sep-pm-platformer/project/level/elements/LevelElement.py

22 lines
565 B
Python
Raw Normal View History

import uuid
2023-03-27 11:46:03 +02:00
from abc import abstractmethod
from level.Level import Level
from physics.SpriteManager import SpriteManager
from sprite.SpritesheetManager import SpritesheetManager
class LevelElement:
def __init__(self, tile: dict, loaded_level):
self.tile = tile
self.loaded_level = loaded_level
if 'id' in tile:
self.id = tile['id']
else:
self.id = uuid.uuid4()
2023-03-27 11:46:03 +02:00
@abstractmethod
def load(self, sprite_manager: SpriteManager, spritesheet_manager: SpritesheetManager, level: Level):
pass