from gamedata.objects.base import BaseObject from gamedata.objects.ingame.lemmings import Lemming from gamedata.objects.ingame.tiles import Tiles class Manager(BaseObject): def __init__(self,game): super().__init__(0,0,game) self.score = 0 self.lives = 5 self.basetime = 10 self.steptime = 2 self.spawntimer = game.lib.Timer(self.basetime) # Time elapsing each lemming spawn self.scoreratio = 0.4 # Points earned per seconds and per lemming # Summon the tiles self.tiles = Tiles(50,50,game) game.gameloop.summon(self.tiles) def step(self): for i in self.game.gameloop.findname("Lemming"): self.score+=self.scoreratio*self.game.dt if self.spawntimer.tick(self.game.dt): self.game.gameloop.summon(Lemming(100,100,self.game)) self.basetime+=self.steptime self.spawntimer = self.game.lib.Timer(self.basetime) def draw(self): pass