예제 #1
0
 def __init__(self, position, newcolor=choice(color.LIST), special=False):
     GameObject.__init__(self)
     self._anim      = 0
     self.color      = newcolor
     self.temp_color = self.color
     self.current_frame_list = _block_frames_color_blind if settings.SETTINGS['color_blind'] else _block_frames
     self.image              = self.current_frame_list[id(self.color)][0]
     self.position = position
     self.rect     = pygame.Rect(position, self.image.get_size()) #(x, y)
     self._special = special
     self.state    = Block.STATES.IDLE
예제 #2
0
 def __init__(self, position, newcolor=choice(color.LIST), special=False):
     GameObject.__init__(self)
     self._anim = 0
     self.color = newcolor
     self.temp_color = self.color
     self.current_frame_list = _block_frames_color_blind if settings.SETTINGS[
         'color_blind'] else _block_frames
     self.image = self.current_frame_list[id(self.color)][0]
     self.position = position
     self.rect = pygame.Rect(position, self.image.get_size())  #(x, y)
     self._special = special
     self.state = Block.STATES.IDLE
예제 #3
0
    def __init__(self, startpos=(-300.0, -300.0), newcolor=choice(color.LIST)):
        GameObject.__init__(self)

        self._anim              = 0
        self.color              = newcolor
        self.current_frame_list = _ball_frames_color_blind if settings.SETTINGS['color_blind'] else _ball_frames
        self.image              = self.current_frame_list[id(newcolor)][0]
        size                    = self.image.get_size()
        self.rect               = Rect(startpos, size)
        self.position           = list(self.rect.topleft)
        self.progress           = 0
        self._target            = [None, 0]
        self.startpos           = startpos
        self.state              = BallOfLight.STATES.IDLE

        del self.acceleration, self.velocity
예제 #4
0
    def __init__(self, startpos=(-300.0, -300.0), newcolor=choice(color.LIST)):
        GameObject.__init__(self)

        self._anim = 0
        self.color = newcolor
        self.current_frame_list = _ball_frames_color_blind if settings.SETTINGS[
            'color_blind'] else _ball_frames
        self.image = self.current_frame_list[id(newcolor)][0]
        size = self.image.get_size()
        self.rect = Rect(startpos, size)
        self.position = list(self.rect.topleft)
        self.progress = 0
        self._target = [None, 0]
        self.startpos = startpos
        self.state = BallOfLight.STATES.IDLE

        del self.acceleration, self.velocity