예제 #1
0
    def __init__(self, pygame, res, surface, size):
        Screen.__init__(self, pygame, res, surface, size)

        self.texts['Heading1'] = Text(pygame, res, surface,
                                      (self.center_x + 3, 70 + 3), 'Tutorial',
                                      res.heading1_font, res.BLACK)

        self.texts['Heading2'] = Text(pygame, res, surface,
                                      (self.center_x, 70), 'Tutorial',
                                      res.heading1_font,
                                      res.game_title_text_color)

        self.texts['Body'] = Text(pygame, res, surface, (self.center_x, 130),
                                  'How to play the game', res.body_font,
                                  res.body_text_color)

        self.buttons['Back'] = Button(pygame, res, surface,
                                      (self.center_x, 700), "Back")
예제 #2
0
    def __init__(self, pygame, res, surface, size, game_manager):
        Screen.__init__(self, pygame, res, surface, size)

        self.game_manager = game_manager
        self.params_list = Gameplay_Parameters().params_list

        self.texts['Heading1'] = Text(pygame, res, surface,
                                      (self.center_x + 3, 70 + 3),
                                      'Introduction', res.heading1_font,
                                      res.BLACK)

        self.texts['Heading2'] = Text(pygame, res, surface,
                                      (self.center_x, 70), 'Introduction',
                                      res.heading1_font,
                                      res.game_title_text_color)

        self.texts['Body'] = Text(pygame, res, surface, (self.center_x, 130),
                                  'How to play this game mode', res.body_font,
                                  res.body_text_color)

        self.buttons_classic = {}
        self.buttons_others = {}

        self.buttons_classic['Easy'] = Button(pygame, res, surface,
                                              (self.center_x - 250, 620),
                                              "Easy")

        self.buttons_classic['Medium'] = Button(pygame, res, surface,
                                                (self.center_x + 000, 620),
                                                "Medium")

        self.buttons_classic['Hard'] = Button(pygame, res, surface,
                                              (self.center_x + 250, 620),
                                              "Hard")

        self.buttons_others['Start'] = Button(pygame, res, surface,
                                              (self.center_x, 620), "Start")

        self.buttons_classic['Back'] = Button(pygame, res, surface,
                                              (self.center_x, 700), "Back")

        self.buttons_others['Back'] = Button(pygame, res, surface,
                                             (self.center_x, 700), "Back")
예제 #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['Vineet'] = Button(pygame, res, surface,
                                     [20, 150, 300, 50], "Vineet")
     self.buttons['Amrit'] = Button(pygame, res, surface,
                                    [20, 220, 300, 50], "Amrit")
     self.buttons['Venturillo'] = Button(pygame, res, surface,
                                         [20, 290, 300, 50], "Venturillo")
     self.buttons['Divyang'] = Button(pygame, res, surface,
                                      [20, 360, 300, 50], "Divyang")
     self.buttons['Azmal'] = Button(pygame, res, surface,
                                    [20, 430, 300, 50], "Azmal")
     self.buttons['Abhinandan'] = Button(pygame, res, surface,
                                         [20, 500, 300, 50], "Abhinandan")
     self.buttons['Gitter'] = Button(pygame, res, surface,
                                     [20, 570, 300, 50], "Gitter")
     self.buttons['Back'] = Button(pygame, res, surface, [20, 640, 300, 50],
                                   "Back")
    def __init__(self, pygame, res, surface, game_manager):
        Screen.__init__(self, pygame, res, surface)
        self.game_manager = game_manager

        self.buttons['Classic'] = Button(pygame, res, surface,
                                         [20, 170, 210, 50], "Classic")
        self.buttons['Infinite'] = Button(pygame, res, surface,
                                          [20, 240, 210, 50], "Infinite")
        self.buttons['1v1'] = Button(pygame, res, surface, [20, 310, 210, 50],
                                     "1 vs 1")

        self.buttons['Easy'] = Button(pygame, res, surface, [20, 520, 180, 50],
                                      "Easy")
        self.buttons['Medium'] = Button(pygame, res, surface,
                                        [240, 520, 180, 50], "Medium")
        self.buttons['Hard'] = Button(pygame, res, surface,
                                      [460, 520, 180, 50], "Hard")

        self.buttons['Back'] = Button(pygame, res, surface, [20, 680, 300, 50],
                                      "Back")
예제 #5
0
    def __init__(self, pygame, res, surface, size):
        Screen.__init__(self, pygame, res, surface, size)

        self.texts['GameTitleShadow1'] = Text(pygame, res, surface,
                                              (self.center_x + 9, 100 + 9),
                                              'Coin Fall', res.game_title_font,
                                              res.BLACK)

        self.texts['GameTitleShadow2'] = Text(pygame, res, surface,
                                              (self.center_x + 6, 100 + 6),
                                              'Coin Fall', res.game_title_font,
                                              res.BLACK)

        self.texts['GameTitleShadow3'] = Text(pygame, res, surface,
                                              (self.center_x + 3, 100 + 3),
                                              'Coin Fall', res.game_title_font,
                                              res.BLACK)

        self.texts['GameTitle'] = Text(pygame, res, surface,
                                       (self.center_x, 100), 'Coin Fall',
                                       res.game_title_font,
                                       res.game_title_text_color)

        self.texts['Body1'] = Text(pygame, res, surface, (self.center_x, 190),
                                   'Open-source coin collection game',
                                   res.body_font, res.body_text_color)

        self.texts['Body2'] = Text(pygame, res, surface, (self.center_x, 220),
                                   'Made with Python and Pygame',
                                   res.body_font, res.body_text_color)

        self.buttons['Start'] = Button(pygame, res, surface,
                                       (self.center_x, 380), "Start")
        self.buttons['Tutorial'] = Button(pygame, res, surface,
                                          (self.center_x, 460), "Tutorial")
        self.buttons['Settings'] = Button(pygame, res, surface,
                                          (self.center_x, 540), "Settings")
        self.buttons['Credits'] = Button(pygame, res, surface,
                                         (self.center_x, 620), "Credits")
        self.buttons['Exit'] = Button(pygame, res, surface,
                                      (self.center_x, 700), "Exit")
