release :/

This commit is contained in:
2024-01-26 15:04:44 +01:00
parent 8d237ae1d4
commit f34c34bb94
26 changed files with 18933 additions and 23 deletions

View File

@@ -15,9 +15,11 @@ 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
get_tree().paused = false
transition.hide()
else:
get_tree().change_scene_to_file("res://scenes/gui/menus/game_finished.tscn")

View File

@@ -2,6 +2,7 @@ extends Control
class_name MainMenu
func _ready() -> void:
get_tree().paused = false
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
LevelManager.level_pointer = 0

View File

@@ -2,11 +2,13 @@ extends AudioStreamPlayer
class_name SoundEffect
@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")