Removed entity management from Game, refactored Map to MapLoader and added Map to manage world

This commit is contained in:
2019-09-27 14:30:23 -05:00
parent 1bfc6e6929
commit b091a489af
20 changed files with 260 additions and 239 deletions

View File

@@ -6,7 +6,7 @@ class IMICFPS
end
def handle(subscriber, context, *args)
event = EventHandler::Event.new(entity: context)
event = EventHandler::Event.new(entity: args.first.first)
subscriber.trigger(event)
end

View File

@@ -9,7 +9,7 @@ class IMICFPS
action = subscriber.args.flatten.first
key = args.flatten.first
event = EventHandler::Event.new(entity: subscriber.entity, context: context, player: context)
event = EventHandler::Event.new(entity: subscriber.entity, context: context)
if action.is_a?(Numeric) && action == key
subscriber.trigger(event)