midori-school/backgounds/gameover.gd

20 lines
496 B
GDScript3
Raw Permalink Normal View History

2024-09-06 02:16:49 +02:00
extends Node2D
var sfx1 := AudioStreamPlayer.new()
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
add_child(sfx1)
sfx1.mix_target = 1
sfx1.bus = &"SFX1"
sfx1.stream = load(Global.sfxtracks[0])
sfx1.play(0)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _input(event):
if Input.is_action_just_pressed("ui_accept"):
get_tree().change_scene_to_file("res://title.tscn")