Ejemplo n.º 1
0
    def __init__(self, position, images, **kwargs):
        super(Asteroid, self).__init__(position, **kwargs)
        self.images = images
        self.state = Asteroid.State.NORMAL
        self.image = getattr(self.images, self.state)
        self.mask = convert_to_mask(self.image)
        self.speed = 6

        self._destroyed_animation_frames = 10
        self._is_destroyed = False
Ejemplo n.º 2
0
    def __init__(self, position, images, **kwargs):
        super(Player, self).__init__(position, **kwargs)
        self.speed = 7
        self.state = Player.State.NORMAL
        self.images = images
        self.image = getattr(self.images, self.state)
        self.mask = convert_to_mask(self.image)

        self._left_move = (-self.speed, 0)
        self._right_move = (self.speed, 0)
        self._direction = Vector2D.zeros()
        self._destroyed_animation_frames = 10
        self._is_destroyed = False
Ejemplo n.º 3
0
 def __init__(self, position, image, **kwargs):
     super(Projectile, self).__init__(position, image,
                                      convert_to_mask(image), **kwargs)
     self.speed = 10