void Awake() { guard = GetComponent <UnityEngine.AI.NavMeshAgent>(); guard.updateRotation = false; guard_motor = GetComponent <BotFreeMovementMotor>(); botNav = GetComponent <BotNavigation>(); _transform = transform; state = State.Patrol; raycastLayerMask = ~raycastLayerMask; }
void Awake() { guard = GetComponent <NavMeshAgent>(); guard.updateRotation = false; guard_motor = GetComponent <BotFreeMovementMotor>(); botNav = GetComponent <BotNavigation>(); _transform = transform; //Explicitly set state so that we call the EnterState method state = State.Patrol; raycastLayerMask = ~raycastLayerMask; }
void OnEnable() { botNav = target as BotNavigation; }