コード例 #1
0
 def processEvents(self, events):
     """Handle the events"""
     inhibited = set()
     for (event, obj), actor in events:
         if actor.active and not event in inhibited:
             # Process the event
             new_inhibits = actor.processEvent((event, obj))
             # Record if we need to inhibit further events of a certain type
             if new_inhibits:
                 inhibited.update(new_inhibits)
コード例 #2
0
ファイル: world.py プロジェクト: hemebond/procgen
 def processEvents(self, events):
     """Handle the events"""
     inhibited = set()
     for (event, obj), actor in events:
         if actor.active and not event in inhibited:
             # Process the event
             new_inhibits = actor.processEvent((event, obj))
             # Record if we need to inhibit further events of a certain type
             if new_inhibits:
                 inhibited.update(new_inhibits)
コード例 #3
0
ファイル: world.py プロジェクト: dreamingo/Roaring-Engine
 def processEvents(self, events):
     """Handle the events"""
     for name_source, actor in events:
         if actor.active:
             actor.processEvent(name_source)