view mode.py @ 16:5c587a0d9ad7

Added clause when the containable should just be added to end of the list
author KarstenBock@gmx.net
date Mon, 01 Aug 2011 08:44:31 +0200
parents e0477f8983cb
children 7b31de1dc964
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() / 1000.0)
	
class FifeMode(BaseMode):
	
	def __init__(self):
		BaseMode.__init__(self)
	
	@abc.abstractmethod
	def pump(self, dt):
		"""Performs actions every frame"""