예제 #1
0
 def __init__(self):
     """Load the game core game"""
     pygame.init
     self.Clock = pygame.time.Clock()
     self.width, self.height = (968, 768)  # Screen width and height :: (Not changeable without having errors)
     self.screen = pygame.display.set_mode(
         (self.width, self.height), RESIZABLE
     )  # Setting up the window where the game will be displayed :: (Not changeable)
     self.gamestate = "ingame"  # Determines in what game state the client starts
     self.mouseCoords = pygame.mouse.get_pos()  # Determines the initial mouse coordinates
     self.FPS = (
         75
     )  # Determines the max FPS the client can achieve :: (No point going over the screen refresh rate, but changeable)
     self.player = sprites.loadSprite("sprites/player.png")
     self.bullImage = sprites.loadSprite("sprites/bullet.png")
예제 #2
0
 def loadUI(self):
     self.currentUI = pygame.Surface((200, 768))
     self.uiBackground = sprites.loadSprite("sprites/uibackground.png")
     self.currentUI.blit(self.uiBackground.sprite, (0, 0))
예제 #3
0
 def loadSprites(self):
     self.player = sprites.loadSprite("sprites/player.png")
     self.bullImage = sprites.loadSprite("sprites/bullet.png")