From 576406b2710c0840a0634ef122a6f882237efc32 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Apr 2022 04:09:46 +0200 Subject: [PATCH 01/17] :wrench: Fix UI? Possibly? --- src/levels/Game.tscn | 70 +++++++++++++++++++++++++------------- src/ui/HealthBar.tscn | 10 ------ src/ui/TheDarkNightUI.tscn | 21 ++++++++++++ src/ui/TimeSurvived.tscn | 16 --------- 4 files changed, 67 insertions(+), 50 deletions(-) delete mode 100644 src/ui/HealthBar.tscn create mode 100644 src/ui/TheDarkNightUI.tscn delete mode 100644 src/ui/TimeSurvived.tscn diff --git a/src/levels/Game.tscn b/src/levels/Game.tscn index 59c88f2..f8b1eca 100644 --- a/src/levels/Game.tscn +++ b/src/levels/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=13 format=2] [ext_resource path="res://src/mechanics/Background.tscn" type="PackedScene" id=1] [ext_resource path="res://src/mechanics/Darkness.tscn" type="PackedScene" id=2] @@ -6,20 +6,29 @@ [ext_resource path="res://src/entities/players/PhaseOnePlayer.tscn" type="PackedScene" id=4] [ext_resource path="res://src/mechanics/RNG.tscn" type="PackedScene" id=5] [ext_resource path="res://src/levels/Game.gd" type="Script" id=6] -[ext_resource path="res://src/ui/TimeSurvived.tscn" type="PackedScene" id=7] -[ext_resource path="res://src/ui/fonts/SourceSerifPro-Regular.ttf" type="DynamicFontData" id=8] +[ext_resource path="res://src/ui/TheDarkNightUI.tscn" type="PackedScene" id=8] [ext_resource path="res://src/levels/PhaseOneMusic.gd" type="Script" id=11] -[ext_resource path="res://src/ui/HealthBar.tscn" type="PackedScene" id=14] [ext_resource path="res://src/music/BaseDrum.mp3" type="AudioStream" id=19] [ext_resource path="res://src/music/BaseBell.mp3" type="AudioStream" id=20] [ext_resource path="res://src/music/BaseChoir.mp3" type="AudioStream" id=21] -[sub_resource type="DynamicFont" id=1] -size = 22 -font_data = ExtResource( 8 ) +[sub_resource type="GDScript" id=1] +script/source = "extends Label -[sub_resource type="Theme" id=2] -default_font = SubResource( 1 ) + +func _ready(): + var game = get_tree().root.get_node(\"Game\") + game.connect(\"survival_seconds_updated\", self, \"_on_survival_seconds_updated\") + + +func _on_survival_seconds_updated(value: float): + # warning-ignore:NARROWING_CONVERSION + var minutes: int = floor(value / 60) + var seconds_and_millis: float = value - minutes * 60 + var seconds: int = int(seconds_and_millis) + var millis: int = int((seconds_and_millis - seconds) * 1000) + text = \"%02d:%02d.%03d\" % ([minutes, seconds, millis]) +" [node name="Game" type="Node2D"] script = ExtResource( 6 ) @@ -69,24 +78,37 @@ position = Vector2( 640, 320 ) [node name="UserInterface" type="CanvasLayer" parent="."] -[node name="UserIntefaceContainer" type="Panel" parent="UserInterface"] -light_mask = 2 -anchor_left = 0.5 -anchor_top = 1.0 -anchor_right = 0.5 +[node name="TheDarkNightUI" parent="UserInterface" instance=ExtResource( 8 )] +anchor_left = 0.0 +anchor_right = 1.0 +margin_left = 0.0 +margin_right = 0.0 + +[node name="Panel" type="Panel" parent="UserInterface/TheDarkNightUI"] +anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -640.0 -margin_top = -80.0 -margin_right = 640.0 -theme = SubResource( 2 ) -[node name="TimeSurvived" parent="UserInterface/UserIntefaceContainer" instance=ExtResource( 7 )] -margin_left = -45.5 -margin_top = -14.5 -margin_right = 45.5 -margin_bottom = 14.5 +[node name="TimeSurvived" type="Label" parent="UserInterface/TheDarkNightUI/Panel"] +anchor_left = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = 14.0 +margin_right = -14.0 +margin_bottom = -14.0 +grow_horizontal = 0 +grow_vertical = 2 +text = "00:00.000" +align = 2 +valign = 1 +script = SubResource( 1 ) -[node name="HealthBar" parent="UserInterface/UserIntefaceContainer" instance=ExtResource( 14 )] +[node name="HealthBar" type="ProgressBar" parent="UserInterface/TheDarkNightUI/Panel"] +anchor_bottom = 1.0 margin_left = 14.0 +margin_top = 14.0 +margin_right = 320.0 +margin_bottom = -14.0 +grow_vertical = 2 +value = 50.0 [connection signal="intensity_changed" from="PhaseOne/Entities/Fire" to="PhaseOne/Music" method="_on_Fire_intensity_changed"] diff --git a/src/ui/HealthBar.tscn b/src/ui/HealthBar.tscn deleted file mode 100644 index 630e4d9..0000000 --- a/src/ui/HealthBar.tscn +++ /dev/null @@ -1,10 +0,0 @@ -[gd_scene format=2] - -[node name="HealthBar" type="ProgressBar"] -anchor_top = 0.5 -anchor_bottom = 0.5 -margin_top = -14.0 -margin_right = 320.0 -margin_bottom = 14.0 -step = 1.0 -value = 50.0 diff --git a/src/ui/TheDarkNightUI.tscn b/src/ui/TheDarkNightUI.tscn new file mode 100644 index 0000000..eaa41c2 --- /dev/null +++ b/src/ui/TheDarkNightUI.tscn @@ -0,0 +1,21 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://src/ui/fonts/SourceSerifPro-Regular.ttf" type="DynamicFontData" id=4] + +[sub_resource type="DynamicFont" id=1] +size = 22 +font_data = ExtResource( 4 ) + +[sub_resource type="Theme" id=2] +default_font = SubResource( 1 ) + +[node name="TheDarkNightUI" type="Control"] +light_mask = 2 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +margin_left = -640.0 +margin_top = -80.0 +margin_right = 640.0 +theme = SubResource( 2 ) diff --git a/src/ui/TimeSurvived.tscn b/src/ui/TimeSurvived.tscn deleted file mode 100644 index f079388..0000000 --- a/src/ui/TimeSurvived.tscn +++ /dev/null @@ -1,16 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://src/ui/TimeSurvived.gd" type="Script" id=1] - -[node name="TimeSurvived" type="Label"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -32.0 -margin_top = -7.0 -margin_right = 32.0 -margin_bottom = 7.0 -text = "00:00.000" -align = 1 -script = ExtResource( 1 ) From 157b907bd602e17a017c729a142838d52dc3fbf8 Mon Sep 17 00:00:00 2001 From: Cookie-CHR Date: Mon, 4 Apr 2022 12:42:10 +0200 Subject: [PATCH 02/17] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20UI=20Bar=20sprites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/LifeBarBg.png | 3 +++ src/ui/LifeBarBg.png.import | 35 +++++++++++++++++++++++++++++++++++ src/ui/LifeBarFg.png | 3 +++ src/ui/LifeBarFg.png.import | 35 +++++++++++++++++++++++++++++++++++ src/ui/Music_off.png | 3 +++ src/ui/Music_off.png.import | 35 +++++++++++++++++++++++++++++++++++ src/ui/Music_on.png | 3 +++ src/ui/Music_on.png.import | 35 +++++++++++++++++++++++++++++++++++ src/ui/UIBar.png | 3 +++ src/ui/UIBar.png.import | 35 +++++++++++++++++++++++++++++++++++ 10 files changed, 190 insertions(+) create mode 100644 src/ui/LifeBarBg.png create mode 100644 src/ui/LifeBarBg.png.import create mode 100644 src/ui/LifeBarFg.png create mode 100644 src/ui/LifeBarFg.png.import create mode 100644 src/ui/Music_off.png create mode 100644 src/ui/Music_off.png.import create mode 100644 src/ui/Music_on.png create mode 100644 src/ui/Music_on.png.import create mode 100644 src/ui/UIBar.png create mode 100644 src/ui/UIBar.png.import diff --git a/src/ui/LifeBarBg.png b/src/ui/LifeBarBg.png new file mode 100644 index 0000000..6eacdbc --- /dev/null +++ b/src/ui/LifeBarBg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b243a9925328813a8760796fa5e14072d91573b9ed0728d0618792e92970aaac +size 5254 diff --git a/src/ui/LifeBarBg.png.import b/src/ui/LifeBarBg.png.import new file mode 100644 index 0000000..4e55ad9 --- /dev/null +++ b/src/ui/LifeBarBg.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/LifeBarBg.png-99f7fc4234c2ec6ac697cc824f58880b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/ui/LifeBarBg.png" +dest_files=[ "res://.import/LifeBarBg.png-99f7fc4234c2ec6ac697cc824f58880b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/ui/LifeBarFg.png b/src/ui/LifeBarFg.png new file mode 100644 index 0000000..fb5f87e --- /dev/null +++ b/src/ui/LifeBarFg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dd30be1538773c916fa6350976a10cc1ecd325bd928896036a88cd840e134df +size 10200 diff --git a/src/ui/LifeBarFg.png.import b/src/ui/LifeBarFg.png.import new file mode 100644 index 0000000..6e6b68d --- /dev/null +++ b/src/ui/LifeBarFg.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/LifeBarFg.png-0d39793826fe9b1367d14793755cf28a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/ui/LifeBarFg.png" +dest_files=[ "res://.import/LifeBarFg.png-0d39793826fe9b1367d14793755cf28a.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/ui/Music_off.png b/src/ui/Music_off.png new file mode 100644 index 0000000..72902d5 --- /dev/null +++ b/src/ui/Music_off.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee7af8545e49a35179a5247aeac4de9c0fbb55023c5abc874ca91c45e3a01d50 +size 906 diff --git a/src/ui/Music_off.png.import b/src/ui/Music_off.png.import new file mode 100644 index 0000000..b7f27c7 --- /dev/null +++ b/src/ui/Music_off.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Music_off.png-27b13d35b03a178cf5a3bbf66101607e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/ui/Music_off.png" +dest_files=[ "res://.import/Music_off.png-27b13d35b03a178cf5a3bbf66101607e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/ui/Music_on.png b/src/ui/Music_on.png new file mode 100644 index 0000000..30c27a0 --- /dev/null +++ b/src/ui/Music_on.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fa620645c490359413f5d91b1d10c488caae8adf0d807ebbfe678e45eea7423 +size 3486 diff --git a/src/ui/Music_on.png.import b/src/ui/Music_on.png.import new file mode 100644 index 0000000..4af38e0 --- /dev/null +++ b/src/ui/Music_on.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Music_on.png-a4e74b2de0c60b71ef58425ddb79e339.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/ui/Music_on.png" +dest_files=[ "res://.import/Music_on.png-a4e74b2de0c60b71ef58425ddb79e339.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/ui/UIBar.png b/src/ui/UIBar.png new file mode 100644 index 0000000..ee2fcf7 --- /dev/null +++ b/src/ui/UIBar.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abede14f1b7d7a9f1c10d0e41af3027e6b423d71a99ca9baf603b3af25ed4859 +size 85907 diff --git a/src/ui/UIBar.png.import b/src/ui/UIBar.png.import new file mode 100644 index 0000000..9ea2b03 --- /dev/null +++ b/src/ui/UIBar.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/UIBar.png-1a0464279903795260a97a88d660c35b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/ui/UIBar.png" +dest_files=[ "res://.import/UIBar.png-1a0464279903795260a97a88d660c35b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 From 241c0bc37739584ddea6f1744764c4cd432a15c6 Mon Sep 17 00:00:00 2001 From: Cookie-CHR Date: Mon, 4 Apr 2022 12:43:04 +0200 Subject: [PATCH 03/17] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20put=20sprites=20on?= =?UTF-8?q?=20ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/levels/Game.tscn | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/src/levels/Game.tscn b/src/levels/Game.tscn index f8b1eca..24c9f32 100644 --- a/src/levels/Game.tscn +++ b/src/levels/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://src/mechanics/Background.tscn" type="PackedScene" id=1] [ext_resource path="res://src/mechanics/Darkness.tscn" type="PackedScene" id=2] @@ -6,8 +6,12 @@ [ext_resource path="res://src/entities/players/PhaseOnePlayer.tscn" type="PackedScene" id=4] [ext_resource path="res://src/mechanics/RNG.tscn" type="PackedScene" id=5] [ext_resource path="res://src/levels/Game.gd" type="Script" id=6] +[ext_resource path="res://src/ui/UIBar.png" type="Texture" id=7] [ext_resource path="res://src/ui/TheDarkNightUI.tscn" type="PackedScene" id=8] +[ext_resource path="res://src/ui/LifeBarFg.png" type="Texture" id=9] +[ext_resource path="res://src/ui/LifeBarBg.png" type="Texture" id=10] [ext_resource path="res://src/levels/PhaseOneMusic.gd" type="Script" id=11] +[ext_resource path="res://src/ui/Music_on.png" type="Texture" id=12] [ext_resource path="res://src/music/BaseDrum.mp3" type="AudioStream" id=19] [ext_resource path="res://src/music/BaseBell.mp3" type="AudioStream" id=20] [ext_resource path="res://src/music/BaseChoir.mp3" type="AudioStream" id=21] @@ -88,13 +92,16 @@ margin_right = 0.0 anchor_right = 1.0 anchor_bottom = 1.0 +[node name="UIBar" type="Sprite" parent="UserInterface/TheDarkNightUI/Panel"] +position = Vector2( 640, 40 ) +texture = ExtResource( 7 ) + [node name="TimeSurvived" type="Label" parent="UserInterface/TheDarkNightUI/Panel"] -anchor_left = 1.0 -anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = 14.0 -margin_right = -14.0 -margin_bottom = -14.0 +margin_left = 600.0 +margin_top = 16.0 +margin_right = 680.0 +margin_bottom = -12.0 grow_horizontal = 0 grow_vertical = 2 text = "00:00.000" @@ -103,6 +110,7 @@ valign = 1 script = SubResource( 1 ) [node name="HealthBar" type="ProgressBar" parent="UserInterface/TheDarkNightUI/Panel"] +visible = false anchor_bottom = 1.0 margin_left = 14.0 margin_top = 14.0 @@ -111,4 +119,28 @@ margin_bottom = -14.0 grow_vertical = 2 value = 50.0 +[node name="TextureProgress" type="TextureProgress" parent="UserInterface/TheDarkNightUI/Panel"] +margin_left = 15.0 +margin_top = 15.0 +margin_right = 317.0 +margin_bottom = -15.0 +value = 50.0 +texture_under = ExtResource( 10 ) +texture_progress = ExtResource( 9 ) +texture_progress_offset = Vector2( 10, 5 ) + +[node name="Button" type="Button" parent="UserInterface/TheDarkNightUI/Panel"] +anchor_left = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = -100.0 +margin_top = 10.0 +margin_right = -50.0 +margin_bottom = -10.0 +flat = true + +[node name="Sprite" type="Sprite" parent="UserInterface/TheDarkNightUI/Panel/Button"] +position = Vector2( 25, 30 ) +texture = ExtResource( 12 ) + [connection signal="intensity_changed" from="PhaseOne/Entities/Fire" to="PhaseOne/Music" method="_on_Fire_intensity_changed"] From 91ba1cb2a837f59058914f49f85e745dcd6acab3 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Apr 2022 14:57:33 +0200 Subject: [PATCH 04/17] :wrench: Import new images --- src/mechanics/CharacterFront.png.import | 35 +++++++++++++++++++++ src/mechanics/CharacterFrontLeft.png.import | 35 +++++++++++++++++++++ src/mechanics/EnemySpiderSanta.png.import | 35 +++++++++++++++++++++ src/mechanics/Snowflake.png.import | 35 +++++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 src/mechanics/CharacterFront.png.import create mode 100644 src/mechanics/CharacterFrontLeft.png.import create mode 100644 src/mechanics/EnemySpiderSanta.png.import create mode 100644 src/mechanics/Snowflake.png.import diff --git a/src/mechanics/CharacterFront.png.import b/src/mechanics/CharacterFront.png.import new file mode 100644 index 0000000..7c16965 --- /dev/null +++ b/src/mechanics/CharacterFront.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/CharacterFront.png-086504ef28b2298368e1e8c99d2c6d8c.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/mechanics/CharacterFront.png" +dest_files=[ "res://.import/CharacterFront.png-086504ef28b2298368e1e8c99d2c6d8c.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/mechanics/CharacterFrontLeft.png.import b/src/mechanics/CharacterFrontLeft.png.import new file mode 100644 index 0000000..3e7b763 --- /dev/null +++ b/src/mechanics/CharacterFrontLeft.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/CharacterFrontLeft.png-a3042b9811da49120539c1fc0f371a48.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/mechanics/CharacterFrontLeft.png" +dest_files=[ "res://.import/CharacterFrontLeft.png-a3042b9811da49120539c1fc0f371a48.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/mechanics/EnemySpiderSanta.png.import b/src/mechanics/EnemySpiderSanta.png.import new file mode 100644 index 0000000..0448b97 --- /dev/null +++ b/src/mechanics/EnemySpiderSanta.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/EnemySpiderSanta.png-eac0456ac0f4bbe49e411b81e6d559f8.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/mechanics/EnemySpiderSanta.png" +dest_files=[ "res://.import/EnemySpiderSanta.png-eac0456ac0f4bbe49e411b81e6d559f8.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/mechanics/Snowflake.png.import b/src/mechanics/Snowflake.png.import new file mode 100644 index 0000000..8fd5bca --- /dev/null +++ b/src/mechanics/Snowflake.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Snowflake.png-e248e372833c2aa730b5b6d333276836.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/mechanics/Snowflake.png" +dest_files=[ "res://.import/Snowflake.png-e248e372833c2aa730b5b6d333276836.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 From cdb57f90e6090afb54145a297f2c82ba29e8b51b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Apr 2022 15:02:36 +0200 Subject: [PATCH 05/17] :wrench: Add functionality to the mute button --- src/levels/Game.tscn | 15 +++------------ src/levels/PhaseOneMusic.gd | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/levels/Game.tscn b/src/levels/Game.tscn index 24c9f32..3582e15 100644 --- a/src/levels/Game.tscn +++ b/src/levels/Game.tscn @@ -109,16 +109,6 @@ align = 2 valign = 1 script = SubResource( 1 ) -[node name="HealthBar" type="ProgressBar" parent="UserInterface/TheDarkNightUI/Panel"] -visible = false -anchor_bottom = 1.0 -margin_left = 14.0 -margin_top = 14.0 -margin_right = 320.0 -margin_bottom = -14.0 -grow_vertical = 2 -value = 50.0 - [node name="TextureProgress" type="TextureProgress" parent="UserInterface/TheDarkNightUI/Panel"] margin_left = 15.0 margin_top = 15.0 @@ -129,7 +119,7 @@ texture_under = ExtResource( 10 ) texture_progress = ExtResource( 9 ) texture_progress_offset = Vector2( 10, 5 ) -[node name="Button" type="Button" parent="UserInterface/TheDarkNightUI/Panel"] +[node name="MuteButton" type="Button" parent="UserInterface/TheDarkNightUI/Panel"] anchor_left = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 @@ -139,8 +129,9 @@ margin_right = -50.0 margin_bottom = -10.0 flat = true -[node name="Sprite" type="Sprite" parent="UserInterface/TheDarkNightUI/Panel/Button"] +[node name="Sprite" type="Sprite" parent="UserInterface/TheDarkNightUI/Panel/MuteButton"] position = Vector2( 25, 30 ) texture = ExtResource( 12 ) [connection signal="intensity_changed" from="PhaseOne/Entities/Fire" to="PhaseOne/Music" method="_on_Fire_intensity_changed"] +[connection signal="pressed" from="UserInterface/TheDarkNightUI/Panel/MuteButton" to="PhaseOne/Music" method="_on_MuteButton_pressed"] diff --git a/src/levels/PhaseOneMusic.gd b/src/levels/PhaseOneMusic.gd index 9a771ac..10d8f4d 100644 --- a/src/levels/PhaseOneMusic.gd +++ b/src/levels/PhaseOneMusic.gd @@ -7,14 +7,26 @@ export var bell_min: float = 0.20 export var bell_max: float = 0.60 export var drum_min: float = 0.40 export var drum_max: float = 0.80 +export var muted: bool = false setget set_mute func _on_Fire_intensity_changed(value): $Choir.volume_db = (smoothstep(choir_min, choir_max, value) - 1) * 60 - $Choir.bus = "Master" if $Choir.volume_db > -60 else "Mute" + $Choir.bus = "Master" if not muted and $Choir.volume_db > -60 else "Mute" $Bell.volume_db = (smoothstep(bell_min, bell_max, value) - 1) * 60 - $Bell.bus = "Master" if $Choir.volume_db > -60 else "Mute" + $Bell.bus = "Master" if not muted and $Bell.volume_db > -60 else "Mute" $Drum.volume_db = (smoothstep(drum_min, drum_max, value) - 1) * 60 - $Drum.bus = "Master" if $Choir.volume_db > -60 else "Mute" + $Drum.bus = "Master" if not muted and $Drum.volume_db > -60 else "Mute" + + +func set_mute(value): + muted = value + $Choir.bus = "Master" if not muted and $Choir.volume_db > -60 else "Mute" + $Bell.bus = "Master" if not muted and $Bell.volume_db > -60 else "Mute" + $Drum.bus = "Master" if not muted and $Drum.volume_db > -60 else "Mute" + + +func _on_MuteButton_pressed(): + set_mute(not muted) From 480e1723077e4d4a07c2ba4d49d5f17a225a3bde Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Apr 2022 15:08:38 +0200 Subject: [PATCH 06/17] :wrench: Add sprites to the player (back is still missing) --- src/behaviours/movement/PlayerMovement.gd | 4 ++ .../players}/CharacterFront.png | 0 .../players}/CharacterFront.png.import | 6 +-- .../players}/CharacterFrontLeft.png | 0 .../players}/CharacterFrontLeft.png.import | 6 +-- src/entities/players/PhaseOnePlayer.tscn | 43 ++++++++++++++++--- 6 files changed, 47 insertions(+), 12 deletions(-) rename src/{mechanics => entities/players}/CharacterFront.png (100%) rename src/{mechanics => entities/players}/CharacterFront.png.import (68%) rename src/{mechanics => entities/players}/CharacterFrontLeft.png (100%) rename src/{mechanics => entities/players}/CharacterFrontLeft.png.import (67%) diff --git a/src/behaviours/movement/PlayerMovement.gd b/src/behaviours/movement/PlayerMovement.gd index f6ac92b..8667d43 100644 --- a/src/behaviours/movement/PlayerMovement.gd +++ b/src/behaviours/movement/PlayerMovement.gd @@ -2,6 +2,9 @@ extends Node class_name PlayerMovement +signal moving_in_direction(direction) + + export var movement_per_second: float @@ -19,4 +22,5 @@ func _physics_process(_delta): if direction.length() > 1: direction.normalized() + emit_signal("moving_in_direction", direction) var _motion: Vector2 = parent.move_and_slide(direction * movement_per_second, Vector2.ZERO) diff --git a/src/mechanics/CharacterFront.png b/src/entities/players/CharacterFront.png similarity index 100% rename from src/mechanics/CharacterFront.png rename to src/entities/players/CharacterFront.png diff --git a/src/mechanics/CharacterFront.png.import b/src/entities/players/CharacterFront.png.import similarity index 68% rename from src/mechanics/CharacterFront.png.import rename to src/entities/players/CharacterFront.png.import index 7c16965..e868946 100644 --- a/src/mechanics/CharacterFront.png.import +++ b/src/entities/players/CharacterFront.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/CharacterFront.png-086504ef28b2298368e1e8c99d2c6d8c.stex" +path="res://.import/CharacterFront.png-845655f7c30d9b4c6e480912b353d1f6.stex" metadata={ "vram_texture": false } [deps] -source_file="res://src/mechanics/CharacterFront.png" -dest_files=[ "res://.import/CharacterFront.png-086504ef28b2298368e1e8c99d2c6d8c.stex" ] +source_file="res://src/entities/players/CharacterFront.png" +dest_files=[ "res://.import/CharacterFront.png-845655f7c30d9b4c6e480912b353d1f6.stex" ] [params] diff --git a/src/mechanics/CharacterFrontLeft.png b/src/entities/players/CharacterFrontLeft.png similarity index 100% rename from src/mechanics/CharacterFrontLeft.png rename to src/entities/players/CharacterFrontLeft.png diff --git a/src/mechanics/CharacterFrontLeft.png.import b/src/entities/players/CharacterFrontLeft.png.import similarity index 67% rename from src/mechanics/CharacterFrontLeft.png.import rename to src/entities/players/CharacterFrontLeft.png.import index 3e7b763..bad89a5 100644 --- a/src/mechanics/CharacterFrontLeft.png.import +++ b/src/entities/players/CharacterFrontLeft.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/CharacterFrontLeft.png-a3042b9811da49120539c1fc0f371a48.stex" +path="res://.import/CharacterFrontLeft.png-114f9621beadf66601a533677fac5ae7.stex" metadata={ "vram_texture": false } [deps] -source_file="res://src/mechanics/CharacterFrontLeft.png" -dest_files=[ "res://.import/CharacterFrontLeft.png-a3042b9811da49120539c1fc0f371a48.stex" ] +source_file="res://src/entities/players/CharacterFrontLeft.png" +dest_files=[ "res://.import/CharacterFrontLeft.png-114f9621beadf66601a533677fac5ae7.stex" ] [params] diff --git a/src/entities/players/PhaseOnePlayer.tscn b/src/entities/players/PhaseOnePlayer.tscn index 7660ecf..49c9725 100644 --- a/src/entities/players/PhaseOnePlayer.tscn +++ b/src/entities/players/PhaseOnePlayer.tscn @@ -1,20 +1,49 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://src/entities/players/AbstractPlayer.tscn" type="PackedScene" id=1] [ext_resource path="res://src/mechanics/White.png" type="Texture" id=2] [ext_resource path="res://src/entities/bullets/ArrowAlternative.tscn" type="PackedScene" id=3] [ext_resource path="res://src/behaviours/spawning/SpawnOnShoot.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/entities/players/CharacterFrontLeft.png" type="Texture" id=5] +[ext_resource path="res://src/entities/players/CharacterFront.png" type="Texture" id=6] +[ext_resource path="res://src/behaviours/graphics/FourSidedSprite.gd" type="Script" id=7] -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 16, 16 ) +[sub_resource type="CapsuleShape2D" id=3] +radius = 9.0 +height = 14.0 + +[sub_resource type="SpriteFrames" id=2] +animations = [ { +"frames": [ ExtResource( 5 ) ], +"loop": true, +"name": "left", +"speed": 5.0 +}, { +"frames": [ ExtResource( 6 ) ], +"loop": true, +"name": "right", +"speed": 5.0 +}, { +"frames": [ ExtResource( 2 ) ], +"loop": true, +"name": "up", +"speed": 5.0 +}, { +"frames": [ ExtResource( 6 ) ], +"loop": true, +"name": "down", +"speed": 5.0 +} ] [node name="PhaseOnePlayer" instance=ExtResource( 1 )] [node name="Shape" type="CollisionShape2D" parent="." index="0"] -shape = SubResource( 1 ) +shape = SubResource( 3 ) -[node name="Sprite" type="Sprite" parent="Shape" index="0"] -texture = ExtResource( 2 ) +[node name="FourSidedSprite" type="AnimatedSprite" parent="Shape" index="0"] +frames = SubResource( 2 ) +animation = "left" +script = ExtResource( 7 ) [node name="Listener" type="Listener2D" parent="." index="1"] current = true @@ -23,3 +52,5 @@ current = true bullet = ExtResource( 3 ) cooldown = 0.1 rapid_fire = true + +[connection signal="moving_in_direction" from="PlayerMovement" to="Shape/FourSidedSprite" method="turn"] From 3cdb38436cd6a0d6bec0544fb509305ae00accef Mon Sep 17 00:00:00 2001 From: Cookie-CHR Date: Mon, 4 Apr 2022 15:55:45 +0200 Subject: [PATCH 07/17] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Main=20menu=20(first?= =?UTF-8?q?=20version)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.godot | 2 +- src/levels/MainMenu.gd | 17 ++++++----------- src/levels/MainMenu.tscn | 23 ++++++++++++++++++----- src/ui/PlayButton.png | 3 +++ src/ui/PlayButton.png.import | 35 +++++++++++++++++++++++++++++++++++ src/ui/Title.png | 3 +++ src/ui/Title.png.import | 35 +++++++++++++++++++++++++++++++++++ 7 files changed, 101 insertions(+), 17 deletions(-) create mode 100644 src/ui/PlayButton.png create mode 100644 src/ui/PlayButton.png.import create mode 100644 src/ui/Title.png create mode 100644 src/ui/Title.png.import diff --git a/project.godot b/project.godot index 59ad3e7..3fefadf 100644 --- a/project.godot +++ b/project.godot @@ -129,7 +129,7 @@ _global_script_class_icons={ [application] config/name="LD50" -run/main_scene="res://src/levels/Game.tscn" +run/main_scene="res://src/levels/MainMenu.tscn" [audio] diff --git a/src/levels/MainMenu.gd b/src/levels/MainMenu.gd index d144d48..7300b29 100644 --- a/src/levels/MainMenu.gd +++ b/src/levels/MainMenu.gd @@ -1,16 +1,11 @@ extends Node2D -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" +func _ready(): + for child in get_children(): + if child.name == "Play": + get_node(child.name).connect("pressed", self, "change_scn") +func change_scn(): + get_tree().change_scene("res://src/levels/Game.tscn") -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass diff --git a/src/levels/MainMenu.tscn b/src/levels/MainMenu.tscn index 941bdcb..d0984ae 100644 --- a/src/levels/MainMenu.tscn +++ b/src/levels/MainMenu.tscn @@ -1,11 +1,24 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://src/levels/MainMenu.gd" type="Script" id=1] +[ext_resource path="res://src/ui/Title.png" type="Texture" id=2] +[ext_resource path="res://src/ui/PlayButton.png" type="Texture" id=3] [node name="MainMenu" type="Node2D"] script = ExtResource( 1 ) -[node name="Label" type="Label" parent="."] -margin_right = 40.0 -margin_bottom = 14.0 -text = "Hello world!" +[node name="Panel" type="Panel" parent="."] +margin_right = 1280.0 +margin_bottom = 720.0 + +[node name="Sprite" type="Sprite" parent="Panel"] +position = Vector2( 640.881, 360.696 ) +texture = ExtResource( 2 ) + +[node name="Play" type="Button" parent="."] +margin_left = 580.0 +margin_top = 540.0 +margin_right = 12.0 +margin_bottom = 20.0 +icon = ExtResource( 3 ) +flat = true diff --git a/src/ui/PlayButton.png b/src/ui/PlayButton.png new file mode 100644 index 0000000..74d81b8 --- /dev/null +++ b/src/ui/PlayButton.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:619dda962506a760592ec31288804014beef768e092bbc7478c0fe0be791f59a +size 7313 diff --git a/src/ui/PlayButton.png.import b/src/ui/PlayButton.png.import new file mode 100644 index 0000000..30a6acc --- /dev/null +++ b/src/ui/PlayButton.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/PlayButton.png-bbb75720f98ee0da7cc56e3bae2f00bf.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/ui/PlayButton.png" +dest_files=[ "res://.import/PlayButton.png-bbb75720f98ee0da7cc56e3bae2f00bf.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/ui/Title.png b/src/ui/Title.png new file mode 100644 index 0000000..011df7b --- /dev/null +++ b/src/ui/Title.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9166dfac6cbc0cb2fc4bd877a88efd4414a0c515e7988725c8646679a8094b62 +size 220905 diff --git a/src/ui/Title.png.import b/src/ui/Title.png.import new file mode 100644 index 0000000..2d06982 --- /dev/null +++ b/src/ui/Title.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Title.png-eddaf0247c16f2cd01805f96e728b10b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/ui/Title.png" +dest_files=[ "res://.import/Title.png-eddaf0247c16f2cd01805f96e728b10b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 From d97890bed3cfdf22f57e7fc7d4f7e0b94b1ccbd0 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Apr 2022 16:16:26 +0200 Subject: [PATCH 08/17] :boom: everything works now but i dont remember why --- project.godot | 7 +++ .../movement/AttractedToMovement.gd | 3 +- .../movement/TeleportToRandomPosition.gd | 24 ++++----- .../movement/TeleportToScreenEdge.gd | 23 +++++++-- src/behaviours/spawning/DropLoot.gd | 2 +- src/behaviours/spawning/SpawnOnShoot.gd | 3 +- src/behaviours/targeting/SetSpawnedGoalTo.gd | 3 +- src/entities/enemies/AbstractEnemy.tscn | 2 + src/entities/enemies/ChaserEnemy.tscn | 11 ++-- src/entities/players/PhaseOnePlayer.tscn | 9 ++-- src/levels/Game.gd | 4 ++ src/levels/Game.tscn | 51 +++++++++++++++++-- src/mechanics/ScreenEdgeSpawner.tscn | 1 + src/pickups/BranchPickup.tscn | 16 ++++++ src/pickups/Pickup.gd | 14 +---- src/pickups/Pickup.tscn | 6 ++- src/pickups/RapidFirePickup.tscn | 18 +++++++ src/{mechanics => pickups}/WeaponCrossbow.png | 0 .../WeaponCrossbow.png.import | 6 +-- src/pickups/effects/ChangeFireIntensity.gd | 3 +- src/pickups/effects/RapidFire.gd | 15 ++++++ src/pickups/effects/RapidFire.tscn | 6 +++ 22 files changed, 172 insertions(+), 55 deletions(-) create mode 100644 src/pickups/BranchPickup.tscn create mode 100644 src/pickups/RapidFirePickup.tscn rename src/{mechanics => pickups}/WeaponCrossbow.png (100%) rename src/{mechanics => pickups}/WeaponCrossbow.png.import (69%) create mode 100644 src/pickups/effects/RapidFire.gd create mode 100644 src/pickups/effects/RapidFire.tscn diff --git a/project.godot b/project.godot index 59ad3e7..d150a7d 100644 --- a/project.godot +++ b/project.godot @@ -80,6 +80,11 @@ _global_script_classes=[ { "path": "res://src/behaviours/graphics/RandomRotationOnReady.gd" }, { "base": "Node", +"class": "RapidFire", +"language": "GDScript", +"path": "res://src/pickups/effects/RapidFire.gd" +}, { +"base": "Node", "class": "SetSpawnedGoalTo", "language": "GDScript", "path": "res://src/behaviours/targeting/SetSpawnedGoalTo.gd" @@ -119,6 +124,7 @@ _global_script_class_icons={ "PlayerMovement": "", "RNG": "", "RandomRotationOnReady": "", +"RapidFire": "", "SetSpawnedGoalTo": "", "SpawnEveryPeriod": "", "SpawnOnShoot": "", @@ -189,6 +195,7 @@ player_shoot={ 2d_physics/layer_2="Damageable" 2d_physics/layer_3="Projectiles" 2d_physics/layer_4="UI" +2d_physics/layer_5="Pickups" [physics] diff --git a/src/behaviours/movement/AttractedToMovement.gd b/src/behaviours/movement/AttractedToMovement.gd index 202bb97..0ba946c 100644 --- a/src/behaviours/movement/AttractedToMovement.gd +++ b/src/behaviours/movement/AttractedToMovement.gd @@ -8,13 +8,12 @@ signal goal_reached export var movement_per_second: float -export var goal_path: NodePath onready var parent: KinematicBody2D = get_parent() -onready var goal: PhysicsBody2D = get_node(goal_path) if goal_path else null +var goal: Node2D = null var _goal_reached_triggered: bool = false diff --git a/src/behaviours/movement/TeleportToRandomPosition.gd b/src/behaviours/movement/TeleportToRandomPosition.gd index 490a829..0b7a73f 100644 --- a/src/behaviours/movement/TeleportToRandomPosition.gd +++ b/src/behaviours/movement/TeleportToRandomPosition.gd @@ -13,21 +13,15 @@ onready var rng = get_tree().root.get_node("Game/RNG").rng func teleport(): - var random = rng.randi_range(1, 4) - - var new_position - if random == 1: - # Left - new_position = Vector2(0, rng.randf_range(0, bounds.y)) - elif random == 2: - # Right - new_position = Vector2(bounds.x, rng.randf_range(0, bounds.y)) - elif random == 3: - # Top - new_position = Vector2(rng.randf_range(0, bounds.x), 0) - else: - # Bottom - new_position = Vector2(rng.randf_range(0, bounds.y), bounds.y) + var new_position = Vector2( + rng.randf_range(0, bounds.x), + rng.randf_range(0, bounds.y) + ) parent.set_position(new_position) emit_signal("teleported", parent.position) + + +func _handle_spawned(_node): + teleport() + \ No newline at end of file diff --git a/src/behaviours/movement/TeleportToScreenEdge.gd b/src/behaviours/movement/TeleportToScreenEdge.gd index 38067fd..572cb96 100644 --- a/src/behaviours/movement/TeleportToScreenEdge.gd +++ b/src/behaviours/movement/TeleportToScreenEdge.gd @@ -13,10 +13,25 @@ onready var rng = get_tree().root.get_node("Game/RNG").rng func teleport(): - var new_position = Vector2( - rng.randf_range(0, bounds.x), - rng.randf_range(0, bounds.y) - ) + var random = rng.randi_range(1, 4) + + var new_position + if random == 1: + # Left + new_position = Vector2(0, rng.randf_range(0, bounds.y)) + elif random == 2: + # Right + new_position = Vector2(bounds.x, rng.randf_range(0, bounds.y)) + elif random == 3: + # Top + new_position = Vector2(rng.randf_range(0, bounds.x), 0) + else: + # Bottom + new_position = Vector2(rng.randf_range(0, bounds.x), bounds.y) parent.set_position(new_position) emit_signal("teleported", parent.position) + + +func _handle_spawned(_node): + teleport() diff --git a/src/behaviours/spawning/DropLoot.gd b/src/behaviours/spawning/DropLoot.gd index c86d670..cb8f400 100644 --- a/src/behaviours/spawning/DropLoot.gd +++ b/src/behaviours/spawning/DropLoot.gd @@ -24,7 +24,7 @@ func select_drop() -> PackedScene: var result = rng.randf_range(0.0, total_weights) - for i in range(loot_types.len()): + for i in range(len(loot_types)): var loot_type = loot_types[i] var loot_weight = loot_weights[i] result -= loot_weight diff --git a/src/behaviours/spawning/SpawnOnShoot.gd b/src/behaviours/spawning/SpawnOnShoot.gd index 4ed64ac..1251aaa 100644 --- a/src/behaviours/spawning/SpawnOnShoot.gd +++ b/src/behaviours/spawning/SpawnOnShoot.gd @@ -8,6 +8,7 @@ signal shot(bullet) export var bullet: PackedScene export var cooldown: float setget set_cooldown, get_cooldown export var rapid_fire: bool +export var angle_offset: float onready var parent: Node2D = get_parent() @@ -25,7 +26,7 @@ func shoot(target): var node = bullet.instance() container.add_child(node) node.set_position(global_position) - node.set_rotation(node.get_angle_to(target)) + node.set_rotation(node.get_angle_to(target) + angle_offset) node.get_node("Ownership").entity_owner = parent node.add_collision_exception_with(parent) emit_signal("shot") diff --git a/src/behaviours/targeting/SetSpawnedGoalTo.gd b/src/behaviours/targeting/SetSpawnedGoalTo.gd index 8d6001d..6d2321c 100644 --- a/src/behaviours/targeting/SetSpawnedGoalTo.gd +++ b/src/behaviours/targeting/SetSpawnedGoalTo.gd @@ -3,8 +3,9 @@ class_name SetSpawnedGoalTo export var goal_path: NodePath +onready var goal = get_node(goal_path) func set_goal(node): var movement = node.get_node("AttractedToMovement") - movement.goal = get_node(goal_path) + movement.goal = goal diff --git a/src/entities/enemies/AbstractEnemy.tscn b/src/entities/enemies/AbstractEnemy.tscn index 500bd27..294478d 100644 --- a/src/entities/enemies/AbstractEnemy.tscn +++ b/src/entities/enemies/AbstractEnemy.tscn @@ -9,3 +9,5 @@ alliance = -1 [node name="DropLoot" parent="." index="2" instance=ExtResource( 1 )] + +[connection signal="dead" from="Damageable" to="DropLoot" method="create_drop"] diff --git a/src/entities/enemies/ChaserEnemy.tscn b/src/entities/enemies/ChaserEnemy.tscn index 74684c7..4513eb1 100644 --- a/src/entities/enemies/ChaserEnemy.tscn +++ b/src/entities/enemies/ChaserEnemy.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=11 format=2] +[gd_scene load_steps=12 format=2] [ext_resource path="res://src/entities/enemies/EnemySnowmanLeft.png" type="Texture" id=1] -[ext_resource path="res://src/behaviours/movement/ErraticMovement.tscn" type="PackedScene" id=2] +[ext_resource path="res://src/pickups/BranchPickup.tscn" type="PackedScene" id=2] [ext_resource path="res://src/behaviours/movement/AttractedToMovement.tscn" type="PackedScene" id=3] [ext_resource path="res://src/entities/enemies/AbstractEnemy.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/pickups/RapidFirePickup.tscn" type="PackedScene" id=5] [ext_resource path="res://src/entities/enemies/EnemySnowmanBack.png" type="Texture" id=6] [ext_resource path="res://src/entities/enemies/EnemySnowmanFront.png" type="Texture" id=7] [ext_resource path="res://src/entities/enemies/EnemySnowmanRight.png" type="Texture" id=8] @@ -45,8 +46,10 @@ shape = SubResource( 1 ) frames = SubResource( 2 ) animation = "down" -[node name="ErraticMovement" parent="." index="4" instance=ExtResource( 2 )] +[node name="DropLoot" parent="." index="3"] +loot_types = [ null, ExtResource( 2 ), ExtResource( 5 ) ] +loot_weights = [ 1.0, 1.0, 0.1 ] -[node name="AttractedToMovement" parent="." index="5" instance=ExtResource( 3 )] +[node name="AttractedToMovement" parent="." index="4" instance=ExtResource( 3 )] [connection signal="moving_in_direction" from="AttractedToMovement" to="Shape/FourSidedSprite" method="turn"] diff --git a/src/entities/players/PhaseOnePlayer.tscn b/src/entities/players/PhaseOnePlayer.tscn index 49c9725..3dbe519 100644 --- a/src/entities/players/PhaseOnePlayer.tscn +++ b/src/entities/players/PhaseOnePlayer.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://src/entities/players/AbstractPlayer.tscn" type="PackedScene" id=1] -[ext_resource path="res://src/mechanics/White.png" type="Texture" id=2] [ext_resource path="res://src/entities/bullets/ArrowAlternative.tscn" type="PackedScene" id=3] [ext_resource path="res://src/behaviours/spawning/SpawnOnShoot.tscn" type="PackedScene" id=4] [ext_resource path="res://src/entities/players/CharacterFrontLeft.png" type="Texture" id=5] @@ -24,7 +23,7 @@ animations = [ { "name": "right", "speed": 5.0 }, { -"frames": [ ExtResource( 2 ) ], +"frames": [ ExtResource( 5 ) ], "loop": true, "name": "up", "speed": 5.0 @@ -36,6 +35,7 @@ animations = [ { } ] [node name="PhaseOnePlayer" instance=ExtResource( 1 )] +collision_layer = 19 [node name="Shape" type="CollisionShape2D" parent="." index="0"] shape = SubResource( 3 ) @@ -50,7 +50,6 @@ current = true [node name="SpawnOnShoot" parent="." index="2" instance=ExtResource( 4 )] bullet = ExtResource( 3 ) -cooldown = 0.1 -rapid_fire = true +cooldown = 0.2 [connection signal="moving_in_direction" from="PlayerMovement" to="Shape/FourSidedSprite" method="turn"] diff --git a/src/levels/Game.gd b/src/levels/Game.gd index 0af3acc..ff9033b 100644 --- a/src/levels/Game.gd +++ b/src/levels/Game.gd @@ -12,3 +12,7 @@ func set_survival_seconds(value): func _process(delta): set_survival_seconds(survival_seconds + delta) + + +func _on_Fire_intensity_reached_min(): + print("Game over!") diff --git a/src/levels/Game.tscn b/src/levels/Game.tscn index 3582e15..4d0568e 100644 --- a/src/levels/Game.tscn +++ b/src/levels/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=21 format=2] [ext_resource path="res://src/mechanics/Background.tscn" type="PackedScene" id=1] [ext_resource path="res://src/mechanics/Darkness.tscn" type="PackedScene" id=2] @@ -12,6 +12,10 @@ [ext_resource path="res://src/ui/LifeBarBg.png" type="Texture" id=10] [ext_resource path="res://src/levels/PhaseOneMusic.gd" type="Script" id=11] [ext_resource path="res://src/ui/Music_on.png" type="Texture" id=12] +[ext_resource path="res://src/mechanics/ScreenEdgeSpawner.tscn" type="PackedScene" id=13] +[ext_resource path="res://src/entities/enemies/ChaserEnemy.tscn" type="PackedScene" id=14] +[ext_resource path="res://src/behaviours/targeting/SetSpawnedGoalTo.tscn" type="PackedScene" id=15] +[ext_resource path="res://src/pickups/BranchPickup.tscn" type="PackedScene" id=16] [ext_resource path="res://src/music/BaseDrum.mp3" type="AudioStream" id=19] [ext_resource path="res://src/music/BaseBell.mp3" type="AudioStream" id=20] [ext_resource path="res://src/music/BaseChoir.mp3" type="AudioStream" id=21] @@ -66,20 +70,58 @@ autoplay = true tile_data = PoolIntArray( 0, 0, 131074, 1, 0, 131074, 2, 0, 131074, 3, 0, 131074, 4, 0, 131074, 5, 0, 131074, 6, 0, 131074, 7, 0, 131074, 8, 0, 131074, 9, 0, 131074, 10, 0, 131074, 11, 0, 131074, 12, 0, 131074, 13, 0, 131074, 14, 0, 131074, 15, 0, 131074, 16, 0, 131075, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 21, 0, 0, 22, 0, 0, 23, 0, 131073, 24, 0, 131074, 25, 0, 131074, 26, 0, 131074, 27, 0, 131074, 28, 0, 131074, 29, 0, 131074, 30, 0, 131074, 31, 0, 131074, 32, 0, 131074, 33, 0, 131074, 34, 0, 131074, 35, 0, 131074, 36, 0, 131074, 37, 0, 131074, 38, 0, 131074, 39, 0, 131074, 65536, 0, 131074, 65537, 0, 131074, 65538, 0, 131074, 65539, 0, 131074, 65540, 0, 131074, 65541, 0, 131074, 65542, 0, 131074, 65543, 0, 131074, 65544, 0, 131074, 65545, 0, 131074, 65546, 0, 131074, 65547, 0, 131074, 65548, 0, 131074, 65549, 0, 131074, 65550, 0, 131074, 65551, 0, 131074, 65552, 0, 131075, 65553, 0, 0, 65554, 0, 0, 65555, 0, 0, 65556, 0, 0, 65557, 0, 0, 65558, 0, 0, 65559, 0, 131073, 65560, 0, 131074, 65561, 0, 131074, 65562, 0, 131074, 65563, 0, 131074, 65564, 0, 131074, 65565, 0, 131074, 65566, 0, 131074, 65567, 0, 131074, 65568, 0, 131074, 65569, 0, 131074, 65570, 0, 131074, 65571, 0, 131074, 65572, 0, 131074, 65573, 0, 131074, 65574, 0, 131074, 65575, 0, 131074, 131072, 0, 131074, 131073, 0, 131074, 131074, 0, 131074, 131075, 0, 131074, 131076, 0, 131074, 131077, 0, 131074, 131078, 0, 131074, 131079, 0, 131074, 131080, 0, 131074, 131081, 0, 131074, 131082, 0, 131074, 131083, 0, 131074, 131084, 0, 131074, 131085, 0, 131074, 131086, 0, 131074, 131087, 0, 131074, 131088, 0, 131075, 131089, 0, 0, 131090, 0, 0, 131091, 0, 0, 131092, 0, 0, 131093, 0, 0, 131094, 0, 0, 131095, 0, 131073, 131096, 0, 131074, 131097, 0, 131074, 131098, 0, 131074, 131099, 0, 131074, 131100, 0, 131074, 131101, 0, 131074, 131102, 0, 131074, 131103, 0, 131074, 131104, 0, 131074, 131105, 0, 131074, 131106, 0, 131074, 131107, 0, 131074, 131108, 0, 131074, 131109, 0, 131074, 131110, 0, 131074, 131111, 0, 131074, 196608, 0, 131074, 196609, 0, 131074, 196610, 0, 131074, 196611, 0, 131074, 196612, 0, 131074, 196613, 0, 131074, 196614, 0, 131074, 196615, 0, 131074, 196616, 0, 131074, 196617, 0, 131074, 196618, 0, 131074, 196619, 0, 131074, 196620, 0, 131074, 196621, 0, 131074, 196622, 0, 131074, 196623, 0, 131074, 196624, 0, 131075, 196625, 0, 0, 196626, 0, 0, 196627, 0, 0, 196628, 0, 0, 196629, 0, 0, 196630, 0, 0, 196631, 0, 131073, 196632, 0, 131074, 196633, 0, 131074, 196634, 0, 131074, 196635, 0, 131074, 196636, 0, 131074, 196637, 0, 131074, 196638, 0, 131074, 196639, 0, 131074, 196640, 0, 131074, 196641, 0, 131074, 196642, 0, 131074, 196643, 0, 131074, 196644, 0, 131074, 196645, 0, 131074, 196646, 0, 131074, 196647, 0, 131074, 262144, 0, 131074, 262145, 0, 131074, 262146, 0, 131074, 262147, 0, 131074, 262148, 0, 131074, 262149, 0, 131074, 262150, 0, 131074, 262151, 0, 131074, 262152, 0, 131074, 262153, 0, 131074, 262154, 0, 131074, 262155, 0, 131074, 262156, 0, 131074, 262157, 0, 131074, 262158, 0, 131074, 262159, 0, 131074, 262160, 0, 131075, 262161, 0, 0, 262162, 0, 0, 262163, 0, 0, 262164, 0, 0, 262165, 0, 0, 262166, 0, 0, 262167, 0, 131073, 262168, 0, 131074, 262169, 0, 131074, 262170, 0, 131074, 262171, 0, 131074, 262172, 0, 131074, 262173, 0, 131074, 262174, 0, 131074, 262175, 0, 131074, 262176, 0, 131074, 262177, 0, 131074, 262178, 0, 131074, 262179, 0, 131074, 262180, 0, 131074, 262181, 0, 131074, 262182, 0, 131074, 262183, 0, 131074, 327680, 0, 131074, 327681, 0, 131074, 327682, 0, 131074, 327683, 0, 131074, 327684, 0, 131074, 327685, 0, 131074, 327686, 0, 131074, 327687, 0, 131074, 327688, 0, 131074, 327689, 0, 131074, 327690, 0, 131074, 327691, 0, 131074, 327692, 0, 131074, 327693, 0, 131074, 327694, 0, 131074, 327695, 0, 131074, 327696, 0, 131075, 327697, 0, 0, 327698, 0, 0, 327699, 0, 0, 327700, 0, 0, 327701, 0, 0, 327702, 0, 0, 327703, 0, 131073, 327704, 0, 131074, 327705, 0, 131074, 327706, 0, 131074, 327707, 0, 131074, 327708, 0, 131074, 327709, 0, 131074, 327710, 0, 131074, 327711, 0, 131074, 327712, 0, 131074, 327713, 0, 131074, 327714, 0, 131074, 327715, 0, 131074, 327716, 0, 131074, 327717, 0, 131074, 327718, 0, 131074, 327719, 0, 131074, 393216, 0, 196610, 393217, 0, 196610, 393218, 0, 196610, 393219, 0, 196610, 393220, 0, 196610, 393221, 0, 196610, 393222, 0, 196610, 393223, 0, 196610, 393224, 0, 196610, 393225, 0, 196610, 393226, 0, 196610, 393227, 0, 196610, 393228, 0, 196610, 393229, 0, 196610, 393230, 0, 196610, 393231, 0, 196610, 393232, 0, 196611, 393233, 0, 0, 393234, 0, 0, 393235, 0, 0, 393236, 0, 0, 393237, 0, 0, 393238, 0, 0, 393239, 0, 196609, 393240, 0, 196610, 393241, 0, 196610, 393242, 0, 196610, 393243, 0, 196610, 393244, 0, 196610, 393245, 0, 196610, 393246, 0, 196610, 393247, 0, 196610, 393248, 0, 196610, 393249, 0, 196610, 393250, 0, 196610, 393251, 0, 196610, 393252, 0, 196610, 393253, 0, 196610, 393254, 0, 196610, 393255, 0, 196610, 458752, 0, 0, 458753, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, 0, 0, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 458769, 0, 0, 458770, 0, 0, 458771, 0, 0, 458772, 0, 0, 458773, 0, 0, 458774, 0, 0, 458775, 0, 0, 458776, 0, 0, 458777, 0, 0, 458778, 0, 0, 458779, 0, 0, 458780, 0, 0, 458781, 0, 0, 458782, 0, 0, 458783, 0, 0, 458784, 0, 0, 458785, 0, 0, 458786, 0, 0, 458787, 0, 0, 458788, 0, 0, 458789, 0, 0, 458790, 0, 0, 458791, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 524307, 0, 0, 524308, 0, 0, 524309, 0, 0, 524310, 0, 0, 524311, 0, 0, 524312, 0, 0, 524313, 0, 0, 524314, 0, 0, 524315, 0, 0, 524316, 0, 0, 524317, 0, 0, 524318, 0, 0, 524319, 0, 0, 524320, 0, 0, 524321, 0, 0, 524322, 0, 0, 524323, 0, 0, 524324, 0, 0, 524325, 0, 0, 524326, 0, 0, 524327, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 589844, 0, 0, 589845, 0, 0, 589846, 0, 0, 589847, 0, 0, 589848, 0, 0, 589849, 0, 0, 589850, 0, 0, 589851, 0, 0, 589852, 0, 0, 589853, 0, 0, 589854, 0, 0, 589855, 0, 0, 589856, 0, 0, 589857, 0, 0, 589858, 0, 0, 589859, 0, 0, 589860, 0, 0, 589861, 0, 0, 589862, 0, 0, 589863, 0, 0, 655360, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 0, 0, 655377, 0, 0, 655378, 0, 0, 655379, 0, 0, 655380, 0, 0, 655381, 0, 0, 655382, 0, 0, 655383, 0, 0, 655384, 0, 0, 655385, 0, 0, 655386, 0, 0, 655387, 0, 0, 655388, 0, 0, 655389, 0, 0, 655390, 0, 0, 655391, 0, 0, 655392, 0, 0, 655393, 0, 0, 655394, 0, 0, 655395, 0, 0, 655396, 0, 0, 655397, 0, 0, 655398, 0, 0, 655399, 0, 0, 720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720908, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720914, 0, 0, 720915, 0, 0, 720916, 0, 0, 720917, 0, 0, 720918, 0, 0, 720919, 0, 0, 720920, 0, 0, 720921, 0, 0, 720922, 0, 0, 720923, 0, 0, 720924, 0, 0, 720925, 0, 0, 720926, 0, 0, 720927, 0, 0, 720928, 0, 0, 720929, 0, 0, 720930, 0, 0, 720931, 0, 0, 720932, 0, 0, 720933, 0, 0, 720934, 0, 0, 720935, 0, 0, 786432, 0, 0, 786433, 0, 0, 786434, 0, 0, 786435, 0, 0, 786436, 0, 0, 786437, 0, 0, 786438, 0, 0, 786439, 0, 0, 786440, 0, 0, 786441, 0, 0, 786442, 0, 0, 786443, 0, 0, 786444, 0, 0, 786445, 0, 0, 786446, 0, 0, 786447, 0, 0, 786448, 0, 0, 786449, 0, 0, 786450, 0, 0, 786451, 0, 0, 786452, 0, 0, 786453, 0, 0, 786454, 0, 0, 786455, 0, 0, 786456, 0, 0, 786457, 0, 0, 786458, 0, 0, 786459, 0, 0, 786460, 0, 0, 786461, 0, 0, 786462, 0, 0, 786463, 0, 0, 786464, 0, 0, 786465, 0, 0, 786466, 0, 0, 786467, 0, 0, 786468, 0, 0, 786469, 0, 0, 786470, 0, 0, 786471, 0, 0, 851968, 0, 65538, 851969, 0, 65538, 851970, 0, 65538, 851971, 0, 65538, 851972, 0, 65538, 851973, 0, 65538, 851974, 0, 65538, 851975, 0, 65538, 851976, 0, 65538, 851977, 0, 65538, 851978, 0, 65538, 851979, 0, 65538, 851980, 0, 65538, 851981, 0, 65538, 851982, 0, 65538, 851983, 0, 65538, 851984, 0, 65539, 851985, 0, 0, 851986, 0, 0, 851987, 0, 0, 851988, 0, 0, 851989, 0, 0, 851990, 0, 0, 851991, 0, 65537, 851992, 0, 65538, 851993, 0, 65538, 851994, 0, 65538, 851995, 0, 65538, 851996, 0, 65538, 851997, 0, 65538, 851998, 0, 65538, 851999, 0, 65538, 852000, 0, 65538, 852001, 0, 65538, 852002, 0, 65538, 852003, 0, 65538, 852004, 0, 65538, 852005, 0, 65538, 852006, 0, 65538, 852007, 0, 65538, 917504, 0, 131074, 917505, 0, 131074, 917506, 0, 131074, 917507, 0, 131074, 917508, 0, 131074, 917509, 0, 131074, 917510, 0, 131074, 917511, 0, 131074, 917512, 0, 131074, 917513, 0, 131074, 917514, 0, 131074, 917515, 0, 131074, 917516, 0, 131074, 917517, 0, 131074, 917518, 0, 131074, 917519, 0, 131074, 917520, 0, 131075, 917521, 0, 0, 917522, 0, 0, 917523, 0, 0, 917524, 0, 0, 917525, 0, 0, 917526, 0, 0, 917527, 0, 131073, 917528, 0, 131074, 917529, 0, 131074, 917530, 0, 131074, 917531, 0, 131074, 917532, 0, 131074, 917533, 0, 131074, 917534, 0, 131074, 917535, 0, 131074, 917536, 0, 131074, 917537, 0, 131074, 917538, 0, 131074, 917539, 0, 131074, 917540, 0, 131074, 917541, 0, 131074, 917542, 0, 131074, 917543, 0, 131074, 983040, 0, 131074, 983041, 0, 131074, 983042, 0, 131074, 983043, 0, 131074, 983044, 0, 131074, 983045, 0, 131074, 983046, 0, 131074, 983047, 0, 131074, 983048, 0, 131074, 983049, 0, 131074, 983050, 0, 131074, 983051, 0, 131074, 983052, 0, 131074, 983053, 0, 131074, 983054, 0, 131074, 983055, 0, 131074, 983056, 0, 131075, 983057, 0, 0, 983058, 0, 0, 983059, 0, 0, 983060, 0, 0, 983061, 0, 0, 983062, 0, 0, 983063, 0, 131073, 983064, 0, 131074, 983065, 0, 131074, 983066, 0, 131074, 983067, 0, 131074, 983068, 0, 131074, 983069, 0, 131074, 983070, 0, 131074, 983071, 0, 131074, 983072, 0, 131074, 983073, 0, 131074, 983074, 0, 131074, 983075, 0, 131074, 983076, 0, 131074, 983077, 0, 131074, 983078, 0, 131074, 983079, 0, 131074, 1048576, 0, 131074, 1048577, 0, 131074, 1048578, 0, 131074, 1048579, 0, 131074, 1048580, 0, 131074, 1048581, 0, 131074, 1048582, 0, 131074, 1048583, 0, 131074, 1048584, 0, 131074, 1048585, 0, 131074, 1048586, 0, 131074, 1048587, 0, 131074, 1048588, 0, 131074, 1048589, 0, 131074, 1048590, 0, 131074, 1048591, 0, 131074, 1048592, 0, 131075, 1048593, 0, 0, 1048594, 0, 0, 1048595, 0, 0, 1048596, 0, 0, 1048597, 0, 0, 1048598, 0, 0, 1048599, 0, 131073, 1048600, 0, 131074, 1048601, 0, 131074, 1048602, 0, 131074, 1048603, 0, 131074, 1048604, 0, 131074, 1048605, 0, 131074, 1048606, 0, 131074, 1048607, 0, 131074, 1048608, 0, 131074, 1048609, 0, 131074, 1048610, 0, 131074, 1048611, 0, 131074, 1048612, 0, 131074, 1048613, 0, 131074, 1048614, 0, 131074, 1048615, 0, 131074, 1114112, 0, 131074, 1114113, 0, 131074, 1114114, 0, 131074, 1114115, 0, 131074, 1114116, 0, 131074, 1114117, 0, 131074, 1114118, 0, 131074, 1114119, 0, 131074, 1114120, 0, 131074, 1114121, 0, 131074, 1114122, 0, 131074, 1114123, 0, 131074, 1114124, 0, 131074, 1114125, 0, 131074, 1114126, 0, 131074, 1114127, 0, 131074, 1114128, 0, 131075, 1114129, 0, 0, 1114130, 0, 0, 1114131, 0, 0, 1114132, 0, 0, 1114133, 0, 0, 1114134, 0, 0, 1114135, 0, 131073, 1114136, 0, 131074, 1114137, 0, 131074, 1114138, 0, 131074, 1114139, 0, 131074, 1114140, 0, 131074, 1114141, 0, 131074, 1114142, 0, 131074, 1114143, 0, 131074, 1114144, 0, 131074, 1114145, 0, 131074, 1114146, 0, 131074, 1114147, 0, 131074, 1114148, 0, 131074, 1114149, 0, 131074, 1114150, 0, 131074, 1114151, 0, 131074, 1179648, 0, 131074, 1179649, 0, 131074, 1179650, 0, 131074, 1179651, 0, 131074, 1179652, 0, 131074, 1179653, 0, 131074, 1179654, 0, 131074, 1179655, 0, 131074, 1179656, 0, 131074, 1179657, 0, 131074, 1179658, 0, 131074, 1179659, 0, 131074, 1179660, 0, 131074, 1179661, 0, 131074, 1179662, 0, 131074, 1179663, 0, 131074, 1179664, 0, 131075, 1179665, 0, 0, 1179666, 0, 0, 1179667, 0, 0, 1179668, 0, 0, 1179669, 0, 0, 1179670, 0, 0, 1179671, 0, 131073, 1179672, 0, 131074, 1179673, 0, 131074, 1179674, 0, 131074, 1179675, 0, 131074, 1179676, 0, 131074, 1179677, 0, 131074, 1179678, 0, 131074, 1179679, 0, 131074, 1179680, 0, 131074, 1179681, 0, 131074, 1179682, 0, 131074, 1179683, 0, 131074, 1179684, 0, 131074, 1179685, 0, 131074, 1179686, 0, 131074, 1179687, 0, 131074, 1245184, 0, 131074, 1245185, 0, 131074, 1245186, 0, 131074, 1245187, 0, 131074, 1245188, 0, 131074, 1245189, 0, 131074, 1245190, 0, 131074, 1245191, 0, 131074, 1245192, 0, 131074, 1245193, 0, 131074, 1245194, 0, 131074, 1245195, 0, 131074, 1245196, 0, 131074, 1245197, 0, 131074, 1245198, 0, 131074, 1245199, 0, 131074, 1245200, 0, 131075, 1245201, 0, 0, 1245202, 0, 0, 1245203, 0, 0, 1245204, 0, 0, 1245205, 0, 0, 1245206, 0, 0, 1245207, 0, 131073, 1245208, 0, 131074, 1245209, 0, 131074, 1245210, 0, 131074, 1245211, 0, 131074, 1245212, 0, 131074, 1245213, 0, 131074, 1245214, 0, 131074, 1245215, 0, 131074, 1245216, 0, 131074, 1245217, 0, 131074, 1245218, 0, 131074, 1245219, 0, 131074, 1245220, 0, 131074, 1245221, 0, 131074, 1245222, 0, 131074, 1245223, 0, 131074 ) [node name="Darkness" parent="PhaseOne/Entities" instance=ExtResource( 2 )] -position = Vector2( 553, 296 ) [node name="PhaseOnePlayer" parent="PhaseOne/Entities" instance=ExtResource( 4 )] position = Vector2( 596, 268 ) [node name="Fire" parent="PhaseOne/Entities" instance=ExtResource( 3 )] -position = Vector2( 640, 320 ) +position = Vector2( 640, 319 ) +intensity = 0.5 [node name="Pickups" type="Node" parent="PhaseOne/Entities"] +[node name="BranchPickup" parent="PhaseOne/Entities/Pickups" instance=ExtResource( 16 )] +position = Vector2( 590, 366 ) + +[node name="BranchPickup5" parent="PhaseOne/Entities/Pickups" instance=ExtResource( 16 )] +position = Vector2( 566, 321 ) + +[node name="BranchPickup6" parent="PhaseOne/Entities/Pickups" instance=ExtResource( 16 )] +position = Vector2( 714, 350 ) + +[node name="BranchPickup7" parent="PhaseOne/Entities/Pickups" instance=ExtResource( 16 )] +position = Vector2( 775, 318 ) + +[node name="BranchPickup2" parent="PhaseOne/Entities/Pickups" instance=ExtResource( 16 )] +position = Vector2( 680, 404 ) + +[node name="BranchPickup3" parent="PhaseOne/Entities/Pickups" instance=ExtResource( 16 )] +position = Vector2( 731, 289 ) + +[node name="BranchPickup4" parent="PhaseOne/Entities/Pickups" instance=ExtResource( 16 )] +position = Vector2( 643, 264 ) + [node name="Bullets" type="Node" parent="PhaseOne/Entities"] [node name="Enemies" type="Node" parent="PhaseOne/Entities"] +[node name="ScreenEdgeSpawner" parent="PhaseOne/Entities/Enemies" instance=ExtResource( 13 )] +spawning = ExtResource( 14 ) +bounds = Vector2( 1280, 640 ) +period_secs = 0.5 + +[node name="SetSpawnedGoalTo" parent="PhaseOne/Entities/Enemies/ScreenEdgeSpawner" instance=ExtResource( 15 )] +goal_path = NodePath("../../../Fire") + +[node name="ScreenEdgeSpawner2" parent="PhaseOne/Entities/Enemies" instance=ExtResource( 13 )] +scale = Vector2( 0.998195, 1 ) +spawning = ExtResource( 14 ) +bounds = Vector2( 1280, 640 ) +period_secs = 0.5 + +[node name="SetSpawnedGoalTo" parent="PhaseOne/Entities/Enemies/ScreenEdgeSpawner2" instance=ExtResource( 15 )] +goal_path = NodePath("../../../PhaseOnePlayer") + [node name="UserInterface" type="CanvasLayer" parent="."] [node name="TheDarkNightUI" parent="UserInterface" instance=ExtResource( 8 )] @@ -134,4 +176,7 @@ position = Vector2( 25, 30 ) texture = ExtResource( 12 ) [connection signal="intensity_changed" from="PhaseOne/Entities/Fire" to="PhaseOne/Music" method="_on_Fire_intensity_changed"] +[connection signal="intensity_reached_min" from="PhaseOne/Entities/Fire" to="." method="_on_Fire_intensity_reached_min"] +[connection signal="spawned" from="PhaseOne/Entities/Enemies/ScreenEdgeSpawner" to="PhaseOne/Entities/Enemies/ScreenEdgeSpawner/SetSpawnedGoalTo" method="set_goal"] +[connection signal="spawned" from="PhaseOne/Entities/Enemies/ScreenEdgeSpawner2" to="PhaseOne/Entities/Enemies/ScreenEdgeSpawner2/SetSpawnedGoalTo" method="set_goal"] [connection signal="pressed" from="UserInterface/TheDarkNightUI/Panel/MuteButton" to="PhaseOne/Music" method="_on_MuteButton_pressed"] diff --git a/src/mechanics/ScreenEdgeSpawner.tscn b/src/mechanics/ScreenEdgeSpawner.tscn index ad1194f..f8a00b8 100644 --- a/src/mechanics/ScreenEdgeSpawner.tscn +++ b/src/mechanics/ScreenEdgeSpawner.tscn @@ -7,4 +7,5 @@ [node name="TeleportToScreenEdge" parent="." index="1" instance=ExtResource( 2 )] +[connection signal="spawned" from="." to="TeleportToScreenEdge" method="_handle_spawned"] [connection signal="timeout" from="Period" to="TeleportToScreenEdge" method="teleport"] diff --git a/src/pickups/BranchPickup.tscn b/src/pickups/BranchPickup.tscn new file mode 100644 index 0000000..0b0e6f2 --- /dev/null +++ b/src/pickups/BranchPickup.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pickups/effects/ChangeFireIntensity.tscn" type="PackedScene" id=1] +[ext_resource path="res://src/pickups/Pickup.tscn" type="PackedScene" id=2] + +[node name="BranchPickup" instance=ExtResource( 2 )] +scale = Vector2( 0.5, 0.5 ) +duration_seconds = 0.4 +despawn_seconds = 15.0 + +[node name="Despawn" parent="." index="2"] +autostart = true + +[node name="ChangeFireIntensity" parent="." index="3" instance=ExtResource( 1 )] + +[connection signal="picked_up" from="." to="ChangeFireIntensity" method="_on_picked_up"] diff --git a/src/pickups/Pickup.gd b/src/pickups/Pickup.gd index 30cf6d8..e92551d 100644 --- a/src/pickups/Pickup.gd +++ b/src/pickups/Pickup.gd @@ -1,9 +1,8 @@ extends Area2D -export var sprite: Texture = preload("res://src/mechanics/White.png") setget set_sprite, get_sprite -export var duration_seconds: float = 1.0 setget set_duration, get_duration -export var despawn_seconds: float = INF setget set_despawn, get_despawn +export var duration_seconds: float setget set_duration, get_duration +export var despawn_seconds: float setget set_despawn, get_despawn signal picked_up signal expired @@ -11,18 +10,10 @@ signal despawned func _ready(): - set_sprite(sprite) set_duration(duration_seconds) set_despawn(despawn_seconds) -func set_sprite(value): - $Shape/Sprite.texture = value - -func get_sprite(): - return $Shape/Sprite.texture - - func set_duration(value): $Duration.wait_time = value @@ -36,7 +27,6 @@ func _on_Duration_timeout(): func set_despawn(value): $Despawn.wait_time = value - $Despawn.start() func get_despawn(): return $Despawn.wait_time diff --git a/src/pickups/Pickup.tscn b/src/pickups/Pickup.tscn index 07f7196..da2e5a6 100644 --- a/src/pickups/Pickup.tscn +++ b/src/pickups/Pickup.tscn @@ -1,13 +1,15 @@ [gd_scene load_steps=5 format=2] -[ext_resource path="res://src/entities/behaviours/SpriteRandomRotation.gd" type="Script" id=1] +[ext_resource path="res://src/behaviours/graphics/RandomRotationOnReady.gd" type="Script" id=1] [ext_resource path="res://src/pickups/Branch1.png" type="Texture" id=2] -[ext_resource path="res://src/entities/Pickup.gd" type="Script" id=3] +[ext_resource path="res://src/pickups/Pickup.gd" type="Script" id=3] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 16, 16 ) [node name="Pickup" type="Area2D"] +collision_layer = 16 +collision_mask = 16 input_pickable = false script = ExtResource( 3 ) diff --git a/src/pickups/RapidFirePickup.tscn b/src/pickups/RapidFirePickup.tscn new file mode 100644 index 0000000..cd1dc50 --- /dev/null +++ b/src/pickups/RapidFirePickup.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://src/pickups/effects/RapidFire.tscn" type="PackedScene" id=1] +[ext_resource path="res://src/pickups/WeaponCrossbow.png" type="Texture" id=2] +[ext_resource path="res://src/pickups/Pickup.tscn" type="PackedScene" id=3] + +[node name="RapidFirePickup" instance=ExtResource( 3 )] +scale = Vector2( 0.5, 0.5 ) +duration_seconds = inf + +[node name="Sprite" parent="Shape" index="0"] +scale = Vector2( 2, 2 ) +texture = ExtResource( 2 ) + +[node name="RapidFire" parent="." index="3" instance=ExtResource( 1 )] +new_cooldown = 0.1 + +[connection signal="picked_up" from="." to="RapidFire" method="_on_picked_up"] diff --git a/src/mechanics/WeaponCrossbow.png b/src/pickups/WeaponCrossbow.png similarity index 100% rename from src/mechanics/WeaponCrossbow.png rename to src/pickups/WeaponCrossbow.png diff --git a/src/mechanics/WeaponCrossbow.png.import b/src/pickups/WeaponCrossbow.png.import similarity index 69% rename from src/mechanics/WeaponCrossbow.png.import rename to src/pickups/WeaponCrossbow.png.import index 4b7d2b5..6844fe6 100644 --- a/src/mechanics/WeaponCrossbow.png.import +++ b/src/pickups/WeaponCrossbow.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WeaponCrossbow.png-0a9cc264e092ccff57799323e11448eb.stex" +path="res://.import/WeaponCrossbow.png-e19361cc3a5a60e770b810055c1aa183.stex" metadata={ "vram_texture": false } [deps] -source_file="res://src/mechanics/WeaponCrossbow.png" -dest_files=[ "res://.import/WeaponCrossbow.png-0a9cc264e092ccff57799323e11448eb.stex" ] +source_file="res://src/pickups/WeaponCrossbow.png" +dest_files=[ "res://.import/WeaponCrossbow.png-e19361cc3a5a60e770b810055c1aa183.stex" ] [params] diff --git a/src/pickups/effects/ChangeFireIntensity.gd b/src/pickups/effects/ChangeFireIntensity.gd index a348437..cd13e86 100644 --- a/src/pickups/effects/ChangeFireIntensity.gd +++ b/src/pickups/effects/ChangeFireIntensity.gd @@ -1,9 +1,8 @@ extends Node -export var target_path: NodePath = NodePath("../../Fire") export var amount_per_second: float = 0.2 -onready var target = get_node(target_path) +onready var target = get_tree().root.find_node("Fire", true, false) onready var pickup: Area2D = get_parent() var active = false diff --git a/src/pickups/effects/RapidFire.gd b/src/pickups/effects/RapidFire.gd new file mode 100644 index 0000000..64afd92 --- /dev/null +++ b/src/pickups/effects/RapidFire.gd @@ -0,0 +1,15 @@ +extends Node +class_name RapidFire + + +export var new_cooldown: float + +onready var target = get_tree().root.find_node("PhaseOnePlayer", true, false) +onready var pickup: Area2D = get_parent() + + +func _on_picked_up(): + var shoot = target.get_node("SpawnOnShoot") + shoot.cooldown = new_cooldown + shoot.rapid_fire = true + diff --git a/src/pickups/effects/RapidFire.tscn b/src/pickups/effects/RapidFire.tscn new file mode 100644 index 0000000..5db28d7 --- /dev/null +++ b/src/pickups/effects/RapidFire.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://src/pickups/effects/RapidFire.gd" type="Script" id=1] + +[node name="RapidFire" type="Node"] +script = ExtResource( 1 ) From 029dcf450c8bf105e6bd17db4279495ab6389b02 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Apr 2022 16:18:58 +0200 Subject: [PATCH 09/17] :wrench: Unfilter --- src/entities/players/CharacterFront.png.import | 2 +- src/entities/players/CharacterFrontLeft.png.import | 2 +- src/mechanics/EnemySpider.png.import | 2 +- src/mechanics/EnemySpiderSanta.png.import | 2 +- src/mechanics/Snowflake.png.import | 2 +- src/pickups/WeaponCrossbow.png.import | 2 +- src/ui/LifeBarBg.png.import | 2 +- src/ui/LifeBarFg.png.import | 2 +- src/ui/Music_off.png.import | 2 +- src/ui/Music_on.png.import | 2 +- src/ui/PlayButton.png.import | 2 +- src/ui/Title.png.import | 2 +- src/ui/UIBar.png.import | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/entities/players/CharacterFront.png.import b/src/entities/players/CharacterFront.png.import index e868946..b27e4c2 100644 --- a/src/entities/players/CharacterFront.png.import +++ b/src/entities/players/CharacterFront.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/entities/players/CharacterFrontLeft.png.import b/src/entities/players/CharacterFrontLeft.png.import index bad89a5..1b655c8 100644 --- a/src/entities/players/CharacterFrontLeft.png.import +++ b/src/entities/players/CharacterFrontLeft.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/mechanics/EnemySpider.png.import b/src/mechanics/EnemySpider.png.import index 84fb787..de04712 100644 --- a/src/mechanics/EnemySpider.png.import +++ b/src/mechanics/EnemySpider.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/mechanics/EnemySpiderSanta.png.import b/src/mechanics/EnemySpiderSanta.png.import index 0448b97..73987f2 100644 --- a/src/mechanics/EnemySpiderSanta.png.import +++ b/src/mechanics/EnemySpiderSanta.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/mechanics/Snowflake.png.import b/src/mechanics/Snowflake.png.import index 8fd5bca..ebde411 100644 --- a/src/mechanics/Snowflake.png.import +++ b/src/mechanics/Snowflake.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/pickups/WeaponCrossbow.png.import b/src/pickups/WeaponCrossbow.png.import index 6844fe6..cb47e91 100644 --- a/src/pickups/WeaponCrossbow.png.import +++ b/src/pickups/WeaponCrossbow.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/ui/LifeBarBg.png.import b/src/ui/LifeBarBg.png.import index 4e55ad9..664c35f 100644 --- a/src/ui/LifeBarBg.png.import +++ b/src/ui/LifeBarBg.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/ui/LifeBarFg.png.import b/src/ui/LifeBarFg.png.import index 6e6b68d..a53dd13 100644 --- a/src/ui/LifeBarFg.png.import +++ b/src/ui/LifeBarFg.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/ui/Music_off.png.import b/src/ui/Music_off.png.import index b7f27c7..55fbcab 100644 --- a/src/ui/Music_off.png.import +++ b/src/ui/Music_off.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/ui/Music_on.png.import b/src/ui/Music_on.png.import index 4af38e0..bac75f4 100644 --- a/src/ui/Music_on.png.import +++ b/src/ui/Music_on.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/ui/PlayButton.png.import b/src/ui/PlayButton.png.import index 30a6acc..c44bc8e 100644 --- a/src/ui/PlayButton.png.import +++ b/src/ui/PlayButton.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/ui/Title.png.import b/src/ui/Title.png.import index 2d06982..43eb17c 100644 --- a/src/ui/Title.png.import +++ b/src/ui/Title.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/src/ui/UIBar.png.import b/src/ui/UIBar.png.import index 9ea2b03..4f6ca3b 100644 --- a/src/ui/UIBar.png.import +++ b/src/ui/UIBar.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 From 7bfcbab7e8336b7567c92f0b242d7d1eac8bb48d Mon Sep 17 00:00:00 2001 From: Cookie-CHR Date: Mon, 4 Apr 2022 16:38:17 +0200 Subject: [PATCH 10/17] =?UTF-8?q?=F0=9F=8E=B6=20Boss=20music?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/music/BossDrum.mp3 | 3 +++ src/music/BossGuitar.mp3 | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 src/music/BossDrum.mp3 create mode 100644 src/music/BossGuitar.mp3 diff --git a/src/music/BossDrum.mp3 b/src/music/BossDrum.mp3 new file mode 100644 index 0000000..cbbb646 --- /dev/null +++ b/src/music/BossDrum.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8d310e629890b6d07cdce1acf6901cd95c567b8d9b0f8fa6af476ba8a516bf0 +size 685915 diff --git a/src/music/BossGuitar.mp3 b/src/music/BossGuitar.mp3 new file mode 100644 index 0000000..2c4dab9 --- /dev/null +++ b/src/music/BossGuitar.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3849e4c2e29473a75d3d6b5d5e43e4abae516493daec9f89ef436a8db410cc4 +size 685915 From afc1a8b4bd3485f9cb944613b5c348e2ea8c60ce Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Apr 2022 16:53:43 +0200 Subject: [PATCH 11/17] :boom: another bundle of quick changes --- src/behaviours/BulletSpawn.gd | 39 ------------------- .../movement/AttractedToMovement.gd | 8 ++-- .../targeting/SetGoalReachedConsequences.gd | 13 +++++++ .../targeting/SetGoalReachedConsequences.tscn | 6 +++ src/entities/bullets/ArrowAlternative.gd | 2 + src/entities/enemies/ChaserEnemy.tscn | 8 +++- src/entities/fire/Fire.gd | 8 ++++ src/levels/Game.tscn | 8 +++- src/pickups/Pickup.gd | 6 ++- src/pickups/effects/ChangeFireIntensity.gd | 5 --- 10 files changed, 51 insertions(+), 52 deletions(-) delete mode 100644 src/behaviours/BulletSpawn.gd create mode 100644 src/behaviours/targeting/SetGoalReachedConsequences.gd create mode 100644 src/behaviours/targeting/SetGoalReachedConsequences.tscn diff --git a/src/behaviours/BulletSpawn.gd b/src/behaviours/BulletSpawn.gd deleted file mode 100644 index ac4ff53..0000000 --- a/src/behaviours/BulletSpawn.gd +++ /dev/null @@ -1,39 +0,0 @@ -extends Node - - -export var bullet: PackedScene -export var bullet_container_node_path: String - - -onready var bullet_container_node: Node = get_node(bullet_container_node_path) -onready var source: Node2D = get_parent() - - -var _timer : Timer = null - -func _ready(): - _timer = Timer.new() - add_child(_timer) - _timer.set_wait_time(0.3) - _timer.set_one_shot(true) - _timer.start() - -func _process(_delta): - print(_timer.get_time_left()) - if Input.is_action_just_pressed("player_shoot") and _timer.get_time_left()==0: - shoot() - - #restart timer - _timer.set_wait_time(0.3) - _timer.set_one_shot(true) - _timer.start() - - -func shoot(): - var new_bullet = bullet.instance() - new_bullet.set_position(source.global_position) - bullet_container_node.add_child(new_bullet) - var rotation = new_bullet.get_angle_to(source.get_global_mouse_position()) - new_bullet.set_rotation(rotation) - new_bullet.get_node("Ownership").entity_owner = source - new_bullet.add_collision_exception_with(source) diff --git a/src/behaviours/movement/AttractedToMovement.gd b/src/behaviours/movement/AttractedToMovement.gd index 0ba946c..5cfa318 100644 --- a/src/behaviours/movement/AttractedToMovement.gd +++ b/src/behaviours/movement/AttractedToMovement.gd @@ -3,8 +3,8 @@ class_name AttractedToMovement signal moving_in_direction(direction) -signal touching_goal -signal goal_reached +signal touching_goal(who) +signal goal_reached(who) export var movement_per_second: float @@ -24,9 +24,9 @@ func move(): for slide_no in parent.get_slide_count(): var slide = parent.get_slide_collision(slide_no) if slide.collider == goal: - emit_signal("touching_goal") + emit_signal("touching_goal", self) if not _goal_reached_triggered: - emit_signal("goal_reached") + emit_signal("goal_reached", self) _goal_reached_triggered = true diff --git a/src/behaviours/targeting/SetGoalReachedConsequences.gd b/src/behaviours/targeting/SetGoalReachedConsequences.gd new file mode 100644 index 0000000..e16e6dc --- /dev/null +++ b/src/behaviours/targeting/SetGoalReachedConsequences.gd @@ -0,0 +1,13 @@ +extends Node + + +signal goal_reached(who) + + +func set_consequences(node): + var movement = node.get_node("AttractedToMovement") + movement.connect("goal_reached", self, "_on_goal_reached") + + +func _on_goal_reached(who): + emit_signal("goal_reached", who) diff --git a/src/behaviours/targeting/SetGoalReachedConsequences.tscn b/src/behaviours/targeting/SetGoalReachedConsequences.tscn new file mode 100644 index 0000000..213ffe8 --- /dev/null +++ b/src/behaviours/targeting/SetGoalReachedConsequences.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://src/behaviours/targeting/SetGoalReachedConsequences.gd" type="Script" id=1] + +[node name="SetGoalReachedConsequences" type="Node"] +script = ExtResource( 1 ) diff --git a/src/entities/bullets/ArrowAlternative.gd b/src/entities/bullets/ArrowAlternative.gd index f85e707..63bc968 100644 --- a/src/entities/bullets/ArrowAlternative.gd +++ b/src/entities/bullets/ArrowAlternative.gd @@ -12,10 +12,12 @@ export var lit_damage: int = 5 func _on_Flammable_caught_fire(): $Shape/Sprite.texture = lit_texture $Damaging.damage = lit_damage + $Damaging.destroy_on_damage = false $Light.visible = true func _on_Flammable_extinguished_fire(): $Shape/Sprite.texture = dim_texture $Damaging.damage = dim_damage + $Damaging.destroy_on_damage = true $Light.visible = false diff --git a/src/entities/enemies/ChaserEnemy.tscn b/src/entities/enemies/ChaserEnemy.tscn index 4513eb1..0c0fca2 100644 --- a/src/entities/enemies/ChaserEnemy.tscn +++ b/src/entities/enemies/ChaserEnemy.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=13 format=2] [ext_resource path="res://src/entities/enemies/EnemySnowmanLeft.png" type="Texture" id=1] [ext_resource path="res://src/pickups/BranchPickup.tscn" type="PackedScene" id=2] @@ -9,6 +9,7 @@ [ext_resource path="res://src/entities/enemies/EnemySnowmanFront.png" type="Texture" id=7] [ext_resource path="res://src/entities/enemies/EnemySnowmanRight.png" type="Texture" id=8] [ext_resource path="res://src/behaviours/graphics/FourSidedSprite.tscn" type="PackedScene" id=9] +[ext_resource path="res://src/sounds/Death.mp3" type="AudioStream" id=10] [sub_resource type="CapsuleShape2D" id=1] radius = 9.0 @@ -52,4 +53,9 @@ loot_weights = [ 1.0, 1.0, 0.1 ] [node name="AttractedToMovement" parent="." index="4" instance=ExtResource( 3 )] +[node name="MeltSound" parent="." index="5"] +stream = ExtResource( 10 ) + +[connection signal="dead" from="Damageable" to="DropLoot" method="create_drop"] +[connection signal="dead" from="Damageable" to="MeltSound" method="_on_Damageable_dead"] [connection signal="moving_in_direction" from="AttractedToMovement" to="Shape/FourSidedSprite" method="turn"] diff --git a/src/entities/fire/Fire.gd b/src/entities/fire/Fire.gd index 64514f4..dd116fe 100644 --- a/src/entities/fire/Fire.gd +++ b/src/entities/fire/Fire.gd @@ -5,6 +5,8 @@ export var intensity: float = 1.0 setget set_intensity export var change_per_second: float = - 1.0 / 60.0 export var min_intensity: float = 0 export var max_intensity: float = INF +export var enemy_touch_penalty = 0.1 + signal intensity_changed(value) signal intensity_at_max @@ -47,3 +49,9 @@ func _on_Flame_body_entered(body: PhysicsBody2D): var flammable = body.get_node("Flammable") if flammable != null: flammable.catch_fire() + + +func _on_Enemy_goal_reached(who): + intensity -= enemy_touch_penalty + # Melt + who.queue_free() diff --git a/src/levels/Game.tscn b/src/levels/Game.tscn index 4d0568e..8e7ad6d 100644 --- a/src/levels/Game.tscn +++ b/src/levels/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=21 format=2] +[gd_scene load_steps=22 format=2] [ext_resource path="res://src/mechanics/Background.tscn" type="PackedScene" id=1] [ext_resource path="res://src/mechanics/Darkness.tscn" type="PackedScene" id=2] @@ -16,6 +16,7 @@ [ext_resource path="res://src/entities/enemies/ChaserEnemy.tscn" type="PackedScene" id=14] [ext_resource path="res://src/behaviours/targeting/SetSpawnedGoalTo.tscn" type="PackedScene" id=15] [ext_resource path="res://src/pickups/BranchPickup.tscn" type="PackedScene" id=16] +[ext_resource path="res://src/behaviours/targeting/SetGoalReachedConsequences.tscn" type="PackedScene" id=17] [ext_resource path="res://src/music/BaseDrum.mp3" type="AudioStream" id=19] [ext_resource path="res://src/music/BaseBell.mp3" type="AudioStream" id=20] [ext_resource path="res://src/music/BaseChoir.mp3" type="AudioStream" id=21] @@ -113,6 +114,8 @@ period_secs = 0.5 [node name="SetSpawnedGoalTo" parent="PhaseOne/Entities/Enemies/ScreenEdgeSpawner" instance=ExtResource( 15 )] goal_path = NodePath("../../../Fire") +[node name="SetGoalReachedConsequences" parent="PhaseOne/Entities/Enemies/ScreenEdgeSpawner" instance=ExtResource( 17 )] + [node name="ScreenEdgeSpawner2" parent="PhaseOne/Entities/Enemies" instance=ExtResource( 13 )] scale = Vector2( 0.998195, 1 ) spawning = ExtResource( 14 ) @@ -122,6 +125,8 @@ period_secs = 0.5 [node name="SetSpawnedGoalTo" parent="PhaseOne/Entities/Enemies/ScreenEdgeSpawner2" instance=ExtResource( 15 )] goal_path = NodePath("../../../PhaseOnePlayer") +[node name="SetGoalReachedConsequences" parent="PhaseOne/Entities/Enemies/ScreenEdgeSpawner2" instance=ExtResource( 17 )] + [node name="UserInterface" type="CanvasLayer" parent="."] [node name="TheDarkNightUI" parent="UserInterface" instance=ExtResource( 8 )] @@ -178,5 +183,6 @@ texture = ExtResource( 12 ) [connection signal="intensity_changed" from="PhaseOne/Entities/Fire" to="PhaseOne/Music" method="_on_Fire_intensity_changed"] [connection signal="intensity_reached_min" from="PhaseOne/Entities/Fire" to="." method="_on_Fire_intensity_reached_min"] [connection signal="spawned" from="PhaseOne/Entities/Enemies/ScreenEdgeSpawner" to="PhaseOne/Entities/Enemies/ScreenEdgeSpawner/SetSpawnedGoalTo" method="set_goal"] +[connection signal="goal_reached" from="PhaseOne/Entities/Enemies/ScreenEdgeSpawner/SetGoalReachedConsequences" to="PhaseOne/Entities/Fire" method="_on_Enemy_goal_reached"] [connection signal="spawned" from="PhaseOne/Entities/Enemies/ScreenEdgeSpawner2" to="PhaseOne/Entities/Enemies/ScreenEdgeSpawner2/SetSpawnedGoalTo" method="set_goal"] [connection signal="pressed" from="UserInterface/TheDarkNightUI/Panel/MuteButton" to="PhaseOne/Music" method="_on_MuteButton_pressed"] diff --git a/src/pickups/Pickup.gd b/src/pickups/Pickup.gd index e92551d..36d5c48 100644 --- a/src/pickups/Pickup.gd +++ b/src/pickups/Pickup.gd @@ -15,7 +15,8 @@ func _ready(): func set_duration(value): - $Duration.wait_time = value + if value > 0: + $Duration.wait_time = value func get_duration(): return $Duration.wait_time @@ -26,7 +27,8 @@ func _on_Duration_timeout(): func set_despawn(value): - $Despawn.wait_time = value + if value > 0: + $Despawn.wait_time = value func get_despawn(): return $Despawn.wait_time diff --git a/src/pickups/effects/ChangeFireIntensity.gd b/src/pickups/effects/ChangeFireIntensity.gd index cd13e86..2ff6c5e 100644 --- a/src/pickups/effects/ChangeFireIntensity.gd +++ b/src/pickups/effects/ChangeFireIntensity.gd @@ -8,11 +8,6 @@ onready var pickup: Area2D = get_parent() var active = false -func _ready(): - # warning-ignore: RETURN_VALUE_DISCARDED - pickup.connect("picked_up", self, "_on_picked_up") - - func _on_picked_up(): active = true From f3b7c4a92e1f655513625ce23b7f2626bfb3ca0f Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Apr 2022 16:54:49 +0200 Subject: [PATCH 12/17] :wrench: Import boss music --- src/music/BossDrum.mp3.import | 15 +++++++++++++++ src/music/BossGuitar.mp3.import | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/music/BossDrum.mp3.import create mode 100644 src/music/BossGuitar.mp3.import diff --git a/src/music/BossDrum.mp3.import b/src/music/BossDrum.mp3.import new file mode 100644 index 0000000..061b654 --- /dev/null +++ b/src/music/BossDrum.mp3.import @@ -0,0 +1,15 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +path="res://.import/BossDrum.mp3-2bfdfe7d88295d55ceececa4a0192925.mp3str" + +[deps] + +source_file="res://src/music/BossDrum.mp3" +dest_files=[ "res://.import/BossDrum.mp3-2bfdfe7d88295d55ceececa4a0192925.mp3str" ] + +[params] + +loop=true +loop_offset=0 diff --git a/src/music/BossGuitar.mp3.import b/src/music/BossGuitar.mp3.import new file mode 100644 index 0000000..1971040 --- /dev/null +++ b/src/music/BossGuitar.mp3.import @@ -0,0 +1,15 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +path="res://.import/BossGuitar.mp3-e2de794fd4225b0cdd668c1932985776.mp3str" + +[deps] + +source_file="res://src/music/BossGuitar.mp3" +dest_files=[ "res://.import/BossGuitar.mp3-e2de794fd4225b0cdd668c1932985776.mp3str" ] + +[params] + +loop=true +loop_offset=0 From 86efa55c122d080cce1a603156822806bdcb6604 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Apr 2022 16:58:52 +0200 Subject: [PATCH 13/17] :wrench: Make mute button mute sounds as well --- src/levels/PhaseOneMusic.gd | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/levels/PhaseOneMusic.gd b/src/levels/PhaseOneMusic.gd index 10d8f4d..490d7a8 100644 --- a/src/levels/PhaseOneMusic.gd +++ b/src/levels/PhaseOneMusic.gd @@ -7,26 +7,28 @@ export var bell_min: float = 0.20 export var bell_max: float = 0.60 export var drum_min: float = 0.40 export var drum_max: float = 0.80 -export var muted: bool = false setget set_mute +export var muted: bool setget set_mute, get_mute func _on_Fire_intensity_changed(value): $Choir.volume_db = (smoothstep(choir_min, choir_max, value) - 1) * 60 - $Choir.bus = "Master" if not muted and $Choir.volume_db > -60 else "Mute" + $Choir.bus = "Master" if $Choir.volume_db > -60 else "Mute" $Bell.volume_db = (smoothstep(bell_min, bell_max, value) - 1) * 60 - $Bell.bus = "Master" if not muted and $Bell.volume_db > -60 else "Mute" + $Bell.bus = "Master" if $Bell.volume_db > -60 else "Mute" $Drum.volume_db = (smoothstep(drum_min, drum_max, value) - 1) * 60 - $Drum.bus = "Master" if not muted and $Drum.volume_db > -60 else "Mute" + $Drum.bus = "Master" if $Drum.volume_db > -60 else "Mute" func set_mute(value): - muted = value - $Choir.bus = "Master" if not muted and $Choir.volume_db > -60 else "Mute" - $Bell.bus = "Master" if not muted and $Bell.volume_db > -60 else "Mute" - $Drum.bus = "Master" if not muted and $Drum.volume_db > -60 else "Mute" + var index = AudioServer.get_bus_index("Master") + AudioServer.set_bus_mute(index, value) + +func get_mute(): + var index = AudioServer.get_bus_index("Master") + return AudioServer.is_bus_mute(index) func _on_MuteButton_pressed(): - set_mute(not muted) + set_mute(not get_mute()) From 0e3d53adabf026b818d16abae21ebfdf27dbd32c Mon Sep 17 00:00:00 2001 From: Cookie-CHR Date: Mon, 4 Apr 2022 17:19:10 +0200 Subject: [PATCH 14/17] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Main=20menu=20(secon?= =?UTF-8?q?d=20version)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/levels/MainMenu.tscn | 22 +++++++++++++++++----- src/ui/Title.png | 4 ++-- src/ui/Title.png.import | 7 +------ 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/levels/MainMenu.tscn b/src/levels/MainMenu.tscn index d0984ae..f276e72 100644 --- a/src/levels/MainMenu.tscn +++ b/src/levels/MainMenu.tscn @@ -1,8 +1,14 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://src/levels/MainMenu.gd" type="Script" id=1] [ext_resource path="res://src/ui/Title.png" type="Texture" id=2] [ext_resource path="res://src/ui/PlayButton.png" type="Texture" id=3] +[ext_resource path="res://src/ui/fonts/SourceSerifPro-Light.ttf" type="DynamicFontData" id=4] +[ext_resource path="res://src/entities/fire/Fire.tscn" type="PackedScene" id=5] + +[sub_resource type="DynamicFont" id=1] +size = 70 +font_data = ExtResource( 4 ) [node name="MainMenu" type="Node2D"] script = ExtResource( 1 ) @@ -15,10 +21,16 @@ margin_bottom = 720.0 position = Vector2( 640.881, 360.696 ) texture = ExtResource( 2 ) +[node name="Fire" parent="Panel" instance=ExtResource( 5 )] +position = Vector2( 421, 365 ) +scale = Vector2( 4, 4 ) + [node name="Play" type="Button" parent="."] -margin_left = 580.0 -margin_top = 540.0 -margin_right = 12.0 -margin_bottom = 20.0 +margin_left = 944.0 +margin_top = 489.0 +margin_right = 1210.0 +margin_bottom = 615.0 +custom_fonts/font = SubResource( 1 ) +text = "Play" icon = ExtResource( 3 ) flat = true diff --git a/src/ui/Title.png b/src/ui/Title.png index 011df7b..230313e 100644 --- a/src/ui/Title.png +++ b/src/ui/Title.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9166dfac6cbc0cb2fc4bd877a88efd4414a0c515e7988725c8646679a8094b62 -size 220905 +oid sha256:10d3fefb58022900bcef7270ca4f0f8d5f825ef1bfca7198fef463b23d40b937 +size 1874421 diff --git a/src/ui/Title.png.import b/src/ui/Title.png.import index 43eb17c..ca3aae8 100644 --- a/src/ui/Title.png.import +++ b/src/ui/Title.png.import @@ -2,16 +2,11 @@ importer="texture" type="StreamTexture" -path="res://.import/Title.png-eddaf0247c16f2cd01805f96e728b10b.stex" -metadata={ -"vram_texture": false -} +valid=false [deps] source_file="res://src/ui/Title.png" -dest_files=[ "res://.import/Title.png-eddaf0247c16f2cd01805f96e728b10b.stex" ] - [params] compress/mode=0 From 6cdb32bd78db0f7b7c76db65f7ed54aa009c6468 Mon Sep 17 00:00:00 2001 From: Cookie-CHR Date: Mon, 4 Apr 2022 19:01:51 +0200 Subject: [PATCH 15/17] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Redrew=20some=20stuf?= =?UTF-8?q?f?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/CrossbowBar.gd | 15 +++++++++++++++ src/ui/CrossbowBar.tscn | 23 +++++++++++++++++++++++ src/ui/LifeBarBg.png | 4 ++-- src/ui/LifeBarFg.png | 4 ++-- src/ui/Title.png.import | 7 ++++++- src/ui/UIBar.png | 4 ++-- 6 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 src/ui/CrossbowBar.gd create mode 100644 src/ui/CrossbowBar.tscn diff --git a/src/ui/CrossbowBar.gd b/src/ui/CrossbowBar.gd new file mode 100644 index 0000000..3ba0f60 --- /dev/null +++ b/src/ui/CrossbowBar.gd @@ -0,0 +1,15 @@ +extends Node2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +func _on_picked_up(): + print ("a") diff --git a/src/ui/CrossbowBar.tscn b/src/ui/CrossbowBar.tscn new file mode 100644 index 0000000..7bd6b9c --- /dev/null +++ b/src/ui/CrossbowBar.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://src/ui/LifeBarBg.png" type="Texture" id=1] +[ext_resource path="res://src/pickups/WeaponCrossbow.png" type="Texture" id=2] +[ext_resource path="res://src/ui/LifeBarFg.png" type="Texture" id=3] +[ext_resource path="res://src/ui/CrossbowBar.gd" type="Script" id=4] + +[node name="CrossbowBar" type="Node"] +script = ExtResource( 4 ) + +[node name="Sprite" type="Sprite" parent="."] +scale = Vector2( 3, 3 ) +texture = ExtResource( 2 ) + +[node name="TextureProgress" type="TextureProgress" parent="."] +margin_left = 28.0 +margin_top = -24.0 +margin_right = 318.0 +margin_bottom = 25.0 +value = 100.0 +texture_under = ExtResource( 1 ) +texture_progress = ExtResource( 3 ) +texture_progress_offset = Vector2( 2, 0 ) diff --git a/src/ui/LifeBarBg.png b/src/ui/LifeBarBg.png index 6eacdbc..79fa8a3 100644 --- a/src/ui/LifeBarBg.png +++ b/src/ui/LifeBarBg.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b243a9925328813a8760796fa5e14072d91573b9ed0728d0618792e92970aaac -size 5254 +oid sha256:3164fb79bd178f440bfbc4ece81250ecfded4918b67e05a54c63f8ce25c381a7 +size 824 diff --git a/src/ui/LifeBarFg.png b/src/ui/LifeBarFg.png index fb5f87e..7979132 100644 --- a/src/ui/LifeBarFg.png +++ b/src/ui/LifeBarFg.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5dd30be1538773c916fa6350976a10cc1ecd325bd928896036a88cd840e134df -size 10200 +oid sha256:a58a31693420f803a92e8dd5f9744e1a9caf444c09324881d631b18f2ef8b372 +size 5981 diff --git a/src/ui/Title.png.import b/src/ui/Title.png.import index ca3aae8..43eb17c 100644 --- a/src/ui/Title.png.import +++ b/src/ui/Title.png.import @@ -2,11 +2,16 @@ importer="texture" type="StreamTexture" -valid=false +path="res://.import/Title.png-eddaf0247c16f2cd01805f96e728b10b.stex" +metadata={ +"vram_texture": false +} [deps] source_file="res://src/ui/Title.png" +dest_files=[ "res://.import/Title.png-eddaf0247c16f2cd01805f96e728b10b.stex" ] + [params] compress/mode=0 diff --git a/src/ui/UIBar.png b/src/ui/UIBar.png index ee2fcf7..f1dc0c2 100644 --- a/src/ui/UIBar.png +++ b/src/ui/UIBar.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abede14f1b7d7a9f1c10d0e41af3027e6b423d71a99ca9baf603b3af25ed4859 -size 85907 +oid sha256:c9d05620a6a888a0bc136c3fd7eadb8ed6fd8f0c7a94265374b62d2c74fcb2c2 +size 85755 From 1f37d21c0dddc08076b5f7a2c32c12ab517e6dc1 Mon Sep 17 00:00:00 2001 From: xZef23 Date: Mon, 4 Apr 2022 19:23:42 +0200 Subject: [PATCH 16/17] :wrench: Fix sprite centering --- src/entities/fire/Fire-v1-f0000.png | 4 ++-- src/entities/fire/Fire-v1-f0002.png | 4 ++-- src/entities/fire/Fire-v1-f0004.png | 4 ++-- src/entities/fire/Fire-v1-f0006.png | 4 ++-- src/entities/fire/Fire-v1-f0008.png | 4 ++-- src/entities/fire/Fire-v1-f0010.png | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/entities/fire/Fire-v1-f0000.png b/src/entities/fire/Fire-v1-f0000.png index d21692d..d45d3c4 100644 --- a/src/entities/fire/Fire-v1-f0000.png +++ b/src/entities/fire/Fire-v1-f0000.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:371c3a7e2fd22829066e6e11fbf18706e778d0dd0019e5cdef12b9911c6d9d26 -size 6723 +oid sha256:8ec7c41405f99b7215d9e3efa2595185a471c08b796c2f143136856f602aa5ab +size 6844 diff --git a/src/entities/fire/Fire-v1-f0002.png b/src/entities/fire/Fire-v1-f0002.png index 27447f6..8388f9c 100644 --- a/src/entities/fire/Fire-v1-f0002.png +++ b/src/entities/fire/Fire-v1-f0002.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2639bd32f9d0f3c8c983385ea40e83f6fddfe3ce3466867b49d18d5267a4287e -size 7321 +oid sha256:8023387d5e9f6ee0c4af518061149abb1eab1038e9a583880663e789abee0e3f +size 7431 diff --git a/src/entities/fire/Fire-v1-f0004.png b/src/entities/fire/Fire-v1-f0004.png index 3769eba..f0de79d 100644 --- a/src/entities/fire/Fire-v1-f0004.png +++ b/src/entities/fire/Fire-v1-f0004.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:761e7775b25f4328f8d8b386621e241cc587e57e591cba46243fc4d6ad32e39e -size 8560 +oid sha256:b312c5280ebce710e2e094843ff8ac322095af9b758e94bfe5ef71fa6e2757f5 +size 8840 diff --git a/src/entities/fire/Fire-v1-f0006.png b/src/entities/fire/Fire-v1-f0006.png index 5b1f9f3..ed4c53a 100644 --- a/src/entities/fire/Fire-v1-f0006.png +++ b/src/entities/fire/Fire-v1-f0006.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24abb7bf5cba5a4ec78f6c09f86f3f86eb8f752cafac6b4f4557c5b30708751c -size 7684 +oid sha256:dca76f928e680a633b9f4f0ec8521471c7ff6493e90b721b9b9a361f124a0c91 +size 8356 diff --git a/src/entities/fire/Fire-v1-f0008.png b/src/entities/fire/Fire-v1-f0008.png index d21692d..af53f4d 100644 --- a/src/entities/fire/Fire-v1-f0008.png +++ b/src/entities/fire/Fire-v1-f0008.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:371c3a7e2fd22829066e6e11fbf18706e778d0dd0019e5cdef12b9911c6d9d26 -size 6723 +oid sha256:374a5c5c3872424aa83f96f2bbfcf00b03e66732cfbfcb122f4d5dab99efa2e4 +size 7270 diff --git a/src/entities/fire/Fire-v1-f0010.png b/src/entities/fire/Fire-v1-f0010.png index c91d84e..79fccd7 100644 --- a/src/entities/fire/Fire-v1-f0010.png +++ b/src/entities/fire/Fire-v1-f0010.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abc7709ccc5af10d421012b5d113f698844774741c3037127a1aa08997f0f4d6 -size 7286 +oid sha256:8c58b9bd8169123b235f0244b7c4179422f9c4323aaa1fab5f860b42aa4b4ab4 +size 7350 From 30d83c44f07f85e49fbaa3c164b9da94dffb99d3 Mon Sep 17 00:00:00 2001 From: Cookie-CHR Date: Mon, 4 Apr 2022 19:47:58 +0200 Subject: [PATCH 17/17] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Redrew=20some=20more?= =?UTF-8?q?=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/levels/Game.tscn | 11 ++++++----- src/ui/Music_on.png | 4 ++-- src/ui/PlayButton.png | 4 ++-- src/ui/UIBar.png | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/levels/Game.tscn b/src/levels/Game.tscn index 8e7ad6d..e1808df 100644 --- a/src/levels/Game.tscn +++ b/src/levels/Game.tscn @@ -143,6 +143,10 @@ anchor_bottom = 1.0 position = Vector2( 640, 40 ) texture = ExtResource( 7 ) +[node name="TimerBG" type="Sprite" parent="UserInterface/TheDarkNightUI/Panel"] +position = Vector2( 630, 40 ) +texture = ExtResource( 10 ) + [node name="TimeSurvived" type="Label" parent="UserInterface/TheDarkNightUI/Panel"] anchor_bottom = 1.0 margin_left = 600.0 @@ -164,7 +168,7 @@ margin_bottom = -15.0 value = 50.0 texture_under = ExtResource( 10 ) texture_progress = ExtResource( 9 ) -texture_progress_offset = Vector2( 10, 5 ) +texture_progress_offset = Vector2( 2, 0 ) [node name="MuteButton" type="Button" parent="UserInterface/TheDarkNightUI/Panel"] anchor_left = 1.0 @@ -174,12 +178,9 @@ margin_left = -100.0 margin_top = 10.0 margin_right = -50.0 margin_bottom = -10.0 +icon = ExtResource( 12 ) flat = true -[node name="Sprite" type="Sprite" parent="UserInterface/TheDarkNightUI/Panel/MuteButton"] -position = Vector2( 25, 30 ) -texture = ExtResource( 12 ) - [connection signal="intensity_changed" from="PhaseOne/Entities/Fire" to="PhaseOne/Music" method="_on_Fire_intensity_changed"] [connection signal="intensity_reached_min" from="PhaseOne/Entities/Fire" to="." method="_on_Fire_intensity_reached_min"] [connection signal="spawned" from="PhaseOne/Entities/Enemies/ScreenEdgeSpawner" to="PhaseOne/Entities/Enemies/ScreenEdgeSpawner/SetSpawnedGoalTo" method="set_goal"] diff --git a/src/ui/Music_on.png b/src/ui/Music_on.png index 30c27a0..4b06ee5 100644 --- a/src/ui/Music_on.png +++ b/src/ui/Music_on.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3fa620645c490359413f5d91b1d10c488caae8adf0d807ebbfe678e45eea7423 -size 3486 +oid sha256:d77ff14aa833ef92d893843f6c7fcf669081cb0fa384c7fa5afc1637ebb1b7a0 +size 14298 diff --git a/src/ui/PlayButton.png b/src/ui/PlayButton.png index 74d81b8..9728067 100644 --- a/src/ui/PlayButton.png +++ b/src/ui/PlayButton.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:619dda962506a760592ec31288804014beef768e092bbc7478c0fe0be791f59a -size 7313 +oid sha256:0e9eda671259bf3cf5a93db8e81c7f4fc59dbd599e134d261f4c80845f7ea344 +size 18382 diff --git a/src/ui/UIBar.png b/src/ui/UIBar.png index f1dc0c2..86a0276 100644 --- a/src/ui/UIBar.png +++ b/src/ui/UIBar.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9d05620a6a888a0bc136c3fd7eadb8ed6fd8f0c7a94265374b62d2c74fcb2c2 -size 85755 +oid sha256:2566fb7d2737a21fab84c32bad2a2e8135e4dd4bf70282aa892ed164fd0a88ae +size 83277