Пример #1
0
 /// <summary>
 /// Adds a path to paths list.
 /// </summary>
 /// <param name="path">Path.</param>
 public static void AddPath(BotPath path)
 {
     if (!paths.Contains(path))
     {
         paths.Add(path);
     }
     CamController.AddAreaOfInterest(path);
 }
Пример #2
0
    /* ### Static Methods ### */

    /// <summary>
    /// Enter this instance.
    /// </summary>
    public static void Enter()
    {
        CamController.AddViewMode(CamController.ViewMode.Birdseye);
        CamController.AddViewMode(CamController.ViewMode.FreeMovement);
        CamController.AddViewMode(CamController.ViewMode.Mounted);
        CamController.AddViewMode(CamController.ViewMode.Orbit);
        CamController.AddAreaOfInterest(testArea);
    }
Пример #3
0
 /// <summary>
 /// Halt current simulation.
 /// Load the next simulation in batch, or
 ///  change state to State.end if at the end of batch.
 /// </summary>
 public static void NextSimulation()
 {
     // stop current simulation
     if (state == State.simulating)
     {
         Halt(StopCode.Unspecified);
     }
     // next in batch
     simulationNumber++;
     if (simulationNumber > batch.Count)
     {
         // end of batch
         Halt(StopCode.Unspecified);
         End();
         return;
     }
     Debug.Log("Simulation NextSimulation: " + simulationNumber + " of " + batch.Count);
     // load simulation settings
     settings = batch[simulationNumber - 1];
     Log.Settings();
     // load environment
     EnvLoader.SearchForEnvironments();
     environment = EnvLoader.LoadEnvironment(settings.environmentName);
     destination.transform.position = RandomInBounds(Instance.bounds);
     // load robot
     if (robot)
     {
         CamController.RemoveAreaOfInterest(robot);
     }
     BotLoader.SearchForRobots();
     robot            = BotLoader.LoadRobot(settings.robotName);
     robot.navigation = NavLoader.LoadPlugin(settings.navigationAssemblyName);
     // configure camera
     CamController.AddAreaOfInterest(robot);
     CamController.SetViewMode(CamController.ViewMode.Birdseye);
     CamController.SetAreaOfInterest(robot);
     // reset test number
     testNumber = 0;
     NextTest();
 }
Пример #4
0
 /// <summary>
 /// Enter this BotNavSim state: setup camera views
 /// </summary>
 public static void Enter()
 {
     CamController.AddViewMode(CamController.ViewMode.Birdseye);
     CamController.AddViewMode(CamController.ViewMode.FreeMovement);
     CamController.AddAreaOfInterest(Instance);
 }