diff --git a/audio/music/04 - Stage 2 (Purple Sea).mp3 b/audio/music/04 - Stage 2 (Purple Sea).mp3 new file mode 100644 index 0000000..42a1719 Binary files /dev/null and b/audio/music/04 - Stage 2 (Purple Sea).mp3 differ diff --git a/audio/music/04 - Stage 2 (Purple Sea).mp3.import b/audio/music/04 - Stage 2 (Purple Sea).mp3.import new file mode 100644 index 0000000..05b8d52 --- /dev/null +++ b/audio/music/04 - Stage 2 (Purple Sea).mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://dftw8ufcgjbft" +path="res://.godot/imported/04 - Stage 2 (Purple Sea).mp3-710db0d0b8088163f775b6c699b20730.mp3str" + +[deps] + +source_file="res://audio/music/04 - Stage 2 (Purple Sea).mp3" +dest_files=["res://.godot/imported/04 - Stage 2 (Purple Sea).mp3-710db0d0b8088163f775b6c699b20730.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/audio/sounds/boss_hit.ogg b/audio/sounds/boss_hit.ogg new file mode 100644 index 0000000..b542f1e Binary files /dev/null and b/audio/sounds/boss_hit.ogg differ diff --git a/audio/sounds/boss_hit.ogg.import b/audio/sounds/boss_hit.ogg.import new file mode 100644 index 0000000..7c89c54 --- /dev/null +++ b/audio/sounds/boss_hit.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dwffpsx7xlfla" +path="res://.godot/imported/boss_hit.ogg-32f58a5f1dbf729aec9053d52888c004.oggvorbisstr" + +[deps] + +source_file="res://audio/sounds/boss_hit.ogg" +dest_files=["res://.godot/imported/boss_hit.ogg-32f58a5f1dbf729aec9053d52888c004.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/audio/sounds/hit.wav b/audio/sounds/hit.wav new file mode 100644 index 0000000..f841148 Binary files /dev/null and b/audio/sounds/hit.wav differ diff --git a/audio/sounds/hit.wav.import b/audio/sounds/hit.wav.import new file mode 100644 index 0000000..14f8a85 --- /dev/null +++ b/audio/sounds/hit.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cq0nb3guhb6l" +path="res://.godot/imported/hit.wav-4eef56122848f5bd20bb2d6449501ca8.sample" + +[deps] + +source_file="res://audio/sounds/hit.wav" +dest_files=["res://.godot/imported/hit.wav-4eef56122848f5bd20bb2d6449501ca8.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/audio/sounds/spawn_bullet.ogg b/audio/sounds/spawn_bullet.ogg new file mode 100644 index 0000000..0bee10f Binary files /dev/null and b/audio/sounds/spawn_bullet.ogg differ diff --git a/audio/sounds/spawn_bullet.ogg.import b/audio/sounds/spawn_bullet.ogg.import new file mode 100644 index 0000000..c109a60 --- /dev/null +++ b/audio/sounds/spawn_bullet.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://7uoa8xk6dgru" +path="res://.godot/imported/spawn_bullet.ogg-3b1c7ab4f6024ad9dd9015dfaa962ead.oggvorbisstr" + +[deps] + +source_file="res://audio/sounds/spawn_bullet.ogg" +dest_files=["res://.godot/imported/spawn_bullet.ogg-3b1c7ab4f6024ad9dd9015dfaa962ead.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/audio/sounds/spawn_bullet_2.ogg b/audio/sounds/spawn_bullet_2.ogg new file mode 100644 index 0000000..088a8b4 Binary files /dev/null and b/audio/sounds/spawn_bullet_2.ogg differ diff --git a/audio/sounds/spawn_bullet_2.ogg.import b/audio/sounds/spawn_bullet_2.ogg.import new file mode 100644 index 0000000..dd8135e --- /dev/null +++ b/audio/sounds/spawn_bullet_2.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://ct7yjy0e5kb02" +path="res://.godot/imported/spawn_bullet_2.ogg-fdfdbbc4d1daf53f7393ab552036ef49.oggvorbisstr" + +[deps] + +source_file="res://audio/sounds/spawn_bullet_2.ogg" +dest_files=["res://.godot/imported/spawn_bullet_2.ogg-fdfdbbc4d1daf53f7393ab552036ef49.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/boss_hit.wav b/boss_hit.wav new file mode 100644 index 0000000..a021016 Binary files /dev/null and b/boss_hit.wav differ diff --git a/boss_hit.wav.import b/boss_hit.wav.import new file mode 100644 index 0000000..d758bd9 --- /dev/null +++ b/boss_hit.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://d0df30y2hpcl" +path="res://.godot/imported/boss_hit.wav-2266805a9f22226c0503eb25d25da32f.sample" + +[deps] + +source_file="res://boss_hit.wav" +dest_files=["res://.godot/imported/boss_hit.wav-2266805a9f22226c0503eb25d25da32f.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/graphics/boss_sprites/tesu.png b/graphics/boss_sprites/tesu.png new file mode 100644 index 0000000..42b869e Binary files /dev/null and b/graphics/boss_sprites/tesu.png differ diff --git a/graphics/boss_sprites/tesu.png.import b/graphics/boss_sprites/tesu.png.import new file mode 100644 index 0000000..6c1d052 --- /dev/null +++ b/graphics/boss_sprites/tesu.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://y0c5cddwa216" +path="res://.godot/imported/tesu.png-3fdb71fc57d9b258a2c3dc2bcbb4ebba.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/boss_sprites/tesu.png" +dest_files=["res://.godot/imported/tesu.png-3fdb71fc57d9b258a2c3dc2bcbb4ebba.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/graphics/bullets/normal_bullet/bullet_1.png b/graphics/bullets/normal_bullet/bullet_1.png new file mode 100644 index 0000000..f7457f7 Binary files /dev/null and b/graphics/bullets/normal_bullet/bullet_1.png differ diff --git a/graphics/bullets/normal_bullet/bullet_1.png.import b/graphics/bullets/normal_bullet/bullet_1.png.import new file mode 100644 index 0000000..56b8b28 --- /dev/null +++ b/graphics/bullets/normal_bullet/bullet_1.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://du7gh3nk66mpo" +path="res://.godot/imported/bullet_1.png-65c804efaa6e8cc5691fe6ba5e4676fa.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/bullets/normal_bullet/bullet_1.png" +dest_files=["res://.godot/imported/bullet_1.png-65c804efaa6e8cc5691fe6ba5e4676fa.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/graphics/bullets/normal_bullet/bullet_2.png b/graphics/bullets/normal_bullet/bullet_2.png new file mode 100644 index 0000000..31a4c9a Binary files /dev/null and b/graphics/bullets/normal_bullet/bullet_2.png differ diff --git a/graphics/bullets/normal_bullet/bullet_2.png.import b/graphics/bullets/normal_bullet/bullet_2.png.import new file mode 100644 index 0000000..cb1cd67 --- /dev/null +++ b/graphics/bullets/normal_bullet/bullet_2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://xe124f1kgf3x" +path="res://.godot/imported/bullet_2.png-5544e7fdf280c4eaf05d566d0e3e7292.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/bullets/normal_bullet/bullet_2.png" +dest_files=["res://.godot/imported/bullet_2.png-5544e7fdf280c4eaf05d566d0e3e7292.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/graphics/bullets/normal_bullet/bullet_3.png b/graphics/bullets/normal_bullet/bullet_3.png new file mode 100644 index 0000000..a9c3702 Binary files /dev/null and b/graphics/bullets/normal_bullet/bullet_3.png differ diff --git a/graphics/bullets/normal_bullet/bullet_3.png.import b/graphics/bullets/normal_bullet/bullet_3.png.import new file mode 100644 index 0000000..51bc2eb --- /dev/null +++ b/graphics/bullets/normal_bullet/bullet_3.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bqn0smy2jio3y" +path="res://.godot/imported/bullet_3.png-7da526c2221ae66f430687e96fd9b7e3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/bullets/normal_bullet/bullet_3.png" +dest_files=["res://.godot/imported/bullet_3.png-7da526c2221ae66f430687e96fd9b7e3.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/graphics/bullets/normal_bullet/bullet_core_1.png b/graphics/bullets/normal_bullet/bullet_core_1.png new file mode 100644 index 0000000..3f0032d Binary files /dev/null and b/graphics/bullets/normal_bullet/bullet_core_1.png differ diff --git a/graphics/bullets/normal_bullet/bullet_core_1.png.import b/graphics/bullets/normal_bullet/bullet_core_1.png.import new file mode 100644 index 0000000..32193f1 --- /dev/null +++ b/graphics/bullets/normal_bullet/bullet_core_1.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cenv3e67bv5fl" +path="res://.godot/imported/bullet_core_1.png-f480755db50bc3e322204b23589a579e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/bullets/normal_bullet/bullet_core_1.png" +dest_files=["res://.godot/imported/bullet_core_1.png-f480755db50bc3e322204b23589a579e.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/graphics/bullets/normal_bullet/bullet_core_2.png b/graphics/bullets/normal_bullet/bullet_core_2.png new file mode 100644 index 0000000..0f5eff4 Binary files /dev/null and b/graphics/bullets/normal_bullet/bullet_core_2.png differ diff --git a/graphics/bullets/normal_bullet/bullet_core_2.png.import b/graphics/bullets/normal_bullet/bullet_core_2.png.import new file mode 100644 index 0000000..f8d28a1 --- /dev/null +++ b/graphics/bullets/normal_bullet/bullet_core_2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://4a633mudwp4q" +path="res://.godot/imported/bullet_core_2.png-8ef866278c360e1e31db8548a72c4aa4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/bullets/normal_bullet/bullet_core_2.png" +dest_files=["res://.godot/imported/bullet_core_2.png-8ef866278c360e1e31db8548a72c4aa4.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/objects/bosses/tesu.gd b/objects/bosses/tesu.gd new file mode 100644 index 0000000..aee9966 --- /dev/null +++ b/objects/bosses/tesu.gd @@ -0,0 +1,14 @@ +extends Node2D + +var health = 100.0 + +func _on_area_2d_area_entered(area: Area2D) -> void: + %HurtSound.play() + health -= 0.25 + print(%Movements.current_animation) + if health < 50.0 && health >= 25.0 && %Movements.current_animation != "midway_left": + %Movements.play("midway_left") + + if health < 25.0 && %Movements.current_animation != "pinch": + %Movements.play("pinch") + %AnimationPlayer.play("hurt") diff --git a/objects/bosses/tesu.gd.uid b/objects/bosses/tesu.gd.uid new file mode 100644 index 0000000..f5c148b --- /dev/null +++ b/objects/bosses/tesu.gd.uid @@ -0,0 +1 @@ +uid://cv578r7dikm6r diff --git a/objects/bosses/tesu.tscn b/objects/bosses/tesu.tscn new file mode 100644 index 0000000..24f3b0c --- /dev/null +++ b/objects/bosses/tesu.tscn @@ -0,0 +1,163 @@ +[gd_scene load_steps=14 format=3 uid="uid://b1rm2x7lofhkm"] + +[ext_resource type="Script" uid="uid://cv578r7dikm6r" path="res://objects/bosses/tesu.gd" id="1_aikw2"] +[ext_resource type="Texture2D" uid="uid://y0c5cddwa216" path="res://graphics/boss_sprites/tesu.png" id="1_h31ol"] +[ext_resource type="AudioStream" uid="uid://dwffpsx7xlfla" path="res://audio/sounds/boss_hit.ogg" id="3_aikw2"] +[ext_resource type="PackedScene" uid="uid://cciq2vk8sex8w" path="res://objects/bullet_emitter/test_bullet_emitter.tscn" id="4_jhpyq"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_1r8x3"] +size = Vector2(33, 35) + +[sub_resource type="Curve" id="Curve_aikw2"] +_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.13380282, 1), 0.0, 0.0, 0, 0, Vector2(0.42957747, 0.6778524), 0.0, 0.0, 0, 0, Vector2(0.64084506, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 5 + +[sub_resource type="Animation" id="Animation_jhpyq"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Body/Sprite2D:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} + +[sub_resource type="Animation" id="Animation_aikw2"] +resource_name = "hurt" +length = 0.2 +step = 0.0333333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Body/Sprite2D:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 0, 0, 1), Color(1, 1, 1, 1)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_1r8x3"] +_data = { +&"RESET": SubResource("Animation_jhpyq"), +&"hurt": SubResource("Animation_aikw2") +} + +[sub_resource type="Animation" id="Animation_smtp5"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Body: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_1r8x3"] +resource_name = "midway_left" +length = 7.0 +loop_mode = 1 +step = 0.0333333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Body:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1, 2.5, 3.0333333, 4.1, 5, 6.4333334, 7), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), +"update": 0, +"values": [Vector2(0, 0), Vector2(-80, 0), Vector2(-80, 0), Vector2(0, 0), Vector2(0, 0), Vector2(80, 0), Vector2(80, 0), Vector2(0, 0)] +} + +[sub_resource type="Animation" id="Animation_sppxf"] +resource_name = "pinch" +length = 4.0 +loop_mode = 1 +step = 0.0333333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Body:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.96666664, 2, 3, 4), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 0, +"values": [Vector2(0, 0), Vector2(-80, 0), Vector2(0, 0), Vector2(80, 0), Vector2(0, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_sppxf"] +_data = { +&"RESET": SubResource("Animation_smtp5"), +&"midway_left": SubResource("Animation_1r8x3"), +&"pinch": SubResource("Animation_sppxf") +} + +[node name="Tesu" type="Node2D"] +script = ExtResource("1_aikw2") + +[node name="Body" type="Node2D" parent="."] + +[node name="Sprite2D" type="Sprite2D" parent="Body"] +texture = ExtResource("1_h31ol") + +[node name="Area2D" type="Area2D" parent="Body"] +collision_mask = 4 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Body/Area2D"] +position = Vector2(-0.5, 0.5) +shape = SubResource("RectangleShape2D_1r8x3") + +[node name="TestBulletEmitter" parent="Body" instance=ExtResource("4_jhpyq")] + +[node name="HurtSound" type="AudioStreamPlayer" parent="."] +unique_name_in_owner = true +stream = ExtResource("3_aikw2") + +[node name="CPUParticles2D" type="CPUParticles2D" parent="."] +unique_name_in_owner = true +visible = false +emitting = false +amount = 3 +lifetime = 0.2 +one_shot = true +explosiveness = 0.31 +randomness = 1.0 +direction = Vector2(1, 1) +spread = 147.5 +initial_velocity_min = 225.0 +initial_velocity_max = 225.0 +angle_max = 286.0 +scale_amount_min = 3.0 +scale_amount_max = 3.0 +scale_amount_curve = SubResource("Curve_aikw2") +color = Color(1, 0, 0.22352941, 1) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +unique_name_in_owner = true +libraries = { +&"": SubResource("AnimationLibrary_1r8x3") +} + +[node name="Movements" type="AnimationPlayer" parent="."] +unique_name_in_owner = true +libraries = { +&"": SubResource("AnimationLibrary_sppxf") +} + +[connection signal="area_entered" from="Body/Area2D" to="." method="_on_area_2d_area_entered"] diff --git a/objects/bullet_emitter/bullet_emitter.gd b/objects/bullet_emitter/bullet_emitter.gd new file mode 100644 index 0000000..4675b0d --- /dev/null +++ b/objects/bullet_emitter/bullet_emitter.gd @@ -0,0 +1,10 @@ +class_name BulletEmitter extends Node2D + +@export var is_player_bullet = false +@export var bullet_type: PackedScene + +func emit_bullets(): + var SpawnedBullet = bullet_type.instantiate() + SpawnedBullet.is_player_bullet = is_player_bullet + SpawnedBullet.global_position = global_position + get_owner().get_owner().add_child(SpawnedBullet) diff --git a/objects/bullet_emitter/bullet_emitter.gd.uid b/objects/bullet_emitter/bullet_emitter.gd.uid new file mode 100644 index 0000000..5ee0f50 --- /dev/null +++ b/objects/bullet_emitter/bullet_emitter.gd.uid @@ -0,0 +1 @@ +uid://dgckw2ixj2mu5 diff --git a/objects/bullet_emitter/bullet_emitter.tscn b/objects/bullet_emitter/bullet_emitter.tscn new file mode 100644 index 0000000..0fd2285 --- /dev/null +++ b/objects/bullet_emitter/bullet_emitter.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://coijpuakhr7ux"] + +[ext_resource type="Script" uid="uid://dgckw2ixj2mu5" path="res://objects/bullet_emitter/bullet_emitter.gd" id="1_hjn36"] + +[node name="BulletEmitter" type="Node2D"] +script = ExtResource("1_hjn36") diff --git a/objects/bullet_emitter/test_bullet_emitter.gd b/objects/bullet_emitter/test_bullet_emitter.gd new file mode 100644 index 0000000..99bd4f6 --- /dev/null +++ b/objects/bullet_emitter/test_bullet_emitter.gd @@ -0,0 +1,7 @@ +extends BulletEmitter + + +func _on_timer_timeout() -> void: + for i in range(10): + emit_bullets() + %AudioStreamPlayer.play() diff --git a/objects/bullet_emitter/test_bullet_emitter.gd.uid b/objects/bullet_emitter/test_bullet_emitter.gd.uid new file mode 100644 index 0000000..fd585c7 --- /dev/null +++ b/objects/bullet_emitter/test_bullet_emitter.gd.uid @@ -0,0 +1 @@ +uid://vwpwjsd5e11o diff --git a/objects/bullet_emitter/test_bullet_emitter.tscn b/objects/bullet_emitter/test_bullet_emitter.tscn new file mode 100644 index 0000000..be1f2f7 --- /dev/null +++ b/objects/bullet_emitter/test_bullet_emitter.tscn @@ -0,0 +1,21 @@ +[gd_scene load_steps=4 format=3 uid="uid://cciq2vk8sex8w"] + +[ext_resource type="Script" uid="uid://vwpwjsd5e11o" path="res://objects/bullet_emitter/test_bullet_emitter.gd" id="1_qnpsh"] +[ext_resource type="PackedScene" uid="uid://je8ntnqgk0p6" path="res://objects/bullet_types/test_bullet.tscn" id="2_jdxi1"] +[ext_resource type="AudioStream" uid="uid://ct7yjy0e5kb02" path="res://audio/sounds/spawn_bullet_2.ogg" id="3_6pw22"] + +[node name="TestBulletEmitter" type="Node2D"] +script = ExtResource("1_qnpsh") +bullet_type = ExtResource("2_jdxi1") +metadata/_custom_type_script = "uid://dgckw2ixj2mu5" + +[node name="Timer" type="Timer" parent="."] +wait_time = 0.5 +autostart = true + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +unique_name_in_owner = true +stream = ExtResource("3_6pw22") +volume_db = -5.0 + +[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] diff --git a/objects/bullet_types/bullet.gd b/objects/bullet_types/bullet.gd new file mode 100644 index 0000000..a68e649 --- /dev/null +++ b/objects/bullet_types/bullet.gd @@ -0,0 +1,3 @@ +class_name Bullet extends Node2D + +@export var is_player_bullet = false diff --git a/objects/bullet_types/bullet.gd.uid b/objects/bullet_types/bullet.gd.uid new file mode 100644 index 0000000..224ec19 --- /dev/null +++ b/objects/bullet_types/bullet.gd.uid @@ -0,0 +1 @@ +uid://bacbwjan886y1 diff --git a/objects/bullet_types/test_bullet.gd b/objects/bullet_types/test_bullet.gd new file mode 100644 index 0000000..c8c5efe --- /dev/null +++ b/objects/bullet_types/test_bullet.gd @@ -0,0 +1,14 @@ +extends Bullet + +var speed = Vector2.ZERO +var bullet_speed = 2 +var angle = randf_range(-360,360) +var colors = [Color.RED,Color.BLUE,Color.GREEN,Color.YELLOW,] + +func _ready() -> void: + var color_choice = randi_range(0,colors.size() - 1) + $Sprite.modulate = colors[color_choice] + +func _physics_process(delta: float) -> void: + speed = Vector2.RIGHT.rotated(rad_to_deg(angle)) * bullet_speed + position += speed diff --git a/objects/bullet_types/test_bullet.gd.uid b/objects/bullet_types/test_bullet.gd.uid new file mode 100644 index 0000000..441dbcc --- /dev/null +++ b/objects/bullet_types/test_bullet.gd.uid @@ -0,0 +1 @@ +uid://dgrxej0tqnnfd diff --git a/objects/bullet_types/test_bullet.tscn b/objects/bullet_types/test_bullet.tscn new file mode 100644 index 0000000..e83b9d2 --- /dev/null +++ b/objects/bullet_types/test_bullet.tscn @@ -0,0 +1,61 @@ +[gd_scene load_steps=8 format=3 uid="uid://je8ntnqgk0p6"] + +[ext_resource type="Script" uid="uid://dgrxej0tqnnfd" path="res://objects/bullet_types/test_bullet.gd" id="1_nd7f1"] +[ext_resource type="Texture2D" uid="uid://du7gh3nk66mpo" path="res://graphics/bullets/normal_bullet/bullet_1.png" id="2_gcdq1"] +[ext_resource type="Texture2D" uid="uid://xe124f1kgf3x" path="res://graphics/bullets/normal_bullet/bullet_2.png" id="3_ic0v5"] +[ext_resource type="Texture2D" uid="uid://cenv3e67bv5fl" path="res://graphics/bullets/normal_bullet/bullet_core_1.png" id="4_ic0v5"] +[ext_resource type="Texture2D" uid="uid://4a633mudwp4q" path="res://graphics/bullets/normal_bullet/bullet_core_2.png" id="5_163b3"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_tg74j"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_gcdq1") +}, { +"duration": 1.0, +"texture": ExtResource("3_ic0v5") +}, { +"duration": 1.0, +"texture": ExtResource("3_ic0v5") +}, { +"duration": 1.0, +"texture": ExtResource("2_gcdq1") +}], +"loop": true, +"name": &"default", +"speed": 20.0 +}] + +[sub_resource type="SpriteFrames" id="SpriteFrames_10vvt"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("4_ic0v5") +}, { +"duration": 1.0, +"texture": ExtResource("5_163b3") +}, { +"duration": 1.0, +"texture": ExtResource("5_163b3") +}, { +"duration": 1.0, +"texture": ExtResource("4_ic0v5") +}], +"loop": true, +"name": &"default", +"speed": 20.0 +}] + +[node name="TestBullet" type="Node2D"] +script = ExtResource("1_nd7f1") + +[node name="Sprite" type="AnimatedSprite2D" parent="."] +modulate = Color(0, 1, 1, 1) +sprite_frames = SubResource("SpriteFrames_tg74j") +autoplay = "default" +frame_progress = 0.26925442 + +[node name="Sprite2" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_10vvt") +autoplay = "default" +frame_progress = 0.21053335 diff --git a/objects/player/bullet.tscn b/objects/player/bullet.tscn index 8db13af..a5a0678 100644 --- a/objects/player/bullet.tscn +++ b/objects/player/bullet.tscn @@ -1,8 +1,11 @@ -[gd_scene load_steps=3 format=3 uid="uid://bgoqv662xuf1r"] +[gd_scene load_steps=4 format=3 uid="uid://bgoqv662xuf1r"] [ext_resource type="Script" uid="uid://b84vrx30l3hei" path="res://objects/player/bullet.gd" id="1_4hrp6"] [ext_resource type="Texture2D" uid="uid://cm68ysi8ojc88" path="res://bullet.png" id="2_du4f6"] +[sub_resource type="RectangleShape2D" id="RectangleShape2D_du4f6"] +size = Vector2(8, 10) + [node name="Bullet" type="Node2D"] script = ExtResource("1_4hrp6") speed = Vector2(0, 500) @@ -10,3 +13,11 @@ speed = Vector2(0, 500) [node name="Sprite2D" type="Sprite2D" parent="."] position = Vector2(0, -5) texture = ExtResource("2_du4f6") + +[node name="Area2D" type="Area2D" parent="."] +collision_layer = 4 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(0, -5) +shape = SubResource("RectangleShape2D_du4f6") diff --git a/objects/player/bullet_emitter/player_bullet_emitter.tscn b/objects/player/bullet_emitter/player_bullet_emitter.tscn index 184f1a5..0e8d175 100644 --- a/objects/player/bullet_emitter/player_bullet_emitter.tscn +++ b/objects/player/bullet_emitter/player_bullet_emitter.tscn @@ -19,5 +19,6 @@ wait_time = 0.1 [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] stream = ExtResource("3_td01p") +volume_db = -10.0 [connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] diff --git a/project.godot b/project.godot index 1cfa738..ad6000f 100644 --- a/project.godot +++ b/project.godot @@ -76,6 +76,7 @@ focus={ 2d_physics/layer_1="obstacle" 2d_physics/layer_2="player" +2d_physics/layer_3="player_bullet" [rendering] diff --git a/scenes/test_scene_penny.tscn b/scenes/test_scene_penny.tscn index 1f22c00..be8e7af 100644 --- a/scenes/test_scene_penny.tscn +++ b/scenes/test_scene_penny.tscn @@ -1,7 +1,9 @@ -[gd_scene load_steps=5 format=3 uid="uid://dfwa3gwtoor3t"] +[gd_scene load_steps=7 format=3 uid="uid://dfwa3gwtoor3t"] [ext_resource type="Texture2D" uid="uid://cokpdf3gw10kr" path="res://space.png" id="1_ikr60"] [ext_resource type="PackedScene" uid="uid://c714s5d7d5765" path="res://objects/player/player.tscn" id="2_ikr60"] +[ext_resource type="PackedScene" uid="uid://b1rm2x7lofhkm" path="res://objects/bosses/tesu.tscn" id="4_mmy68"] +[ext_resource type="AudioStream" uid="uid://dftw8ufcgjbft" path="res://audio/music/04 - Stage 2 (Purple Sea).mp3" id="5_wcm38"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ikr60"] size = Vector2(10, 320) @@ -35,3 +37,10 @@ shape = SubResource("RectangleShape2D_mmy68") [node name="CollisionShape2D4" type="CollisionShape2D" parent="StaticBody2D"] position = Vector2(120, -5.75) shape = SubResource("RectangleShape2D_mmy68") + +[node name="Tesu" parent="." instance=ExtResource("4_mmy68")] +position = Vector2(124, 81) + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = ExtResource("5_wcm38") +autoplay = true