forked from ayte/PinmikPanik
Added some slight speed variations
This commit is contained in:
parent
936d77bbe7
commit
56488ec3da
@ -2,13 +2,13 @@ from gamedata.objects.base import BaseObject
|
|||||||
import random,math
|
import random,math
|
||||||
|
|
||||||
class Lemming(BaseObject):
|
class Lemming(BaseObject):
|
||||||
def __init__(self,x,y,game):
|
def __init__(self,x,y,game,speedmargin=5):
|
||||||
super().__init__(x,y,game)
|
super().__init__(x,y,game)
|
||||||
self.direction = random.randint(0,360)
|
self.direction = random.randint(0,360)
|
||||||
self.radius = 30 # Radius in which the mouse can click
|
self.radius = 30 # Radius in which the mouse can click
|
||||||
self.basespeed = 60 # Speed that he normally walks by
|
self.basespeed = 50+random.randint(-speedmargin,speedmargin) # Speed that he normally walks by
|
||||||
self.normalspeed = self.basespeed # Speed "objective"
|
self.normalspeed = self.basespeed # Speed "objective"
|
||||||
self.speed = self.normalspeed # 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user