Add initial game code

This commit is contained in:
Aslan 2025-09-12 08:34:06 -04:00
parent f80a60e208
commit 1383997ebf
55 changed files with 1355 additions and 0 deletions

View file

@ -0,0 +1,28 @@
using Godot;
public partial class MainMenuController : Node
{
public Button StartGameButton { get; private set; }
public Button ExitGameButton { get; private set; }
public override void _Ready()
{
base._Ready();
this.StartGameButton = GetNode<Button>("CenterContainer/VBoxContainer/StartGameButton");
this.ExitGameButton = GetNode<Button>("CenterContainer/VBoxContainer/ExitGameButton");
this.StartGameButton.Pressed += OnStartGame;
this.ExitGameButton.Pressed += OnExitGame;
}
public void OnStartGame()
{
GetTree().ChangeSceneToFile("res://scenes/game.tscn");
}
public void OnExitGame()
{
GetTree().Quit();
}
}