IEnumerator Timer(float delay, string property) { playerState.SetBool(property, true); if (property == "dashing") { playerAnimation.Slide(true); } yield return(new WaitForSeconds(delay)); playerState.SetBool(property, false); if (property == "dashing") { playerAnimation.Slide(false); } }