Ejemplo n.º 1
0
 private void Update()
 {
     if (AttackEnded)
     {
         EnemyCombatManager.IsAttacking = false;
         AttackCurrentRecoveryTime     += Time.deltaTime;
         if (AttackCurrentRecoveryTime > AttackRecoveryTime)
         {
             AttackCurrentRecoveryTime    = 0;
             EnemyBehavior.AiPath.enabled = true;
             EnemyStateMachine.ChangeState(EnemyStateMachine.States.Chasing);
             EnemyStateMachine.IsAttackingNow = false;
         }
     }
 }
Ejemplo n.º 2
0
 private void Update()
 {
     if (AttackEnded && EnemyStateMachine.State == EnemyStateMachine.States.Attacking)
     {
         EnemyCombatManager.IsAttacking = false;
         AttackCurrentRecoveryTime     += Time.deltaTime;
         if (AttackCurrentRecoveryTime > AttackRecoveryTime)
         {
             AttackCurrentRecoveryTime = 0;
             AttackEnded = false;
             EnemyStateMachine.IsAttackingNow = false;
             ProbablyGonnaHit             = false;
             EnemyBehavior.AiPath.enabled = true;
             EnemyStateMachine.ChangeState(EnemyStateMachine.States.Chasing);
             //  Debug.Log("MeleeAttackManager");
         }
     }
 }