Move the renderable part of Entity to a Renderable component
Move symbol, render order, foreground, and background properties on Entity to a new Component called Renderable.
This commit is contained in:
parent
01b549bc6e
commit
def79386d8
5 changed files with 80 additions and 71 deletions
|
@ -45,7 +45,8 @@ class Interface:
|
|||
hero = self.engine.hero
|
||||
self.info_window.update_hero(hero)
|
||||
|
||||
sorted_entities = sorted(self.engine.entities, key=lambda e: e.render_order.value)
|
||||
sorted_entities = sorted(filter(lambda e: e.renderable is not None, self.engine.entities),
|
||||
key=lambda e: e.renderable.order.value)
|
||||
self.map_window.entities = sorted_entities
|
||||
|
||||
def draw(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue