""" 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
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):