Add import new class in Game.py

This commit is contained in:
Michał Czekański 2020-04-25 23:19:41 +02:00
parent e6c36eea8d
commit 7d9dd06d09
2 changed files with 3 additions and 2 deletions

View File

@ -86,10 +86,8 @@ class EventManager:
# TODO: Collision ckecks
self.player.move(Movement.FORWARD)
if keys[pygame.K_a]:
# TODO: Collision ckecks
self.player.move(Movement.ROTATE_L)
if keys[pygame.K_d]:
# TODO: Collision ckecks
self.player.move(Movement.ROTATE_R)

View File

@ -3,6 +3,7 @@ import json
from pathlib import Path
from os import path
from src.AI.AutomaticMovement import AutomaticMovement
from src.game.EventManager import EventManager
from src.game.Screen import Screen
from src.game.Map import Map
@ -53,6 +54,8 @@ class Game:
self.map.addEntity(self.player)
self.eventManager = EventManager(self, self.player)
self.movement = AutomaticMovement(self.player, self.map)
self.mainLoop()
def mainLoop(self):