Пример #1
0
        private IEnumerator AttackFinish()
        {
            calledFinishAttack = true;
            animator.SetBool("ChargingPowerfullAttack", false);
            yield return(new WaitForSeconds(0.2f));

            animator.SetFloat("AttackSpeed", currentWeapon.GetAttackSpeed());
            OnAttackFinished();
            if (weaponTrailParticle != null)
            {
                weaponTrailParticle.Stop();
            }
            isAttackGoing      = false;
            calledFinishAttack = false;
            yield return(new WaitForSeconds(0.5f));

            if (!mover.IsNavMeshAgentEnabled() && !isBlocking)
            {
                mover.AllowMove();
            }
            if (chargeParticle != null && !isAttackGoing)
            {
                Destroy(chargeParticle);
                chargeParticle = null;
            }
            yield return(new WaitForSeconds(0.8f));

            playerCamera.SetCustomNoiseSettings(playerCamera.GetDefaultNoiseSettings());
        }