public IEnumerator FreeAttack() { MM.TurnOff(); AnM.MovePlayerToEnemy(); status.text = "Get Ready"; //wait for new beat to start yield return(new WaitUntil(() => TM.BeatLast())); yield return(new WaitUntil(() => TM.BeatOne())); yield return(new WaitUntil(() => TM.BeatLast())); isAttacking = true; IV.Enable(); status.text = "Attack"; yield return(new WaitUntil(() => TM.BeatOne())); yield return(new WaitUntil(() => TM.BeatLast())); status.text = "Enemy Turn"; isAttacking = false; IV.Disable(); AnM.PlayerToIdle(); StartCoroutine(Defend()); }