private IEnumerator Jump(Collider colliderToJump)
    {
        // If collider to specific obstace is already disabled, exit coroutine
        if (colliderToJump.enabled == false)
        {
            yield break;
        }

        Debug.Log("start jump coroutine");
        jumpInProgress         = true;
        colliderToJump.enabled = false;
        horse.horseRidingBehavior.ignorePlayerInput = true;
        //if (jumpInProgress) {
        //    anim.Play("Jump", -1, 0);
        //}
        horse.horseAnimator.SetBool("Jump", true);

        yield return(new WaitForSeconds(1f));

        horse.horseAnimator.SetBool("Jump", false);
        yield return(new WaitForSeconds(2f));

        currentHorseGait = horseGait.CANTER;
        horse.horseRidingBehavior.ignorePlayerInput = false;
        colliderToJump.enabled = true;
        jumpInProgress         = false;
        Debug.Log("end jump coroutine");
    }
    private horseGait DecreaseGaitByOne()
    {
        horseGait result = horseBehaviour.currentHorseGait - 1;

        if (result < horseGait.STAND)
        {
            result = horseGait.STAND;
        }
        Debug.Log("decrease gait, old: " + horseBehaviour.currentHorseGait + " new: " + result);
        return(result);
    }
    private horseGait IncreaseGaitByOne()
    {
        horseGait result = horseBehaviour.currentHorseGait + 1;

        if ((int)result > 3)
        {
            result = horseGait.CANTER;
        }
        Debug.Log("increase gait, old: " + horseBehaviour.currentHorseGait + " new: " + result);
        return(result);
    }
 public void RidingHorse(bool mountUp)
 {
     if (mountUp)
     {
         ChangeState(horseState.RIDING);
         navMeshAgent.enabled = false;
     }
     else
     {
         navMeshAgent.enabled = true;
         horse.horseAnimator.SetBool("Still", false);
         currentHorseGait = horseGait.STAND;
         ChangeState(horseState.IDLE);
     }
 }
 public void PutHorseOnLead(bool onLead)
 {
     if (onLead)
     {
         ChangeState(horseState.ONLEAD);
         navMeshAgent.enabled = false;
     }
     else
     {
         navMeshAgent.enabled = true;
         horse.horseAnimator.SetBool("Still", false);
         currentHorseGait = horseGait.STAND;
         ChangeState(horseState.IDLE);
     }
 }