From c140049cf789ce87d137f07a5340a4cbc3664ede Mon Sep 17 00:00:00 2001 From: Luna Brovchuk Date: Mon, 2 Oct 2023 00:06:57 +0200 Subject: [PATCH] Trash Path Remake, Minor Trash Fixes, Gameover Art --- src/models/enemies/bat/Bat.tscn | 1 + .../sprites/path/HorizontalTrashPath.tres | 51 ++++++++++++++++++ .../sprites/path/VerticalTrashPath.tres | 41 ++++++++++++++ .../sprites/path/horizontal_animation.png | Bin 0 -> 3243 bytes .../path/horizontal_animation.png.import | 35 ++++++++++++ .../sprites/path/vertical_animation.png | Bin 0 -> 2612 bytes .../path/vertical_animation.png.import | 35 ++++++++++++ src/models/enemies/trash_can/trash_can.gd | 39 ++++++++------ src/scenes/game/Game.tscn | 47 +++++++++++++++- src/scenes/game/game.gd | 4 +- src/scenes/game/sprites/gameover.png | Bin 0 -> 10021 bytes src/scenes/game/sprites/gameover.png.import | 35 ++++++++++++ src/scripts/global.gd | 6 ++- 13 files changed, 273 insertions(+), 21 deletions(-) create mode 100644 src/models/enemies/trash_can/sprites/path/HorizontalTrashPath.tres create mode 100644 src/models/enemies/trash_can/sprites/path/VerticalTrashPath.tres create mode 100644 src/models/enemies/trash_can/sprites/path/horizontal_animation.png create mode 100644 src/models/enemies/trash_can/sprites/path/horizontal_animation.png.import create mode 100644 src/models/enemies/trash_can/sprites/path/vertical_animation.png create mode 100644 src/models/enemies/trash_can/sprites/path/vertical_animation.png.import create mode 100644 src/scenes/game/sprites/gameover.png create mode 100644 src/scenes/game/sprites/gameover.png.import diff --git a/src/models/enemies/bat/Bat.tscn b/src/models/enemies/bat/Bat.tscn index 940b0be..7425150 100644 --- a/src/models/enemies/bat/Bat.tscn +++ b/src/models/enemies/bat/Bat.tscn @@ -19,6 +19,7 @@ script = ExtResource( 2 ) use_parent_material = true frames = ExtResource( 1 ) animation = "idle" +frame = 1 playing = true centered = false diff --git a/src/models/enemies/trash_can/sprites/path/HorizontalTrashPath.tres b/src/models/enemies/trash_can/sprites/path/HorizontalTrashPath.tres new file mode 100644 index 0000000..670bbf0 --- /dev/null +++ b/src/models/enemies/trash_can/sprites/path/HorizontalTrashPath.tres @@ -0,0 +1,51 @@ +[gd_resource type="SpriteFrames" load_steps=10 format=2] + +[ext_resource path="res://src/models/enemies/trash_can/sprites/path/horizontal_animation.png" type="Texture" id=1] + +[sub_resource type="AtlasTexture" id=2] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 280, 11 ) + +[sub_resource type="AtlasTexture" id=3] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 0, 11, 280, 11 ) + +[sub_resource type="AtlasTexture" id=4] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 0, 22, 280, 11 ) + +[sub_resource type="AtlasTexture" id=5] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 0, 33, 280, 11 ) + +[sub_resource type="AtlasTexture" id=6] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 0, 44, 280, 11 ) + +[sub_resource type="AtlasTexture" id=7] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 0, 55, 280, 11 ) + +[sub_resource type="AtlasTexture" id=8] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 0, 66, 280, 11 ) + +[sub_resource type="AtlasTexture" id=9] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 0, 77, 280, 11 ) + +[resource] +animations = [ { +"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ], +"loop": false, +"name": "default", +"speed": 7.0 +} ] diff --git a/src/models/enemies/trash_can/sprites/path/VerticalTrashPath.tres b/src/models/enemies/trash_can/sprites/path/VerticalTrashPath.tres new file mode 100644 index 0000000..9a62ea3 --- /dev/null +++ b/src/models/enemies/trash_can/sprites/path/VerticalTrashPath.tres @@ -0,0 +1,41 @@ +[gd_resource type="SpriteFrames" load_steps=8 format=2] + +[ext_resource path="res://src/models/enemies/trash_can/sprites/path/vertical_animation.png" type="Texture" id=1] + +[sub_resource type="AtlasTexture" id=1] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 11, 80 ) + +[sub_resource type="AtlasTexture" id=2] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 11, 0, 11, 80 ) + +[sub_resource type="AtlasTexture" id=3] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 22, 0, 11, 80 ) + +[sub_resource type="AtlasTexture" id=4] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 33, 0, 11, 80 ) + +[sub_resource type="AtlasTexture" id=5] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 44, 0, 11, 80 ) + +[sub_resource type="AtlasTexture" id=6] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 55, 0, 11, 80 ) + +[resource] +animations = [ { +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ], +"loop": true, +"name": "default", +"speed": 4.0 +} ] diff --git a/src/models/enemies/trash_can/sprites/path/horizontal_animation.png b/src/models/enemies/trash_can/sprites/path/horizontal_animation.png new file mode 100644 index 0000000000000000000000000000000000000000..a08c66f725b44f4c78fdbb0bf3af7b70ca078367 GIT binary patch literal 3243 zcmcIn3se(V8Xl^k1Zph`#dkJpRb-OMi;&R(3J6$(fRVStWHNz}r%8|qu2NksqCm@0 z;J6e;t45JmHM)R+S&F(+1r12`s30sVBH|Gg6(4)UYu&E8o}RNgCzCrf-~ImY|G)p< zd$J?I-{*7ER1yS1pZocG1woL7BN&H{w*psc{(S-Xu~zwpX&}gElKE=^?ac)Ut1O8i zR2#})f#OOz6%#3i1XU+j0W<_HcGsyeTuNxkLLx?@;8A)iswrfNh(`%w^AWzvlZci0 zCaQ^5iT(mSQHpa#6n8iBVjT(y*O+p2G#K>gS;phn;+9ClagGLZxTI|2T42Icart5!zl_H6F!>2&`eAG{&(P9dm@bltP zfG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MxtFQcM=-|%whBNP7I&zP{bh_%sOJUb~cMV{|c;uGx`A5ddiy9rWW?u95 360: - path_sprite.call_deferred("free") self.call_deferred("free") if self.global_position.x > last_x + 7: last_x = self.global_position.x @@ -73,7 +78,6 @@ func _physics_process(delta): else: velocity.x -= horizontal_speed if self.global_position.x < 0: - path_sprite.call_deferred("free") self.call_deferred("free") if self.global_position.x < last_x - 7: last_x = self.global_position.x @@ -82,13 +86,13 @@ func _physics_process(delta): else: velocity.y += vertical_speed if self.global_position.y > 160: - path_sprite.call_deferred("free") self.call_deferred("free") if self.global_position.y > last_y + 7: last_y = self.global_position.y drop_trash() - - velocity = move_and_slide(velocity) + + if start_timer >= 1.25: + velocity = move_and_slide(velocity) func _on_sprite_animation_finished(): if $Sprite.animation == "spawn": @@ -96,3 +100,4 @@ func _on_sprite_animation_finished(): func _on_Spawn_Animation_Start_timeout(): $Sprite.play("spawn") + diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index 7ef2729..69c4210 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=22 format=2] [ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=1] [ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2] @@ -14,6 +14,7 @@ [ext_resource path="res://src/scenes/game/sprites/ui_background.png" type="Texture" id=12] [ext_resource path="res://src/scenes/game/sprites/hatch1.png" type="Texture" id=13] [ext_resource path="res://src/scenes/game/sprites/hatch2.png" type="Texture" id=14] +[ext_resource path="res://src/scenes/game/sprites/gameover.png" type="Texture" id=15] [ext_resource path="res://src/scenes/game/spell_recharge_bar.gd" type="Script" id=16] [sub_resource type="RectangleShape2D" id=2] @@ -30,6 +31,37 @@ animations = [ { "speed": 5.0 } ] +[sub_resource type="Animation" id=5] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 0 ) ] +} + +[sub_resource type="Animation" id=6] +resource_name = "gameover" +length = 3.0 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.1, 1.5, 3 ), +"transitions": PoolRealArray( 3.24901, 29.8571, 2, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 0, 0, 0, 1 ) ] +} + [node name="Game" type="Node"] script = ExtResource( 11 ) @@ -171,3 +203,16 @@ margin_bottom = 3.0 [node name="Right" type="Control" parent="UIWrapper/UI"] margin_right = 40.0 margin_bottom = 40.0 + +[node name="Gameover" type="Control" parent="UIWrapper"] +margin_right = 320.0 +margin_bottom = 180.0 + +[node name="Sprite" type="Sprite" parent="UIWrapper/Gameover"] +modulate = Color( 1, 1, 1, 0 ) +texture = ExtResource( 15 ) +centered = false + +[node name="AnimationPlayer" type="AnimationPlayer" parent="UIWrapper/Gameover"] +anims/RESET = SubResource( 5 ) +anims/gameover = SubResource( 6 ) diff --git a/src/scenes/game/game.gd b/src/scenes/game/game.gd index 3869fe6..c6c3895 100644 --- a/src/scenes/game/game.gd +++ b/src/scenes/game/game.gd @@ -13,8 +13,8 @@ var mob_threshold = [5, 7, 10, 7] func _ready(): Global.playing = true - Global.play_time = 70 - Global.health = 3 + Global.play_time = 120 + Global.health = 1 Global.add_health(0) func pause(): diff --git a/src/scenes/game/sprites/gameover.png b/src/scenes/game/sprites/gameover.png new file mode 100644 index 0000000000000000000000000000000000000000..f7bc88ad5aaf4eb7caef003a7b9d8b28eb203167 GIT binary patch literal 10021 zcmcgy2|Sc*+n>Zq$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=3TA;T_-#J;~}v2kdhf9E@!;#mATJjwF4&_=v5BJ9fu6DEN5SH-mHn!@airs z^Nekb?nkE&5Dm$iEUj$o>e?}dU5N*lduxshVsz}EFXYs$Ju>>pq9^?LbdUzFpB}zq zclpuK11765y681WwF=1t!BLc;9_x_;p1`MxGkdio4d)qSD`RDiM@KClzKw5w{rLp& z%ysa5_nN(WUO`x6#8Bt9{$t`k5h7I648QZ|F5qb9;>@5Zt~i`W!?II;~&`!bxm|iw4B2K2Oqt$ A(EtDd literal 0 HcmV?d00001 diff --git a/src/scenes/game/sprites/gameover.png.import b/src/scenes/game/sprites/gameover.png.import new file mode 100644 index 0000000..efc7465 --- /dev/null +++ b/src/scenes/game/sprites/gameover.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/gameover.png-46b9ccb4c7936f430dcf3c2c305dfc1e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/game/sprites/gameover.png" +dest_files=[ "res://.import/gameover.png-46b9ccb4c7936f430dcf3c2c305dfc1e.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=false +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=false +svg/scale=1.0 diff --git a/src/scripts/global.gd b/src/scripts/global.gd index b46bfd2..cda2a9f 100644 --- a/src/scripts/global.gd +++ b/src/scripts/global.gd @@ -18,4 +18,8 @@ func add_health(amount): health = clamp(health + amount, 0, 3) get_tree().get_root().get_node("Game/UIWrapper/UI/Left/Health/HealthSprite").frame = health if health == 0: - return_to_menu() # TODO endgame + playing = false + var animplayer = get_tree().get_root().get_node("Game/UIWrapper/Gameover/AnimationPlayer") + animplayer.play("gameover") + yield(animplayer, "animation_finished") + return_to_menu()