Move roaches to the roach layer.
authorSimon Cross <hodgestar@gmail.com>
Wed, 2 Mar 2016 19:34:22 +0000 (21:34 +0200)
committerSimon Cross <hodgestar@gmail.com>
Wed, 2 Mar 2016 19:34:22 +0000 (21:34 +0200)
koperkapel/scenes/roaches.py

index 74f32a96f3344acacddb3406633e9cce62edbaab..923e6fde263e3e62da76aed366fab01b048abf69 100644 (file)
@@ -10,6 +10,7 @@ class RoachesScene(Scene):
 
     def __init__(self):
         super().__init__()
+        self.actors.add_layer("roaches", level=10)
         self._roach_actors = {}
 
     def update(self, world, dt):
@@ -23,7 +24,7 @@ class RoachesScene(Scene):
                         roach.attributes.items()),
                     )))
                 self._roach_actors[roach.name] = actor
-                self.actors.add(actor)
+                self.actors.add(actor, layer="roaches")
             # TODO: remove missing roaches
             actor.pos = (300, 100 + i * 100)