diff --git a/res/sounds/card_select/card_select.ogg b/res/sounds/card_select/card_select.ogg new file mode 100644 index 0000000..ec6c6f2 Binary files /dev/null and b/res/sounds/card_select/card_select.ogg differ diff --git a/res/sounds/card_select/card_select.ogg.import b/res/sounds/card_select/card_select.ogg.import new file mode 100644 index 0000000..f955d76 --- /dev/null +++ b/res/sounds/card_select/card_select.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/card_select.ogg-d67a6f7f8c8f8a582e1c42a34d767426.oggstr" + +[deps] + +source_file="res://res/sounds/card_select/card_select.ogg" +dest_files=[ "res://.import/card_select.ogg-d67a6f7f8c8f8a582e1c42a34d767426.oggstr" ] + +[params] + +loop=false +loop_offset=0 diff --git a/res/themes/default.tres b/res/themes/default.tres index f806a20..41f81a2 100644 --- a/res/themes/default.tres +++ b/res/themes/default.tres @@ -3,6 +3,7 @@ [ext_resource path="res://res/fonts/silkscreen/Silkscreen-Regular.ttf" type="DynamicFontData" id=1] [sub_resource type="DynamicFont" id=1] +size = 8 font_data = ExtResource( 1 ) [resource] diff --git a/src/models/enemies/bat/Bat.tscn b/src/models/enemies/bat/Bat.tscn index d742495..22968bf 100644 --- a/src/models/enemies/bat/Bat.tscn +++ b/src/models/enemies/bat/Bat.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://src/models/enemies/bat/sprites/bat_spriteframes.tres" type="SpriteFrames" id=1] [ext_resource path="res://src/models/enemies/bat/bat.gd" type="Script" id=2] [ext_resource path="res://src/models/shadow/shadow.png" type="Texture" id=3] +[ext_resource path="res://res/sounds/bat/damaged.ogg" type="AudioStream" id=4] +[ext_resource path="res://res/sounds/bat/screem.wav" type="AudioStream" id=5] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 4, 3 ) @@ -20,7 +22,6 @@ script = ExtResource( 2 ) use_parent_material = true frames = ExtResource( 1 ) animation = "idle" -frame = 3 playing = true centered = false @@ -38,3 +39,9 @@ shape = SubResource( 2 ) position = Vector2( 11, 21 ) z_index = -1 texture = ExtResource( 3 ) + +[node name="AudioDamage" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 4 ) + +[node name="AudioScreem" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 5 ) diff --git a/src/models/enemies/bat/bat.gd b/src/models/enemies/bat/bat.gd index 2cd9129..c4c58c5 100644 --- a/src/models/enemies/bat/bat.gd +++ b/src/models/enemies/bat/bat.gd @@ -61,3 +61,4 @@ func _shoot(): get_parent().add_child(sonic_wave) sonic_wave.global_position.x = self.global_position.x + 8 sonic_wave.global_position.y = self.global_position.y + 8 + $AudioScreem.play() diff --git a/src/models/enemies/ghost/Ghost.tscn b/src/models/enemies/ghost/Ghost.tscn index a763fe5..3145aff 100644 --- a/src/models/enemies/ghost/Ghost.tscn +++ b/src/models/enemies/ghost/Ghost.tscn @@ -1,8 +1,11 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://src/models/enemies/ghost/sprites/ghost_spriteframes.tres" type="SpriteFrames" id=1] [ext_resource path="res://src/models/enemies/ghost/ghost.gd" type="Script" id=2] [ext_resource path="res://src/models/enemies/ghost/sprites/aiming/aiming_spriteframes.tres" type="SpriteFrames" id=3] +[ext_resource path="res://res/sounds/ghost/damaged.wav" type="AudioStream" id=4] +[ext_resource path="res://res/sounds/ghost/dash_charge.wav" type="AudioStream" id=5] +[ext_resource path="res://res/sounds/ghost/dash.wav" type="AudioStream" id=6] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 7, 9 ) @@ -25,6 +28,7 @@ flip_h = true use_parent_material = true frames = ExtResource( 1 ) animation = "idle" +frame = 1 playing = true centered = false @@ -33,3 +37,12 @@ centered = false [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] position = Vector2( 8.5, 13.5 ) shape = SubResource( 1 ) + +[node name="AudioDamage" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 4 ) + +[node name="AudioDashCharge" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 5 ) + +[node name="AudioDash" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 6 ) diff --git a/src/models/enemies/ghost/ghost.gd b/src/models/enemies/ghost/ghost.gd index dcdd6d6..1c9d17d 100644 --- a/src/models/enemies/ghost/ghost.gd +++ b/src/models/enemies/ghost/ghost.gd @@ -34,8 +34,8 @@ func _physics_process(delta): global_position = global_position.move_toward(dash_target, 10) if global_position == dash_target: dashing = false + $AudioDash.play() afterdash = true - if afterdash: afterdash_timer += delta if afterdash_timer >= 1: diff --git a/src/models/enemies/rat/Rat.tscn b/src/models/enemies/rat/Rat.tscn index acae655..a08cff9 100644 --- a/src/models/enemies/rat/Rat.tscn +++ b/src/models/enemies/rat/Rat.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=6 format=2] [ext_resource path="res://src/models/enemies/rat/sprites/rat_spriteframes.tres" type="SpriteFrames" id=1] [ext_resource path="res://src/models/enemies/rat/rat.gd" type="Script" id=2] [ext_resource path="res://src/models/shadow/shadow.png" type="Texture" id=3] +[ext_resource path="res://res/sounds/rat/damaged.wav" type="AudioStream" id=4] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 8, 3.5 ) @@ -29,3 +30,6 @@ shape = SubResource( 1 ) position = Vector2( 11, 9 ) z_index = -1 texture = ExtResource( 3 ) + +[node name="AudioDamage" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 4 ) diff --git a/src/music/Music.tscn b/src/music/Music.tscn index 21c534e..a7995c9 100644 --- a/src/music/Music.tscn +++ b/src/music/Music.tscn @@ -4,4 +4,5 @@ [node name="Music" type="AudioStreamPlayer"] stream = ExtResource( 1 ) +volume_db = -15.0 autoplay = true diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index afac4a6..b13a039 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=29 format=2] +[gd_scene load_steps=31 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] @@ -6,6 +6,8 @@ [ext_resource path="res://res/themes/8px.tres" type="Theme" id=4] [ext_resource path="res://src/models/player/Player.tscn" type="PackedScene" id=5] [ext_resource path="res://src/scenes/game/sprites/health/health.png" type="Texture" id=6] +[ext_resource path="res://src/scenes/game/sprites/cast_time.png" type="Texture" id=7] +[ext_resource path="res://src/scenes/game/sprites/damage.png" type="Texture" id=8] [ext_resource path="res://src/scenes/game/card_placeholder.gd" type="Script" id=8] [ext_resource path="res://src/scenes/game/sprites/player_icon.png" type="Texture" id=10] [ext_resource path="res://src/scenes/game/game.gd" type="Script" id=11] @@ -28,14 +30,14 @@ extents = Vector2( 140, 10.125 ) atlas = ExtResource( 6 ) region = Rect2( 155, 0, 31, 11 ) -[sub_resource type="AtlasTexture" id=8] -atlas = ExtResource( 6 ) -region = Rect2( 124, 0, 31, 11 ) - [sub_resource type="AtlasTexture" id=9] atlas = ExtResource( 6 ) region = Rect2( 93, 0, 31, 11 ) +[sub_resource type="AtlasTexture" id=8] +atlas = ExtResource( 6 ) +region = Rect2( 124, 0, 31, 11 ) + [sub_resource type="AtlasTexture" id=10] atlas = ExtResource( 6 ) region = Rect2( 62, 0, 31, 11 ) @@ -50,10 +52,10 @@ region = Rect2( 0, 0, 31, 11 ) [sub_resource type="SpriteFrames" id=4] animations = [ { -"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ], -"loop": true, -"name": "default", -"speed": 5.0 +"frames": [ SubResource( 7 ), SubResource( 9 ), SubResource( 8 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ], +"loop": false, +"name": "idle", +"speed": 0.0 } ] [sub_resource type="Animation" id=5] @@ -174,6 +176,11 @@ margin_top = 126.0 margin_right = 310.0 margin_bottom = 128.0 +[node name="ColorRectBackground" type="ColorRect" parent="UIWrapper/UI/LevelProgressBar"] +margin_right = 300.0 +margin_bottom = 2.0 +color = Color( 0.0862745, 0.141176, 0.2, 1 ) + [node name="ColorRect" type="ColorRect" parent="UIWrapper/UI/LevelProgressBar"] margin_right = 300.0 margin_bottom = 2.0 @@ -212,7 +219,7 @@ margin_bottom = 40.0 [node name="HealthSprite" type="AnimatedSprite" parent="UIWrapper/UI/Left/Health"] position = Vector2( 52, 156 ) frames = SubResource( 4 ) -frame = 5 +animation = "idle" centered = false [node name="PlayerIcon" type="Sprite" parent="UIWrapper/UI/Left"] @@ -246,6 +253,11 @@ margin_right = 200.0 margin_bottom = 165.0 script = ExtResource( 16 ) +[node name="ColorRectBackground" type="ColorRect" parent="UIWrapper/UI/Center/SpellRechargeBar"] +margin_right = 80.0 +margin_bottom = 3.0 +color = Color( 0.0862745, 0.141176, 0.2, 1 ) + [node name="ColorRect" type="ColorRect" parent="UIWrapper/UI/Center/SpellRechargeBar"] margin_right = 80.0 margin_bottom = 3.0 @@ -254,6 +266,22 @@ margin_bottom = 3.0 margin_right = 40.0 margin_bottom = 40.0 +[node name="CastTime" type="Control" parent="UIWrapper/UI/Right"] +margin_right = 40.0 +margin_bottom = 40.0 + +[node name="CastTime" type="Sprite" parent="UIWrapper/UI/Right/CastTime"] +position = Vector2( 256, 140 ) +texture = ExtResource( 7 ) + +[node name="Damage" type="Control" parent="UIWrapper/UI/Right"] +margin_right = 40.0 +margin_bottom = 40.0 + +[node name="Damage" type="Sprite" parent="UIWrapper/UI/Right/Damage"] +position = Vector2( 256, 160 ) +texture = ExtResource( 8 ) + [node name="Cards" type="Control" parent="UIWrapper/UI"] visible = false margin_right = 320.0 diff --git a/src/scenes/game/game.gd b/src/scenes/game/game.gd index f18f548..956d7b2 100644 --- a/src/scenes/game/game.gd +++ b/src/scenes/game/game.gd @@ -14,7 +14,7 @@ var mob_threshold = [5, 7, 10, 7] func _ready(): Global.playing = true - Global.play_time = 56 + Global.play_time = .0 Global.health = 5 Global.add_health(0) diff --git a/src/scenes/game/sprites/cast_time.png b/src/scenes/game/sprites/cast_time.png new file mode 100644 index 0000000..dc46305 Binary files /dev/null and b/src/scenes/game/sprites/cast_time.png differ diff --git a/src/scenes/game/sprites/cast_time.png.import b/src/scenes/game/sprites/cast_time.png.import new file mode 100644 index 0000000..99ca894 --- /dev/null +++ b/src/scenes/game/sprites/cast_time.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/cast_time.png-236467b38d086f7887f1b94b4c0e9f8d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/game/sprites/cast_time.png" +dest_files=[ "res://.import/cast_time.png-236467b38d086f7887f1b94b4c0e9f8d.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/scenes/game/sprites/damage.png b/src/scenes/game/sprites/damage.png new file mode 100644 index 0000000..d7dcacc Binary files /dev/null and b/src/scenes/game/sprites/damage.png differ diff --git a/src/scenes/game/sprites/damage.png.import b/src/scenes/game/sprites/damage.png.import new file mode 100644 index 0000000..cf57789 --- /dev/null +++ b/src/scenes/game/sprites/damage.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/damage.png-add8d9c6f61d8b55c2333dfcd00b0797.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/game/sprites/damage.png" +dest_files=[ "res://.import/damage.png-add8d9c6f61d8b55c2333dfcd00b0797.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/scenes/menu/Menu.tscn b/src/scenes/menu/Menu.tscn index 8bab30d..917c8d3 100644 --- a/src/scenes/menu/Menu.tscn +++ b/src/scenes/menu/Menu.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=7 format=2] [ext_resource path="res://src/scenes/menu/menu.gd" type="Script" id=1] -[ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=2] +[ext_resource path="res://src/scenes/menu/background/main_menu.png" type="Texture" id=2] [ext_resource path="res://res/themes/default.tres" type="Theme" id=3] [ext_resource path="res://src/scenes/menu/button/button_outline.png" type="Texture" id=4] [ext_resource path="res://res/sounds/menu/click.wav" type="AudioStream" id=5] @@ -35,17 +35,17 @@ margin_right = 160.0 margin_bottom = 90.0 [node name="PlayButton" type="Button" parent="UI"] -margin_left = 20.0 -margin_top = 40.0 -margin_right = 140.0 -margin_bottom = 80.0 +margin_left = 138.0 +margin_top = 45.0 +margin_right = 218.0 +margin_bottom = 72.0 theme = ExtResource( 3 ) text = "Play" flat = true [node name="Button_Outline" type="NinePatchRect" parent="UI/PlayButton"] -margin_right = 120.0 -margin_bottom = 40.0 +margin_right = 80.0 +margin_bottom = 27.0 rect_clip_content = true texture = ExtResource( 4 ) patch_margin_left = 2 @@ -60,17 +60,17 @@ stream = ExtResource( 5 ) stream = ExtResource( 6 ) [node name="ExitButton" type="Button" parent="UI"] -margin_left = 20.0 -margin_top = 100.0 -margin_right = 140.0 -margin_bottom = 140.0 +margin_left = 122.0 +margin_top = 90.0 +margin_right = 202.0 +margin_bottom = 117.0 theme = ExtResource( 3 ) text = "Exit" flat = true [node name="Button_Outline" type="NinePatchRect" parent="UI/ExitButton"] -margin_right = 120.0 -margin_bottom = 40.0 +margin_right = 80.0 +margin_bottom = 27.0 rect_clip_content = true texture = ExtResource( 4 ) patch_margin_left = 2 @@ -84,16 +84,6 @@ stream = ExtResource( 5 ) [node name="AudioHovering" type="AudioStreamPlayer" parent="UI/ExitButton"] stream = ExtResource( 6 ) -[node name="Label" type="Label" parent="UI"] -margin_left = 192.0 -margin_top = 56.0 -margin_right = 300.0 -margin_bottom = 125.0 -theme = ExtResource( 3 ) -text = "Manskage -iLunaiLuna -JustDzhi" - [connection signal="mouse_entered" from="UI/PlayButton" to="." method="_on_PlayButton_mouse_entered"] [connection signal="mouse_exited" from="UI/PlayButton" to="." method="_on_PlayButton_mouse_exited"] [connection signal="pressed" from="UI/PlayButton" to="." method="game_start"] diff --git a/src/scenes/menu/background/main_menu.png b/src/scenes/menu/background/main_menu.png new file mode 100644 index 0000000..d3b185e Binary files /dev/null and b/src/scenes/menu/background/main_menu.png differ diff --git a/src/scenes/menu/background/main_menu.png.import b/src/scenes/menu/background/main_menu.png.import new file mode 100644 index 0000000..c348d2c --- /dev/null +++ b/src/scenes/menu/background/main_menu.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/main_menu.png-de2bf9e679f8b63409cdc558ee8ea050.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/menu/background/main_menu.png" +dest_files=[ "res://.import/main_menu.png-de2bf9e679f8b63409cdc558ee8ea050.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/enemy_class.gd b/src/scripts/enemy_class.gd index ef6b37c..9b65828 100644 --- a/src/scripts/enemy_class.gd +++ b/src/scripts/enemy_class.gd @@ -19,6 +19,7 @@ var frozen = false func deal_damage(amount): hp -= amount + $AudioDamage.play() if hp <= 0: death()