def __init__(self, pos): r = pygame.Rect(pos,(ICON_SIZE,ICON_SIZE)) BasicSprite.__init__(self, r, health=15, mass=1.0) # graphics related self.movingRight = False self.movingLeft = False self.isWalking = False self.dir = 1 # gameplay related self.canBeHurt = True self.hurtCounter = 0 self.isShooting = False #true when shooting self.score = 0 self.hasBigWeapon = False
def __init__(self, pos): r = pygame.Rect(pos, (ICON_SIZE, ICON_SIZE)) BasicSprite.__init__(self, r, health=15, mass=1.0) # graphics related self.movingRight = False self.movingLeft = False self.isWalking = False self.dir = 1 # gameplay related self.canBeHurt = True self.hurtCounter = 0 self.isShooting = False #true when shooting self.score = 0 self.hasBigWeapon = False
def __init__(self, pos): r = pygame.Rect(pos, (ICON_SIZE, ICON_SIZE)) BasicSprite.__init__(self, r, numberOfFrames=3, health=3, mass=0.6) self.moveTime = random.randint(100, 200) self.xspeed = 4.0 * ICON_SIZE / FPS
def __init__(self, pos): r = pygame.Rect(pos, (2 * ICON_SIZE, 2 * ICON_SIZE)) BasicSprite.__init__(self, r, health=15, mass=2.0, numberOfFrames=2) self.waitTime = random.randint(300, 500)
def __init__(self, pos): r = pygame.Rect(pos,(2*ICON_SIZE,2*ICON_SIZE)) BasicSprite.__init__(self, r, health=15, mass=2.0, numberOfFrames=2) self.waitTime = random.randint(300,500)