(self, zoom_to_scene)
Loads a new environment.
Loads a new environment.
Loads a new environment .
def _load_environment(self, zoom_to_scene):
    """Loads a new environment."""
    if self._runtime:
      del self._runtime
      self._runtime = None
    self._environment = None
    environment_instance = None
    if self._environment_loader:
      environment_instance = self._environment_loader()
    if environment_instance:
      self._environment = environment_instance
      self._runtime = runtime.Runtime(
          environment=self._environment, policy=self._policy)
      self._runtime.on_physics_changed += lambda: self._on_reload(False)
    self._status.set_runtime(self._runtime)
    self._on_reload(zoom_to_scene=zoom_to_scene)
def _load_environment ( self , zoom_to_scene ) : if self . _runtime : del self . _runtime self . _runtime = None self . _environment = None environment_instance = None if self . _environment_loader : environment_instance = self . _environment_loader ( ) if environment_instance : self . _environment = environment_instance self . _runtime = runtime . Runtime ( environment = self . _environment , policy = self . _policy ) self . _runtime . on_physics_changed += lambda : self . _on_reload ( False ) self . _status . set_runtime ( self . _runtime ) self . _on_reload ( zoom_to_scene = zoom_to_scene )