Display roach pads.
authorSimon Cross <hodgestar@gmail.com>
Wed, 2 Mar 2016 20:04:59 +0000 (22:04 +0200)
committerSimon Cross <hodgestar@gmail.com>
Wed, 2 Mar 2016 20:04:59 +0000 (22:04 +0200)
koperkapel/scenes/roaches.py

index 923e6fde263e3e62da76aed366fab01b048abf69..7198ee2363ffee41c85530a158ad82037ed45b83 100644 (file)
@@ -1,7 +1,9 @@
 """ Roach management scene. """
 
 from pgzero.constants import keys
+from pgzero.actor import Actor
 from ..actors.buttons import TextButton
+from ..constants import WIDTH, HEIGHT
 from .base import Scene, ChangeSceneEvent
 
 
@@ -10,8 +12,18 @@ class RoachesScene(Scene):
 
     def __init__(self):
         super().__init__()
+        self.actors.add_layer("pads", level=5)
         self.actors.add_layer("roaches", level=10)
         self._roach_actors = {}
+        self._init_pads()
+
+    def _init_pads(self):
+        self._roach_pad = self.actors.add(
+            Actor("roach_management/roach_pad"), layer="pads")
+        self._roach_pad.pos = (WIDTH * (7/8), HEIGHT * (1/4))
+        self._inventory_pad = self.actors.add(
+            Actor("roach_management/inventory_pad"), layer="pads")
+        self._inventory_pad.pos = (WIDTH * (7/8), HEIGHT * (3/4))
 
     def update(self, world, dt):
         for i, roach in enumerate(world.roaches):