2024-08-15 13:15:33 +00:00
|
|
|
using Godot;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
public partial class main_menu : Control
|
|
|
|
|
{
|
|
|
|
|
// Called when the node enters the scene tree for the first time.
|
|
|
|
|
public override void _Ready()
|
|
|
|
|
{
|
|
|
|
|
//Connecting Buttons
|
|
|
|
|
GetNode<Button>("StartButton").Pressed += OnStartButtonPressed;
|
|
|
|
|
GetNode<Button>("ExitButton").Pressed += OnExitButtonPressed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnStartButtonPressed()
|
|
|
|
|
{
|
|
|
|
|
GetTree().ChangeSceneToFile("res://scenes/game.tscn");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnExitButtonPressed()
|
|
|
|
|
{
|
|
|
|
|
GetTree().Quit();
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-19 22:24:46 +00:00
|
|
|
// Called every frame. 'delta' has been the elapsed time since the previous frame.
|
2024-08-15 13:15:33 +00:00
|
|
|
public override void _Process(double delta)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|