35 lines
707 B
C#
35 lines
707 B
C#
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);
|
|
if (_tock == 3) {
|
|
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)
|
|
{
|
|
}
|
|
}
|