void GetNewObservationSubTarget() { Vector3 randomDirection = originalStartSearchAreaPosition + Random.insideUnitSphere * searchDistance; randomDirection.y = stateController.transform.position.y; currentSearchAreaPosition = GetNearestNavMeshPoint.GetClosestNavMeshPoint(randomDirection); isObservingCurrentSearchPosition = false; }
IEnumerator FetchWeaponAfterGetUpTimer() { Debug.Log(gameObject.name); yield return(new WaitForSeconds(1.8f)); if (droppedWeapon.isPlayerWeapon == true) { droppedWeapon = null; Debug.Log("Player Took Weapon From " + gameObject.name); } else { targetPositionForWeaponPickup = GetNearestNavMeshPoint.GetClosestNavMeshPoint(droppedWeapon.transform.position); movementController.SetAgentDestination(targetPositionForWeaponPickup); animController.SetAnimBool(animController.animData.isIdleBool, true); animController.SetAnimFloat(animController.animData.verticalFloat, 1); } }