+ if ev.key == pgl.K_e:
+ from .day import DayScene
+ SceneChangeEvent.post(scene=DayScene())
+ elif ev.type == pgl.MOUSEBUTTONDOWN:
+ if ev.button == 1:
+ self._lights.toggle_nearest(ev.pos, surfpos=True)
+ print self._lights.lit_by(ev.pos, surfpos=True)
+
+ @debug_timer("night.tick")
+ def tick(self, gamestate):
+ self._mould.tick(gamestate, self._space, self._lights)
+ self._lights.tick()
+
+ def exit(self, gamestate):
+ turnip_data = [turnip.serialize() for turnip in self._turnips]
+ gamestate.turnips = turnip_data