Ignore:
Timestamp:
09/06/13 21:58:15 (8 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Phase:
public
Rebase:
35303737613634613836383239353338336366613238316631663639633630356133643634333763
Message:

Use a result object to get new drawables back to the area

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/area.py

    r371 r385  
    244244        self.tick_protagonist()
    245245        for drawable in self._drawables:
    246             drawable.update(seconds)
    247             if drawable.remove:
    248                 self._drawables.remove(drawable)
     246            result = drawable.update(seconds)
     247            if result is not None:
     248                for new_drawable in result.add:
     249                    self._drawables.add(new_drawable)
     250                for old_drawable in result.remove:
     251                    self._drawables.remove(old_drawable)
    249252
    250253    def render_health_bar(self, surface, damage_experienced=None):
Note: See TracChangeset for help on using the changeset viewer.