public void SetNextComponent() { foreach (GameObject obj in elementsObjects) { Destroy(obj); } ; switch (mCompoundIndex) { case 0: mCompoundDescription = CompoundDescription.GetOxygen(); break; case 1: mCompoundDescription = CompoundDescription.GetWater(); break; case 2: mCompoundDescription = CompoundDescription.GetBenzene(); break; case 3: mCompoundDescription = CompoundDescription.GetSodiumChloride(); break; } ; mCompoundIndex++; mCompoundIndex %= 3; StartCoroutine(UpdatePodiumTitle(mCompoundDescription.mName)); }