summaryrefslogtreecommitdiff
path: root/scripts/Utils/SignalBus.cs
blob: a2aa6ca62a25c894941475462c10e7e1fefb8d7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using Godot;

namespace TheLegendOfGustav.Utils;

/// <summary>
/// Objeto global com sinais, fortes sinais.
/// </summary>
public partial class SignalBus : Node
{
	/// <summary>
	/// Pois é.
	/// </summary>
	public static SignalBus Instance { get; private set; }

	[Signal]
	public delegate void InspectorMovedEventHandler(Vector2I pos);

	[Signal]
	public delegate void EnterInspectionModeEventHandler();
	[Signal]
	public delegate void ExitInspectionModeEventHandler();

	public override void _Ready()
	{
		base._Ready();
		Instance = this;
	}
}