Adjusted lemmings hitboxes

This commit is contained in:
theo@manjaro 2021-09-12 21:44:29 +02:00
parent d9d51042e3
commit 2aef0afc1c
1 changed files with 3 additions and 3 deletions

View File

@ -3,10 +3,10 @@ import random,math
class Lemming(BaseObject):
def __init__(self,x,y,game,speedmargin=5):
super().__init__(x,y,game,w=45,h=45)
super().__init__(x,y,game,w=60,h=60)
self.direction = random.randint(0,360)
self.holdrect = self.rect.copy()
self.holdradius = 60
self.holdradius = 65
self.holdrect = self.holdrect.inflate(self.holdradius,self.holdradius)
self.basespeed = 40+random.randint(-speedmargin,speedmargin) # Speed that he normally walks by
self.normalspeed = self.basespeed # Speed "objective"
@ -69,7 +69,7 @@ class Lemming(BaseObject):
averagerel = [sum([x[i] for x in self.cachedrel])/len(self.cachedrel) for i in range(2)]
self.direction = math.degrees(math.atan2(averagerel[1],averagerel[0]))
self.speed = self.basespeed*2
self.speed = self.basespeed*4
self.cachedrel = []
self.selected = False