Example #1
0
    def __init__(self,
                 name,
                 x,
                 y,
                 health,
                 health_states,
                 bubbles,
                 radius,
                 body,
                 gun_type='PeacefulGun',
                 time=0.0,
                 w=0.0,
                 body_rect=None):

        self.gun = guns_factory_player(gun_type) if name == 'Player' else guns_factory_mobs(gun_type)
        self.name = name
        self.xo = x
        self.yo = y
        self.x = x
        self.y = y
        self.time = time
        self.w = w
        self.speed = [0, 0]
        self.max_health = health
        self.health = health
        self.health_states = health_states
        self.bubbles = bubbles
        self.radius = radius
        self.body = Body(body)
        self.body_rect = body_rect
        self.is_paralysed = False
        self.paralysed_time = 0
        self.gamma = 0
        self.is_frozen = False
        self.frost_time = 0
Example #2
0
 def change_body(self):
     super().change_body()
     if self.health <= 6 and self.gun.cooldown_time == 450:
         self.gun = guns_factory_mobs('GunBeetleReserve')
Example #3
0
 def change_body(self):
     super().change_body()
     if self.health <= 3:
         self.gun = guns_factory_mobs('GunPeaceful')