Пример #1
0
    def __init__(self):
        """Inits game and creates resources"""

        pygame.init()
        self.settings = Settings()
        self.screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
        pygame.display.set_caption("Sideways shooter")
        self.screen_rect = self.screen.get_rect()
        self.bg_color = self.settings.bg_color
        self.ship = Ship(self)
        self.bullets = pygame.sprite.Group()
Пример #2
0
    def __init__(self):
        """Inits all settings and attriubutes"""

        pygame.init()
        self.settings = Settings()
        self.screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
        self.settings.screen_width = self.screen.get_rect().width
        self.settings.screen_height = self.screen.get_rect().height
        pygame.display.set_caption("Sideways-Shooter 2")
        self.bg_color = self.settings.bg_color
        self.ship = Ship(self)
        self.bullets = pygame.sprite.Group()
        self.aliens = pygame.sprite.Group()
        self._create_fleet()
Пример #3
0
    def __init__(self):
        """Inits all settings and attriubutes"""

        pygame.init()
        self.settings = Settings()
        self.screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
        self.settings.screen_width = self.screen.get_rect().width
        self.settings.screen_height = self.screen.get_rect().height
        self.screen_rect = self.screen.get_rect()
        pygame.display.set_caption("Target Practice")
        self.bg_color = self.settings.bg_color
        self.btn = Button(self, "Press P to play")
        self.stats = GameStats(self)
        self.ship = Ship(self)
        self.bullets = pygame.sprite.Group()
        self.target = Target(self)
Пример #4
0
    def __init__(self):
        """Inits all settings and attriubutes"""

        pygame.init()
        self.settings = Settings()
        self.screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
        self.settings.screen_width = self.screen.get_rect().width
        self.settings.screen_height = self.screen.get_rect().height
        pygame.display.set_caption("Sideways-Shooter 2")
        self.bg_color = self.settings.bg_color
        self.play_btn = Button(self, "Play")
        self.easy_btn = Button1(self, "Easy")
        self.medium_btn = Button2(self, "Medium")
        self.hard_btn = Button3(self, "Hard!")
        self.stats = GameStats(self)
        self.scorebd = Scoreboard(self)
        self.ship = Ship(self)
        self.bullets = pygame.sprite.Group()
        self.aliens = pygame.sprite.Group()
        self._create_fleet()