view src/parpg/mode.py @ 31:ff198b1168af

TimeDelta parameter is now correct
author KarstenBock@gmx.net
date Thu, 14 Jul 2011 10:44:51 +0200
parents 94cb5843dcbb
children 70738c470ad7
line wrap: on
line source


from parpg.grease.mode import *
from fife.extensions.basicapplication import ApplicationBase
import abc

class FifeManager(BaseManager, ApplicationBase):

	def __init__(self, TDS):
		ApplicationBase.__init__(self, TDS)
		self.modes = []
	
	def _pump(self):
		if self.current_mode:
			self.current_mode.pump(self.engine.getTimeManager().getTimeDelta())
	
class FifeMode(BaseMode):
	
	def __init__(self):
		BaseMode.__init__(self)
	
	@abc.abstractmethod
	def pump(self, dt):
		"""Performs actions every frame"""