loose menu
This commit is contained in:
parent
6608fb8389
commit
a6f817efbc
17 changed files with 369 additions and 52 deletions
10
scripts/components/gui/ExitButton.cs
Normal file
10
scripts/components/gui/ExitButton.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class ExitButton : Button
|
||||
{
|
||||
public override void _Pressed()
|
||||
{
|
||||
GetTree().Quit();
|
||||
}
|
||||
}
|
||||
1
scripts/components/gui/ExitButton.cs.uid
Normal file
1
scripts/components/gui/ExitButton.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dpdpv2oyxdna7
|
||||
|
|
@ -21,8 +21,7 @@ public partial class PauseMenu : Control
|
|||
}
|
||||
public void Exit()
|
||||
{
|
||||
GetNode<AudioStreamPlayer>("Audio").Play();
|
||||
GetNode<AudioStreamPlayer>("Audio").Finished += () => { GetTree().Quit(); };
|
||||
GetTree().Quit();
|
||||
}
|
||||
public static void Pause()
|
||||
{
|
||||
|
|
|
|||
12
scripts/components/gui/RestartButton.cs
Normal file
12
scripts/components/gui/RestartButton.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class RestartButton : Button
|
||||
{
|
||||
public override void _Pressed()
|
||||
{
|
||||
GetTree().Paused = false;
|
||||
GetTree().ReloadCurrentScene();
|
||||
}
|
||||
|
||||
}
|
||||
1
scripts/components/gui/RestartButton.cs.uid
Normal file
1
scripts/components/gui/RestartButton.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://btqwxelqxheh3
|
||||
Loading…
Add table
Add a link
Reference in a new issue