new stimmy flashlight sounds
This commit is contained in:
parent
a7e2ff36fb
commit
1f13716d42
12 changed files with 94 additions and 58 deletions
|
@ -73,19 +73,19 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||
if ($Camera/Flashlight.visible):
|
||||
if ($Camera/Flashlight.spot_angle > 2):
|
||||
$Camera/Flashlight.spot_angle -= 2
|
||||
$FlashlightSFX.pitch_scale = $Camera/Flashlight.spot_angle/10.0
|
||||
$FlashlightSFX.play()
|
||||
$FlashlightSizeSFX.pitch_scale = sqrt($Camera/Flashlight.spot_angle)-0.5
|
||||
$FlashlightSizeSFX.play()
|
||||
elif event.is_action_pressed(&"freeroam_flashlight_zoom_out"):
|
||||
if ($Camera/Flashlight.visible):
|
||||
if ($Camera/Flashlight.spot_angle < 88):
|
||||
$Camera/Flashlight.spot_angle += 2
|
||||
$FlashlightSFX.pitch_scale = $Camera/Flashlight.spot_angle/10.0
|
||||
$FlashlightSFX.play()
|
||||
$FlashlightSizeSFX.pitch_scale = sqrt($Camera/Flashlight.spot_angle)-0.5
|
||||
$FlashlightSizeSFX.play()
|
||||
elif event.is_action_pressed(&"freeroam_flashlight_zoom_reset"):
|
||||
if ($Camera/Flashlight.visible):
|
||||
$Camera/Flashlight.spot_angle = 30
|
||||
$FlashlightSFX.pitch_scale = $Camera/Flashlight.spot_angle/10.0
|
||||
$FlashlightSFX.play()
|
||||
$FlashlightSizeSFX.pitch_scale = sqrt($Camera/Flashlight.spot_angle)-0.5
|
||||
$FlashlightSizeSFX.play()
|
||||
elif event.is_action_pressed(&"freeroam_camera_zoom_in"):
|
||||
if ($Camera.fov > 2):
|
||||
$Camera.fov -= 2
|
||||
|
@ -139,6 +139,8 @@ func _physics_process(delta: float) -> void:
|
|||
running = false
|
||||
elif Input.is_action_just_pressed(&"freeroam_toggle_flashlight"):
|
||||
$Camera/Flashlight.visible = !$Camera/Flashlight.visible
|
||||
if ($Camera/Flashlight.visible): $FlashlightOnSFX.play()
|
||||
else: $FlashlightOffSFX.play()
|
||||
|
||||
if mouse_captured: _handle_joypad_camera_rotation(delta)
|
||||
velocity = _walk(delta) + _gravity(delta) + _jump(delta)
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://cdk6hwb4hi2wc"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cdk6hwb4hi2wc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b0c02p6ckmpdq" path="res://Scripts/Player/Player.gd" id="1_2f8j2"]
|
||||
[ext_resource type="PackedScene" uid="uid://cd67bfok34xhy" path="res://Scenes/GUI/InGameMenu.tscn" id="2_0s4r2"]
|
||||
[ext_resource type="PackedScene" uid="uid://fjveglbs1vfv" path="res://Scenes/GUI/DebugMenu.tscn" id="3_ejydr"]
|
||||
[ext_resource type="AudioStream" uid="uid://gu2qnrfyvk0m" path="res://UI/Sounds/boing.wav" id="4_7s4cc"]
|
||||
[ext_resource type="AudioStream" uid="uid://bd13mqgeswusd" path="res://UI/Sounds/flashlight_click.wav" id="5_nckbs"]
|
||||
[ext_resource type="AudioStream" uid="uid://bfeslo2ldb40t" path="res://UI/Sounds/flashlight_size_change.wav" id="5_gfoho"]
|
||||
[ext_resource type="AudioStream" uid="uid://8uh608yamqpj" path="res://UI/Sounds/flashlight_on.wav" id="6_gfoho"]
|
||||
[ext_resource type="AudioStream" uid="uid://bwwl6h7uyog64" path="res://UI/Sounds/flashlight_off.wav" id="7_7v0xc"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ejydr"]
|
||||
radius = 0.3
|
||||
|
@ -42,6 +44,14 @@ visible = false
|
|||
[node name="BoingSFX" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("4_7s4cc")
|
||||
|
||||
[node name="FlashlightSFX" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("5_nckbs")
|
||||
[node name="FlashlightSizeSFX" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("5_gfoho")
|
||||
volume_db = -10.0
|
||||
|
||||
[node name="FlashlightOnSFX" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("6_gfoho")
|
||||
volume_db = -5.0
|
||||
|
||||
[node name="FlashlightOffSFX" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("7_7v0xc")
|
||||
volume_db = -5.0
|
||||
|
|
Binary file not shown.
|
@ -1,24 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bd13mqgeswusd"
|
||||
path="res://.godot/imported/flashlight_click.wav-045ee61892a45745c4f95a53eafba64d.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://UI/Sounds/flashlight_click.wav"
|
||||
dest_files=["res://.godot/imported/flashlight_click.wav-045ee61892a45745c4f95a53eafba64d.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
|
BIN
UI/Sounds/flashlight_off.wav
Normal file
BIN
UI/Sounds/flashlight_off.wav
Normal file
Binary file not shown.
24
UI/Sounds/flashlight_off.wav.import
Normal file
24
UI/Sounds/flashlight_off.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bwwl6h7uyog64"
|
||||
path="res://.godot/imported/flashlight_off.wav-35e5e53a3d8c7ae814ab25518fb4e49a.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://UI/Sounds/flashlight_off.wav"
|
||||
dest_files=["res://.godot/imported/flashlight_off.wav-35e5e53a3d8c7ae814ab25518fb4e49a.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
|
BIN
UI/Sounds/flashlight_on.wav
Normal file
BIN
UI/Sounds/flashlight_on.wav
Normal file
Binary file not shown.
24
UI/Sounds/flashlight_on.wav.import
Normal file
24
UI/Sounds/flashlight_on.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://8uh608yamqpj"
|
||||
path="res://.godot/imported/flashlight_on.wav-ab09cd90c434f4e9e976330972a5ed44.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://UI/Sounds/flashlight_on.wav"
|
||||
dest_files=["res://.godot/imported/flashlight_on.wav-ab09cd90c434f4e9e976330972a5ed44.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
|
BIN
UI/Sounds/flashlight_size_change.wav
Normal file
BIN
UI/Sounds/flashlight_size_change.wav
Normal file
Binary file not shown.
24
UI/Sounds/flashlight_size_change.wav.import
Normal file
24
UI/Sounds/flashlight_size_change.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bfeslo2ldb40t"
|
||||
path="res://.godot/imported/flashlight_size_change.wav-66bef8a68f6dceb95e92e9591132dc34.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://UI/Sounds/flashlight_size_change.wav"
|
||||
dest_files=["res://.godot/imported/flashlight_size_change.wav-66bef8a68f6dceb95e92e9591132dc34.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
|
Binary file not shown.
|
@ -1,24 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dmn3kqd4rdlh6"
|
||||
path="res://.godot/imported/ui_select.wav-822850e003dd35cb22f9869939ace729.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://UI/Sounds/ui_select.wav"
|
||||
dest_files=["res://.godot/imported/ui_select.wav-822850e003dd35cb22f9869939ace729.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
|
Loading…
Add table
Add a link
Reference in a new issue