Pygame setup and fps label
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import pygame as pg
|
||||
import pygame_gui
|
||||
|
||||
from constants import Config
|
||||
from game.game import Game
|
||||
|
||||
def main():
|
||||
|
||||
running = True
|
||||
|
||||
pg.init()
|
||||
# pygame.mixer.init()
|
||||
pg.display.set_caption('Portal')
|
||||
screen = pg.display.set_mode(Config.WINDOW_SIZE)
|
||||
manager = pygame_gui.UIManager(Config.WINDOW_SIZE, theme_path="data/theme/theme.json")
|
||||
|
||||
clock = pg.time.Clock()
|
||||
|
||||
# implement game
|
||||
game = Game(screen, clock, manager)
|
||||
|
||||
while running:
|
||||
|
||||
running = game.run()
|
||||
|
||||
pg.quit()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user