コード例 #1
0
    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);
        }
    }
コード例 #2
0
 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;
             }
         }
     }
 }