summaryrefslogtreecommitdiff
path: root/scripts/Utils/SignalBus.cs
blob: bf97c2dbe6155cf7a9e279f0cd80d72a9a6db44d (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
29
30
31
32
33
34
35
36
37
38
39
using System;
using Godot;
using TheLegendOfGustav.InputHandling;
using TheLegendOfGustav.Magic;

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();

	[Signal]
	public delegate void PlayerSpellChooseLocationEventHandler(SpellResource spell);
	[Signal]
	public delegate void PlayerSpellCastEventHandler(bool success);

	[Signal]
	public delegate void CommandInputHandlerEventHandler(InputHandlers state);

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