コード例 #1
0
 /// <summary>
 /// Change trajectory line and move arrows to new active robot
 /// </summary>
 private void OnActiveRobotChange()
 {
     dpmRobot = mainState.ActiveRobot.GetDriverPractice();
     trajectoryLine.transform.parent = dpmRobot.transform;
     Destroy(moveArrows);
     moveArrows = CreateMoveArrows();
 }
コード例 #2
0
ファイル: TrajectoryEditor.cs プロジェクト: chargen/synthesis
 void Update()
 {
     if (mainState == null)
     {
         mainState = StateMachine.SceneGlobal.FindState <MainState>();
     }
     else
     {
         if (dpmRobot == null)
         {
             dpmRobot = mainState.ActiveRobot.GetDriverPractice();
             FindElements();
         }
         if (mainState.ActiveRobot.GetDriverPractice() != dpmRobot)
         {
             OnActiveRobotChange();
         }
         SetGamepieceIndex();
         if (trajectory && !editing)
         {
             UpdateTrajectoryValues();
         }
         if (dpmRobot.drawing && DPMDataHandler.dpmodes.Where(d => d.gamepiece.Equals(FieldDataHandler.gamepieces[gamepieceIndex].name)).ToArray().Length > 0)
         {
             DrawTrajectory();
         }
         else
         {
             trajectoryLine.GetComponent <LineRenderer>().enabled = false;
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// Change trajectory line and move arrows to new active robot
 /// </summary>
 private void OnActiveRobotChange()
 {
     dpmRobot = mainState.ActiveRobot.GetDriverPractice();
     trajectoryLine.transform.parent = dpmRobot.transform;
     Destroy(moveArrows);
     if (Auxiliary.FindGameObject("Field") != null)
     {
         moveArrows = CreateMoveArrows();
     }
 }