1 """ In the night, the mould attacks. """
3 import pygame.locals as pgl
7 from .base import BaseScene
8 from ..obstacles import Wall
9 from ..events import SceneChangeEvent
12 class NightScene(BaseScene):
13 def enter(self, gamestate):
15 pprint.pprint(gamestate.station)
17 self._space = pymunk.Space()
21 for obs in gamestate.station['obstacles']:
22 wall = Wall(obs['vertices'], self._space)
23 self._obstacles.append(wall)
25 def render(self, surface, gamestate):
26 surface.fill((0, 0, 255))
27 for obs in self._obstacles:
30 def event(self, ev, gamestate):
31 if ev.type == pgl.KEYDOWN:
32 if ev.key in (pgl.K_q, pgl.K_ESCAPE):
33 from .menu import MenuScene
34 SceneChangeEvent.post(scene=MenuScene())