def __init__(self): State.__init__(self) self.state.timer(20, self.lighten) self.color = pygame.Color(0, 0, 0) self.colors = [ pygame.Color(*color) for color in [(0, 40, 0), (40, 0, 0), (0, 40, 40)] ] self.block = Block()
def __init__(self, flip): # This will save the this instance to state machine State.__init__(self) self.flip = flip font = pygame.font.Font(None, 24) self.text = font.render('Press spacebar to flip', 1, (240, 240, 240)) self.text_rect = self.text.get_rect() self.text_rect.centerx = self.state.machine.rect.centerx self.text_rect.bottom = self.state.machine.rect.bottom - 2
def __init__(self): # This will save the this instance to state machine State.__init__(self)
def __init__(self): State.__init__(self) self.color = pygame.Color(0, 40, 0)