mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 03:15:55 +00:00
46 lines
796 B
C#
46 lines
796 B
C#
|
|
using Godot;
|
||
|
|
using System;
|
||
|
|
|
||
|
|
public partial class MainMenu : Control
|
||
|
|
{
|
||
|
|
|
||
|
|
[Export]
|
||
|
|
public PackedScene GameScene { get; set; }
|
||
|
|
|
||
|
|
[Export]
|
||
|
|
public PackedScene MainMenuScene { get; set; }
|
||
|
|
|
||
|
|
// Called when the node enters the scene tree for the first time.
|
||
|
|
public override void _Ready()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
|
public override void _Process(double delta)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
private void _on_start_button_pressed()
|
||
|
|
{
|
||
|
|
if (GameScene != null) {
|
||
|
|
GetTree().ChangeSceneToPacked(GameScene);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void _on_debug_button_pressed()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
private void _on_mainmenu_button_pressed()
|
||
|
|
{
|
||
|
|
if (MainMenuScene != null) {
|
||
|
|
GetTree().ChangeSceneToPacked(MainMenuScene);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void _on_exit_button_pressed()
|
||
|
|
{
|
||
|
|
GetTree().Quit();
|
||
|
|
}
|
||
|
|
}
|