/** * reset */ public void Reset() { PathFinding.AStarAgent agent = _agent as PathFinding.AStarAgent; if (agent != null && agent._asm != null) { _goal = null; } _goal = null; //.Reset(); _map = null; //.Reset(); _storage = null; //.Reset(); #if UNITY_EDITOR && !MULTI_THREAD if (PathFinding.PathFindingManager.DEBUG) { if (_agent != null && ((PathFinding.AStarAgent)_agent)._asm == this) { // UnityEngine.Debug.LogError("reset path error"); } } #endif _inQueue = false; _revsCurrentRun = 0; _curPosIdx = -1; _agent = null; _maxRevolutions = C_MaxRevolutions; ResetMachineData(); #if ASTARDEBUG _totalRevs = 0; #endif }
public void Ini(IAgent agent, IAStarGoal goal, AStarStorageBase storage, IAStarMap aStarMap) { Reset(); _agent = agent; _goal = goal; _storage = storage; _map = aStarMap; }