-
- self._obstacles = []
- self._lights = []
- for obs in gamestate.station['obstacles']:
- wall = Wall(obs['vertices'], self._space)
- self._obstacles.append(wall)
+ self._obstacles = [
+ BaseObstacle.load(cfg) for cfg in gamestate.station["obstacles"]]
+ self._lights = [
+ BaseLight.load(cfg) for cfg in gamestate.station["lights"]]
+ for obs in self._obstacles:
+ obs.add(self._space)
+ for light in self._lights:
+ light.add(self._space)