/// <summary> /// 获取未连接的甲板房间 /// </summary> public static List <CanvasCore> GetNoLinkPutDeckRoom() { List <CanvasCore> lNolinkCore = new List <CanvasCore>(); // //获取未连接的节点 List <RoomGrid> lNolink = RoomMap.GetUnLinkDeckRoom(); List <int> lBuild = new List <int>(); foreach (RoomGrid R in lNolink) { if (R != null) { if (lBuild.Contains(R.buildingid) == false) { lBuild.Add(R.buildingid); } } } // foreach (int buildingid in lBuild) { if (buildingid != RoomGrid.EMPTYGRIDID) { lNolinkCore.Add(new CanvasCore(ShipBuildType.BuildRoom, false, buildingid, buildingid, Vector2.zero)); } } return(lNolinkCore); }