quality update and sound
This commit is contained in:
BIN
assets/audio/interactions/button_down.wav
Normal file
BIN
assets/audio/interactions/button_down.wav
Normal file
Binary file not shown.
24
assets/audio/interactions/button_down.wav.import
Normal file
24
assets/audio/interactions/button_down.wav.import
Normal file
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dlqy1pvffxmpq"
|
||||
path="res://.godot/imported/button_down.wav-754ef75f96a11527ea12df3de36d511b.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/interactions/button_down.wav"
|
||||
dest_files=["res://.godot/imported/button_down.wav-754ef75f96a11527ea12df3de36d511b.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=0
|
BIN
assets/audio/interactions/button_up.wav
Normal file
BIN
assets/audio/interactions/button_up.wav
Normal file
Binary file not shown.
24
assets/audio/interactions/button_up.wav.import
Normal file
24
assets/audio/interactions/button_up.wav.import
Normal file
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c4xw0cimkin7x"
|
||||
path="res://.godot/imported/button_up.wav-a18f821f701d8abea7fcd72ba58959d5.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/interactions/button_up.wav"
|
||||
dest_files=["res://.godot/imported/button_up.wav-a18f821f701d8abea7fcd72ba58959d5.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=0
|
BIN
assets/audio/interactions/door.wav
Normal file
BIN
assets/audio/interactions/door.wav
Normal file
Binary file not shown.
24
assets/audio/interactions/door.wav.import
Normal file
24
assets/audio/interactions/door.wav.import
Normal file
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c7k6qk8go84lw"
|
||||
path="res://.godot/imported/door.wav-5266e7aba2a2b4b7a47084aac774bc0c.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/interactions/door.wav"
|
||||
dest_files=["res://.godot/imported/door.wav-5266e7aba2a2b4b7a47084aac774bc0c.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=0
|
BIN
assets/audio/music/theturtlebox_home-main_menu.wav
Normal file
BIN
assets/audio/music/theturtlebox_home-main_menu.wav
Normal file
Binary file not shown.
24
assets/audio/music/theturtlebox_home-main_menu.wav.import
Normal file
24
assets/audio/music/theturtlebox_home-main_menu.wav.import
Normal file
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://58phpeni4qge"
|
||||
path="res://.godot/imported/theturtlebox_home-main_menu.wav-e40231367ca90f1ce913895f4e2115c1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/music/theturtlebox_home-main_menu.wav"
|
||||
dest_files=["res://.godot/imported/theturtlebox_home-main_menu.wav-e40231367ca90f1ce913895f4e2115c1.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=2
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
BIN
assets/audio/music/theturtlebox_thought-lvl_1.wav
Normal file
BIN
assets/audio/music/theturtlebox_thought-lvl_1.wav
Normal file
Binary file not shown.
24
assets/audio/music/theturtlebox_thought-lvl_1.wav.import
Normal file
24
assets/audio/music/theturtlebox_thought-lvl_1.wav.import
Normal file
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c2odo0ydvqrp5"
|
||||
path="res://.godot/imported/theturtlebox_thought-lvl_1.wav-0b71ab3b3d631e44ab64d77f00dcf8c0.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/music/theturtlebox_thought-lvl_1.wav"
|
||||
dest_files=["res://.godot/imported/theturtlebox_thought-lvl_1.wav-0b71ab3b3d631e44ab64d77f00dcf8c0.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=2
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
Binary file not shown.
@@ -13,3 +13,9 @@ bus/2/mute = false
|
||||
bus/2/bypass_fx = false
|
||||
bus/2/volume_db = 0.0
|
||||
bus/2/send = &"Master"
|
||||
bus/3/name = &"Music"
|
||||
bus/3/solo = false
|
||||
bus/3/mute = false
|
||||
bus/3/bypass_fx = false
|
||||
bus/3/volume_db = -10.5236
|
||||
bus/3/send = &"Master"
|
||||
|
@@ -23,6 +23,7 @@ config/icon="res://assets/textures/gui/pte_icon.svg"
|
||||
WindowManager="*res://scripts/autoloads/window_manager.gd"
|
||||
LevelManager="*res://scenes/autoloads/level_manager.tscn"
|
||||
DiscordSDKLoader="*res://addons/discord-sdk-gd/nodes/discord_autoload.gd"
|
||||
MusicManager="*res://scenes/autoloads/music_manager.tscn"
|
||||
|
||||
[display]
|
||||
|
||||
|
25
scenes/autoloads/music_manager.tscn
Normal file
25
scenes/autoloads/music_manager.tscn
Normal file
@@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://d05ijxjrvveav"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/autoloads/music_manager.gd" id="1_y5orj"]
|
||||
[ext_resource type="Script" path="res://scripts/sound_effect.gd" id="2_b3vke"]
|
||||
[ext_resource type="AudioStream" uid="uid://58phpeni4qge" path="res://assets/audio/music/theturtlebox_home-main_menu.wav" id="3_fvdep"]
|
||||
[ext_resource type="Script" path="res://scripts/soundeffect_resource.gd" id="4_g5rbb"]
|
||||
[ext_resource type="AudioStream" uid="uid://c2odo0ydvqrp5" path="res://assets/audio/music/theturtlebox_thought-lvl_1.wav" id="5_nktif"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6qbpn"]
|
||||
script = ExtResource("4_g5rbb")
|
||||
key = "main"
|
||||
audio = ExtResource("3_fvdep")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_k4uy8"]
|
||||
script = ExtResource("4_g5rbb")
|
||||
key = "lvl1"
|
||||
audio = ExtResource("5_nktif")
|
||||
|
||||
[node name="MusicManager" type="Node"]
|
||||
script = ExtResource("1_y5orj")
|
||||
|
||||
[node name="SoundEffect" type="AudioStreamPlayer" parent="."]
|
||||
bus = &"Music"
|
||||
script = ExtResource("2_b3vke")
|
||||
audio_library = Array[ExtResource("4_g5rbb")]([SubResource("Resource_6qbpn"), SubResource("Resource_k4uy8")])
|
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dvb7rkyyyllkc"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/close_game_confirmation.gd" id="1_7dm65"]
|
||||
[ext_resource type="Script" path="res://scripts/menus/close_game_confirmation.gd" id="1_7dm65"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2juxv"]
|
||||
bg_color = Color(0, 0, 0, 0.482353)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://ceq785h1fcvq"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/game_over.gd" id="1_oydw2"]
|
||||
[ext_resource type="Script" path="res://scripts/menus/game_over.gd" id="1_oydw2"]
|
||||
[ext_resource type="FontFile" uid="uid://cr7a85ntk0t0k" path="res://assets/fonts/spacegrotesk_bold.ttf" id="2_1rhse"]
|
||||
|
||||
[sub_resource type="Shader" id="Shader_1tfvw"]
|
||||
|
@@ -62,6 +62,9 @@ visible = false
|
||||
[node name="Camera3D" parent="SubViewportContainer/SubViewport/LVL1/Player" index="1"]
|
||||
current = false
|
||||
|
||||
[node name="AudioListener3D" parent="SubViewportContainer/SubViewport/LVL1/Player/Camera3D" index="3"]
|
||||
current = true
|
||||
|
||||
[node name="GravityGunLayer" parent="SubViewportContainer/SubViewport/LVL1/Player" index="2"]
|
||||
visible = false
|
||||
|
||||
|
@@ -1,9 +1,10 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cy0x2nliyw8gw"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cy0x2nliyw8gw"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/door.gd" id="1_qix0h"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://dcoh3pfu6hb6q" path="res://assets/models/door.obj" id="2_vc20h"]
|
||||
[ext_resource type="Material" uid="uid://canvgrlphqagw" path="res://assets/materials/light_metal.material" id="3_ti6vs"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://bpv5cwupbmdtk" path="res://assets/models/door_handle.obj" id="4_frcys"]
|
||||
[ext_resource type="AudioStream" uid="uid://c7k6qk8go84lw" path="res://assets/audio/interactions/door.wav" id="6_mhwxm"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_pejvk"]
|
||||
size = Vector3(1.5, 3, 0.2)
|
||||
@@ -37,7 +38,7 @@ tracks/1/keys = {
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1220n"]
|
||||
resource_name = "open"
|
||||
length = 0.5
|
||||
length = 2.7
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
@@ -45,7 +46,7 @@ tracks/0/path = NodePath("MeshInstance3D2:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"times": PackedFloat32Array(0.6, 2.2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(1, 0, 0)]
|
||||
@@ -57,7 +58,7 @@ tracks/1/path = NodePath("MeshInstance3D2/Handle:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"times": PackedFloat32Array(0, 2.7),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.349066, 1.5708, -1.5708), Vector3(5.93412, 1.5708, -1.5708)]
|
||||
@@ -95,3 +96,6 @@ surface_material_override/0 = ExtResource("3_ti6vs")
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_5xgbb")
|
||||
}
|
||||
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
|
||||
stream = ExtResource("6_mhwxm")
|
||||
|
@@ -1,10 +1,14 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://dqy8bqf1chm8c"]
|
||||
[gd_scene load_steps=17 format=3 uid="uid://dqy8bqf1chm8c"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dm8l36ephydnl" path="res://scenes/objects/interaction_area.tscn" id="1_0okd0"]
|
||||
[ext_resource type="Script" path="res://scripts/interactables/completer/button_stand.gd" id="1_gkcm2"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://bjiycdbug2bd3" path="res://assets/models/button_stand.obj" id="2_0tsnx"]
|
||||
[ext_resource type="Material" uid="uid://cxjgare3kcbtl" path="res://assets/materials/dark_metal2.material" id="3_u47pc"]
|
||||
[ext_resource type="Material" uid="uid://df88ryv5mvkg0" path="res://assets/textures/material/metal/metal_red.material" id="4_sck5v"]
|
||||
[ext_resource type="Script" path="res://scripts/sound_effect_3d.gd" id="6_vwtv2"]
|
||||
[ext_resource type="AudioStream" uid="uid://dlqy1pvffxmpq" path="res://assets/audio/interactions/button_down.wav" id="7_brmv4"]
|
||||
[ext_resource type="Script" path="res://scripts/soundeffect_resource.gd" id="8_62har"]
|
||||
[ext_resource type="AudioStream" uid="uid://c4xw0cimkin7x" path="res://assets/audio/interactions/button_up.wav" id="9_pbk3w"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_jpuiw"]
|
||||
height = 1.45
|
||||
@@ -53,6 +57,16 @@ _data = {
|
||||
"press": SubResource("Animation_stg1c")
|
||||
}
|
||||
|
||||
[sub_resource type="Resource" id="Resource_x4t53"]
|
||||
script = ExtResource("8_62har")
|
||||
key = "down"
|
||||
audio = ExtResource("7_brmv4")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_n3yxo"]
|
||||
script = ExtResource("8_62har")
|
||||
key = "up"
|
||||
audio = ExtResource("9_pbk3w")
|
||||
|
||||
[node name="ButtonStand" type="StaticBody3D"]
|
||||
collision_layer = 7
|
||||
collision_mask = 7
|
||||
@@ -84,4 +98,8 @@ libraries = {
|
||||
[node name="InteractionArea" parent="." instance=ExtResource("1_0okd0")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.9, 0)
|
||||
|
||||
[node name="SoundEffect3D" type="AudioStreamPlayer3D" parent="."]
|
||||
script = ExtResource("6_vwtv2")
|
||||
audio_library = Array[ExtResource("8_62har")]([SubResource("Resource_x4t53"), SubResource("Resource_n3yxo")])
|
||||
|
||||
[connection signal="interacted" from="InteractionArea" to="." method="_on_interaction_area_interacted"]
|
||||
|
@@ -91,6 +91,7 @@ player = NodePath("..")
|
||||
wait_time = 0.4
|
||||
|
||||
[node name="FootSteps" type="AudioStreamPlayer" parent="."]
|
||||
bus = &"Sound Effects"
|
||||
script = ExtResource("5_t1bvf")
|
||||
audio_library = Array[ExtResource("6_4revs")]([SubResource("Resource_n8h0v"), SubResource("Resource_a4b4g"), SubResource("Resource_yjl6f"), SubResource("Resource_qe4pm")])
|
||||
pitch_variation = 0.3
|
||||
|
@@ -1,5 +1,7 @@
|
||||
extends Node
|
||||
|
||||
signal level_switched
|
||||
|
||||
@onready var transition: CanvasLayer = $Transition
|
||||
|
||||
@export var levels: Array[PackedScene]
|
||||
@@ -12,17 +14,19 @@ func _ready() -> void:
|
||||
progress_save.load(PROGRESS_SAVE_PATH)
|
||||
|
||||
func next_level() -> void:
|
||||
level_pointer += 1
|
||||
if level_pointer < levels.size():
|
||||
transition.show()
|
||||
get_tree().paused = true
|
||||
await get_tree().create_timer(1).timeout
|
||||
get_tree().change_scene_to_packed(levels[level_pointer])
|
||||
await get_tree().create_timer(2).timeout
|
||||
level_switched.emit()
|
||||
get_tree().paused = false
|
||||
transition.hide()
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://scenes/gui/menus/game_finished.tscn")
|
||||
level_switched.emit()
|
||||
level_pointer += 1
|
||||
|
||||
func start_last_level() -> void:
|
||||
pass
|
||||
|
15
scripts/autoloads/music_manager.gd
Normal file
15
scripts/autoloads/music_manager.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
extends Node
|
||||
|
||||
@onready var soundeffect: SoundEffect = $SoundEffect
|
||||
|
||||
func _ready() -> void:
|
||||
_on_level_switched()
|
||||
LevelManager.level_switched.connect(_on_level_switched)
|
||||
|
||||
func _on_level_switched() -> void:
|
||||
print(get_tree().current_scene.name)
|
||||
match get_tree().current_scene.name:
|
||||
"MainMenu":
|
||||
soundeffect.play_key("main")
|
||||
"LVL1":
|
||||
soundeffect.play_key("lvl1")
|
@@ -42,7 +42,7 @@ func uncapture_mouse() -> void:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("pause"):
|
||||
if event.is_action_pressed("pause") && !get_tree().current_scene is MainMenu:
|
||||
show_pause_menu()
|
||||
|
||||
func toggle_fullscreen() -> void:
|
||||
|
@@ -1,7 +1,12 @@
|
||||
extends Node3D
|
||||
|
||||
@onready var anim: AnimationPlayer = $AnimationPlayer
|
||||
@onready var audio: AudioStreamPlayer3D = $AudioStreamPlayer3D
|
||||
|
||||
func open(): anim.play("open")
|
||||
func open():
|
||||
anim.play("open")
|
||||
audio.play()
|
||||
|
||||
func close(): anim.play_backwards("open")
|
||||
func close():
|
||||
anim.play_backwards("open")
|
||||
audio.play()
|
||||
|
@@ -1,12 +1,15 @@
|
||||
extends Completer
|
||||
|
||||
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||
@onready var soundeffect_3d: SoundEffect3D = $SoundEffect3D
|
||||
|
||||
func _on_interaction_area_interacted():
|
||||
if completed:
|
||||
animation_player.play_backwards("press")
|
||||
soundeffect_3d.play_key("down")
|
||||
else:
|
||||
animation_player.play("press")
|
||||
soundeffect_3d.play_key("up")
|
||||
toggle_complete()
|
||||
if one_shot:
|
||||
await animation_player.animation_finished
|
||||
|
@@ -7,8 +7,7 @@ func _ready() -> void:
|
||||
LevelManager.level_pointer = 0
|
||||
|
||||
func _on_start_game_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://scenes/levels/lvl_1.tscn")
|
||||
|
||||
LevelManager.next_level()
|
||||
|
||||
func _on_quit_game_pressed() -> void:
|
||||
get_tree().quit()
|
||||
|
14
scripts/sound_effect_3d.gd
Normal file
14
scripts/sound_effect_3d.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
extends AudioStreamPlayer3D
|
||||
class_name SoundEffect3D
|
||||
|
||||
@export var audio_library: Array[SoundeffectResource]
|
||||
@export_range(0,2) var pitch_variation: float
|
||||
|
||||
func play_key(key: String) -> void:
|
||||
for res in audio_library:
|
||||
if res.key == key:
|
||||
stream = res.audio
|
||||
pitch_scale = 1 + randf_range(pitch_variation * -1, pitch_variation)
|
||||
play()
|
||||
return
|
||||
push_error(key + " is not available in the Audio Library variable")
|
Reference in New Issue
Block a user