MoveEvent.py 483B

12345678910111213141516
  1. from synergine.synergy.event.Event import Event
  2. from synergine.core.simulation.mechanism.Mechanism import Mechanism
  3. from intelligine.cst import ALIVE, WALKER
  4. class MoveEvent(Event):
  5. def concern(self, object_id, context):
  6. return context.metas.states.have(object_id, [ALIVE, WALKER])
  7. def __init__(self, actions):
  8. super().__init__(actions)
  9. self._mechanism = Mechanism
  10. def _object_match(self, object_id, context, parameters={}):
  11. return True