protected override IEnumerator InnerDoGroupAbility(Transform groupTransform) { _horn.transform.position = groupTransform.position + new Vector3(0f, 1f, 0f); _horn.transform.SetParent(groupTransform); ArenaManager arena = groupTransform.GetComponent <ImpGroupAi>().Target.Target.GetComponent <ArenaBoss>() .Arena; CombatSystem[] spectatorsSystems = arena.GetComponentsInChildren <CombatSystem>(); float timer = 0f; int i = 0; while (timer <= data.ActivatedDuration) { if (spectatorsSystems[i].enabled) { spectatorsSystems[i].StartAttack(data.AssociatedAttack.GetAttack(), arena.Boss.transform); } yield return(null); timer += Time.deltaTime; i = i < spectatorsSystems.Length - 1 ? i + 1 : 0; } }