Correct handling of spawners depth
This commit is contained in:
parent
9276b216ae
commit
59b933225a
@ -19,6 +19,9 @@ class Spawner(BaseObject):
|
||||
self.skin = random.choice(skins["specials"])
|
||||
self.fallsprite = game.sprite_lib["lemmings/"+self.skin+"/falling.png"]
|
||||
|
||||
# Depth updating based on position
|
||||
self.depth = 1+self.rect[1]/100
|
||||
|
||||
def step(self):
|
||||
if self.timer.tick(self.game.dt):
|
||||
lemming = Lemming(self.rect[0],self.rect[1],self.game,speedmargin=self.speedmargin,skin=self.skin)
|
||||
|
Loading…
Reference in New Issue
Block a user