file refactor
This commit is contained in:
parent
da5a3e874b
commit
bffb012a26
175 changed files with 1086 additions and 1107 deletions
31
scripts/gui/PauseMenu.cs
Normal file
31
scripts/gui/PauseMenu.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class PauseMenu : Control
|
||||
{
|
||||
private static PauseMenu Instance;
|
||||
public override void _Ready()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public void Continue()
|
||||
{
|
||||
GetParent<Control>().Visible = false;
|
||||
GetTree().Paused = false;
|
||||
}
|
||||
public void Restart()
|
||||
{
|
||||
GetTree().Paused = false;
|
||||
GetTree().ReloadCurrentScene();
|
||||
}
|
||||
public void Exit()
|
||||
{
|
||||
GetTree().ChangeSceneToFile("uid://bfstrli64u23y");
|
||||
}
|
||||
public static void Pause()
|
||||
{
|
||||
Instance.GetParent<Control>().Visible = true;
|
||||
Instance.GetTree().Paused = true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue