/// <summary> /// 依照3d位置,取得cell的資料 /// </summary> /// <param name="pos"></param> /// <returns></returns> public CellData GetCell(Vector3 pos) { int x = 0; int z = 0; MapUtility.GetCellIndexBy3dPosition(pos, CenterPosition, MapSizeX, MapSizeZ, ref x, ref z); return(MapDataCollection.GetCell(x, z)); }