29 lines
553 B
Python
29 lines
553 B
Python
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() |