/* ----------------------------------------
  * At Awake, assign the 'OnDemandProbe' game object to
  * 'probe', and the 'UpdateProbe' to the 'up' variable
  */
 void Awake()
 {
     // Asign the 'OnDemandProbe' game object to the 'probe' variable
     probe = GameObject.Find("OnDemandProbe");
     // Assign the 'UpdateProbe' component of the 'probe' object to the 'up' variable
     up = probe.GetComponent<UpdateProbe>();
 }
 /* ----------------------------------------
  * At Awake, assign the 'OnDemandProbe' game object to
  * 'probe', and the 'UpdateProbe' to the 'up' variable
  */
 void Awake()
 {
     // Asign the 'OnDemandProbe' game object to the 'probe' variable
     probe = GameObject.Find("OnDemandProbe");
     // Assign the 'UpdateProbe' component of the 'probe' object to the 'up' variable
     up = probe.GetComponent <UpdateProbe>();
 }
Beispiel #3
0
    private void ToggleLights(bool on)
    {
        foreach (GameObject g in Lights)
        {
            g.SetActive(on);
        }

        if (!IsWebGl)
        {
            UpdateProbe.OnOnLightChanged();
        }
        else
        {
            RelfectionProbes[0].SetActive(on);
            RelfectionProbes[1].SetActive(!on);
        }
    }
Beispiel #4
0
 void Awake()
 {
     probe = GameObject.Find("OnDemandProbe");
     up    = probe.GetComponent <UpdateProbe>();
 }
Beispiel #5
0
 void ToggleLight()
 {
     GetComponentInChildren <Light>().enabled = IsOn;
     EmissionObj.GetComponent <Renderer>().material.SetColor("_EmissionColor", IsOn ? EmissionColor : Color.black);
     UpdateProbe.OnOnLightChanged();
 }