IEnumerator RecoverFromStruckState() { yield return(new WaitForSeconds(struckWaitTime)); npcMaster.CallEventNpcRecoveredAnim(); //Evil max.Repair gun hold // if (rangedWeapon != null) { // HARD CODED STATEMENT BELOW yield return(new WaitForSeconds(struckWaitTime / 2)); rangedWeapon.SetActive(true); } if (myNavMeshAgent.enabled) { //myNavMeshAgent.Resume(); myNavMeshAgent.isStopped = false; } currentState = capturedState; }
void CheckHealthFraction() { if (npcHealth <= healthLow && npcHealth > 0) { npcMaster.CallEventNpcLowHealth(); healthCritical = true; } else if (npcHealth > healthLow && healthCritical) { npcMaster.CallEventNpcRecoveredAnim(); healthCritical = false; } }