menu et +

This commit is contained in:
2024-10-19 20:22:03 +02:00
parent 360a866db9
commit 1bca0ada4f
12 changed files with 345 additions and 26 deletions

View File

@@ -4,8 +4,9 @@ using System;
public partial class Principal : Control
{
[Export] Panel sub;
[Export] Panel credit;
[Export] PackedScene play;
[Export] PackedScene credit;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
@@ -21,4 +22,26 @@ public partial class Principal : Control
{
sub.Visible = true;
}
public void creditEnter()
{
credit.Visible = true;
sub.Visible = false;
}
public void CreditExit()
{
credit.Visible = false;
sub.Visible = true;
}
public void PlayPressed()
{
GetTree().ChangeSceneToPacked(play);
}
public void ExitGlobPressed()
{
GetTree().Quit();
}
}