new stimmy flashlight sounds

This commit is contained in:
Persephone Bubblegum-Holiday 2025-08-18 17:20:50 -07:00
parent a7e2ff36fb
commit 1f13716d42
12 changed files with 94 additions and 58 deletions

View file

@ -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)

View file

@ -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