53 lines
840 B
C#
53 lines
840 B
C#
using Godot;
|
|
using System;
|
|
|
|
public partial class Principal : Control
|
|
{
|
|
[Export] Panel sub;
|
|
[Export] Panel credit;
|
|
|
|
|
|
Node parent;
|
|
|
|
// Called when the node enters the scene tree for the first time.
|
|
public override void _Ready()
|
|
{
|
|
parent = GetParent();
|
|
sub.Visible = false;
|
|
}
|
|
|
|
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
public override void _Process(double delta)
|
|
{
|
|
}
|
|
|
|
public void EnterPressed()
|
|
{
|
|
sub.Visible = true;
|
|
}
|
|
|
|
public void creditEnter()
|
|
{
|
|
credit.Visible = true;
|
|
sub.Visible = false;
|
|
}
|
|
|
|
public void CreditExit()
|
|
{
|
|
credit.Visible = false;
|
|
sub.Visible = true;
|
|
}
|
|
|
|
public void PlayPressed()
|
|
{
|
|
parent.Call("ToCityFunc");
|
|
//EmitSignal("ToCityEventHandler");
|
|
//GetTree().ChangeSceneToPacked(play);
|
|
}
|
|
|
|
public void ExitGlobPressed()
|
|
{
|
|
GetTree().Quit();
|
|
}
|
|
}
|