add some signals to the event bus
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user