예제 #6
0
    def __init__(self, pygame, res, surface, size, game_manager):
        Screen.__init__(self, pygame, res, surface, size)
        self.game_manager = game_manager

        self.texts['Heading1'] = Text(pygame, res, surface,
                                      (self.center_x + 3, 70 + 3), 'Game Over',
                                      res.heading1_font, res.BLACK)

        self.texts['Heading2'] = Text(pygame, res, surface,
                                      (self.center_x, 70), 'Game Over',
                                      res.heading1_font,
                                      res.game_title_text_color)

        self.texts['Body'] = Text(pygame, res, surface, (self.center_x, 130),
                                  'Game score and performance', res.body_font,
                                  res.body_text_color)

        self.buttons['Restart'] = Button(pygame, res, surface,
                                         (self.center_x, 290), "Restart")
        self.buttons['Back'] = Button(pygame, res, surface,
                                      (self.center_x, 700), "Back")
예제 #7
0
    def __init__(self, pygame, res, surface, size):
        Screen.__init__(self, pygame, res, surface, size)

        self.texts['Heading1'] = Text(pygame, res, surface,
                                      (self.center_x + 3, 70 + 3), 'Credits',
                                      res.heading1_font, res.BLACK)

        self.texts['Heading2'] = Text(pygame, res, surface,
                                      (self.center_x, 70), 'Credits',
                                      res.heading1_font,
                                      res.game_title_text_color)

        self.texts['Body'] = Text(
            pygame, res, surface, (self.center_x, 130),
            'People who have contributed to this project', res.body_font,
            res.body_text_color)

        self.buttons['Contribute'] = Button(pygame, res, surface,
                                            (self.center_x, 200), "Contribute")
        self.buttons['Vineet'] = Button(pygame, res, surface,
                                        (self.center_x - 150, 300), "Vineet")
        self.buttons['Amrit'] = Button(pygame, res, surface,
                                       (self.center_x + 150, 300), "Amrit")
        self.buttons['Kartik'] = Button(pygame, res, surface,
                                        (self.center_x - 150, 380), "Kartik")
        self.buttons['Venturillo'] = Button(pygame, res, surface,
                                            (self.center_x + 150, 380),
                                            "Venturillo")
        self.buttons['Shikhar'] = Button(pygame, res, surface,
                                         (self.center_x - 150, 460), "Shikhar")
        self.buttons['Divyang'] = Button(pygame, res, surface,
                                         (self.center_x + 150, 460), "Divyang")
        self.buttons['Azmal'] = Button(pygame, res, surface,
                                       (self.center_x - 150, 540), "Azmal")
        self.buttons['Abhinandan'] = Button(pygame, res, surface,
                                            (self.center_x + 150, 540),
                                            "Abhinandan")
        self.buttons['Back'] = Button(pygame, res, surface,
                                      (self.center_x, 700), "Back")
예제 #8
0
    def __init__(self, pygame, res, surface, size, game_manager):
        Screen.__init__(self, pygame, res, surface, size)
        self.highscore_manager = game_manager.highscore_manager

        self.texts['Heading1'] = Text(pygame, res, surface,
                                      (self.center_x + 3, 70 + 3), 'Settings',
                                      res.heading1_font, res.BLACK)

        self.texts['Heading2'] = Text(pygame, res, surface,
                                      (self.center_x, 70), 'Settings',
                                      res.heading1_font,
                                      res.game_title_text_color)

        self.texts['Body'] = Text(pygame, res, surface, (self.center_x, 130),
                                  'Edit game settings here', res.body_font,
                                  res.body_text_color)

        self.buttons['Reset'] = Button(pygame, res, surface,
                                       (self.center_x, 380), "Reset")

        self.buttons['Back'] = Button(pygame, res, surface,
                                      (self.center_x, 700), "Back")
예제 #9
0
    def __init__(self, pygame, res, surface, size, gameclock, game_manager):
        Screen.__init__(self, pygame, res, surface, size)

        score_x, score_y = res.score_bg_image_size

        self.images['ScoreBG'] = Image(pygame, res, surface, (0, 0),
                                       res.score_bg_image)
        self.images['TimeBG'] = Image(pygame, res, surface,
                                      (self.center_x * 2 - score_x, 0),
                                      res.score_bg_image)

        self.texts['Score'] = Text(pygame,
                                   res,
                                   surface, (45, score_y / 2),
                                   'Score: 30',
                                   res.score_font,
                                   res.score_text_color,
                                   alignment='left')

        self.texts['Time'] = Text(
            pygame,
            res,
            surface, (self.center_x * 2 - score_x / 2 - 65, score_y / 2),
            'Time: 50',
            res.score_font,
            res.score_text_color,
            alignment='left')

        # set up initial variables
        self.need_reset = False
        self.size = size
        self.result = 0
        self.arbit_var = 1
        self.coinlist = []
        self.gameclock = gameclock
        self.game_manager = game_manager
        self.timer = 0
        self.cart = Cart(res, self.size, surface, self.game_manager)
예제 #10
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")
예제 #11
0
 def __init__(self, pygame, res, surface):
     Screen.__init__(self, pygame, res, surface)
     self.buttons['Back'] = Button(
         pygame, res, surface, [20, 360, 300, 50], "Back")