Fixed pinmiks spawning on pause

This commit is contained in:
theo@manjaro 2021-10-18 11:42:34 +02:00
parent 7c9eb4f6b0
commit 506930b67e
1 changed files with 5 additions and 4 deletions

View File

@ -75,10 +75,11 @@ class Manager(BaseObject):
self.game.globals["pause"] = not self.game.globals["pause"]
# Spawning more lemmings
if (self.lives>0 and nblemmings>0):
if self.spawntimer.tick(self.game.dt):
self.game.gameloop.summon(Spawner(self.game,self.tiles,speedmargin=int(self.speedmargin+0.5),skins=self.skins))
self.speedmargin+=self.speedstep
self.spawntimer = self.game.lib.Timer(self.basetime+nblemmings*self.steptime)
if not self.game.globals["pause"]:
if self.spawntimer.tick(self.game.dt):
self.game.gameloop.summon(Spawner(self.game,self.tiles,speedmargin=int(self.speedmargin+0.5),skins=self.skins))
self.speedmargin+=self.speedstep
self.spawntimer = self.game.lib.Timer(self.basetime+nblemmings*self.steptime)
else:
# Game over
if self.endtimer.tick(self.game.dt):