Added alot of things, waypoints, grid for editor, game camera system, enemy moving on pre defined waypoint (path)

This commit is contained in:
2026-06-07 22:46:47 +02:00
parent 6283fb0d5a
commit 0171a5c845
23 changed files with 432 additions and 77 deletions
+13 -2
View File
@@ -20,12 +20,21 @@ class Game:
self.clock = pygame.time.Clock()
self.ui_manager = pygame_gui.UIManager(
WINDOW_SIZE,
"theme.json"
"assets/theme/theme.json"
)
self.tilemap = Tilemap(self)
self.map = 'test'
self.path = 'assets/maps/' + str(self.map) + '.json'
try:
self.tilemap.load(self.path)
except FileNotFoundError:
print('File not Found')
print(self.tilemap.waypoints)
self.assets={
"base": load_images('/tiles/test')
"base": load_images('/tiles/test'),
"jungle": load_images('/tiles/jungle'),
"enemy": load_image('/entities/enemies/sand_monster.png')
}
self.screens = {
@@ -58,6 +67,8 @@ class Game:
self.ui_manager.process_events(event)
self.current_screen.process_event(event)
self.current_screen.update(dt)
self.ui_manager.update(dt)