Correct handling of spawners depth

This commit is contained in:
theo@manjaro 2021-09-18 18:56:49 +02:00
parent 9276b216ae
commit 59b933225a

View File

@ -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)