Пример #1
0
    def __make_block(self, position, color=choice(color.LIST), special=False):
        '''
        @param position: Position to release the Block (it'll snap to the grid)
        @param color: Color of the Block that will be released
        '''

        if not special:
        #If we're not adding a special block...
            BLOCKS.add(block.get_block([position, 0.0], color))
        else:
            UFO.BLOCK_GROUP.add(block.get_block([position, 0.0], special=True))
Пример #2
0
 def die(self):
     '''
     Vanish and release a special Block that clears lots of other Blocks.
     '''
     self.emitter.rect = self.rect
     self.emitter.burst(30)
     DEATH.play()
     UFO.BLOCK_GROUP.add(get_block((self.rect.centerx, 0), special=True))
     gamedata.score += 90
     self.change_state(UFO.STATES.LEAVING)
Пример #3
0
 def die(self):
     '''
     Vanish and release a special Block that clears lots of other Blocks.
     '''
     self.emitter.rect = self.rect
     self.emitter.burst(30)
     DEATH.play()
     UFO.BLOCK_GROUP.add(get_block((self.rect.centerx, 0), special=True))
     gamedata.score += 90
     self.change_state(UFO.STATES.LEAVING)