mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 07:32:35 +00:00
16 lines
399 B
Ruby
16 lines
399 B
Ruby
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 |