コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        if (GameObject.Find("wanderer") != null)
        {
            DesertWandererAI wanderer = GameObject.Find("wanderer").GetComponent <DesertWandererAI> ();


            colorTiming = Mathf.PingPong(Time.time, 1 - (wanderer.heat / 2));

            transform.GetComponent <Text> ().color = Color.Lerp(activeColor, initialColor, colorTiming);
        }
        else
        {
            transform.GetComponent <Text> ().color = deadColor;
        }
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     AI = GameObject.Find("wanderer").GetComponent <DesertWandererAI> ();
 }