protected virtual void effectOfColor(Color keyColor) { if ((int)pillarLocation > 0) { pillarLocation = 0; } for (int i = 0; i < Pillars.Length; i++) { distances[i] = new float[4]; distances[i] = pillarsScript[i].GetHeights(); heights[(int)pillarLocation] = pillarsScript[i].SetHeight(keyColor, distances[i]); //Debug.Log("Height of Pillars: " + heights[(int)pillarLocation].ToString()); pillarLocation++; } }
// Use this for initialization void Start() { pillarLocation = PillarLocation.FIRST; this.colorManager = ColorManager_GO.GetComponent<ColorManager>(); for (int i = 0; i < pillarsScript.Length; i++) { pillarsScript[i] = Pillars[i].GetComponent<PillarScript>(); pillarsScript[i].Tower = Pillars[i]; } }