first commit
This commit is contained in:
22
main menu.gd
Normal file
22
main menu.gd
Normal file
@@ -0,0 +1,22 @@
|
||||
extends Node3D
|
||||
|
||||
func _ready():
|
||||
$AudioStreamPlayer.play()
|
||||
|
||||
var drop_pitch = false
|
||||
var to_quit=false
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if !drop_pitch: return
|
||||
$AudioStreamPlayer.pitch_scale=clamp($AudioStreamPlayer.pitch_scale-delta*0.25,0.01,INF);
|
||||
if $AudioStreamPlayer.pitch_scale <= 0.02:
|
||||
if to_quit:
|
||||
get_tree().quit()
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://forest.tscn")
|
||||
|
||||
func start(quit):
|
||||
to_quit = quit
|
||||
drop_pitch=true
|
||||
self.remove_child($CanvasLayer)
|
||||
self.remove_child($character)
|
||||
Reference in New Issue
Block a user