示例#1
0
 // Start is called before the first frame update
 void Start()
 {
     if (type == 1)
     {
         title = GameObject.Find("type1Txt").GetComponent <TMP_Text>();
         info  = GameObject.Find("type1Info").GetComponent <TMP_Text>();
         infoR = GameObject.Find("type1Radio").GetComponent <TMP_Text>();
     }
     else if (type == 2)
     {
         title = GameObject.Find("type2Txt").GetComponent <TMP_Text>();
         info  = GameObject.Find("type2Info").GetComponent <TMP_Text>();
         infoR = GameObject.Find("type2Radio").GetComponent <TMP_Text>();
     }
     else if (type == 3)
     {
         title = GameObject.Find("type3Txt").GetComponent <TMP_Text>();
         info  = GameObject.Find("type3Info").GetComponent <TMP_Text>();
         infoR = GameObject.Find("type3Radio").GetComponent <TMP_Text>();
     }
     title.text = particleInfo.name;
     info.text  = "Masa = " + particleInfo.mass + " kg\nCarga = " + particleInfo.charge + " C";
     simulationSceneController = GameObject.Find("SceneController").GetComponent <SimulationSceneController>();
     x0 = gameObject.transform.position.x;
     y0 = gameObject.transform.position.y;
 }
示例#2
0
    public override void ExecuteAction()
    {
        Simulation           sim        = Simulation.Instance;
        SimulationController controller = sim.Controller;

        Debug.Log("TRANSITION");

        // Change scene
        SimulationSceneController sceneController = controller.GetSimulationComponent <SimulationSceneController>();

        sceneController.ChangeScene(routeID);
    }