Files
chess_game/Main.cs

33 lines
878 B
C#

using Godot;
public partial class Main : Node2D {
// Called when the node enters the scene tree for the first time.
GlobalManager global = null!;
public override void _Ready() {
// GetTree().Connect("screen_resized", ResizeChessboardToFitScreen);
global = GlobalManager.Instance;
global.GlobalTheme = GetChild<Control>(GetChildCount() - 1).Theme;
global.GlobalThemeConfigFlush();
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta) {
}
private void GoToSignlePlayer() {
global?.GotoScene("res://Scenes/ChessGame.tscn");
}
private void GoToMultiPlayer() {
global?.GotoScene("res://Scenes/GameLobby.tscn");
}
private void GoToSetting() {
global?.GotoScene("res://Scenes/Setting.tscn");
}
private void GotoMods() {
global?.GotoScene("res://Scenes/Mods.tscn");
}
}