Update bee animations, game over component UI, and game state handling. Set up game over conditions based on the number of dead bees.
This commit is contained in:
parent
2a4a578f19
commit
f4e2169009
11 changed files with 203 additions and 37 deletions
|
|
@ -13,30 +13,6 @@
|
|||
[ext_resource type="Texture2D" uid="uid://bsskcrayofs8n" path="res://resources/textures/bee_wings.png" id="11_utbwk"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2jr0mt5xymog" path="res://resources/particles/smoke_01.png" id="12_52rft"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_iys4n"]
|
||||
resource_name = "Flying"
|
||||
length = 5.0
|
||||
loop_mode = 1
|
||||
step = 0.25
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("BeeBody:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 2, 3, 4, 5),
|
||||
"transitions": PackedFloat32Array(-2, -2, -2, -2, -2, -2),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(0, 10), Vector2(0, 5), Vector2(0, -5), Vector2(0, 10), Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_t75ra"]
|
||||
resource_name = "Idle"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_0encb"]
|
||||
length = 0.001
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1dh34"]
|
||||
resource_name = "Death"
|
||||
length = 2.0
|
||||
|
|
@ -116,6 +92,30 @@ tracks/5/keys = {
|
|||
"values": [true, false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_iys4n"]
|
||||
resource_name = "Flying"
|
||||
length = 5.0
|
||||
loop_mode = 1
|
||||
step = 0.25
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("BeeBody:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 2, 3, 4, 5),
|
||||
"transitions": PackedFloat32Array(-2, -2, -2, -2, -2, -2),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(0, 10), Vector2(0, 5), Vector2(0, -5), Vector2(0, 10), Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_t75ra"]
|
||||
resource_name = "Idle"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_0encb"]
|
||||
length = 0.001
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_m27po"]
|
||||
_data = {
|
||||
"Death": SubResource("Animation_1dh34"),
|
||||
|
|
@ -202,8 +202,8 @@ script = ExtResource("7_6qlbu")
|
|||
script = ExtResource("8_dptvu")
|
||||
|
||||
[node name="BeeBody" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, 10.0475)
|
||||
rotation = 0.378783
|
||||
position = Vector2(0, 50)
|
||||
rotation = 1.5708
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("10_yi42o")
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ scale = Vector2(0.07, 0.04)
|
|||
texture = ExtResource("10_yi42o")
|
||||
|
||||
[node name="ImpactCloud" type="CPUParticles2D" parent="."]
|
||||
self_modulate = Color(1, 1, 1, 0)
|
||||
self_modulate = Color(1, 1, 1, 0.333333)
|
||||
position = Vector2(0, 50)
|
||||
texture = ExtResource("12_52rft")
|
||||
gravity = Vector2(0, 0)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ class_name BeeDeath
|
|||
|
||||
|
||||
func enter(_msg := {}):
|
||||
GameState.bee_died()
|
||||
bee.bee_position_animation.play("Death")
|
||||
bee.bee_wing_animation.stop()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue