diff --git a/project.godot b/project.godot index 1035c1a..fb5d8d7 100644 --- a/project.godot +++ b/project.godot @@ -8,11 +8,15 @@ config_version=5 +[animation] + +compatibility/default_parent_skeleton_in_mesh_instance_3d=true + [application] config/name="the third place" run/main_scene="uid://cc2dnhuv4qx7m" -config/features=PackedStringArray("4.5", "Forward Plus") +config/features=PackedStringArray("4.6", "Forward Plus") config/icon="res://icon.svg" [autoload] diff --git a/scenes/bullet.gd b/scenes/bullet.gd index 09dce72..8062cef 100644 --- a/scenes/bullet.gd +++ b/scenes/bullet.gd @@ -16,3 +16,4 @@ func _on_area_entered(area: Area2D) -> void: if area.is_in_group("enemies"): area.explode() queue_free() + diff --git a/scenes/bullet.tscn b/scenes/bullet.tscn index f92b38a..c9d83d0 100644 --- a/scenes/bullet.tscn +++ b/scenes/bullet.tscn @@ -1,23 +1,39 @@ -[gd_scene load_steps=4 format=3 uid="uid://bwxxdrdvo3le0"] +[gd_scene format=3 uid="uid://bwxxdrdvo3le0"] [ext_resource type="Script" uid="uid://c6oorp45vpqpc" path="res://scenes/bullet.gd" id="1_v8qja"] -[ext_resource type="Texture2D" uid="uid://bltpqew3le1j" path="res://_graphics/Mini Pixel Pack 3/Projectiles/Player_charged_beam (16 x 16).png" id="2_t4vbm"] +[ext_resource type="Texture2D" uid="uid://bnc77g20gb20h" path="res://sprites/david-head.png" id="2_y25gk"] +[ext_resource type="Texture2D" uid="uid://dwd6pycecukqb" path="res://sprites/david-headshot.png" id="3_l5glv"] + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_eoqba"] +particle_flag_disable_z = true +gravity = Vector3(0, 98, 0) [sub_resource type="RectangleShape2D" id="RectangleShape2D_2b2rl"] -size = Vector2(12, 10) +size = Vector2(12, 11) -[node name="Bullet" type="Area2D"] +[node name="Bullet" type="Area2D" unique_id=1850257077] script = ExtResource("1_v8qja") -[node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource("2_t4vbm") -hframes = 2 +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=29933687] +position = Vector2(1.1920929e-07, 2.9802322e-07) +scale = Vector2(1.1111112, 1.1764706) +texture = ExtResource("2_y25gk") +hframes = 3 -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(0, -1) +[node name="GPUParticles2D" type="GPUParticles2D" parent="Sprite2D" unique_id=1840545252] +position = Vector2(-1.0728836e-07, -2.5331974e-07) +amount = 2 +texture = ExtResource("3_l5glv") +lifetime = 0.03 +explosiveness = 0.21 +randomness = 0.15 +process_material = SubResource("ParticleProcessMaterial_eoqba") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1297459172] +position = Vector2(0, -0.5) shape = SubResource("RectangleShape2D_2b2rl") -[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] +[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="." unique_id=210965331] [connection signal="area_entered" from="." to="." method="_on_area_entered"] [connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"] diff --git a/scenes/enemy.tscn b/scenes/enemy.tscn index 3cad3ce..38276ef 100644 --- a/scenes/enemy.tscn +++ b/scenes/enemy.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=3 uid="uid://mp72cjiuquik"] +[gd_scene format=3 uid="uid://mp72cjiuquik"] [ext_resource type="Script" uid="uid://xoihsrr4hw4k" path="res://scenes/enemy.gd" id="1_4gyqm"] [ext_resource type="Texture2D" uid="uid://deyu1prtitqcp" path="res://_graphics/Mini Pixel Pack 3/Enemies/Bon_Bon (16 x 16).png" id="1_7k104"] @@ -134,27 +134,25 @@ _data = { &"explode": SubResource("Animation_epg4t") } -[node name="Enemy" type="Area2D" groups=["enemies"]] +[node name="EnemyTest" type="Area2D" unique_id=1433837580 groups=["enemies"]] script = ExtResource("1_4gyqm") -[node name="Sprite2D" type="Sprite2D" parent="."] +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=2115910138] texture = ExtResource("1_7k104") hframes = 4 frame = 2 -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1841693239] shape = SubResource("RectangleShape2D_4gyqm") -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -&"": SubResource("AnimationLibrary_3yqyl") -} -autoplay = "bounce" +[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=505814518] +libraries/ = SubResource("AnimationLibrary_3yqyl") +autoplay = &"bounce" -[node name="MoveTimer" type="Timer" parent="."] +[node name="MoveTimer" type="Timer" parent="." unique_id=1928257014] one_shot = true -[node name="ShootTimer" type="Timer" parent="."] +[node name="ShootTimer" type="Timer" parent="." unique_id=1985644907] one_shot = true [connection signal="timeout" from="MoveTimer" to="." method="_on_timer_timeout"] diff --git a/scenes/enemy_test.tscn b/scenes/enemy_test.tscn new file mode 100644 index 0000000..0d5da26 --- /dev/null +++ b/scenes/enemy_test.tscn @@ -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"] diff --git a/scenes/main.gd b/scenes/main.gd index 7cc79d3..c7506be 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -3,7 +3,9 @@ extends Node2D var enemy = preload("res://scenes/enemy.tscn") var player = preload("res://scenes/player.tscn") var instance = null -var playing = false +var playing: bool = false + +var enemy_wave: int var enemy_count: int = 0: set(value): if value < 0: @@ -29,6 +31,8 @@ func _ready(): func spawn_enemies(): # print("Remaining enemies: ", enemy_count) # await get_tree().process_frame + enemy_wave += 1 + print("Enemy Wave: ", enemy_wave) for x in range(COLS): for y in range(ROWS): var e = enemy.instantiate() @@ -46,7 +50,9 @@ func _on_enemy_died(): print_debug(enemy_count) if enemy_count == 0: print_debug("Remaining enemies: ", enemy_count, ", ", get_tree().get_nodes_in_group("enemies").size()) - win_game() + # win_game() + await get_tree().create_timer(2).timeout + spawn_enemies() if enemy_count == ROWS * COLS / 2: print_debug("Enemy count is 50%") update_enemy_aggression(2,10) @@ -87,6 +93,7 @@ func new_game(): get_tree().call_group("enemy_bullets", "queue_free") # print("Number of enemies at new_game: ",enemy_count) enemy_count = 0 + enemy_wave = 0 await get_tree().process_frame # Reset score. diff --git a/scenes/main.tscn b/scenes/main.tscn index f09e66b..8ab010b 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=3 uid="uid://cc2dnhuv4qx7m"] +[gd_scene format=3 uid="uid://cc2dnhuv4qx7m"] [ext_resource type="Script" uid="uid://c51huloycn5as" path="res://scenes/main.gd" id="1_h2yge"] [ext_resource type="PackedScene" uid="uid://tlcdxoupi2lb" path="res://scenes/parallax_starfield.tscn" id="2_5vw27"] @@ -58,24 +58,22 @@ shader_parameter/pixelate_line = 0 [sub_resource type="ShaderMaterial" id="ShaderMaterial_5vw27"] -[node name="Main" type="Node2D"] +[node name="Main" type="Node2D" unique_id=128010797] script = ExtResource("1_h2yge") -[node name="Parallax Starfield" parent="." instance=ExtResource("2_5vw27")] +[node name="Parallax Starfield" parent="." unique_id=571002326 instance=ExtResource("2_5vw27")] -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -&"": SubResource("AnimationLibrary_lquwl") -} -autoplay = "scroll" +[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=122041916] +libraries/ = SubResource("AnimationLibrary_lquwl") +autoplay = &"scroll" -[node name="CanvasLayer" type="CanvasLayer" parent="."] +[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1849605109] -[node name="UI" parent="CanvasLayer" instance=ExtResource("4_1bvp3")] +[node name="UI" parent="CanvasLayer" unique_id=1138646344 instance=ExtResource("4_1bvp3")] offset_right = 196.0 offset_bottom = 36.0 -[node name="Title" type="TextureRect" parent="CanvasLayer"] +[node name="Title" type="TextureRect" parent="CanvasLayer" unique_id=561106216] self_modulate = Color(0.015236704, 0.015236706, 0.0152367065, 1) material = SubResource("ShaderMaterial_kek77") offset_left = 50.0 @@ -84,22 +82,22 @@ offset_right = 146.0 offset_bottom = 117.0 texture = ExtResource("5_tipki") -[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer"] +[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer" unique_id=1787047882] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -[node name="Start" type="TextureButton" parent="CanvasLayer/CenterContainer"] +[node name="Start" type="TextureButton" parent="CanvasLayer/CenterContainer" unique_id=735420279] layout_mode = 2 texture_normal = ExtResource("5_lquwl") -[node name="GameOver" type="TextureRect" parent="CanvasLayer/CenterContainer"] +[node name="GameOver" type="TextureRect" parent="CanvasLayer/CenterContainer" unique_id=2025679102] layout_mode = 2 texture = ExtResource("6_7mycd") -[node name="background" type="Sprite2D" parent="."] +[node name="background" type="Sprite2D" parent="." unique_id=1790434669] z_index = -4 texture_repeat = 2 material = SubResource("ShaderMaterial_5vw27") diff --git a/scenes/player.gd b/scenes/player.gd index c12bdd1..ca366cf 100644 --- a/scenes/player.gd +++ b/scenes/player.gd @@ -6,7 +6,7 @@ signal damage_taken # signal shield_ui @export var speed: int = 150 -@export var cooldown: float = 0.25 +@export var cooldown: float = 1 @export var bullet_scene : PackedScene @export var max_shield: int = 10 var shield: int = 0: @@ -36,7 +36,7 @@ func _ready(): func start(): print(shield) shader_active = false - $Ship.frame = 1 + $Ship.frame = 0 # $Ship/Boosters/BoosterBurst.hide() # $Ship/Boosters.hide() $Ship.show() @@ -57,13 +57,16 @@ func _process(delta): var input = Input.get_vector("left", "right", "up", "down") if input.x > 0: $Ship.frame = 2 + $Ship/Head.frame = 2 # $Ship/Boosters.animation = "right" elif input.x < 0: - $Ship.frame = 0 + $Ship.frame = 1 + $Ship/Head.frame = 1 # $Ship/Boosters.animation = "left" else: - $Ship.frame = 1 + $Ship.frame = 0 $Ship/Boosters.animation = "forward" + $Ship/Head.frame = 0 position += input * speed * delta position = position.clamp(Vector2(8, 8), screensize - Vector2(8, 8)) if Input.is_action_pressed("shoot"): @@ -74,6 +77,7 @@ func shoot(): return can_shoot = false $GunCooldown.start() + $Ship/Head.hide() var b = bullet_scene.instantiate() get_tree().root.add_child(b) b.start(position + ship.position + Vector2(0, -10)) @@ -98,6 +102,14 @@ func set_shield(value: int): func _on_gun_cooldown_timeout() -> void: + $HeadInflate.play() + #tween.tween_property($Ship/Head, "scale", 4, 0.25) + #await tween.finished + await get_tree().create_timer(0.25).timeout + var tween = create_tween().set_parallel(false) + $Ship/Head.show() + tween.tween_property($Ship/Head, "scale", Vector2(2,2), .15).set_trans(Tween.TRANS_BOUNCE) + tween.tween_property($Ship/Head, "scale", Vector2(1,1), .10).set_trans(Tween.TRANS_BOUNCE) can_shoot = true func _on_area_entered(area): diff --git a/scenes/player.tscn b/scenes/player.tscn index 669ad71..3c81894 100644 --- a/scenes/player.tscn +++ b/scenes/player.tscn @@ -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"] diff --git a/sounds/HeadInflatePOP.wav b/sounds/HeadInflatePOP.wav new file mode 100644 index 0000000..d2edcb6 Binary files /dev/null and b/sounds/HeadInflatePOP.wav differ diff --git a/sounds/HeadInflatePOP.wav.import b/sounds/HeadInflatePOP.wav.import new file mode 100644 index 0000000..7a2eb4c --- /dev/null +++ b/sounds/HeadInflatePOP.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://d3ejo2dfxblsx" +path="res://.godot/imported/HeadInflatePOP.wav-ad93e386eda46867e419d62e8df3e7ac.sample" + +[deps] + +source_file="res://sounds/HeadInflatePOP.wav" +dest_files=["res://.godot/imported/HeadInflatePOP.wav-ad93e386eda46867e419d62e8df3e7ac.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/sprites/david-head.png b/sprites/david-head.png new file mode 100644 index 0000000..838a3de Binary files /dev/null and b/sprites/david-head.png differ diff --git a/sprites/david-head.png.import b/sprites/david-head.png.import new file mode 100644 index 0000000..c88c0f3 --- /dev/null +++ b/sprites/david-head.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bnc77g20gb20h" +path="res://.godot/imported/david-head.png-3fc14615e7410fbe172a768e810dbd1e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/david-head.png" +dest_files=["res://.godot/imported/david-head.png-3fc14615e7410fbe172a768e810dbd1e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/david-headless-sprite.png b/sprites/david-headless-sprite.png new file mode 100644 index 0000000..128de36 Binary files /dev/null and b/sprites/david-headless-sprite.png differ diff --git a/sprites/david-headless-sprite.png.import b/sprites/david-headless-sprite.png.import new file mode 100644 index 0000000..c73621e --- /dev/null +++ b/sprites/david-headless-sprite.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjq40d464xovr" +path="res://.godot/imported/david-headless-sprite.png-b48933a48d1fca98d1e6af59d891a75d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/david-headless-sprite.png" +dest_files=["res://.godot/imported/david-headless-sprite.png-b48933a48d1fca98d1e6af59d891a75d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/david-headshot.png b/sprites/david-headshot.png new file mode 100644 index 0000000..f1c979b Binary files /dev/null and b/sprites/david-headshot.png differ diff --git a/sprites/david-headshot.png.import b/sprites/david-headshot.png.import new file mode 100644 index 0000000..3bf08a7 --- /dev/null +++ b/sprites/david-headshot.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dwd6pycecukqb" +path="res://.godot/imported/david-headshot.png-13da436758ece3b09e7aa54a2545744e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/david-headshot.png" +dest_files=["res://.godot/imported/david-headshot.png-13da436758ece3b09e7aa54a2545744e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1