Added head-shooting and regeneration feature to player; added first

draft of Maggie's sounds.
This commit is contained in:
Henry 2026-02-11 15:04:59 +00:00
parent accc463791
commit 2cc08692fd
17 changed files with 470 additions and 54 deletions

225
scenes/enemy_test.tscn Normal file
View file

@ -0,0 +1,225 @@
[gd_scene format=3 uid="uid://drwm27rxxpq3t"]
[ext_resource type="Script" uid="uid://xoihsrr4hw4k" path="res://scenes/enemy.gd" id="1_ainam"]
[ext_resource type="Texture2D" uid="uid://deyu1prtitqcp" path="res://_graphics/Mini Pixel Pack 3/Enemies/Bon_Bon (16 x 16).png" id="2_mo2s0"]
[ext_resource type="Texture2D" uid="uid://h04wm5a27u0" path="res://_graphics/Mini Pixel Pack 3/Effects/Explosion (16 x 16).png" id="3_1yn4p"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4gyqm"]
size = Vector2(14, 8)
[sub_resource type="Animation" id="Animation_iifgy"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_mo2s0")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [4]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [2]
}
[sub_resource type="Animation" id="Animation_qi2p4"]
resource_name = "bounce"
loop_mode = 1
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_mo2s0")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [4]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1023555, 0.2, 0.3, 0.35),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [2, 1, 0, 3, 0]
}
[sub_resource type="Animation" id="Animation_epg4t"]
resource_name = "explode"
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 4, 5]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:texture")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_1yn4p")]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:hframes")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [6]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_3yqyl"]
_data = {
&"RESET": SubResource("Animation_iifgy"),
&"bounce": SubResource("Animation_qi2p4"),
&"explode": SubResource("Animation_epg4t")
}
[sub_resource type="Animation" id="Animation_ainam"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_mo2s0"]
resource_name = "wiggle"
length = 3.0
loop_mode = 1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 2, 0, 2, 2),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 8, -0.16666667, 0, 0.083333336, 0, 0, -0.16666667, 0, 0, 0, -7, -0.083333336, 1.1666667, 0, 0, 0, -0.16666667, -1.1666667, 0, 0),
"times": PackedFloat32Array(0, 1, 1.5, 2, 3)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:position:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 2, 0, 2, 2),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 7.162058, -0.16666667, -1.3333334, 0.083333336, 0.6666667, 12, -0.16666667, -2, 0, 0, 8, -0.083333336, 0.6666667, 0, 0, 0, -0.16666667, 1.3333334, 0, 0),
"times": PackedFloat32Array(0, 1, 1.5, 2, 3)
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_1yn4p"]
_data = {
&"RESET": SubResource("Animation_ainam"),
&"wiggle": SubResource("Animation_mo2s0")
}
[sub_resource type="Curve2D" id="Curve2D_1yn4p"]
_data = {
"points": PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, -13, 0, 0, 0, 0, 30, 9, 0, 0, 0, 0, 10, 23, 8.891694, -1.4366493, -8.891694, 1.4366493, 0, 27, 0, 0, 0, 0, -18, 7, 0, 0, 0, 0, -14, -11, 0, 0, 0, 0, 0, 0)
}
point_count = 8
[node name="EnemyTest" type="Area2D" unique_id=1433837580 groups=["enemies"]]
script = ExtResource("1_ainam")
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=2115910138]
texture = ExtResource("2_mo2s0")
hframes = 4
frame = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1841693239]
shape = SubResource("RectangleShape2D_4gyqm")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=505814518]
libraries/ = SubResource("AnimationLibrary_3yqyl")
autoplay = &"bounce"
[node name="AnimationWiggle" type="AnimationPlayer" parent="." unique_id=800893512]
libraries/ = SubResource("AnimationLibrary_1yn4p")
autoplay = &"MoveAlongPath"
[node name="MoveTimer" type="Timer" parent="." unique_id=1928257014]
one_shot = true
[node name="ShootTimer" type="Timer" parent="." unique_id=1985644907]
one_shot = true
[node name="Path2D" type="Path2D" parent="." unique_id=1830415709]
visible = false
curve = SubResource("Curve2D_1yn4p")
[node name="PathFollow2D" type="PathFollow2D" parent="Path2D" unique_id=1294967533]
visible = false
rotation = -0.7140907
[connection signal="timeout" from="MoveTimer" to="." method="_on_timer_timeout"]
[connection signal="timeout" from="ShootTimer" to="." method="_on_shoot_timer_timeout"]