oldie/scenes/Event.cs
2022-11-09 20:21:26 -03:00

21 lines
394 B
C#

using Godot;
using System;
public class Event : Node
{
[Signal]
delegate void GameStarted(string example);
public override void _Ready()
{
var events = (Event) GetNode("/root/Event");
events.Connect("GameStarted", this, "MyCallBack");
events.EmitSignal("GameStarted", " my extra string");
}
public void MyCallBack(string example) {
GD.Print("signal worked" + example);
}
}