diff --git a/items/active_items/bow/bow.gd b/items/active_items/bow/bow.gd index cfb25fd..cbe1588 100644 --- a/items/active_items/bow/bow.gd +++ b/items/active_items/bow/bow.gd @@ -13,3 +13,4 @@ func activate(): arrow.position = player.position arrow.rotation = player.rotation arrow.direction = player.earth_aligner.global_from_local(Vector2(player.facing, 0)) + $SoundBowRelease.play() diff --git a/items/active_items/bow/bow.tscn b/items/active_items/bow/bow.tscn index 95cb4e0..c96c7b5 100644 --- a/items/active_items/bow/bow.tscn +++ b/items/active_items/bow/bow.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://ddn025xnjngko"] +[gd_scene load_steps=9 format=3 uid="uid://ddn025xnjngko"] [ext_resource type="Script" uid="uid://bkcip66at5sug" path="res://items/active_items/bow/bow.gd" id="1_xppub"] [ext_resource type="PackedScene" uid="uid://dfva4dhflxglr" path="res://items/active_items/bow/arrow.tscn" id="2_0id2q"] @@ -6,6 +6,7 @@ [ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="4_0id2q"] [ext_resource type="AudioStream" uid="uid://bg1w0fyeyys2p" path="res://sounds/item-equip-6904.mp3" id="5_gfbg0"] [ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="5_o1smo"] +[ext_resource type="AudioStream" uid="uid://10ljbd4djqgb" path="res://sounds/263675__porkmuncher__bow_release_cut.wav" id="7_o1smo"] [sub_resource type="CircleShape2D" id="CircleShape2D_gllxn"] radius = 13.239409 @@ -37,3 +38,6 @@ texture = ExtResource("3_vkelq") [node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("5_gfbg0") volume_db = 15.0 + +[node name="SoundBowRelease" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("7_o1smo") diff --git a/items/generic/item_spawn.gd b/items/generic/item_spawn.gd index 72c3c76..41620b5 100644 --- a/items/generic/item_spawn.gd +++ b/items/generic/item_spawn.gd @@ -3,7 +3,8 @@ class_name ItemSpawn extends Node2D @export var common_items : Array[PackedScene] @export var rare_items : Array[PackedScene] static var unique_items : Array[PackedScene] = [ - load("res://items/permanent_items/backslash.tscn") + load("res://items/permanent_items/backslash.tscn"), + load("res://items/permanent_items/high_jump.tscn") ] @export var rarity_bonus = 0 diff --git a/items/permanent_items/backslash.gd b/items/permanent_items/backslash.gd index 2cbdf11..a3c674b 100644 --- a/items/permanent_items/backslash.gd +++ b/items/permanent_items/backslash.gd @@ -7,4 +7,3 @@ func collect() -> bool: player.add_child(sword_instance) sword_instance.facing_mult = -1 return true - diff --git a/items/permanent_items/backslash.tscn b/items/permanent_items/backslash.tscn index 583da3d..3728051 100644 --- a/items/permanent_items/backslash.tscn +++ b/items/permanent_items/backslash.tscn @@ -22,7 +22,6 @@ shape = SubResource("CircleShape2D_hvhjo") [node name="Sprite2D2" type="Sprite2D" parent="."] modulate = Color(0.725757, 0.519822, 5.77569e-07, 1) -position = Vector2(2, 2) scale = Vector2(2.5, 2.5) texture = ExtResource("4_legpc") diff --git a/items/permanent_items/high_jump.gd b/items/permanent_items/high_jump.gd new file mode 100644 index 0000000..45b2649 --- /dev/null +++ b/items/permanent_items/high_jump.gd @@ -0,0 +1,5 @@ +extends Item + +func collect(): + player.jump_strength = 1500 + return true diff --git a/items/permanent_items/high_jump.gd.uid b/items/permanent_items/high_jump.gd.uid new file mode 100644 index 0000000..b795ec4 --- /dev/null +++ b/items/permanent_items/high_jump.gd.uid @@ -0,0 +1 @@ +uid://cq6h2iven3rly diff --git a/items/permanent_items/high_jump.png b/items/permanent_items/high_jump.png new file mode 100644 index 0000000..791421b Binary files /dev/null and b/items/permanent_items/high_jump.png differ diff --git a/items/permanent_items/high_jump.png.import b/items/permanent_items/high_jump.png.import new file mode 100644 index 0000000..220d1e1 --- /dev/null +++ b/items/permanent_items/high_jump.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c6pyyfgkhytu5" +path="res://.godot/imported/high_jump.png-8bc003388f039950b2397263b61bf2a9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://items/permanent_items/high_jump.png" +dest_files=["res://.godot/imported/high_jump.png-8bc003388f039950b2397263b61bf2a9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/items/permanent_items/high_jump.tscn b/items/permanent_items/high_jump.tscn new file mode 100644 index 0000000..5092b7f --- /dev/null +++ b/items/permanent_items/high_jump.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=6 format=3 uid="uid://bpgo1djj8f1rg"] + +[ext_resource type="Script" uid="uid://cq6h2iven3rly" path="res://items/permanent_items/high_jump.gd" id="1_7gixi"] +[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_s7mjt"] +[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="3_ui5no"] +[ext_resource type="Texture2D" uid="uid://c6pyyfgkhytu5" path="res://items/permanent_items/high_jump.png" id="4_7gixi"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_bya24"] + +[node name="HighJump" type="Area2D"] +script = ExtResource("1_7gixi") +metadata/_custom_type_script = "uid://c0uftljafcroy" + +[node name="EarthAligner" parent="." instance=ExtResource("2_s7mjt")] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +visible = false +scale = Vector2(7, 7) +shape = SubResource("CircleShape2D_bya24") + +[node name="SpriteGlint" type="Sprite2D" parent="."] +modulate = Color(0.725757, 0.519822, 5.77569e-07, 1) +scale = Vector2(2.5, 2.5) +texture = ExtResource("3_ui5no") + +[node name="SpriteItem" type="Sprite2D" parent="."] +texture_filter = 1 +scale = Vector2(4, 4) +texture = ExtResource("4_7gixi") diff --git a/player/player.gd b/player/player.gd index 30ae0ef..ceb1f8f 100644 --- a/player/player.gd +++ b/player/player.gd @@ -88,6 +88,7 @@ func manage_attack(delta : float): if(Input.is_action_just_pressed("attack") and atk_timer <= 0): attack.emit() $AnimatedSprite2D.play("attack") + $SwordSwingAudio.play() atk_timer = atk_cooldown func manage_active(_delta : float): diff --git a/player/player.tscn b/player/player.tscn index aeefb1f..1a856a3 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=19 format=3 uid="uid://cmaovvr15b3qk"] +[gd_scene load_steps=20 format=3 uid="uid://cmaovvr15b3qk"] [ext_resource type="Script" uid="uid://ddidj1uau28ck" path="res://player/player.gd" id="1_4flbx"] [ext_resource type="Texture2D" uid="uid://c4xg25s8loxp0" path="res://player/Player_Walk/Walk 1.png" id="2_hg6s5"] @@ -16,6 +16,7 @@ [ext_resource type="PackedScene" uid="uid://beotdg4etmevc" path="res://player/double_jump/double_jump_animation.tscn" id="10_8t03j"] [ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="11_2ieo8"] [ext_resource type="AudioStream" uid="uid://ds0yw3au0quae" path="res://sounds/whoosh.mp3" id="12_ebec5"] +[ext_resource type="AudioStream" uid="uid://c3pqq5yi1686n" path="res://sounds/sword_swing.wav" id="17_tqiix"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_onrkg"] @@ -101,5 +102,9 @@ volume_db = 15.0 [node name="AirJumpAudio" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("12_ebec5") -volume_db = -6.0 +volume_db = 4.0 pitch_scale = 1.62 + +[node name="SwordSwingAudio" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("17_tqiix") +volume_db = -12.0 diff --git a/sounds/263675__porkmuncher__bow_release_cut.wav b/sounds/263675__porkmuncher__bow_release_cut.wav new file mode 100644 index 0000000..08ab70f Binary files /dev/null and b/sounds/263675__porkmuncher__bow_release_cut.wav differ diff --git a/sounds/263675__porkmuncher__bow_release_cut.wav.import b/sounds/263675__porkmuncher__bow_release_cut.wav.import new file mode 100644 index 0000000..88a6942 --- /dev/null +++ b/sounds/263675__porkmuncher__bow_release_cut.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://10ljbd4djqgb" +path="res://.godot/imported/263675__porkmuncher__bow_release_cut.wav-ee391734f701fa70f133b49426577cf3.sample" + +[deps] + +source_file="res://sounds/263675__porkmuncher__bow_release_cut.wav" +dest_files=["res://.godot/imported/263675__porkmuncher__bow_release_cut.wav-ee391734f701fa70f133b49426577cf3.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/sounds/750240__universfield__coin-drop.mp3.import b/sounds/750240__universfield__coin-drop.mp3.import index bada918..c38f7fd 100644 --- a/sounds/750240__universfield__coin-drop.mp3.import +++ b/sounds/750240__universfield__coin-drop.mp3.import @@ -13,7 +13,7 @@ dest_files=["res://.godot/imported/750240__universfield__coin-drop.mp3-ff686fa24 [params] loop=false -loop_offset=0 -bpm=0 +loop_offset=0.0 +bpm=0.0 beat_count=0 bar_beats=4 diff --git a/sounds/sword_swing.wav b/sounds/sword_swing.wav new file mode 100644 index 0000000..0a6c851 Binary files /dev/null and b/sounds/sword_swing.wav differ diff --git a/sounds/sword_swing.wav.import b/sounds/sword_swing.wav.import new file mode 100644 index 0000000..7579ba7 --- /dev/null +++ b/sounds/sword_swing.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://c3pqq5yi1686n" +path="res://.godot/imported/sword_swing.wav-b950b6729fe085f49372f5c905feadec.sample" + +[deps] + +source_file="res://sounds/sword_swing.wav" +dest_files=["res://.godot/imported/sword_swing.wav-b950b6729fe085f49372f5c905feadec.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2