Exemplo n.º 1
0
    private bool StartAnimatedSwing()
    {
        _SwingReset = false;
        _feedBack.SetBool();
        _hasPlayedSheath = false;
        _delayManager.AddDelay(10000);
        if (!_collider.enabled)
        {
            _collider.enabled = true;
        }
        _isAerial = !_mouvementManager.IsGrounded;
        string animationToUse = "Grounded";

        if (isAbility)
        {
            _mouvementManager.ChangeCanFlip();

            if (_isAerial)
            {
                _sound         = SoundManager.PlaySFX(AbilityAerial);
                animationToUse = "Air";
                m_animator.SetBool(animationToUse, true);
            }
            else
            {
                _sound = SoundManager.PlaySFX(Swipe);
                m_animator.SetBool(animationToUse, true);
            }
        }
        else
        {
            _sound = SoundManager.PlaySFX(Swipe);
            m_animator.SetBool(animationToUse, true);
        }
        StartCoroutine(ResetBoolNextFrame(animationToUse, false));
        //StartTrail();
        return(true);
    }