From 037da90121d2be279cf5229a44d78b89adc14833 Mon Sep 17 00:00:00 2001 From: Victor Turgeon Date: Wed, 11 Oct 2023 11:45:08 -0400 Subject: [PATCH] balance and main screen ambiance --- Scenes/Spawnables/bat_spawnable.tscn | 2 +- Scenes/Spawnables/wolf_spawnable.tscn | 2 +- Scenes/enemy.tscn | 8 +++++++- Scenes/start_menu.tscn | 7 ++++++- Scripts/start_menu.gd | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Scenes/Spawnables/bat_spawnable.tscn b/Scenes/Spawnables/bat_spawnable.tscn index dcf2e1d..dc7dbba 100644 --- a/Scenes/Spawnables/bat_spawnable.tscn +++ b/Scenes/Spawnables/bat_spawnable.tscn @@ -15,7 +15,7 @@ region = Rect2(0, 0, 64, 64) [node name="BatSpawnable" instance=ExtResource("1_verf7")] maxHp = 7 -attackSpeed = 50.0 +attackSpeed = 75.0 speed = 4000.0 damage = 1 priority = 1 diff --git a/Scenes/Spawnables/wolf_spawnable.tscn b/Scenes/Spawnables/wolf_spawnable.tscn index e541921..6b0a3ee 100644 --- a/Scenes/Spawnables/wolf_spawnable.tscn +++ b/Scenes/Spawnables/wolf_spawnable.tscn @@ -342,7 +342,7 @@ polygon = PackedVector2Array(-11, -5, 10, -5, 12, 1, 4, 5, -13, 5, -18, 0) [node name="WolfSpawnable" instance=ExtResource("1_t7ryl")] maxHp = 21 -attackSpeed = 70.0 +attackSpeed = 50.0 speed = 10000.0 damage = 5 priority = 3 diff --git a/Scenes/enemy.tscn b/Scenes/enemy.tscn index 081b990..74f25f0 100644 --- a/Scenes/enemy.tscn +++ b/Scenes/enemy.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=61 format=3 uid="uid://b5lnjonlf4i1b"] +[gd_scene load_steps=62 format=3 uid="uid://b5lnjonlf4i1b"] [ext_resource type="Script" path="res://Scripts/Enemy.gd" id="1_xj62t"] [ext_resource type="Texture2D" uid="uid://xn7yb3f5w17m" path="res://Assets/Knight/noBKG_KnightAttack_strip.png" id="2_dclcl"] @@ -374,6 +374,9 @@ height = 28.0 radius = 16.0 height = 72.0 +[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_y0q6s"] +polygon = PackedVector2Array(-2, -16, -5, -8, -6, -2, -5, 4, -2, 9, 1, 10, 2, 6, 3, 0, 0, -13) + [node name="Enemy" type="CharacterBody2D"] position = Vector2(10, 10) collision_layer = 5 @@ -480,6 +483,9 @@ skew = -0.0837758 shape = SubResource("CapsuleShape2D_qykhm") debug_color = Color(0.956863, 0.203922, 0, 0.419608) +[node name="LightOccluder2D" type="LightOccluder2D" parent="."] +occluder = SubResource("OccluderPolygon2D_y0q6s") + [connection signal="animation_finished" from="Sprite" to="." method="_on_sprite_animation_finished"] [connection signal="animation_looped" from="Sprite" to="." method="_on_sprite_animation_looped"] [connection signal="timeout" from="Atk_cooldown" to="." method="_on_atk_cooldown_timeout"] diff --git a/Scenes/start_menu.tscn b/Scenes/start_menu.tscn index 3d008bc..23a05c7 100644 --- a/Scenes/start_menu.tscn +++ b/Scenes/start_menu.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=7 format=3 uid="uid://bkt0gdgv7bsx2"] +[gd_scene load_steps=8 format=3 uid="uid://bkt0gdgv7bsx2"] [ext_resource type="Script" path="res://Scripts/start_menu.gd" id="1_dgae7"] [ext_resource type="PackedScene" uid="uid://b8s2seg2lf7wo" path="res://Scenes/Tilemaps/tileset_1.tscn" id="2_0sfou"] [ext_resource type="Theme" uid="uid://dr1h7to56a2pv" path="res://Themes/base_theme.tres" id="3_puxi3"] [ext_resource type="Texture2D" uid="uid://cxk21atb8fblp" path="res://Assets/Witch/noBKG_WitchThrow_strip.png" id="4_qq6xh"] +[ext_resource type="AudioStream" uid="uid://bdkt27mbfvuxs" path="res://Assets/Audio/cave_ambience.mp3" id="5_c04sa"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1owyk"] bg_color = Color(0.6, 0.6, 0.6, 0) @@ -115,5 +116,9 @@ texture = SubResource("AtlasTexture_je3v2") expand_mode = 2 stretch_mode = 5 +[node name="backgroundAmbiance" type="AudioStreamPlayer" parent="."] +stream = ExtResource("5_c04sa") +volume_db = 2.0 + [connection signal="pressed" from="StartButton" to="." method="_on_start_button_pressed"] [connection signal="pressed" from="QuitButton" to="." method="_on_quit_button_pressed"] diff --git a/Scripts/start_menu.gd b/Scripts/start_menu.gd index cee2b5b..46bcdd2 100644 --- a/Scripts/start_menu.gd +++ b/Scripts/start_menu.gd @@ -3,7 +3,7 @@ extends Control # Called when the node enters the scene tree for the first time. func _ready(): - pass # Replace with function body. + $backgroundAmbiance.play(0.0) # Called every frame. 'delta' is the elapsed time since the previous frame.