Exemplo n.º 1
0
    def __init__(self, pygame, res, surface, size, gameclock, game_manager):
        Screen.__init__(self, pygame, res, surface)

        # set up initial variables
        self.need_reset = False
        self.size = size
        self.result = 0
        self.i = 1
        self.coinlist = []
        self.gameclock = gameclock
        self.game_manager = game_manager
        self.timer = 0
        self.cart = Cart(res, self.size, surface)

        # set up texts
        self.time_text = res.basicFont.render('TIMER:', True, res.BLACK,
                                              res.WHITE)
        self.textbox = self.time_text.get_rect(center=(900, 170))
        self.point_text = res.basicFont.render('POINTS:', True, res.BLACK,
                                               res.WHITE)
        self.pointbox = self.point_text.get_rect(center=(100, 170))
        self.display_time = res.basicFont.render('0', True, res.BLACK,
                                                 res.WHITE)
        self.timebox = self.display_time.get_rect(center=(900, 200))
        self.score = res.basicFont.render(str(self.cart.points), True,
                                          res.BLACK, res.WHITE)
        self.scorebox = self.score.get_rect(center=(100, 200))
Exemplo n.º 2
0
 def __init__(self, pygame, res, surface, game_manager):
     Screen.__init__(self, pygame, res, surface)
     self.game_manager = game_manager
     self.font = pygame.font.SysFont('cambria', 60)
     self.font2 = pygame.font.SysFont('cambria', 30)
     self.buttons['Restart'] = Button(pygame, res, surface,
                                      [20, 290, 300, 50], "Restart")
     self.buttons['Back'] = Button(pygame, res, surface, [20, 360, 300, 50],
                                   "Back")
Exemplo n.º 3
0
 def __init__(self, pygame, res, surface):
     Screen.__init__(self, pygame, res, surface)
     self.font = pygame.font.SysFont('cambria', 60)
     self.font2 = pygame.font.SysFont('cambria', 30)
     self.buttons['Start Game'] = Button(pygame, res, surface,
                                         [20, 150, 300, 50], "Start Game")
     self.buttons['Tutorial'] = Button(pygame, res, surface,
                                       [20, 220, 300, 50], "Tutorial")
     self.buttons['Settings'] = Button(pygame, res, surface,
                                       [20, 290, 300, 50], "Settings")
     self.buttons['Exit'] = Button(pygame, res, surface, [20, 360, 300, 50],
                                   "Exit")
Exemplo n.º 4
0
 def __init__(self, pygame, res, surface):
     Screen.__init__(self, pygame, res, surface)
     self.font = pygame.font.SysFont('cambria', 60)
     self.font2 = pygame.font.SysFont('cambria', 30)
     self.buttons['Back'] = Button(pygame, res, surface, [20, 360, 300, 50],
                                   "Back")