summaryrefslogtreecommitdiff
path: root/demo/SignalManager.lua
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-03-01 22:49:53 -0600
committersanine <sanine.not@pm.me>2022-03-01 22:49:53 -0600
commit82cf18b9163f86e4d0a1cd999d4815cc3f85a3fd (patch)
tree1bc96ae80f509ef919bb7e74500dc6b37c9e59cf /demo/SignalManager.lua
parent10288765588673645c1cc0a6e3d2245aff3f9080 (diff)
clear out demo/
Diffstat (limited to 'demo/SignalManager.lua')
-rw-r--r--demo/SignalManager.lua24
1 files changed, 0 insertions, 24 deletions
diff --git a/demo/SignalManager.lua b/demo/SignalManager.lua
deleted file mode 100644
index b7e9d6b..0000000
--- a/demo/SignalManager.lua
+++ /dev/null
@@ -1,24 +0,0 @@
-local SignalManager = {}
-SignalManager.signals = {}
-
-function SignalManager.addCallback(self, signal, func)
- if not self.signals[signal] then self.signals[signal] = {} end
- self.signals[signal][func] = true
-end
-
-function SignalManager.removeCallback(self, signal, func)
- if self.signals[signal] then
- self.signals[signal][func] = nil
- end
-end
-
-function SignalManager.emit(self, signal, argtable)
- local sig = self.signals[signal]
- if not sig then return end
-
- for f, _ in pairs(sig) do
- f(argtable)
- end
-end
-
-return SignalManager