コード例 #1
0
    void ChangeCloudColors()
    {
        //   Debug.Log(" amount " + foundClouds.Count);
        //   Debug.Log("highx: " + highestX + "   highestPeak: " + highestPeak +"   closecloud: " + closestCloud.transform.localPosition.x);
        if (highestPeak > colorThreshold)
        {
            if (zoneClouds)
            {
                foreach (GameObject cloudObj in foundZoneClouds)
                {
                    if (foundClouds.Contains(cloudObj) == false)
                    {
                        Cloud cloud = cloudObj.GetComponent <Cloud>();
                        cloud.ActivateSecondary(foundZoneClouds.IndexOf(cloudObj));
                    }
                }
            }

            foreach (GameObject cloudObj in foundClouds)
            {
                Cloud cloud = cloudObj.GetComponent <Cloud>();
                cloud.ActivateCloud(foundClouds.IndexOf(cloudObj));
            }

            ResetCloudColors();
        }
    }