starfighter/MB_FYP/script/ui/game_over.cs

24 lines
557 B
C#
Raw Permalink Normal View History

using Godot;
using System;
public partial class game_over : CenterContainer
{
public override void _Ready()
{
GetNode<Button>("VBox/HBox/Retry").Pressed += () =>
{
GetTree().Paused = false;
Visible = false;
GetTree().ChangeSceneToFile("res://scenes/system/game.tscn");
};
GetNode<Button>("VBox/HBox/MainMenu").Pressed += () =>
{
GetTree().Paused = false;
GetTree().ChangeSceneToFile("res://scenes/ui/main_menu.tscn");
};
}
}