Added SFX sounds
This commit is contained in:
@@ -91,6 +91,7 @@ func _physics_process(delta: float) -> void:
|
||||
State.ChasingLeft:
|
||||
_process_player_ray(left_player_distant_ray)
|
||||
if position.x < _target_x:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_player_lost, global_position)
|
||||
_state = State.LookAround
|
||||
else:
|
||||
_update_x_velocity(DIRECTION_LEFT, MAX_CHASE_SPEED, delta)
|
||||
@@ -98,6 +99,7 @@ func _physics_process(delta: float) -> void:
|
||||
State.ChasingRight:
|
||||
_process_player_ray(right_player_distant_ray)
|
||||
if position.x > _target_x:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_player_lost, global_position)
|
||||
_state = State.LookAround
|
||||
else:
|
||||
_update_x_velocity(DIRECTION_RIGHT, MAX_CHASE_SPEED, delta)
|
||||
@@ -174,6 +176,8 @@ func _check_wall_collision_and_switch_state(direction: int) -> void:
|
||||
State.WalkRight:
|
||||
_state = State.WalkLeft
|
||||
State.ChasingLeft, State.ChasingRight:
|
||||
var stream := SoundManager.sfx_stream_player_lost
|
||||
SoundManager.play_sfx_stream(stream, global_position)
|
||||
_state = State.LookAround
|
||||
|
||||
|
||||
@@ -267,6 +271,7 @@ func _set_walking_state() -> void:
|
||||
|
||||
|
||||
func _set_chase_state() -> void:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_player_spoted, global_position)
|
||||
if _target_x < position.x:
|
||||
_state = State.ChasingLeft
|
||||
else:
|
||||
|
||||
@@ -26,7 +26,6 @@ const PICKUP_OFFSET = 16.0
|
||||
@export_range(0.0, 1000.0) var max_fall_speed := 640
|
||||
@export_range(0.0, 1000.0) var acceleration := 600.0
|
||||
@export_range(0.0, 1000.0) var jump_velocity := 320.0
|
||||
@export_range(0.0, 10.0) var switch_time := 0.0
|
||||
@export_range(0.0, 2.0) var jump_gravity_factor := 1.0
|
||||
@export_range(0.0, 2.0) var fall_gravity_factor := 1.5
|
||||
@export_range(0.0, 1.0) var passive_jump_factor := 0.5
|
||||
@@ -68,6 +67,7 @@ func _physics_process(delta: float) -> void:
|
||||
jump_buffer_timer.start()
|
||||
|
||||
if not coyote_time_timer.is_stopped() and not jump_buffer_timer.is_stopped():
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_jump, global_position)
|
||||
velocity.y = -jump_velocity
|
||||
jump_buffer_timer.stop()
|
||||
|
||||
@@ -83,7 +83,8 @@ func _physics_process(delta: float) -> void:
|
||||
if was_collided and _is_alive:
|
||||
for i in range(get_slide_collision_count()):
|
||||
var collision := get_slide_collision(i)
|
||||
if _is_killing_collider(collision.get_collider()):
|
||||
if _is_killing_collider(collision.get_collider()) and _is_alive:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_death, global_position)
|
||||
_is_alive = false
|
||||
collision_mask = 1
|
||||
get_tree().paused = true
|
||||
@@ -93,7 +94,8 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("switch_color") and _is_alive:
|
||||
collision_switcher.switch_color(switch_time)
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_switch, global_position)
|
||||
collision_switcher.switch_color()
|
||||
|
||||
|
||||
func add_pickup(pickup: AbstractPickup) -> void:
|
||||
|
||||
@@ -22,17 +22,12 @@ enum Collisions {
|
||||
enum State {
|
||||
Black,
|
||||
White,
|
||||
TransitionToBlack,
|
||||
TransitionToWhite,
|
||||
}
|
||||
|
||||
|
||||
const COLLISION_WHITE_SHIFT = 4
|
||||
|
||||
const MAX_INTENSITY = 1.0
|
||||
|
||||
const SHADER_SWITCH_COLORS = "shader_parameter/switch_colors"
|
||||
const SHADER_INTENSITY = "shader_parameter/intensity"
|
||||
|
||||
|
||||
@export var object : CollisionObject2D
|
||||
@@ -50,8 +45,6 @@ var _state : State:
|
||||
_state = value
|
||||
_apply_color()
|
||||
|
||||
var _intensity_tween : Tween
|
||||
|
||||
var _grey_layer := 0
|
||||
var _color_layer := 0
|
||||
|
||||
@@ -69,17 +62,9 @@ func _ready() -> void:
|
||||
_state = initial_state
|
||||
|
||||
|
||||
func switch_color(time: float = 0.0) -> void:
|
||||
if _intensity_tween != null and _intensity_tween.is_running(): return
|
||||
func switch_color() -> void:
|
||||
_state = State.Black if _state == State.White else State.White
|
||||
|
||||
if is_zero_approx(time):
|
||||
_state = State.Black if _state == State.White else State.White
|
||||
else:
|
||||
_state = State.TransitionToBlack if _state == State.White else State.TransitionToWhite
|
||||
|
||||
_intensity_tween = create_tween()
|
||||
_intensity_tween.tween_method(_set_shader_internsity, 0.0, MAX_INTENSITY, time)
|
||||
_intensity_tween.finished.connect(_update_state)
|
||||
|
||||
|
||||
func _get_grey_collision(collision: int) -> int:
|
||||
@@ -92,18 +77,6 @@ func _get_color_collision(collision: int) -> int:
|
||||
return black_collision | white_collision
|
||||
|
||||
|
||||
func _set_shader_internsity(value: float) -> void:
|
||||
material.set(SHADER_INTENSITY, value)
|
||||
|
||||
|
||||
func _update_state() -> void:
|
||||
match _state:
|
||||
State.TransitionToBlack:
|
||||
_state = State.Black
|
||||
State.TransitionToWhite:
|
||||
_state = State.White
|
||||
|
||||
|
||||
func _apply_color() -> void:
|
||||
var layer := 0
|
||||
var mask := 0
|
||||
@@ -115,13 +88,10 @@ func _apply_color() -> void:
|
||||
State.White:
|
||||
layer = _grey_layer | (_color_layer << COLLISION_WHITE_SHIFT)
|
||||
mask = _grey_mask | (_color_mask << COLLISION_WHITE_SHIFT)
|
||||
State.TransitionToBlack, State.TransitionToWhite:
|
||||
layer = _grey_layer | _color_layer | (_color_layer << COLLISION_WHITE_SHIFT)
|
||||
mask = _grey_mask
|
||||
|
||||
object.collision_layer = layer
|
||||
object.collision_mask = mask
|
||||
|
||||
if material != null:
|
||||
var is_black := _state == State.Black or _state == State.TransitionToBlack
|
||||
var is_black := _state == State.Black
|
||||
material.set(SHADER_SWITCH_COLORS, is_black)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class_name BookDoor
|
||||
extends ClosedDoor
|
||||
extends LockedDoor
|
||||
|
||||
|
||||
func _is_key(node: Node) -> bool:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://dioc4r03dfleq"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/closed_door.tscn" id="1_p87ci"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/locked_door.tscn" id="1_p87ci"]
|
||||
[ext_resource type="Script" uid="uid://befuova1g4tth" path="res://game/doors/book_door.gd" id="2_atb6l"]
|
||||
[ext_resource type="Texture2D" uid="uid://sfjjweantpja" path="res://images/level/doors.png" id="3_gbgmk"]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class_name CircleDoor
|
||||
extends ClosedDoor
|
||||
extends LockedDoor
|
||||
|
||||
|
||||
func _is_key(node: Node) -> bool:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://g0n5npbt3hb2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/closed_door.tscn" id="1_amonf"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/locked_door.tscn" id="1_amonf"]
|
||||
[ext_resource type="Texture2D" uid="uid://sfjjweantpja" path="res://images/level/doors.png" id="2_5d3q0"]
|
||||
[ext_resource type="Script" uid="uid://50eqrh24tgx7" path="res://game/doors/circle_door.gd" id="2_t4nfh"]
|
||||
|
||||
|
||||
@@ -39,11 +39,13 @@ func _can_close(_body: Node2D) -> bool:
|
||||
|
||||
|
||||
func _open() -> void:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_door_opening, global_position)
|
||||
sprite.play(ANIMATION_OPENING)
|
||||
static_body.process_mode = Node.PROCESS_MODE_DISABLED
|
||||
|
||||
|
||||
func _close() -> void:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_door_closing, global_position)
|
||||
sprite.play(ANIMATION_CLOSING)
|
||||
static_body.process_mode = Node.PROCESS_MODE_INHERIT
|
||||
|
||||
@@ -71,6 +73,8 @@ func _on_area_entered(body: Node2D) -> void:
|
||||
_open()
|
||||
else:
|
||||
_needed_to_be_open = true
|
||||
else:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_door_locked, global_position)
|
||||
|
||||
|
||||
func _on_area_exited(body: Node2D) -> void:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class_name ClosedDoor
|
||||
class_name LockedDoor
|
||||
extends Door
|
||||
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://cojxqx5al7kyv"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b7mhdrj3b6loq" path="res://game/doors/door.tscn" id="1_rxn60"]
|
||||
[ext_resource type="Script" uid="uid://qd7aihqwgddj" path="res://game/doors/closed_door.gd" id="2_dntl7"]
|
||||
[ext_resource type="Texture2D" uid="uid://sfjjweantpja" path="res://images/level/doors.png" id="3_dntl7"]
|
||||
[ext_resource type="PackedScene" uid="uid://b7mhdrj3b6loq" path="res://game/doors/door.tscn" id="1_8ic80"]
|
||||
[ext_resource type="Script" uid="uid://qd7aihqwgddj" path="res://game/doors/locked_door.gd" id="2_asbqu"]
|
||||
[ext_resource type="Texture2D" uid="uid://sfjjweantpja" path="res://images/level/doors.png" id="3_jhxil"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3gkgk"]
|
||||
atlas = ExtResource("3_dntl7")
|
||||
atlas = ExtResource("3_jhxil")
|
||||
region = Rect2(0, 48, 32, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dntl7"]
|
||||
atlas = ExtResource("3_dntl7")
|
||||
atlas = ExtResource("3_jhxil")
|
||||
region = Rect2(64, 48, 32, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fgn1o"]
|
||||
atlas = ExtResource("3_dntl7")
|
||||
atlas = ExtResource("3_jhxil")
|
||||
region = Rect2(32, 48, 32, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qpt8q"]
|
||||
atlas = ExtResource("3_dntl7")
|
||||
atlas = ExtResource("3_jhxil")
|
||||
region = Rect2(0, 48, 32, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gu75k"]
|
||||
atlas = ExtResource("3_dntl7")
|
||||
atlas = ExtResource("3_jhxil")
|
||||
region = Rect2(64, 48, 32, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_l618y"]
|
||||
atlas = ExtResource("3_dntl7")
|
||||
atlas = ExtResource("3_jhxil")
|
||||
region = Rect2(0, 48, 32, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s3oqg"]
|
||||
atlas = ExtResource("3_dntl7")
|
||||
atlas = ExtResource("3_jhxil")
|
||||
region = Rect2(32, 48, 32, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ir1gv"]
|
||||
atlas = ExtResource("3_dntl7")
|
||||
atlas = ExtResource("3_jhxil")
|
||||
region = Rect2(64, 48, 32, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_fgn1o"]
|
||||
@@ -83,8 +83,8 @@ animations = [{
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[node name="ClosedDoor" instance=ExtResource("1_rxn60")]
|
||||
script = ExtResource("2_dntl7")
|
||||
[node name="LockedDoor" instance=ExtResource("1_8ic80")]
|
||||
script = ExtResource("2_asbqu")
|
||||
|
||||
[node name="AnimatedSprite2D" parent="." index="2"]
|
||||
sprite_frames = SubResource("SpriteFrames_fgn1o")
|
||||
@@ -1,5 +1,5 @@
|
||||
class_name SquareDoor
|
||||
extends ClosedDoor
|
||||
extends LockedDoor
|
||||
|
||||
|
||||
func _is_key(node: Node) -> bool:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://b7imlh4sl036i"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/closed_door.tscn" id="1_jg0qv"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/locked_door.tscn" id="1_jg0qv"]
|
||||
[ext_resource type="Script" uid="uid://mp2dfsd1uk5p" path="res://game/doors/square_door.gd" id="2_wyn1t"]
|
||||
[ext_resource type="Texture2D" uid="uid://sfjjweantpja" path="res://images/level/doors.png" id="3_txk00"]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class_name TriagleDoor
|
||||
extends ClosedDoor
|
||||
extends LockedDoor
|
||||
|
||||
|
||||
func _is_key(node: Node) -> bool:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://dwvv5dj8lqif2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/closed_door.tscn" id="1_l21ff"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/locked_door.tscn" id="1_l21ff"]
|
||||
[ext_resource type="Script" uid="uid://d4lrt6yw0knf7" path="res://game/doors/triangle_door.gd" id="2_ifpbb"]
|
||||
[ext_resource type="Texture2D" uid="uid://sfjjweantpja" path="res://images/level/doors.png" id="3_eqipl"]
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ func _ready() -> void:
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("pause"):
|
||||
SoundManager.play_ui_stream.call_deferred(SoundManager.ui_stream_accept)
|
||||
SoundManager.play_ui_stream(SoundManager.ui_stream_accept)
|
||||
get_tree().paused = true
|
||||
pause_menu.show()
|
||||
|
||||
@@ -33,6 +33,8 @@ func _on_player_dead() -> void:
|
||||
|
||||
func _on_level_end_entered(body: Node2D) -> void:
|
||||
if body is Player:
|
||||
var player_position := player.global_position
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_level_completed, player_position)
|
||||
get_tree().paused = true
|
||||
completion_menu.show()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=26 format=4 uid="uid://dlpi1ptis3wna"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://mpsu4g2b5h3a" path="res://game/levels/abstract_level.tscn" id="1_15okj"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/closed_door.tscn" id="2_4ocoy"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/locked_door.tscn" id="2_4ocoy"]
|
||||
[ext_resource type="Material" uid="uid://dojhoc6ljpt1a" path="res://game/materials/gray_walls.tres" id="2_tuvkr"]
|
||||
[ext_resource type="PackedScene" uid="uid://b7mhdrj3b6loq" path="res://game/doors/door.tscn" id="3_crrvt"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3346lrt1c1oh" path="res://images/level/outdoor.png" id="3_wi6ud"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=20 format=4 uid="uid://cc06c06hlv7ix"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://mpsu4g2b5h3a" path="res://game/levels/abstract_level.tscn" id="1_t037v"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/closed_door.tscn" id="2_iakit"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/locked_door.tscn" id="2_iakit"]
|
||||
[ext_resource type="PackedScene" uid="uid://deo60sij43ibm" path="res://game/objects/tutorial/switch_kbd.tscn" id="3_6jjde"]
|
||||
[ext_resource type="PackedScene" uid="uid://b7mhdrj3b6loq" path="res://game/doors/door.tscn" id="3_ylsm2"]
|
||||
[ext_resource type="PackedScene" uid="uid://f70xseggdimg" path="res://game/objects/tutorial/switch_pad.tscn" id="4_bxukv"]
|
||||
@@ -23,7 +23,7 @@
|
||||
[node name="Level2" instance=ExtResource("1_t037v")]
|
||||
player_falling_at_start = true
|
||||
|
||||
[node name="ClosedDoor" parent="Doors" index="0" instance=ExtResource("2_iakit")]
|
||||
[node name="LockedDoor" parent="Doors" index="0" instance=ExtResource("2_iakit")]
|
||||
position = Vector2(-48, 296)
|
||||
|
||||
[node name="TunnelEntranceDoor" parent="Doors" index="1" instance=ExtResource("3_ylsm2")]
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
class_name TestLevel
|
||||
extends AbstractLevel
|
||||
@@ -1 +0,0 @@
|
||||
uid://b04km0lbc108u
|
||||
@@ -1,11 +1,10 @@
|
||||
[gd_scene load_steps=22 format=4 uid="uid://bmn74wc2vophn"]
|
||||
[gd_scene load_steps=21 format=4 uid="uid://bmn74wc2vophn"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://mpsu4g2b5h3a" path="res://game/levels/abstract_level.tscn" id="1_15okj"]
|
||||
[ext_resource type="Script" uid="uid://b04km0lbc108u" path="res://game/levels/test_level.gd" id="2_hj65a"]
|
||||
[ext_resource type="PackedScene" uid="uid://b3kyqvuxmfn8f" path="res://game/objects/fireplace.tscn" id="3_tuvkr"]
|
||||
[ext_resource type="PackedScene" uid="uid://pw8xqtpauy57" path="res://game/objects/tutorial/jump_kbd.tscn" id="4_crrvt"]
|
||||
[ext_resource type="PackedScene" uid="uid://g0n5npbt3hb2" path="res://game/doors/circle_door.tscn" id="4_yrqjd"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/closed_door.tscn" id="5_1skah"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojxqx5al7kyv" path="res://game/doors/locked_door.tscn" id="5_1skah"]
|
||||
[ext_resource type="PackedScene" uid="uid://cemhsfdru4pv6" path="res://game/objects/tutorial/movement_kbd.tscn" id="5_rifvl"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwvv5dj8lqif2" path="res://game/doors/triangle_door.tscn" id="6_75eok"]
|
||||
[ext_resource type="PackedScene" uid="uid://deo60sij43ibm" path="res://game/objects/tutorial/switch_kbd.tscn" id="6_l6jt4"]
|
||||
@@ -23,7 +22,6 @@
|
||||
[ext_resource type="PackedScene" uid="uid://bv2gahb4wxgb1" path="res://game/characters/white_enemy.tscn" id="20_rt0xo"]
|
||||
|
||||
[node name="TestLevel" instance=ExtResource("1_15okj")]
|
||||
script = ExtResource("2_hj65a")
|
||||
|
||||
[node name="Door" parent="Doors" index="0" instance=ExtResource("11_g1txn")]
|
||||
position = Vector2(416, -56)
|
||||
|
||||
@@ -18,11 +18,24 @@ const MUSIC_BUS = "Music"
|
||||
@export_range(1, 10) var player_count_ui := 1
|
||||
@export_range(1, 100) var player_count_sfx := 1
|
||||
|
||||
@export_group("UI Sounds", "ui")
|
||||
@export_group("UI Sounds", "ui_stream")
|
||||
@export var ui_stream_accept : AudioStream
|
||||
@export var ui_stream_decline : AudioStream
|
||||
@export var ui_stream_select : AudioStream
|
||||
|
||||
@export_group("SFX Sounds", "sfx_stream")
|
||||
@export var sfx_stream_book_picked_up : AudioStream
|
||||
@export var sfx_stream_death : AudioStream
|
||||
@export var sfx_stream_door_closing : AudioStream
|
||||
@export var sfx_stream_door_locked : AudioStream
|
||||
@export var sfx_stream_door_opening : AudioStream
|
||||
@export var sfx_stream_jump : AudioStream
|
||||
@export var sfx_stream_key_picked_up : AudioStream
|
||||
@export var sfx_stream_level_completed : AudioStream
|
||||
@export var sfx_stream_player_lost : AudioStream
|
||||
@export var sfx_stream_player_spoted : AudioStream
|
||||
@export var sfx_stream_switch : AudioStream
|
||||
|
||||
|
||||
var _ui_players : Array[AudioStreamPlayer] = []
|
||||
var _sfx_players : Array[AudioStreamPlayer2D] = []
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://drk4dvbn78dva"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://drk4dvbn78dva"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cx5qcukr66whc" path="res://game/managers/sound_manager.gd" id="1_cg0sy"]
|
||||
[ext_resource type="AudioStream" uid="uid://d2suvaisb6w45" path="res://sound/ui/accept.wav" id="2_ge1il"]
|
||||
[ext_resource type="AudioStream" uid="uid://2smjkpqyjcrb" path="res://sound/ui/decline.wav" id="3_agyxs"]
|
||||
[ext_resource type="AudioStream" uid="uid://dnqw8nign1s6e" path="res://sound/ui/select.wav" id="4_0i6kl"]
|
||||
[ext_resource type="AudioStream" uid="uid://bar0qo30hnk5a" path="res://sound/sfx/death.wav" id="5_fpnh3"]
|
||||
[ext_resource type="AudioStream" uid="uid://ngforqq1dxy8" path="res://sound/sfx/book_picked_up.wav" id="5_l4iry"]
|
||||
[ext_resource type="AudioStream" uid="uid://kdtpvofbtlus" path="res://sound/sfx/jump.wav" id="6_22ptj"]
|
||||
[ext_resource type="AudioStream" uid="uid://cye1ne86awd0u" path="res://sound/sfx/level_completed.wav" id="7_22ptj"]
|
||||
[ext_resource type="AudioStream" uid="uid://dri8l7y40s3g6" path="res://sound/sfx/door_closing.wav" id="7_814q3"]
|
||||
[ext_resource type="AudioStream" uid="uid://yjq5ojrma76c" path="res://sound/sfx/switch.wav" id="7_ab171"]
|
||||
[ext_resource type="AudioStream" uid="uid://dgnsy5siim5gp" path="res://sound/sfx/player_lost.wav" id="8_6ll5c"]
|
||||
[ext_resource type="AudioStream" uid="uid://bglv6ptl6tlu1" path="res://sound/sfx/door_locked.wav" id="8_lqyhh"]
|
||||
[ext_resource type="AudioStream" uid="uid://2spbxv7pwkmb" path="res://sound/sfx/door_opening.wav" id="8_ounmg"]
|
||||
[ext_resource type="AudioStream" uid="uid://txk8dq16levc" path="res://sound/sfx/key_picked_up.wav" id="8_wyfta"]
|
||||
[ext_resource type="AudioStream" uid="uid://dy7qnen5k20mo" path="res://sound/sfx/player_spoted.wav" id="9_q7cyi"]
|
||||
|
||||
[node name="SoundManager" type="Node"]
|
||||
process_mode = 3
|
||||
script = ExtResource("1_cg0sy")
|
||||
putch_ui_min = 0.95
|
||||
putch_ui_max = 1.05
|
||||
@@ -16,3 +28,14 @@ player_count_sfx = 25
|
||||
ui_stream_accept = ExtResource("2_ge1il")
|
||||
ui_stream_decline = ExtResource("3_agyxs")
|
||||
ui_stream_select = ExtResource("4_0i6kl")
|
||||
sfx_stream_book_picked_up = ExtResource("5_l4iry")
|
||||
sfx_stream_death = ExtResource("5_fpnh3")
|
||||
sfx_stream_door_closing = ExtResource("7_814q3")
|
||||
sfx_stream_door_locked = ExtResource("8_lqyhh")
|
||||
sfx_stream_door_opening = ExtResource("8_ounmg")
|
||||
sfx_stream_jump = ExtResource("6_22ptj")
|
||||
sfx_stream_key_picked_up = ExtResource("8_wyfta")
|
||||
sfx_stream_level_completed = ExtResource("7_22ptj")
|
||||
sfx_stream_player_lost = ExtResource("8_6ll5c")
|
||||
sfx_stream_player_spoted = ExtResource("9_q7cyi")
|
||||
sfx_stream_switch = ExtResource("7_ab171")
|
||||
|
||||
@@ -2,7 +2,12 @@ class_name AbstractPickup
|
||||
extends Area2D
|
||||
|
||||
|
||||
func _play_pickup_sound() -> void:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_key_picked_up, global_position)
|
||||
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
if body.has_method("add_pickup"):
|
||||
collision_mask = 0
|
||||
body.add_pickup(self)
|
||||
_play_pickup_sound()
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
class_name BookPickup
|
||||
extends AbstractPickup
|
||||
|
||||
|
||||
func _play_pickup_sound() -> void:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_book_picked_up, global_position)
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://ngforqq1dxy8"
|
||||
path="res://.godot/imported/book_picked_up.wav-cffbd5c03fc6f01b4edb0021c15e335b.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/book_picked_up.wav"
|
||||
dest_files=["res://.godot/imported/book_picked_up.wav-cffbd5c03fc6f01b4edb0021c15e335b.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
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bar0qo30hnk5a"
|
||||
path="res://.godot/imported/death.wav-9751715de9f585f81d61e3e623b1e56f.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/death.wav"
|
||||
dest_files=["res://.godot/imported/death.wav-9751715de9f585f81d61e3e623b1e56f.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
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dri8l7y40s3g6"
|
||||
path="res://.godot/imported/door_closing.wav-81c2243f4ba1cfcf846bf349ca63843e.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/door_closing.wav"
|
||||
dest_files=["res://.godot/imported/door_closing.wav-81c2243f4ba1cfcf846bf349ca63843e.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
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bglv6ptl6tlu1"
|
||||
path="res://.godot/imported/door_locked.wav-8014050dae1098889ccf133677c8678d.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/door_locked.wav"
|
||||
dest_files=["res://.godot/imported/door_locked.wav-8014050dae1098889ccf133677c8678d.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
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://2spbxv7pwkmb"
|
||||
path="res://.godot/imported/door_opening.wav-f50d5badfd844e165d9c526b9beadf53.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/door_opening.wav"
|
||||
dest_files=["res://.godot/imported/door_opening.wav-f50d5badfd844e165d9c526b9beadf53.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
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://kdtpvofbtlus"
|
||||
path="res://.godot/imported/jump.wav-89eafde76b4d0550c115f0c423080c9e.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/jump.wav"
|
||||
dest_files=["res://.godot/imported/jump.wav-89eafde76b4d0550c115f0c423080c9e.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
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://txk8dq16levc"
|
||||
path="res://.godot/imported/key_picked_up.wav-a7434d8d9b72bf9c252ee751dd0e122a.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/key_picked_up.wav"
|
||||
dest_files=["res://.godot/imported/key_picked_up.wav-a7434d8d9b72bf9c252ee751dd0e122a.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.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cye1ne86awd0u"
|
||||
path="res://.godot/imported/level_completed.wav-07dcc83a0c57c107eb67698e1bebcccb.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/level_completed.wav"
|
||||
dest_files=["res://.godot/imported/level_completed.wav-07dcc83a0c57c107eb67698e1bebcccb.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
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dgnsy5siim5gp"
|
||||
path="res://.godot/imported/player_lost.wav-f4942ed4e5c7cfdde833ea2883713ad0.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/player_lost.wav"
|
||||
dest_files=["res://.godot/imported/player_lost.wav-f4942ed4e5c7cfdde833ea2883713ad0.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
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dy7qnen5k20mo"
|
||||
path="res://.godot/imported/player_spoted.wav-f9be7e62d8eab9af967de0909e2bbcc1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/player_spoted.wav"
|
||||
dest_files=["res://.godot/imported/player_spoted.wav-f9be7e62d8eab9af967de0909e2bbcc1.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
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://yjq5ojrma76c"
|
||||
path="res://.godot/imported/switch.wav-d4e953c7727d2b2582636b05792bc2b7.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/switch.wav"
|
||||
dest_files=["res://.godot/imported/switch.wav-d4e953c7727d2b2582636b05792bc2b7.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
|
||||
Reference in New Issue
Block a user