示例#1
0
 // Use this for initialization
 void Start()
 {
     sun = GameObject.Find ("Sun").GetComponent<SunBehaviourScript> ();
     lighting = GameObject.Find ("Lighting").GetComponentInChildren<LightBehaviourScript> ();
     linesToWrite_blue = new List<string> ();
     linesToWrite_green = new List<string> ();
     linesToWrite_red = new List<string> ();
 }
    //private float lerpVal = 0.0;

    // Use this for initialization
    void Start()
    {
        daylight         = new Color(255, 236, 224);
        fluorescent      = new Color(255, 213, 173);
        halogen          = new Color(255, 193, 132);
        incandescent     = new Color(255, 169, 87);
        warmIncandescent = new Color(255, 152, 54);
        candle           = new Color(255, 131, 0);
        ember            = new Color(255, 83, 0);

        sunb      = GameObject.Find("Sun").GetComponent <SunBehaviourScript> ();
        dayLength = sunb.getDayLengthCount();          // a value in # of frames (e.g. 900)

        this.gameObject.GetComponent <Light> ().color = daylight;
    }