Ejemplo n.º 1
0
    /// <summary>
    /// Force the character to stop following the player.
    /// </summary>
    public void ForceFailure()
    {
        _characterStatus = AiCharacterStatus.Retreating;
        _animator.SetFloat(_hashes.speed, _crowdScript.followTarget.GetMovementSpeed());

        //  May want to force some sort of reaction.
    }
Ejemplo n.º 2
0
    public void CompletedBlockGroup(bool wasSuccessful)
    {
        _characterStatus = wasSuccessful ?
            AiCharacterStatus.Following : AiCharacterStatus.Retreating;
        _crowdScript.AddFollower(wasSuccessful, this);

        var reactionToPlay = wasSuccessful ? (int)passReaction.animation : (int)failReaction.animation;

        if (reactionToPlay > 0)
        {
            _animator.SetInteger( _hashes.reaction, reactionToPlay );
            _animator.SetBool(_hashes.doReaction, true);

            StartCoroutine(StopReacting());
        }
    }