void Cylinder() { foreach (GameObject c in Platforms) { platform = (Platform)c.gameObject.GetComponent<Platform>(); Debug.Log(platform.CheckState()); platform.ChangeState(); } }