// Use this for initialization void Start() { Sim.enabled = false; DnD_Incomplete.enabled = false; pauseMenu = GameObject.Find("PauseMenu").GetComponent <PauseMenu>(); kv = GameObject.Find("KillVolume").GetComponent <Killvolume>(); rs = GameObject.Find("LevelLoader").GetComponent <reloadSpaceship>(); }
// Use this for initialization void Start() { pauseMenu = GameObject.Find("PauseMenu").GetComponent <PauseMenu>(); kv = GameObject.Find("KillVolume").GetComponent <Killvolume>(); rs = GameObject.Find("LevelLoader").GetComponent <reloadSpaceship>(); }
// Use this for initialization void Start() { rs = GameObject.Find("LevelLoader").GetComponent <reloadSpaceship>(); //Gets the color of the Laser Beam Laser_Beam_Color = Laser_Beam.color; BeamR = Laser_Beam_Color.r; BeamG = Laser_Beam_Color.g; BeamB = Laser_Beam_Color.b; //Gets the script of the main photon destroyer Photon_Destroyer_Script = Photon_Destroyer.GetComponent <Destoyer_Of_Photons>(); //Sets the point light's intensity to 0; Point_Light_1.intensity = 0; Point_Light_2.intensity = 0; //Sets the current number of photons for both below paramters Current_Number_Of_Photons_For_Start = 0; Current_Number_Of_Photons_For_Real = 0; //Sets the max value of the Photons emitted Photons = new GameObject[Max_Num_Of_Photons]; //Gets the RGB values of the Mirror so as not to change them when changing the transparency Color MirrorColor = Mirror_Material.color; ProperR = MirrorColor.r; ProperG = MirrorColor.g; ProperB = MirrorColor.b; //Gets the value of each slider and sets the proper exitation delay variable to said value delay_e2toe1 = E2_Lifetime.value; delay_e1toe0 = E1_LifeTime.value; Mirror_Reflectivity = Mirror_Reflectivity_Slider.value; delayExite = Current.value; //Initializing the three linked lists; E0List = new LinkedList <int>(); E1List = new LinkedList <int>(); E2List = new LinkedList <int>(); Photon_List = new LinkedList <int>(); electrons_e0 = new GameObject[NumParticle]; electrons_e1 = new GameObject[NumParticle]; electrons_e2 = new GameObject[NumParticle]; //laser_electron = new GameObject[NumParticle]; for (int i = 0; i < NumParticle; i++) { this.electrons_e0 [i] = GameObject.Instantiate(electronGO, origin_e0.position + new Vector3(i * View_Offset, 0, i) * offset, origin_e0.rotation); this.electrons_e1 [i] = GameObject.Instantiate(electronGO, origin_e1.position + new Vector3(i * View_Offset, 0, i) * offset, origin_e1.rotation); this.electrons_e2 [i] = GameObject.Instantiate(electronGO, origin_e2.position + new Vector3(i * View_Offset, 0, i) * offset, origin_e2.rotation); //this.laser_electron[i] = GameObject.Instantiate (electronGO, new Vector3(origin_e0.position.x + 0.05f, origin_e0.position.y, origin_e0.position.z) + new Vector3 (i*View_Offset, -1, i) * offset, origin_e2.rotation); this.electrons_e0 [i].transform.parent = this.E0_group.transform; this.electrons_e1 [i].transform.parent = this.E1_group.transform; this.electrons_e2 [i].transform.parent = this.E2_group.transform; //this.laser_electron[i].transform.parent = this.E_laserGroup.transform; int temp = Random.Range(0, NumParticle); while (E0List.Contains(temp)) { temp = Random.Range(0, NumParticle); } E0List.AddLast(temp); } rend_e0 = new Renderer[NumParticle]; rend_e1 = new Renderer[NumParticle]; rend_e2 = new Renderer[NumParticle]; //laserElectronRend = new Renderer[NumParticle]; electronRend = new Renderer[NumParticle]; for (int i = 0; i < NumParticle; i++) { rend_e0[i] = electrons_e0[i].GetComponent <Renderer>(); rend_e1[i] = electrons_e1[i].GetComponent <Renderer>(); rend_e2[i] = electrons_e2[i].GetComponent <Renderer>(); //laserElectronRend[i] = laser_electron[i].GetComponent<Renderer>(); electronRend[i] = electrons[i].GetComponent <Renderer>(); } for (int i = 0; i < NumParticle; i++) { counterList.Add(i); } StartCoroutine(ExcitationGate()); // StartCoroutine (E1Gate ()); // StartCoroutine (E0Gate ()); }