Ejemplo n.º 1
0
 def __init__(self, position, bonus_type):
     self.bonus_type = bonus_type
     Object2D.__init__(self, Vec2D(BONUS_SIZE, BONUS_SIZE), position)
     self.force = Vec2D()
     self.to_kill = False
     self.fall = True
     self.timer = BONUS_DURATION
Ejemplo n.º 2
0
 def __init__(self, position):
     self.can_climb = False
     self.is_climbing = False
     self.hook_type = HookType.rope
     self.max_hooks = 1
     self.image = pygame.image.load('assets/gfx/Player.png')
     self.sheet_size = Vec2D(self.image.get_width(),
                             self.image.get_height())
     Object2D.__init__(
         self, Vec2D(self.image.get_width() / 4,
                     self.image.get_height() / 2), position)
     self.rect = (0, 0, self.width, self.height)
     self.force = Vec2D()
     self.direction = Vec2D()
     self.frame_left = 0
     self.frame_right = 0
     self.last_direction = 0
     self.last_shooting = 0
     self.can_shoot = True
     self.ladder_span = Vec2D()
     self.invulnerability_timer = 0
     self.invulnerable = False
     self.invulnerability_rect = pygame.Surface((self.width, self.height),
                                                pygame.SRCALPHA, 32)
     self.invulnerability_rect.fill((255, 0, 255, 192))
Ejemplo n.º 3
0
 def __init__(self, position, bonus_type):
     self.bonus_type = bonus_type
     Object2D.__init__(self, Vec2D(BONUS_SIZE, BONUS_SIZE), position)
     self.force = Vec2D()
     self.to_kill = False
     self.fall = True
     self.timer = BONUS_DURATION
Ejemplo n.º 4
0
 def __init__(self, height, position, hook_type):
     self.hook_type = hook_type
     self.to_kill = False
     Object2D.__init__(self, Vec2D(6, height),
                       position)
     self.expand = True
     self.timer = HOOK_DURATION
Ejemplo n.º 5
0
 def __init__(self, radius, position, force):
     Object2D.__init__(self, Vec2D(radius * 2, radius * 2), position)
     self.radius = radius
     self.position = position
     self.force = force
     self.falling = True
     if force.y < 0:
         self.falling = False
     self.max_height = SCREEN_HEIGHT - 150 - radius*4
Ejemplo n.º 6
0
 def __init__(self, radius, position, force):
     Object2D.__init__(self, Vec2D(radius * 2, radius * 2), position)
     self.radius = radius
     self.position = position
     self.force = force
     self.falling = True
     if force.y < 0:
         self.falling = False
     self.max_height = SCREEN_HEIGHT - 150 - radius * 4
Ejemplo n.º 7
0
 def __init__(self, position):
     self.can_climb = False
     self.is_climbing = False
     self.hook_type = HookType.rope
     self.max_hooks = 1
     self.image = pygame.image.load('assets/gfx/Player.png')
     self.sheet_size = Vec2D(self.image.get_width(),
                             self.image.get_height())
     Object2D.__init__(self, Vec2D(self.image.get_width()/4,
                                   self.image.get_height()/2), position)
     self.rect = (0, 0, self.width, self.height)
     self.force = Vec2D()
     self.direction = Vec2D()
     self.frame_left = 0
     self.frame_right = 0
     self.last_direction = 0
     self.last_shooting = 0
     self.can_shoot = True
     self.ladder_span = Vec2D()
     self.invulnerability_timer = 0
     self.invulnerable = False
     self.invulnerability_rect = pygame.Surface((self.width, self.height),
                                                pygame.SRCALPHA, 32)
     self.invulnerability_rect.fill((255, 0, 255, 192))
Ejemplo n.º 8
0
 def __init__(self, height, position):
     Object2D.__init__(self, Vec2D(LADDER_WIDTH, height), position)
Ejemplo n.º 9
0
 def __init__(self, size, position):
     Object2D.__init__(self, size, position)
Ejemplo n.º 10
0
 def __init__(self, size, position):
     Object2D.__init__(self, size, position)
Ejemplo n.º 11
0
 def __init__(self, height, position):
     Object2D.__init__(self, Vec2D(LADDER_WIDTH, height), position)