public void Move(Vector3 position) { if (!_FSMController.LockedByInteraction) { isIdle = false; if (useBioCrowds) { _agent.GoalPosition = position; } else { _navMeshAgent.destination = position; _navMeshAgent.isStopped = false; } _FSMController.SetNextState(GameEnums.FSMInteractionEnum.Moving); } }
public void CheckTrans(FSMController controller) { for (int i = 0; i < trans.Length; i++) { if (trans[i].transCheck()) { if (trans[i].TrueState != null) { controller.SetNextState(trans[i].TrueState); break; } } else { if (trans[i].FalseState != null) { controller.SetNextState(trans[i].FalseState); break; } } } }