summaryrefslogtreecommitdiff
path: root/scripts/Utils/SignalBus.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-09-01 17:50:25 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-09-01 17:50:25 -0300
commit0456e7cd82b232a38fd9b6e008be7d49b2f9e90f (patch)
treeea2285eaca0d68c269d07212bc6a1e3688b9aef8 /scripts/Utils/SignalBus.cs
parentd7d2454d5ccc1e0acb47cb679c7550e74c4e1916 (diff)
Logs
Diffstat (limited to 'scripts/Utils/SignalBus.cs')
-rw-r--r--scripts/Utils/SignalBus.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/Utils/SignalBus.cs b/scripts/Utils/SignalBus.cs
new file mode 100644
index 0000000..7408db2
--- /dev/null
+++ b/scripts/Utils/SignalBus.cs
@@ -0,0 +1,25 @@
+using Godot;
+using System;
+
+/// <summary>
+/// Objeto global com sinais, fortes sinais.
+/// </summary>
+public partial class SignalBus : Node
+{
+ /// <summary>
+ /// Pois é.
+ /// </summary>
+ public static SignalBus Instance { get; private set; }
+
+ public override void _Ready()
+ {
+ base._Ready();
+ Instance = this;
+ }
+ /// <summary>
+ /// Acionado sempre que uma mensagem for adicionada para o log.
+ /// </summary>
+ /// <param name="text">Mensagem.</param>
+ [Signal]
+ public delegate void messageSentEventHandler(string text);
+}