From bd8aab701fb1ccd81a3c50661600242024847cad Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Wed, 2 Mar 2016 22:04:59 +0200 Subject: [PATCH] Display roach pads. --- koperkapel/scenes/roaches.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/koperkapel/scenes/roaches.py b/koperkapel/scenes/roaches.py index 923e6fd..7198ee2 100644 --- a/koperkapel/scenes/roaches.py +++ b/koperkapel/scenes/roaches.py @@ -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): -- 2.34.1