Implemented event system, Implemented initial bit of scripting system, Stubbed component system. Entities can now use the scripting system to place their 'decorations'

This commit is contained in:
2019-09-26 12:13:08 -05:00
parent e41a2b6524
commit b6d7a6ebdb
24 changed files with 293 additions and 80 deletions

View File

@@ -0,0 +1,16 @@
class IMICFPS
class EventHandler
class EntityLifeCycle < EventHandler
def handles
[:create, :entity_move, :destroy]
end
def handle(subscriber, context, *args)
return unless subscriber.entity == args.first.first
event = EventHandler::Event.new(entity: subscriber.entity, context: context)
subscriber.trigger(event)
end
end
end
end