private IEnumerator SetToIdleAfterTask(float after) { yield return(new WaitForSeconds(after)); movementController.UnlockAnimations(); AIState = AIStates.Idle; }
public void StartBlocking() { if (canBlocking && !forceAiming) { if (weapon != null) { if (weapon.blockPower > 0) { blocking = false; parry = true; canAiming = false; if (aiming) { EndAiming(); } canAttack = false; if (movementController != null) { movementController.ResetArmsPosition(); movementController.UnlockAnimations(); movementController.PlayAnimation(SNMovementController.AnimationsStates.Parry, true); movementController.canMove = false; movementController.canDash = false; movementController.canJump = false; } if (weapon.weaponAnimator != null) { weapon.weaponAnimator.Play("Parry"); } if (parryDelayCo != null) { StopCoroutine(parryDelayCo); } parryDelayCo = StartCoroutine(EndParryDelayed(weapon.parryKnockbackDelay)); } } } }