diff options
Diffstat (limited to 'demo/SignalManager.lua')
-rw-r--r-- | demo/SignalManager.lua | 24 |
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 |