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

View file

@ -1,13 +1,15 @@
[gd_scene load_steps=20 format=3 uid="uid://pyuorpwb7lpe"]
[gd_scene format=3 uid="uid://pyuorpwb7lpe"]
[ext_resource type="Script" uid="uid://dcrnf4r6c5qaw" path="res://scenes/player.gd" id="1_sweqy"]
[ext_resource type="PackedScene" uid="uid://bwxxdrdvo3le0" path="res://scenes/bullet.tscn" id="2_1jxqw"]
[ext_resource type="Texture2D" uid="uid://ces8fm7lxh574" path="res://_graphics/Mini Pixel Pack 3/Player ship/Boosters (16 x 16).png" id="3_1jxqw"]
[ext_resource type="Shader" uid="uid://dfywtah53il1m" path="res://shaders/player_hit.gdshader" id="3_dw050"]
[ext_resource type="Texture2D" uid="uid://bjdhq42ummgky" path="res://_graphics/Mini Pixel Pack 3/Player ship/Boosters_left (16 x 16).png" id="4_dw050"]
[ext_resource type="Texture2D" uid="uid://42nppsb4mtv8" path="res://sprites/coop.png" id="4_smehm"]
[ext_resource type="Texture2D" uid="uid://cjq40d464xovr" path="res://sprites/david-headless-sprite.png" id="4_smehm"]
[ext_resource type="Texture2D" uid="uid://cjv3xbuj65pav" path="res://_graphics/Mini Pixel Pack 3/Player ship/Boosters_right (16 x 16).png" id="5_b26j0"]
[ext_resource type="PackedScene" uid="uid://4jvu41vu2557" path="res://scenes/explosion.tscn" id="8_dw050"]
[ext_resource type="Texture2D" uid="uid://bnc77g20gb20h" path="res://sprites/david-head.png" id="8_ur7pv"]
[ext_resource type="AudioStream" uid="uid://d3ejo2dfxblsx" path="res://sounds/HeadInflatePOP.wav" id="10_y4r1p"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b26j0"]
shader = ExtResource("3_dw050")
@ -84,27 +86,27 @@ particle_flag_disable_z = true
gravity = Vector3(0, 98, 0)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_op7ga"]
size = Vector2(14, 14)
size = Vector2(14, 12.465912)
[node name="Player" type="Area2D"]
[node name="Player" type="Area2D" unique_id=1628218629]
script = ExtResource("1_sweqy")
bullet_scene = ExtResource("2_1jxqw")
[node name="Ship" type="Sprite2D" parent="." groups=["ship"]]
[node name="Ship" type="Sprite2D" parent="." unique_id=1499605112 groups=["ship"]]
unique_name_in_owner = true
material = SubResource("ShaderMaterial_b26j0")
texture = ExtResource("4_smehm")
hframes = 3
frame = 1
[node name="Boosters" type="AnimatedSprite2D" parent="Ship"]
[node name="Boosters" type="AnimatedSprite2D" parent="Ship" unique_id=1877984106]
visible = false
position = Vector2(0, 15)
sprite_frames = SubResource("SpriteFrames_u1c27")
animation = &"forward"
autoplay = "forward"
[node name="BoosterBurst" type="GPUParticles2D" parent="Ship/Boosters"]
[node name="BoosterBurst" type="GPUParticles2D" parent="Ship/Boosters" unique_id=1873224221]
visible = false
texture_repeat = 2
material = SubResource("CanvasItemMaterial_dw050")
amount = 10
@ -118,16 +120,25 @@ trail_lifetime = 1.85
trail_sections = 2
process_material = SubResource("ParticleProcessMaterial_b26j0")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
[node name="Head" type="Sprite2D" parent="Ship" unique_id=522385006]
position = Vector2(1, -17)
texture = ExtResource("8_ur7pv")
hframes = 3
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1614510161]
position = Vector2(0, -0.4999997)
scale = Vector2(2.0054688, 2.0054688)
shape = SubResource("RectangleShape2D_op7ga")
[node name="GunCooldown" type="Timer" parent="."]
[node name="GunCooldown" type="Timer" parent="." unique_id=831201762]
one_shot = true
[node name="Explosion" parent="." instance=ExtResource("8_dw050")]
[node name="Explosion" parent="." unique_id=321630316 instance=ExtResource("8_dw050")]
visible = false
[node name="HeadInflate" type="AudioStreamPlayer2D" parent="." unique_id=374500278]
stream = ExtResource("10_y4r1p")
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="damage_taken" from="." to="." method="_on_damage_taken"]
[connection signal="timeout" from="GunCooldown" to="." method="_on_gun_cooldown_timeout"]