23 lines
356 B
C#
23 lines
356 B
C#
using Godot;
|
|
|
|
public partial class MainMenuController : Node
|
|
{
|
|
public void OnHostGame()
|
|
{
|
|
Global.IsGameHost = true;
|
|
|
|
GetTree().ChangeSceneToFile("res://scenes/game.tscn");
|
|
}
|
|
|
|
public void OnJoinGame()
|
|
{
|
|
Global.IsGameHost = false;
|
|
|
|
GetTree().ChangeSceneToFile("res://scenes/game.tscn");
|
|
}
|
|
|
|
public void OnExitGame()
|
|
{
|
|
GetTree().Quit();
|
|
}
|
|
}
|