plusieurs amélioration mineure du gameplay et de la qualité de vie
This commit is contained in:
parent
a81361abec
commit
52b2df8639
@ -20,6 +20,33 @@ corner_radius_bottom_left = 5
|
|||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_coj8m"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_coj8m"]
|
||||||
size = Vector2(77, 92)
|
size = Vector2(77, 92)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_r6435"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Compost:scale")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0.291262, 0.291262)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("Compost:position")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_1758a"]
|
[sub_resource type="Animation" id="Animation_1758a"]
|
||||||
resource_name = "empty"
|
resource_name = "empty"
|
||||||
length = 0.5
|
length = 0.5
|
||||||
@ -48,33 +75,6 @@ tracks/1/keys = {
|
|||||||
"values": [Vector2(0.291262, 0.291262), Vector2(0.291, 0.191), Vector2(0.291, 0.366), Vector2(0.291262, 0.291262)]
|
"values": [Vector2(0.291262, 0.291262), Vector2(0.291, 0.191), Vector2(0.291, 0.366), Vector2(0.291262, 0.291262)]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_r6435"]
|
|
||||||
length = 0.001
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("Compost:scale")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector2(0.291262, 0.291262)]
|
|
||||||
}
|
|
||||||
tracks/1/type = "value"
|
|
||||||
tracks/1/imported = false
|
|
||||||
tracks/1/enabled = true
|
|
||||||
tracks/1/path = NodePath("Compost:position")
|
|
||||||
tracks/1/interp = 1
|
|
||||||
tracks/1/loop_wrap = true
|
|
||||||
tracks/1/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector2(0, 0)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_etofw"]
|
[sub_resource type="Animation" id="Animation_etofw"]
|
||||||
resource_name = "fill"
|
resource_name = "fill"
|
||||||
length = 0.3
|
length = 0.3
|
||||||
|
|||||||
@ -3,6 +3,61 @@
|
|||||||
[ext_resource type="Script" uid="uid://bmjjpk4lvijws" path="res://entities/plants/scripts/plant_sprite.gd" id="1_pq8o7"]
|
[ext_resource type="Script" uid="uid://bmjjpk4lvijws" path="res://entities/plants/scripts/plant_sprite.gd" id="1_pq8o7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b3wom2xu26g43" path="res://entities/plants/assets/sprites/default_plant_glowing.png" id="2_hyinx"]
|
[ext_resource type="Texture2D" uid="uid://b3wom2xu26g43" path="res://entities/plants/assets/sprites/default_plant_glowing.png" id="2_hyinx"]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_wyuub"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Sprite2D:scale")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0.15, 0.15)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("Sprite2D:skew")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("Sprite2D:modulate")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_j6jm5"]
|
||||||
|
resource_name = "bump"
|
||||||
|
length = 0.5
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Sprite2D:scale")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2, 0.5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0.15, 0.15), Vector2(0.15, 0.075), Vector2(0.15, 0.15)]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_rbgiq"]
|
[sub_resource type="Animation" id="Animation_rbgiq"]
|
||||||
resource_name = "harvest"
|
resource_name = "harvest"
|
||||||
length = 0.2
|
length = 0.2
|
||||||
@ -31,85 +86,6 @@ tracks/1/keys = {
|
|||||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_j6jm5"]
|
|
||||||
resource_name = "bump"
|
|
||||||
length = 0.5
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("Sprite2D:scale")
|
|
||||||
tracks/0/interp = 2
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 0.233333, 0.5),
|
|
||||||
"transitions": PackedFloat32Array(1, 1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector2(0.15, 0.15), Vector2(0.15, 0.075), Vector2(0.15, 0.15)]
|
|
||||||
}
|
|
||||||
tracks/1/type = "value"
|
|
||||||
tracks/1/imported = false
|
|
||||||
tracks/1/enabled = true
|
|
||||||
tracks/1/path = NodePath("Sprite2D:position")
|
|
||||||
tracks/1/interp = 2
|
|
||||||
tracks/1/loop_wrap = true
|
|
||||||
tracks/1/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 0.233333, 0.5),
|
|
||||||
"transitions": PackedFloat32Array(1, 1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector2(0, 0), Vector2(0, 17.475), Vector2(0, 0)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_wyuub"]
|
|
||||||
length = 0.001
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("Sprite2D:scale")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector2(0.15, 0.15)]
|
|
||||||
}
|
|
||||||
tracks/1/type = "value"
|
|
||||||
tracks/1/imported = false
|
|
||||||
tracks/1/enabled = true
|
|
||||||
tracks/1/path = NodePath("Sprite2D:position")
|
|
||||||
tracks/1/interp = 1
|
|
||||||
tracks/1/loop_wrap = true
|
|
||||||
tracks/1/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector2(0, 0)]
|
|
||||||
}
|
|
||||||
tracks/2/type = "value"
|
|
||||||
tracks/2/imported = false
|
|
||||||
tracks/2/enabled = true
|
|
||||||
tracks/2/path = NodePath("Sprite2D:skew")
|
|
||||||
tracks/2/interp = 1
|
|
||||||
tracks/2/loop_wrap = true
|
|
||||||
tracks/2/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [0.0]
|
|
||||||
}
|
|
||||||
tracks/3/type = "value"
|
|
||||||
tracks/3/imported = false
|
|
||||||
tracks/3/enabled = true
|
|
||||||
tracks/3/path = NodePath("Sprite2D:modulate")
|
|
||||||
tracks/3/interp = 1
|
|
||||||
tracks/3/loop_wrap = true
|
|
||||||
tracks/3/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(1, 1, 1, 1)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8eofq"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8eofq"]
|
||||||
_data = {
|
_data = {
|
||||||
&"RESET": SubResource("Animation_wyuub"),
|
&"RESET": SubResource("Animation_wyuub"),
|
||||||
@ -123,6 +99,7 @@ script = ExtResource("1_pq8o7")
|
|||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
scale = Vector2(0.15, 0.15)
|
scale = Vector2(0.15, 0.15)
|
||||||
texture = ExtResource("2_hyinx")
|
texture = ExtResource("2_hyinx")
|
||||||
|
offset = Vector2(0, -100)
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
libraries = {
|
libraries = {
|
||||||
|
|||||||
@ -2,7 +2,6 @@ extends Area2D
|
|||||||
class_name Plant
|
class_name Plant
|
||||||
|
|
||||||
const PLANT_AREA_WIDTH = 10
|
const PLANT_AREA_WIDTH = 10
|
||||||
const PLANT_SPRITE_SCALE = 0.15
|
|
||||||
const HARVESTED_SEED_POSITION_RANGE = 100
|
const HARVESTED_SEED_POSITION_RANGE = 100
|
||||||
|
|
||||||
const RANDOM_MAX_GROW_INTERVAL = 0.4
|
const RANDOM_MAX_GROW_INTERVAL = 0.4
|
||||||
@ -55,8 +54,10 @@ func set_day(d):
|
|||||||
if day == 0:
|
if day == 0:
|
||||||
change_state(State.PLANTED)
|
change_state(State.PLANTED)
|
||||||
if day > plant_type.growing_time:
|
if day > plant_type.growing_time:
|
||||||
|
if state != State.MATURE:
|
||||||
change_state(State.MATURE)
|
change_state(State.MATURE)
|
||||||
else:
|
else:
|
||||||
|
if state != State.GROWING:
|
||||||
change_state(State.GROWING)
|
change_state(State.GROWING)
|
||||||
|
|
||||||
func change_state(_state: State):
|
func change_state(_state: State):
|
||||||
|
|||||||
@ -10,6 +10,7 @@ func apply_texture_to_sprite(texture, with_animation = true):
|
|||||||
$AnimationPlayer.play("bump")
|
$AnimationPlayer.play("bump")
|
||||||
await $AnimationPlayer.animation_finished
|
await $AnimationPlayer.animation_finished
|
||||||
sprite.texture = texture
|
sprite.texture = texture
|
||||||
|
sprite.flip_h = true if randi()%2 == 0 else false
|
||||||
|
|
||||||
func start_harvest_animation():
|
func start_harvest_animation():
|
||||||
$AnimationPlayer.play("harvest")
|
$AnimationPlayer.play("harvest")
|
||||||
|
|||||||
@ -6,7 +6,7 @@ signal action_tried_without_energy
|
|||||||
signal upgraded
|
signal upgraded
|
||||||
|
|
||||||
var planet : Planet # mis à jour par la classe Planet
|
var planet : Planet # mis à jour par la classe Planet
|
||||||
@export var speed = 400
|
@export var speed = 350
|
||||||
|
|
||||||
@onready var inventory : Inventory = Inventory.new()
|
@onready var inventory : Inventory = Inventory.new()
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ func detect_closest_interactable():
|
|||||||
|
|
||||||
in_range_interactables.sort_custom(
|
in_range_interactables.sort_custom(
|
||||||
func(a : Node2D, b : Node2D) :
|
func(a : Node2D, b : Node2D) :
|
||||||
return a.global_position.distance_to(global_position) > b.global_position.distance_to(global_position)
|
return a.global_position.distance_to(global_position) < b.global_position.distance_to(global_position)
|
||||||
)
|
)
|
||||||
|
|
||||||
if len(in_range_interactables) > 0:
|
if len(in_range_interactables) > 0:
|
||||||
|
|||||||
@ -8,7 +8,7 @@ var pause = false :
|
|||||||
get_tree().paused = pause
|
get_tree().paused = pause
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
pause = false
|
pause = true
|
||||||
|
|
||||||
func _input(_event):
|
func _input(_event):
|
||||||
if Input.is_action_just_pressed("pause"):
|
if Input.is_action_just_pressed("pause"):
|
||||||
|
|||||||
@ -2,5 +2,8 @@ extends Node2D
|
|||||||
|
|
||||||
@export_file var start_scene_path : String
|
@export_file var start_scene_path : String
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
%Version.text = ProjectSettings.get_setting("application/config/version")
|
||||||
|
|
||||||
func _on_start_pressed():
|
func _on_start_pressed():
|
||||||
get_tree().change_scene_to_file(start_scene_path)
|
get_tree().change_scene_to_file(start_scene_path)
|
||||||
|
|||||||
@ -71,24 +71,25 @@ text = "Start"
|
|||||||
icon = ExtResource("7_qwhpj")
|
icon = ExtResource("7_qwhpj")
|
||||||
|
|
||||||
[node name="Version" type="Label" parent="CanvasLayer/MarginContainer"]
|
[node name="Version" type="Label" parent="CanvasLayer/MarginContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 8
|
size_flags_horizontal = 8
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
text = "Prototype 1"
|
text = "Version"
|
||||||
|
|
||||||
[node name="Credits" type="Label" parent="CanvasLayer/MarginContainer"]
|
[node name="Credits" type="Label" parent="CanvasLayer/MarginContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 0
|
size_flags_horizontal = 0
|
||||||
size_flags_vertical = 8
|
size_flags_vertical = 8
|
||||||
text = "🎨 Art
|
text = "Art
|
||||||
Céline Ferrand / Lunarde
|
Céline Ferrand / Lunarde
|
||||||
Camille Fleury
|
Camille Fleury
|
||||||
|
|
||||||
🖥️ Development / 🧩 Game Design
|
Development / Game Design
|
||||||
Zacharie Guet / Zink
|
Zacharie Guet / Zink
|
||||||
Victor Robert Jaunet / Altaezio
|
Victor Robert Jaunet / Altaezio
|
||||||
|
|
||||||
🎸 Music
|
Music
|
||||||
Niels / Nilou"
|
Niels / Nilou"
|
||||||
|
|
||||||
[connection signal="pressed" from="CanvasLayer/MarginContainer/Start" to="." method="_on_start_pressed"]
|
[connection signal="pressed" from="CanvasLayer/MarginContainer/Start" to="." method="_on_start_pressed"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user