/// <summary> /// 给定一个坐标和格子数据表,搜索相邻格子 /// </summary> /// <param name="ljGridDict"></param> /// <param name="serVector3Int"></param> /// <returns></returns> public static Dictionary <SerVector2Int, int> GetRangePositionsByInSidePosition(LJMapObjDict mapObjDict, SerVector2Int serVector2Int) { if (mapObjDict == null) { return(null); } LJMapObject tempGridObject = null; mapObjDict.TryGetValue(serVector2Int, out tempGridObject); if (tempGridObject == null) { return(null); } Dictionary <SerVector2Int, int> searchGroup = new Dictionary <SerVector2Int, int>();//搜索出来的结果 searchGroup.Add(serVector2Int, LJMapConst.MAP_SEARCH_STATE.NONE); SearchRangePositions(mapObjDict, searchGroup); return(searchGroup); }
public bool TryGetPositionProperty(SerVector2Int position, out LJMapObject positionValue) { return(m_PositionProperties.TryGetValue(position, out positionValue)); }