Added some shadows
This commit is contained in:
parent
56488ec3da
commit
31c6e7d062
BIN
gamedata/assets/lemmings/shadow.png
Normal file
BIN
gamedata/assets/lemmings/shadow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 795 B |
@ -11,7 +11,6 @@ class Lemming(BaseObject):
|
|||||||
self.speed = 0 # Current speed, leaning towards objective speed
|
self.speed = 0 # Current speed, leaning towards objective speed
|
||||||
|
|
||||||
self.selected = False # If beeing redirected
|
self.selected = False # If beeing redirected
|
||||||
|
|
||||||
self.cachedrel = [] # Storing relative movement of mouse
|
self.cachedrel = [] # Storing relative movement of mouse
|
||||||
self.cachedrelsize = 10
|
self.cachedrelsize = 10
|
||||||
self.mincachedsize = 5
|
self.mincachedsize = 5
|
||||||
@ -30,6 +29,9 @@ class Lemming(BaseObject):
|
|||||||
|
|
||||||
def step(self):
|
def step(self):
|
||||||
|
|
||||||
|
# Depth updating based on position
|
||||||
|
self.depth = 1+self.rect[1]/100
|
||||||
|
|
||||||
# Lean towards the normal speed
|
# Lean towards the normal speed
|
||||||
if self.selected:
|
if self.selected:
|
||||||
self.normalspeed = 0
|
self.normalspeed = 0
|
||||||
@ -83,4 +85,5 @@ class Lemming(BaseObject):
|
|||||||
def draw(self):
|
def draw(self):
|
||||||
orientation = self.orientations[int(self.direction%360/361*4)]
|
orientation = self.orientations[int(self.direction%360/361*4)]
|
||||||
sprites = self.sprites[orientation]
|
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])
|
self.game.lib.drawcenter(self.game,sprites[int(self.spriteindex)%len(sprites)],self.rect.center[0],self.rect.center[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user