/// <summary> /// Plays an animation given the type and hand. /// </summary> public void PlayAnimationForType(ShotType type, bool leftHanded) { switch (type) { case ShotType.SHOT: m_animator.Play("Shoot"); break; case ShotType.LAYUP: if (leftHanded) { m_animator.Play("LayupL"); } else { m_animator.Play("Layup"); } break; case ShotType.DUNK: if (leftHanded) { m_animator.Play("1hand_dunkL"); } else { m_animator.Play("1hand_dunk"); } StartCoroutine(PlayerUtils.Dunk(this, GameManager.GetBasket())); break; default: break; } }