コード例 #1
0
	def _redirectEvent(self,name,event):
		self.indent += 4
		try:
			event = self.translateEvent(getEventType(name), event)
			if name in self.events:
				if self.debug: print "-"*self.indent, name
				for f in self.events[name].itervalues():
					def delayed_f():
						f( event )
					timer.delayCall(0,delayed_f)

		except:
			print name, repr(event)
			traceback.print_exc()
			raise

		finally:
			self.indent -= 4
コード例 #2
0
	def onInstanceActionFinished(self, instance, action):
		super(BossActionListener, self).onInstanceActionFinished(instance, action)

		if action.getId() == 'explode':
			self.delayed = fife_timer.delayCall(5000,self._ship.endLevel())
コード例 #3
0
ファイル: enemies.py プロジェクト: Teemperor/fifengine
    def onInstanceActionFinished(self, instance, action):
        super(BossActionListener, self).onInstanceActionFinished(instance, action)

        if action.getId() == "explode":
            self.delayed = fife_timer.delayCall(5000, self._ship.endLevel())