Initial work on Scripting sandbox, no longer Entity's responsibility.

This commit is contained in:
2019-09-27 12:37:16 -05:00
parent 0b40e042bf
commit 1bfc6e6929
7 changed files with 97 additions and 17 deletions

View File

@@ -10,7 +10,7 @@ class IMICFPS
end
def method_missing(event, *args, &block)
return unless subscribable_events.include?(event)
return unless Subscription.subscribable_events.include?(event)
@event, @args, @block = event, args, block
Publisher.subscribe(self)
@@ -22,7 +22,7 @@ class IMICFPS
end
end
private def subscribable_events
def self.subscribable_events
[
:tick,
:create, :move, :destroy,