Added structure for Level loading
parent
f1709229c5
commit
7d3dd16fe5
|
@ -0,0 +1,5 @@
|
|||
from level.elements.LevelElement import LevelElement
|
||||
|
||||
|
||||
class BlockElement(LevelElement):
|
||||
pass
|
|
@ -0,0 +1,2 @@
|
|||
class LevelElement:
|
||||
pass
|
|
@ -0,0 +1,23 @@
|
|||
from level.Level import Level
|
||||
from physics.SpriteManager import SpriteManager, DrawLayers
|
||||
from sprite.SpritesheetManager import SpritesheetManager
|
||||
from sprite.StaticSprite import StaticSprite
|
||||
|
||||
BLOCK_SIZE = (16, 16)
|
||||
|
||||
|
||||
class LoadedLevel:
|
||||
def __init__(self, sprite_manager: SpriteManager, spritesheet_manager: SpritesheetManager):
|
||||
self.sprite_manager = sprite_manager
|
||||
self.spritesheet_manager = spritesheet_manager
|
||||
|
||||
def load_level(self, level: Level):
|
||||
for row in level.tiles:
|
||||
for tile in row:
|
||||
pass
|
||||
|
||||
sprite = StaticSprite(self.spritesheet_manager.get_sheet('test_1'))
|
||||
sprite.position_scale.position = (1, 1)
|
||||
sprite.set_animation_state('idle')
|
||||
|
||||
self.sprite_manager.add_ui_element(DrawLayers.OBJECTS, None)
|
Loading…
Reference in New Issue