2023-06-11 16:30:38 -04:00
|
|
|
using Godot;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
public partial class the_end : Control
|
|
|
|
{
|
|
|
|
[Export]
|
|
|
|
private Label _lbl;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
private Timer _tim;
|
|
|
|
// Called when the node enters the scene tree for the first time.
|
|
|
|
public override void _Ready()
|
|
|
|
{
|
|
|
|
_tim.Timeout += Tick;
|
|
|
|
}
|
|
|
|
|
|
|
|
private int _tock = 0;
|
|
|
|
private void Tick() {
|
|
|
|
if (_tock == 0)
|
|
|
|
_lbl.Set("visible", true);
|
2023-06-11 17:39:14 -04:00
|
|
|
if (_tock == 3) {
|
2023-06-11 16:30:38 -04:00
|
|
|
var scene = GD.Load<PackedScene>("res://menu/start_game_menu.tscn");
|
|
|
|
var instance = scene.Instantiate();
|
|
|
|
GetNode<Node>("/root/").AddChild(instance);
|
|
|
|
this.QueueFree();
|
|
|
|
}
|
|
|
|
_tock++;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
public override void _Process(double delta)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|