Exemplo n.º 1
0
    protected void Stop()
    {
        if (Agent.isOnNavMesh && Agent.enabled)
        {
            Agent.destination = Player.transform.position;
        }

        Locomotion.jump = false;
        Speed           = 0;
        Direction       = 0;
        motionType      = LocomotionType.normal;
        Locomotion.ResetHoldTugAnimator();
        Locomotion.ResetSpeedMultiples();

        player.GetTugOfWar().RemoveJoint();
        Player.GetComponent <Rigidbody>().velocity    = Vector3.zero;
        Player.GetComponent <Animator>().rootPosition = Player.transform.position;
        isForcedGoTo = false;
        forceGoTo    = Player.transform.position;
    }