forked from ayte/PinmikPanik
Adjustements
This commit is contained in:
parent
1194ccfd55
commit
e2be9da9bb
@ -9,12 +9,12 @@ class Manager(BaseObject):
|
|||||||
self.lives = 5
|
self.lives = 5
|
||||||
self.basetime = 10
|
self.basetime = 10
|
||||||
self.steptime = 2
|
self.steptime = 2
|
||||||
self.speedmargin = 6
|
self.speedmargin = 7
|
||||||
self.stepmargin = 0.4
|
self.stepmargin = 2
|
||||||
self.spawntimer = game.lib.Timer(self.basetime) # Time elapsing each lemming spawn
|
self.spawntimer = game.lib.Timer(self.basetime) # Time elapsing each lemming spawn
|
||||||
self.deathtimer = game.lib.Timer(1) # Time betwin each life loss
|
self.deathtimer = game.lib.Timer(1) # Time betwin each life loss
|
||||||
self.invincible = False
|
self.invincible = False
|
||||||
self.scoreratio = 0.4 # Points earned per seconds and per lemming
|
self.scoreratio = 0.2 # Points earned per seconds and per lemming
|
||||||
|
|
||||||
# Summon the tiles
|
# Summon the tiles
|
||||||
self.tiles = Tiles(50,50,game)
|
self.tiles = Tiles(50,50,game)
|
||||||
@ -31,9 +31,7 @@ class Manager(BaseObject):
|
|||||||
# Spawning more lemmings
|
# Spawning more lemmings
|
||||||
if self.lives>0 and nblemmings>0 and self.spawntimer.tick(self.game.dt):
|
if self.lives>0 and nblemmings>0 and self.spawntimer.tick(self.game.dt):
|
||||||
self.game.gameloop.summon(Spawner(self.game,self.tiles,speedmargin=int(self.speedmargin+0.5)))
|
self.game.gameloop.summon(Spawner(self.game,self.tiles,speedmargin=int(self.speedmargin+0.5)))
|
||||||
self.basetime+=self.steptime
|
self.spawntimer = self.game.lib.Timer(self.basetime+nblemmings*self.steptime)
|
||||||
self.spawntimer = self.game.lib.Timer(self.basetime)
|
|
||||||
self.speedmargin+=self.stepmargin
|
|
||||||
|
|
||||||
if self.invincible:
|
if self.invincible:
|
||||||
if self.deathtimer.tick(self.game.dt):
|
if self.deathtimer.tick(self.game.dt):
|
||||||
@ -43,6 +41,8 @@ class Manager(BaseObject):
|
|||||||
if not self.invincible:
|
if not self.invincible:
|
||||||
self.lives-=1
|
self.lives-=1
|
||||||
self.invincible = True
|
self.invincible = True
|
||||||
|
else:
|
||||||
|
self.deathtimer.tick(self.deathtimer.getmax()/3)
|
||||||
|
|
||||||
def draw(self):
|
def draw(self):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user