Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions assets/third_party/sounds/grapple/grapple_collect.wav
Git LFS file not shown
24 changes: 24 additions & 0 deletions assets/third_party/sounds/grapple/grapple_collect.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[remap]

importer="wav"
type="AudioStreamWAV"
uid="uid://dvctnwkgdbsew"
path="res://.godot/imported/grapple_collect.wav-45318d61b4076db79d40877c4146f334.sample"

[deps]

source_file="res://assets/third_party/sounds/grapple/grapple_collect.wav"
dest_files=["res://.godot/imported/grapple_collect.wav-45318d61b4076db79d40877c4146f334.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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SPDX-FileCopyrightText: LSpec
SPDX-License-Identifier: CC0-1.0

pickup_item_pop_effect by LSpec -- https://freesound.org/people/LSpec/sounds/868506/
3 changes: 3 additions & 0 deletions assets/third_party/sounds/grapple/grapple_fail.ogg
Git LFS file not shown
19 changes: 19 additions & 0 deletions assets/third_party/sounds/grapple/grapple_fail.ogg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[remap]

importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://b87ceihlec2h2"
path="res://.godot/imported/grapple_fail.ogg-4194c49b417cd161a0bb938e5efede4b.oggvorbisstr"

[deps]

source_file="res://assets/third_party/sounds/grapple/grapple_fail.ogg"
dest_files=["res://.godot/imported/grapple_fail.ogg-4194c49b417cd161a0bb938e5efede4b.oggvorbisstr"]

[params]

loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
4 changes: 4 additions & 0 deletions assets/third_party/sounds/grapple/grapple_fail.ogg.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SPDX-FileCopyrightText: WizardOZ
SPDX-License-Identifier: CC0-1.0

Swoosh.ogg by WizardOZ -- https://freesound.org/people/WizardOZ/sounds/419341/
3 changes: 3 additions & 0 deletions assets/third_party/sounds/grapple/grapple_fly.wav
Git LFS file not shown
24 changes: 24 additions & 0 deletions assets/third_party/sounds/grapple/grapple_fly.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[remap]

importer="wav"
type="AudioStreamWAV"
uid="uid://do2l7t3usqkos"
path="res://.godot/imported/grapple_fly.wav-4edb2cb74a4ee442c9cb3b70a939567e.sample"

[deps]

source_file="res://assets/third_party/sounds/grapple/grapple_fly.wav"
dest_files=["res://.godot/imported/grapple_fly.wav-4edb2cb74a4ee442c9cb3b70a939567e.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
4 changes: 4 additions & 0 deletions assets/third_party/sounds/grapple/grapple_fly.wav.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SPDX-FileCopyrightText: Nox_Sound
SPDX-License-Identifier: CC0-1.0

Whoosh_Rope.wav by Nox_Sound -- https://freesound.org/people/Nox_Sound/sounds/473583/
3 changes: 3 additions & 0 deletions assets/third_party/sounds/grapple/grapple_hit.wav
Git LFS file not shown
24 changes: 24 additions & 0 deletions assets/third_party/sounds/grapple/grapple_hit.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[remap]

importer="wav"
type="AudioStreamWAV"
uid="uid://5265ydem2dka"
path="res://.godot/imported/grapple_hit.wav-c50fc30668acb41e34849796725d7641.sample"

[deps]

source_file="res://assets/third_party/sounds/grapple/grapple_hit.wav"
dest_files=["res://.godot/imported/grapple_hit.wav-c50fc30668acb41e34849796725d7641.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
4 changes: 4 additions & 0 deletions assets/third_party/sounds/grapple/grapple_hit.wav.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SPDX-FileCopyrightText: The.sound.Root
SPDX-License-Identifier: CC0-1.0

Short Click by The.sound.Root -- https://freesound.org/people/The.sound.Root/sounds/792319/
3 changes: 3 additions & 0 deletions assets/third_party/sounds/grapple/grapple_throw.wav
Git LFS file not shown
24 changes: 24 additions & 0 deletions assets/third_party/sounds/grapple/grapple_throw.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[remap]

importer="wav"
type="AudioStreamWAV"
uid="uid://cbie64bvakm04"
path="res://.godot/imported/grapple_throw.wav-60b0968c11fa0748c5ce03fd2618b33d.sample"

[deps]

source_file="res://assets/third_party/sounds/grapple/grapple_throw.wav"
dest_files=["res://.godot/imported/grapple_throw.wav-60b0968c11fa0748c5ce03fd2618b33d.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
4 changes: 4 additions & 0 deletions assets/third_party/sounds/grapple/grapple_throw.wav.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SPDX-FileCopyrightText: ErikCruzDev
SPDX-License-Identifier: CC0-1.0

Whip woosh by ErikCruzDev -- https://freesound.org/people/ErikCruzDev/sounds/735907/
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,18 @@ var hook_string: Line2D
## A [PhantomCamera2D] at the tip of the string.
@onready var phantom_camera_2d: PhantomCamera2D = %PhantomCamera2D

## Plays a sound effect when the string is thrown.
@onready var throw_audio_player: AudioStreamPlayer2D = %ThrowAudioPlayer

## Plays a sound effect while the string hits the air.
@onready var hit_air_audio_player: AudioStreamPlayer2D = %HitAirAudioPlayer

## Plays a sound effect when the string hits a hookable area.
@onready var hooked_audio_player: AudioStreamPlayer2D = %HookedAudioPlayer

## Plays a sound effect when the string hits a wall.
@onready var hit_wall_audio_player: AudioStreamPlayer2D = %HitWallAudioPlayer


func _enter_tree() -> void:
if not character and get_parent() is CharacterBody2D:
Expand Down Expand Up @@ -155,6 +167,8 @@ func hooked(_new_hooked_to: HookableArea, is_loop: bool) -> void:
CameraUtilities.copy_current_camera_limits(phantom_camera_2d)
phantom_camera_2d.priority = 20
hook_ending.global_position = p
throw_audio_player.play()
hooked_audio_player.play()
areas_hooked.append(_new_hooked_to)
if not _new_hooked_to.hook_control:
# The area hooked doesn't have a control to aim from it, so start pulling:
Expand Down Expand Up @@ -185,6 +199,8 @@ func hit_wall(wall_point: Vector2) -> void:
hook_string = _new_hook_string()
hook_string.add_point(wall_point, 0)
areas_hooked.append(null)
throw_audio_player.play()
hit_wall_audio_player.play()


## Called when a throw has hit the air.
Expand All @@ -195,6 +211,8 @@ func hit_air(air_point: Vector2) -> void:
hook_string = _new_hook_string()
hook_string.add_point(air_point, 0)
areas_hooked.append(null)
throw_audio_player.play()
hit_air_audio_player.play()


## Remove the [member hook_string].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
[ext_resource type="PackedScene" uid="uid://b0dehcnfo68j1" path="res://scenes/game_elements/props/hook_control/hook_control.tscn" id="2_5svv0"]
[ext_resource type="Script" uid="uid://bhexx6mj1xv3q" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="3_wahl3"]
[ext_resource type="Script" uid="uid://8umksf8e80fw" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="4_muesi"]
[ext_resource type="AudioStream" uid="uid://cbie64bvakm04" path="res://assets/third_party/sounds/grapple/grapple_throw.wav" id="5_4y42v"]
[ext_resource type="AudioStream" uid="uid://do2l7t3usqkos" path="res://assets/third_party/sounds/grapple/grapple_fly.wav" id="6_282du"]
[ext_resource type="AudioStream" uid="uid://5265ydem2dka" path="res://assets/third_party/sounds/grapple/grapple_hit.wav" id="7_y2mwr"]
[ext_resource type="AudioStream" uid="uid://b87ceihlec2h2" path="res://assets/third_party/sounds/grapple/grapple_fail.ogg" id="8_xdtmi"]

[sub_resource type="Resource" id="Resource_lv7pl"]
script = ExtResource("4_muesi")
Expand All @@ -28,3 +32,38 @@ dead_zone_width = 0.4
dead_zone_height = 0.2
draw_limits = true
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"

[node name="ThrowAudioPlayer" type="AudioStreamPlayer2D" parent="." unique_id=557191266]
unique_name_in_owner = true
stream = ExtResource("5_4y42v")
volume_db = 8.0
max_distance = 1200.0
panning_strength = 0.5
bus = &"SFX"

[node name="HookedAudioPlayer" type="AudioStreamPlayer2D" parent="." unique_id=1735421435]
unique_name_in_owner = true
stream = ExtResource("7_y2mwr")
volume_db = 6.0
pitch_scale = 5.0
max_distance = 1200.0
panning_strength = 0.5
bus = &"SFX"

[node name="HitAirAudioPlayer" type="AudioStreamPlayer2D" parent="." unique_id=1205196393]
unique_name_in_owner = true
stream = ExtResource("6_282du")
volume_db = -10.0
pitch_scale = 1.3
max_distance = 1200.0
panning_strength = 0.5
bus = &"SFX"

[node name="HitWallAudioPlayer" type="AudioStreamPlayer2D" parent="." unique_id=1335991406]
unique_name_in_owner = true
stream = ExtResource("8_xdtmi")
volume_db = -3.0
pitch_scale = 5.0
max_distance = 1200.0
panning_strength = 0.5
bus = &"SFX"
Loading