ResetPath() private method

private ResetPath ( ) : void
return void
コード例 #1
0
 static public int ResetPath(IntPtr l)
 {
     try {
         UnityEngine.NavMeshAgent self = (UnityEngine.NavMeshAgent)checkSelf(l);
         self.ResetPath();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #2
0
 static public int ResetPath(IntPtr l)
 {
     try {
         UnityEngine.NavMeshAgent self = (UnityEngine.NavMeshAgent)checkSelf(l);
         self.ResetPath();
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #3
0
 static int ResetPath(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.NavMeshAgent obj = (UnityEngine.NavMeshAgent)ToLua.CheckObject(L, 1, typeof(UnityEngine.NavMeshAgent));
         obj.ResetPath();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #4
0
 internal void Create(EntityInfo entity)
 {
     if (null != entity) {
         m_Entity = entity;
         MovementStateInfo msi = m_Entity.GetMovementStateInfo();
         ScriptRuntime.Vector3 pos = msi.GetPosition3D();
         float dir = msi.GetFaceDir();
         CreateActor(m_Entity.GetId(), m_Entity.GetModel(), pos.X, pos.Y, pos.Z, dir, m_Entity.Scale, m_Entity.GetRadius(), m_Entity.GetActualProperty().MoveSpeed);
         if (null != Actor) {
             m_Agent = Actor.GetComponent<NavMeshAgent>();
             if (m_Agent == null) {
                 m_Agent = Actor.AddComponent<NavMeshAgent>();
                 m_Agent.angularSpeed = c_AngularSpeed;
                 m_Agent.acceleration = c_Acceleration;
                 m_Agent.radius = entity.GetRadius();
                 m_Agent.speed = entity.GetActualProperty().MoveSpeed;
                 m_Agent.obstacleAvoidanceType = ObstacleAvoidanceType.NoObstacleAvoidance;
                 m_Agent.ResetPath();
             }
             m_Animator = Actor.GetComponentInChildren<Animator>();
             EntityDrawGizmos gizmos = Actor.GetComponent<EntityDrawGizmos>();
             if (null == gizmos) {
                 gizmos = Actor.AddComponent<EntityDrawGizmos>();
                 gizmos.npcInfo = m_Entity;
             } else {
                 gizmos.npcInfo = m_Entity;
             }
             SetMoveAgentEnable(true);
         }
     }
 }