Added some shadows

This commit is contained in:
theo@manjaro 2021-09-11 19:13:14 +02:00
parent 56488ec3da
commit 31c6e7d062
2 changed files with 4 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

View File

@ -11,7 +11,6 @@ class Lemming(BaseObject):
self.speed = 0 # Current speed, leaning towards objective speed
self.selected = False # If beeing redirected
self.cachedrel = [] # Storing relative movement of mouse
self.cachedrelsize = 10
self.mincachedsize = 5
@ -30,6 +29,9 @@ class Lemming(BaseObject):
def step(self):
# Depth updating based on position
self.depth = 1+self.rect[1]/100
# Lean towards the normal speed
if self.selected:
self.normalspeed = 0
@ -83,4 +85,5 @@ class Lemming(BaseObject):
def draw(self):
orientation = self.orientations[int(self.direction%360/361*4)]
sprites = self.sprites[orientation]
self.game.lib.drawcenter(self.game,self.game.sprite_lib["lemmings/shadow.png"],self.rect.center[0],self.rect.center[1])
self.game.lib.drawcenter(self.game,sprites[int(self.spriteindex)%len(sprites)],self.rect.center[0],self.rect.center[1])