30 lines
516 B
C#
30 lines
516 B
C#
using Godot;
|
|
|
|
public partial class MainMenu : Control
|
|
{
|
|
public override void _Ready()
|
|
{
|
|
UIStyle.Apply(this);
|
|
}
|
|
|
|
public void OnPlayPressed()
|
|
{
|
|
GameData.loadSaveOnStart = false;
|
|
GetTree().ChangeSceneToFile("res://Scenes/WorldSetup.tscn");
|
|
}
|
|
|
|
public void OnLoadPressed()
|
|
{
|
|
if (!SaveGameManager.SaveExists()) return;
|
|
|
|
GameData.loadSaveOnStart = true;
|
|
GameData.showTutorial = false;
|
|
GetTree().ChangeSceneToFile("res://Scenes/Game.tscn");
|
|
}
|
|
|
|
public void OnQuitPressed()
|
|
{
|
|
GetTree().Quit();
|
|
}
|
|
}
|