public void RebuildFinderPathData(ENGateDirection enDir, bool isHave) { ConfigObstacleArray(enDir, isHave); Pathfinder finder = m_roomObj.GetComponent <Pathfinder>(); finder.RebuildFinderPathData(m_obstacleData); }
//配置障碍二维表 public void ConfigObstacleArray(ENGateDirection enDir, bool isHave = false) { if (enDir != ENGateDirection.enNone) { for (int k = 0; k < m_obstacleData.mData.Count; k++) { if (m_obstacleData.mData[k].enDirection == enDir) { SM.SceneObstacleData.ObData d = m_obstacleData.mData[k]; d.obstacleArray.z = (isHave ? 1 : 0); m_obstacleData.mData[k] = d; } } } }
public void Reset() { enDirection = ENGateDirection.enNone; obstacleArray = Vector3.zero; }