The shadows fade in

This commit is contained in:
theo@manjaro 2021-09-17 15:22:26 +02:00
parent 12ba5d9107
commit 4945594a6f

View File

@ -30,6 +30,11 @@ class Spawner(BaseObject):
def draw(self): def draw(self):
# Draw the shadow # Draw the shadow
alphavalue = 1-self.timer.getratio()
alphamax = 0.5
alphavalue/=alphamax
alphavalue = min(1,alphavalue)*255
self.sprite.set_alpha(alphavalue)
self.game.lib.drawcenter(self.game,self.sprite,self.rect[0]-self.game.globals["camerax"],self.rect[1]-self.game.globals["cameray"]) self.game.lib.drawcenter(self.game,self.sprite,self.rect[0]-self.game.globals["camerax"],self.rect[1]-self.game.globals["cameray"])
# Display the lemming falling # Display the lemming falling