Mutually_Assured_Destruction/endings/the_end.cs
MarcEricMartel 46922f6a69 MAD World
2023-06-11 16:30:38 -04:00

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 == 4) {
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)
{
}
}