That'sgreatitstartswithanearthquake
This commit is contained in:
42
endings/mad.cs
Normal file
42
endings/mad.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class mad : Control
|
||||
{
|
||||
private List<Label> _lbls;
|
||||
|
||||
[Export]
|
||||
private Label _lb1, _lb2, _lb3, _lb4;
|
||||
|
||||
[Export]
|
||||
private Timer _tmr;
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
_lbls = new();
|
||||
_lbls.Add(_lb1);
|
||||
_lbls.Add(_lb2);
|
||||
_lbls.Add(_lb3);
|
||||
_lbls.Add(_lb4);
|
||||
_tmr.Timeout += () => Tick();
|
||||
}
|
||||
|
||||
private void Tick() {
|
||||
if (_lbls.Count > 0) {
|
||||
_lbls[0].Set("visible", true);
|
||||
_lbls.Remove(_lbls[0]);
|
||||
} else {
|
||||
var scene = GD.Load<PackedScene>("res://menu/start_game_menu.tscn");
|
||||
var instance = scene.Instantiate();
|
||||
GetNode<Node>("/root/").AddChild(instance);
|
||||
this.QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user