mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
TODO: Audio.tscn
This commit is contained in:
parent
d5bc068952
commit
86aad52961
3 changed files with 9 additions and 2 deletions
|
|
@ -103,6 +103,7 @@ Wipe="*res://src/autoload/Wipe.tscn"
|
|||
UI="*res://src/autoload/UI.tscn"
|
||||
SilentWolf="*res://addons/silent_wolf/SilentWolf.gd"
|
||||
Leaderboard="*res://src/autoload/Leaderboard.gd"
|
||||
Audio="*res://src/autoload/Audio.tscn"
|
||||
|
||||
[display]
|
||||
|
||||
|
|
|
|||
|
|
@ -51,8 +51,7 @@ func _input(event):
|
|||
if up or down:
|
||||
set_cursor(cursor + (-1 if up else 1))
|
||||
write_menu()
|
||||
node_audio_scroll.pitch_scale = 1 + rand_range(-0.2, 0.2)
|
||||
node_audio_scroll.play()
|
||||
Audio.play("pause_scroll", 0.8, 1.2)
|
||||
|
||||
func toggle_pause():
|
||||
is_paused = !is_paused
|
||||
|
|
|
|||
|
|
@ -377,3 +377,10 @@ func set_window_scale(arg := window_scale):
|
|||
# center window
|
||||
OS.set_window_position(OS.get_screen_size() * 0.5 - OS.get_window_size() * 0.5)
|
||||
return "window_scale: " + str(window_scale) + " - resolution: " + str(OS.get_window_size())
|
||||
|
||||
func get_all_children(n, a := []):
|
||||
if is_instance_valid(n):
|
||||
a.append(n)
|
||||
for i in n.get_children():
|
||||
a = get_all_children(i, a)
|
||||
return a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue