Ejemplo n.º 1
0
    public void MoveWithRoom(CanvasCore roomCore)
    {
        if (roomCore.m_type != ShipBuildType.BuildRoom)
        {
            return;
        }
        TouchMove         tmParent     = PutCanvasM.GetTouchMoveByCore(roomCore);
        List <CanvasCore> childrenCore = PutCanvasM.GetChildByCore(roomCore);

        if (childrenCore.Count == 0 || roomCore.IsDeckRoom)
        {
            return;
        }
        Transform roomShellT = PutCanvasM.GetTransformByCore(roomCore).parent;

        foreach (var childCore in childrenCore)
        {
            TouchMove tm = PutCanvasM.GetTouchMoveByCore(childCore);
            if (tm != null)
            {
                tm.m_OffsetGrid = tmParent.m_orgPosMapGrid - tm.m_orgPosMapGrid;
            }
            if (PutCanvasM.GetTransformByCore(childCore) != null)
            {
                Transform childShellT = PutCanvasM.GetTransformByCore(childCore).parent;
                childShellT.parent = roomShellT;
            }
        }
    }
Ejemplo n.º 2
0
    void BtnSetTransGate_OnClickEventHandler(UIButton sender)
    {
        SetBuildParaStart();
        List <CanvasCore> childrenCore = PutCanvasM.GetChildByCore(m_Core);

        if (childrenCore.Count == 0)
        {
#if UNITY_EDITOR_LOG
            NGUIUtil.DebugLog("房间内未检测到传送门,请调查!!!");
#endif
            return;
        }
        ShipPlan P = ShipPlanDC.GetCurShipPlan();
        if (P == null)
        {
            return;
        }
        foreach (var childCore in childrenCore)
        {
            TouchMove     tm      = PutCanvasM.GetTouchMoveByCore(childCore);
            BuildProperty lifeobj = tm.GetComponent <BuildProperty>();
            if (lifeobj != null && lifeobj.GetModeType() == 1605)
            {
                Building1605 b = lifeobj.GetLife() as Building1605;
                if (b != null)
                {
                    ShipPutInfo Info = P.GetShipBuildInfo(m_Core);
                    b.ShowTranGate(new Int2(Info.shipput_data0, Info.shipput_data1));
                }
            }
        }
    }
Ejemplo n.º 3
0
    static void BindStair(Int2 grid)
    {
        CanvasCore core = RoomMap.FindCanvasCore(grid, ShipBuildType.BuildRoom);

        if (core != null)
        {
            TouchMove tm = PutCanvasM.GetTouchMoveByCore(core);
            tm.MoveWithRoom(core);
        }
    }
Ejemplo n.º 4
0
    public static TouchMove GetTouchMoveByRoomGrid(RoomGrid rGrid, ShipBuildType type)
    {
        if (null == rGrid)
        {
            return(null);
        }
        List <CanvasCore> childCores = rGrid.GetOtherBuild();

        for (int i = 0; i < childCores.Count; i++)
        {
            CanvasCore curCore = childCores[i];
            if (curCore.m_type == type)
            {
                return(PutCanvasM.GetTouchMoveByCore(curCore));
            }
        }
        return(null);
    }
Ejemplo n.º 5
0
    void BtnDeleteSoldier_OnClickEventHandler(UIButton sender)
    {
        List <CanvasCore> childrenCore = PutCanvasM.GetChildByCore(m_Core);

        if (childrenCore.Count == 0)
        {
            return;
        }

        foreach (var childCore in childrenCore)
        {
            TouchMove tm = PutCanvasM.GetTouchMoveByCore(childCore);
            if (childCore.m_type == ShipBuildType.Soldier)
            {
                tm.DestroyShipBuild();
            }
        }
        PutCanvasM.ShowRoomGridUI(false);
    }
Ejemplo n.º 6
0
 public static void ClearNoLinkList()
 {
     if (PutCanvasM.SaveSuc)
     {
         return;
     }
     PutCanvasM.SaveSuc = true;
     if (null != s_listNoLinkPutRoomcores)
     {
         int nCoreCount = s_listNoLinkPutRoomcores.Count;
         int nCoreCnt   = 10;
         for (nCoreCnt = 0; nCoreCnt < nCoreCount; nCoreCnt++)
         {
             CanvasCore core = s_listNoLinkPutRoomcores[nCoreCnt];
             PutCanvasM.GetTouchMoveByCore(core).UnLoadEditEffect();
         }
         s_listNoLinkPutRoomcores.Clear();
     }
     if (null != s_listNoLinkPutDeckRoomcores)
     {
         int nCoreCount = s_listNoLinkPutDeckRoomcores.Count;
         int nCoreCnt   = 10;
         for (nCoreCnt = 0; nCoreCnt < nCoreCount; nCoreCnt++)
         {
             CanvasCore core = s_listNoLinkPutDeckRoomcores[nCoreCnt];
             PutCanvasM.GetTouchMoveByCore(core).UnLoadEditEffect();
         }
         s_listNoLinkPutRoomcores.Clear();
     }
     if (null != s_listNoLinkSolders)
     {
         int nCoreCount = s_listNoLinkSolders.Count;
         int nCoreCnt   = 10;
         for (nCoreCnt = 0; nCoreCnt < nCoreCount; nCoreCnt++)
         {
             CanvasCore core = s_listNoLinkSolders[nCoreCnt];
             PutCanvasM.GetTouchMoveByCore(core).UnLoadEditEffect();
         }
         s_listNoLinkSolders.Clear();
     }
     return;
 }
Ejemplo n.º 7
0
    public void UpdateChildmGridWhenUp()
    {
        List <CanvasCore> childrenCore = PutCanvasM.GetChildByCore(m_Core);

        if (childrenCore == null || childrenCore.Count == 0)
        {
            return;
        }
        if (m_tStart == null)
        {
            return;
        }
        foreach (var childCore in childrenCore)
        {
            TouchMove tm = PutCanvasM.GetTouchMoveByCore(childCore);
            if (tm)
            {
                tm.m_posMapGrid    = m_posMapGrid - tm.m_OffsetGrid;
                tm.m_orgPosMapGrid = tm.m_posMapGrid;
            }
        }
    }
Ejemplo n.º 8
0
    /// <summary>
    /// 移动房间完毕后,解除房间内对象的父子关系
    /// </summary>
    public void LeaveRoom()
    {
        if (m_Core.m_type != ShipBuildType.BuildRoom)
        {
            return;
        }
        List <CanvasCore> childrenCore = PutCanvasM.GetChildByCore(m_Core);

        if (childrenCore.Count == 0)
        {
            return;
        }
        if (m_tStart == null)
        {
            return;
        }
        foreach (var childCore in childrenCore)
        {
            TouchMove tm = PutCanvasM.GetTouchMoveByCore(childCore);
            //tm.m_bCanOperate = true;
            Transform childShellT = PutCanvasM.GetTransformByCore(childCore).parent;
            childShellT.parent = m_tStart;
        }
    }
Ejemplo n.º 9
0
 /// <summary>
 /// 房间置换
 /// </summary>
 void DoRoomExchange(Int2 mapGrid)
 {
     if (m_Core.m_type == ShipBuildType.BuildStair)
     {
         return;
     }
     if (!m_Core.IsNewCreate)
     {
         TouchMove tmCurExchange = m_ExchangeTouch;
         if (null != tmCurExchange)
         {
             if (m_ExchangeTouch.MyCore().IsDeckRoom == MyCore().IsDeckRoom&& m_ExchangeTouch.MyCore().m_type == ShipBuildType.BuildRoom && MyCore().m_type == ShipBuildType.BuildRoom)
             {
                 PutCanvasM.ExchangeRoom(m_ExchangeTouch.MyCore(), m_ExchangeTouch.m_orgPosMapGrid, MyCore(), m_orgPosMapGrid);
             }
             else
             {
                 m_ExchangeTouch.MoveShipBuilding(m_ExchangeTouch.m_orgPosMapGrid);
                 MoveShipBuilding(m_orgPosMapGrid);
             }
         }
         CanvasCore core = RoomMap.FindCanvasCore(mapGrid, m_Core.m_type);
         if (core != null && core.m_ID != m_Core.m_ID)
         {
             bool b = PutCanvasM.CheckExchange(m_Core, core);
             if (b)
             {
                 TouchMove tmNew = PutCanvasM.GetTouchMoveByCore(core);
                 if (tmNew != null)
                 {
                     m_ExchangeTouch = tmNew;
                     if (m_ExchangeTouch.MyCore().IsDeckRoom == MyCore().IsDeckRoom&& m_ExchangeTouch.MyCore().m_type == ShipBuildType.BuildRoom && MyCore().m_type == ShipBuildType.BuildRoom)
                     {
                         PutCanvasM.ExchangeRoom(m_ExchangeTouch.MyCore(), m_orgPosMapGrid, MyCore(), m_posMapGrid);
                     }
                     else
                     {
                         m_ExchangeTouch.MoveShipBuilding(m_orgPosMapGrid);
                         MoveShipBuilding(m_posMapGrid);
                     }
                     if (m_ExchangeTouch != tmCurExchange)
                     {
                         m_ExchangeTouch.ExchangeAnimation(m_orgPosMapGrid);
                     }
                 }
             }
             else
             {
                 m_ExchangeTouch = null;
             }
         }
         else
         {
             m_ExchangeTouch = null;
         }
         if (null != tmCurExchange && m_ExchangeTouch != tmCurExchange)
         {
             //MoveShipBuilding (m_posMapGrid);
             tmCurExchange.MoveShipBuilding(tmCurExchange.m_orgPosMapGrid);
             tmCurExchange.ResetExchangePos();
         }
     }
 }
Ejemplo n.º 10
0
    void OnMouseDown()
    {
        if (PutCanvasM.CanOperate == false)
        {
            return;
        }

        RaycastHit hit;

        if (WndManager.IsHitNGUI(out hit))//当点击到UI时不做处理
        {
            return;
        }
        if (Input.touchCount >= 2)
        {
            return;
        }
        m_bMouseDown       = true;
        m_bLongTouch       = false;
        m_bTouchMoveChange = true;
        m_fMouseDownTime   = Time.time;
        m_vtotalmouseDelta = Vector2.zero;
        m_vlastFirstTouch  = GetTouchPos(0);
        m_isDrag           = false;
        if (SystemInfo.deviceType == DeviceType.Desktop)
        {
            m_v3MouseTouchDown = Input.mousePosition;
        }
        else
        {
            m_v3MouseTouchDown = Input.GetTouch(0).position;
        }

        //获取按下时画布格子
        Vector3 m_v3TouchScreenPos = new Vector3(m_v3MouseTouchDown.x, m_v3MouseTouchDown.y, -Camera.main.transform.position.z);
        Vector3 m_v3TouchWorldPos  = Camera.main.ScreenToWorldPoint(m_v3TouchScreenPos);
        Vector3 v3dLocalPos        = BattleEnvironmentM.World2LocalPos(m_v3TouchWorldPos);

        m_roomGridTouchDown = RoomMap.FindRoomGrid(v3dLocalPos);
        if (m_roomGridTouchDown == null)
        {
            return;
        }
        m_curClickType = RoomMap.PickupShipBuildType(m_roomGridTouchDown, v3dLocalPos, m_roomGridTouchDown.mPosRoomGrid.Layer);

        CanvasCore buildRoomCoreTouchDown = m_roomGridTouchDown.GetBuildRoom();

        if (TouchMove.g_bSetParaing == true)
        {
            return;
        }

        TouchMove curTouchMove = TouchMoveManager.GetCurTouchMove();

        if (null != curTouchMove)
        {
            //如果当前选中的是房间,新选中的不管是什么都不做变更
            //如果当前选中的不是房间,但是新选中的对象和当前选中的一样则也不变量。
            if (curTouchMove.IsContainsRoomGrid(m_roomGridTouchDown))
            {
                TouchMove selNewTouchMov = PutCanvasM.GetTouchMoveByRoomGrid(m_roomGridTouchDown, m_curClickType);
                if (curTouchMove.MyCore().m_type == ShipBuildType.BuildRoom ||
                    selNewTouchMov != null && selNewTouchMov == curTouchMove)
                {
                    curTouchMove.PlayEditSelectAnimationEnd();                                     //恢复上个房间内陷阱/角色 动画
                    curTouchMove.OnMouseDown();
                    m_bTouchMoveChange = false;
                }
            }
            PutCanvasM.ClearNoLinkList();
        }
        else
        {
            //判断选中物件是否在上次保存失败的物件上,如果是则直接选择
            bool bInNoLinkList = false;
            if (buildRoomCoreTouchDown != null)
            {
                TouchMove selNewTouchMov = PutCanvasM.GetTouchMoveByCore(buildRoomCoreTouchDown);
                if (null == selNewTouchMov)
                {
                    List <CanvasCore> childCores = m_roomGridTouchDown.GetOtherBuild();
                    for (int i = 0; i < childCores.Count; i++)
                    {
                        selNewTouchMov = PutCanvasM.GetTouchMoveByCore(childCores[i]);
                        break;
                    }
                }
                if (null != selNewTouchMov && PutCanvasM.NoLinkListContain(selNewTouchMov.MyCore()))
                {
                    PutCanvasM.ClearNoLinkList();
                    TouchMoveManager.SetCurTouchMove(selNewTouchMov);
                    selNewTouchMov.PlayEditSelectAnimationEnd();                     //恢复上个房间内陷阱/角色 动画
                    selNewTouchMov.OnMouseDown();
                    m_bTouchMoveChange = false;
                    bInNoLinkList      = true;
                }
            }
            if (bInNoLinkList == false)
            {
                PutCanvasM.ClearNoLinkList();
            }
        }
    }
Ejemplo n.º 11
0
    void OnMouseUp()
    {
        if (!m_bMouseDown || PutCanvasM.CanOperate == false)
        {
            return;
        }
        m_bMouseDown = false;
        bool bCancelSel = false;
//        MainCameraM.s_Instance.EnableDrag(true);
        TouchMove selNewTouchMov = null;

        if (TouchMove.g_bSetParaing == true)
        {
            SetPara();
            return;
        }
        if (m_bTouchMoveChange)
        {
            if (m_roomGridTouchDown != null)
            {
                bCancelSel     = true;
                selNewTouchMov = PutCanvasM.GetTouchMoveByRoomGrid(m_roomGridTouchDown, m_curClickType);
                if (null == selNewTouchMov)
                {
                    CanvasCore buildRoomCoreTouchDown = m_roomGridTouchDown.GetBuildRoom();
                    selNewTouchMov = PutCanvasM.GetTouchMoveByCore(buildRoomCoreTouchDown);
                }
                if (selNewTouchMov)
                {
                    CanvasCore selCanvasCore = selNewTouchMov.MyCore();
                    bCancelSel = false;
                    TouchMove selOldeTouchMove = TouchMoveManager.GetCurTouchMove();
                    selNewTouchMov.PlayEditSelectAnimation();//点选时播放房间内陷阱动画
                    TouchMoveManager.SetCurTouchMove(selNewTouchMov);
                    selNewTouchMov.MoveWithRoom(selCanvasCore);
                }
                if (bCancelSel)
                {
                    TouchMoveManager.SetCurTouchMove(null);
                }
            }
        }
        else
        {
            selNewTouchMov = TouchMoveManager.GetCurTouchMove();
        }
        if (selNewTouchMov)
        {
            if (selNewTouchMov.MoveBuildUp())
            {
                //TouchMoveManager.ShowCanvas(false);
                PutCanvasM.ShowRoomGridUI(true);
            }
            else
            {
                PutCanvasM.ShowRoomGridUI(true);
            }
        }
        else
        {
            TouchMoveManager.SetCurTouchMove(null);
            //TouchMoveManager.ShowCanvas(false);
            PutCanvasM.ShowRoomGridUI(true);
        }
    }
Ejemplo n.º 12
0
 void Update()
 {
     if (MainCameraM.s_Instance.CheckIsZooming() || MainCameraM.s_Instance.CheckCameraMove())
     {
         PutCanvasM.ShowRoomGridUI(false);
     }
     if (PutCanvasM.CanOperate == false)
     {
         return;
     }
     if (Input.touchCount >= 2)
     {
         PutCanvasM.ShowRoomGridUI(false);
         m_bTouchMoveChange  = true;
         m_roomGridTouchDown = null;
     }
     // MainCameraM.s_Instance.EnableDrag(true);
     if (m_bMouseDown)
     {
         if (!m_isDrag)
         {
             float click = mouseClickThreshold;
             click *= click;
             m_vtotalmouseDelta += m_vlastFirstTouch - GetTouchPos(0);
             m_vlastFirstTouch   = GetTouchPos(0);
             m_mag = m_vtotalmouseDelta.sqrMagnitude;
             if (m_mag > click)
             {
                 m_isDrag = true;
             }
             else
             {
                 //没有发生移动地图 或 没有发生长按  要判定
                 if (!m_isDrag && !m_bLongTouch)
                 {
                     //长按判定
                     if (!m_isDrag && m_roomGridTouchDown != null)
                     {
                         if (Time.time - m_fMouseDownTime > 0.5f)
                         {
                             m_bLongTouch = true;
                         }
                         //没有发生移动地图,但有发生长按,则更换选中房间,并将m_bTouchMoveChange=false
                         if (m_bLongTouch)
                         {
                             CanvasCore buildRoomCoreTouchDown = m_roomGridTouchDown.GetBuildRoom();
                             TouchMove  selNewTouchMov         = PutCanvasM.GetTouchMoveByCore(buildRoomCoreTouchDown);
                             TouchMove  selOldeTouchMove       = TouchMoveManager.GetCurTouchMove();
                             if (selNewTouchMov != null && selNewTouchMov != selOldeTouchMove)
                             {
                                 m_bTouchMoveChange = false;
                                 TouchMoveManager.SetCurTouchMove(selNewTouchMov);
                                 selNewTouchMov.OnMouseDown();
                             }
                         }
                     }
                 }
             }
         }
         if (m_isDrag)
         {
             //按下是选中的是原选中房间,则直接移动该房间
             //长按时会自动将最新选中房间,并将m_bTouchMoveChange设置为false
             if (!m_bTouchMoveChange)
             {
                 MainCameraM.s_Instance.EnableDrag(false);
                 TouchMove curTouchMove = TouchMoveManager.GetCurTouchMove();
                 if (null != curTouchMove)
                 {
                     PutCanvasM.ShowRoomGridUI(false);
                     //TouchMoveManager.ShowCanvas(true);
                     PutCanvasM.ShowRoomGridUI(false);
                     curTouchMove.MoveBuild();
                 }
             }
         }
     }
 }
Ejemplo n.º 13
0
    public static bool CheckSave()
    {
        PutCanvasM.StopEdit();

        List <TouchMove> lOutShape = CheckBuildOutOfShape();

        if (lOutShape.Count > 0)
        {
            NGUIUtil.ShowTipWndByKey <string>("10000204");
            foreach (TouchMove item in lOutShape)
            {
                item.LoadEditEffect(TouchMoveState.CannotEdit);
            }
            PutCanvasM.SaveSuc = false;
            return(PutCanvasM.SaveSuc);
        }

        List <TouchMove> lDeckBuild = CheckDeckRoomInMaxLayer();

        if (lDeckBuild.Count > 0)
        {
            NGUIUtil.ShowTipWndByKey <string>("10000206");
            foreach (TouchMove item in lDeckBuild)
            {
                item.LoadEditEffect(TouchMoveState.CannotEdit);
            }
            PutCanvasM.SaveSuc = false;
            return(PutCanvasM.SaveSuc);
        }

        s_listNoLinkPutRoomcores = PutCanvasM.GetNoLinkPutRoom();
        if (s_listNoLinkPutRoomcores.Count > 0)
        {
            //TouchMoveManager.ShowCanvas(true);
            TouchMoveManager.SetCanPutArea(ShipBuildType.BuildRoom, false);
            NGUIUtil.ShowTipWndByKey <string>("30000013");
            int nCoreCount = s_listNoLinkPutRoomcores.Count;
            int nCoreCnt   = 10;
            for (nCoreCnt = 0; nCoreCnt < nCoreCount; nCoreCnt++)
            {
                CanvasCore core = s_listNoLinkPutRoomcores[nCoreCnt];
                PutCanvasM.GetTouchMoveByCore(core).LoadEditEffect(TouchMoveState.CannotEdit);
            }
            PutCanvasM.SaveSuc = false;
            return(PutCanvasM.SaveSuc);
        }
        s_listNoLinkPutDeckRoomcores = PutCanvasM.GetNoLinkPutDeckRoom();
        if (s_listNoLinkPutDeckRoomcores.Count > 0)
        {
            //TouchMoveManager.ShowCanvas(true);
            TouchMoveManager.SetCanPutArea(ShipBuildType.BuildRoom, true);
            NGUIUtil.ShowTipWndByKey <string>("30000016");
            int nCoreCount = s_listNoLinkPutDeckRoomcores.Count;
            int nCoreCnt   = 10;
            for (nCoreCnt = 0; nCoreCnt < nCoreCount; nCoreCnt++)
            {
                CanvasCore core = s_listNoLinkPutDeckRoomcores[nCoreCnt];
                PutCanvasM.GetTouchMoveByCore(core).LoadEditEffect(TouchMoveState.CannotEdit);
            }
            PutCanvasM.SaveSuc = false;
            return(PutCanvasM.SaveSuc);
        }
        s_listNoLinkSolders = PutCanvasM.GetNoLinkSolder();
        if (s_listNoLinkSolders.Count > 0)
        {
            //TouchMoveManager.ShowCanvas(true);
            TouchMoveManager.SetCanPutArea(ShipBuildType.Soldier, false);
            NGUIUtil.ShowTipWndByKey <string>("30000015");
            int nCoreCount = s_listNoLinkSolders.Count;
            int nCoreCnt   = 10;
            for (nCoreCnt = 0; nCoreCnt < nCoreCount; nCoreCnt++)
            {
                CanvasCore core = s_listNoLinkSolders[nCoreCnt];
                PutCanvasM.GetTouchMoveByCore(core).LoadEditEffect(TouchMoveState.CannotEdit);
            }
            PutCanvasM.SaveSuc = false;
            return(PutCanvasM.SaveSuc);
        }


        return(PutCanvasM.SaveSuc);
    }
Ejemplo n.º 14
0
    /// <summary>
    /// 确认房间是否可置换
    /// </summary>
    public static bool CheckExchange(CanvasCore coreSrc, CanvasCore coreExchange)
    {
        if (coreSrc == null || coreExchange == null)
        {
            return(false);
        }
        if (coreSrc.m_ID == coreExchange.m_ID)
        {
            return(false);
        }
        if (coreSrc.m_type == ShipBuildType.BuildStair)
        {
            return(false);
        }
        if (coreSrc.m_type != coreExchange.m_type)
        {
            return(false);
        }
        if (coreSrc.Data == null || coreExchange.Data == null)
        {
            return(false);
        }
        if (coreSrc.m_type == ShipBuildType.Soldier)
        {
            return(true);
        }
        if (coreSrc.Data.m_DeckRoom != coreExchange.Data.m_DeckRoom)
        {
            return(false);
        }
        TouchMove tmSrc      = PutCanvasM.GetTouchMoveByCore(coreSrc);
        TouchMove tmExchange = PutCanvasM.GetTouchMoveByCore(coreExchange);

        if (tmSrc == null || tmExchange == null)
        {
            return(false);
        }
        if (tmSrc.m_orgPosMapGrid.Layer + tmExchange.MyCore().GetSize().Layer - 1 >= RoomMap.DeckRoomTopLayer)
        {
            return(false);
        }

        List <RoomGrid> listRoomGridSrc       = RoomMap.GetPutRoomGrid(coreSrc);
        List <RoomGrid> listMovetoRoomGridSrc = RoomMap.GetMovetoRoomGrid(coreSrc, tmSrc.m_posMapGrid);

        if (listRoomGridSrc.Count != listMovetoRoomGridSrc.Count)
        {
            return(false);
        }
        List <RoomGrid> listRoomGridExchange     = RoomMap.GetPutRoomGrid(coreExchange);
        List <RoomGrid> listMoveRoomGridExchange = RoomMap.GetMovetoRoomGrid(coreExchange, tmSrc.m_orgPosMapGrid);

        if (listRoomGridExchange.Count != listMoveRoomGridExchange.Count)
        {
            return(false);
        }

        int nMoveToCount = listMovetoRoomGridSrc.Count;
        int nMoveCnt     = 0;

        for (nMoveCnt = 0; nMoveCnt < nMoveToCount; nMoveCnt++)
        {
            RoomGrid roomGrid = listMovetoRoomGridSrc[nMoveCnt];
            if (listMoveRoomGridExchange.Contains(roomGrid))
            {
                return(false);
            }
            CanvasCore buildCore = roomGrid.GetBuildRoom();
            if (buildCore.m_ID != RoomGrid.EMPTYGRIDID && buildCore.m_ID != coreSrc.m_ID && buildCore.m_ID != coreExchange.m_ID)
            {
                return(false);
            }
            if (buildCore.m_ID == RoomGrid.EMPTYGRIDID)
            {
                List <CanvasCore> childrenCore = roomGrid.GetOtherBuild();
                foreach (CanvasCore childCore in childrenCore)
                {
                    if (childCore.m_type == ShipBuildType.Soldier)
                    {
                        return(false);
                    }
                }
            }
        }
        nMoveToCount = listMoveRoomGridExchange.Count;
        for (nMoveCnt = 0; nMoveCnt < nMoveToCount; nMoveCnt++)
        {
            RoomGrid roomGrid = listMoveRoomGridExchange[nMoveCnt];
            if (listMovetoRoomGridSrc.Contains(roomGrid))
            {
                return(false);
            }
            CanvasCore buildCore = roomGrid.GetBuildRoom();
            if (buildCore.m_ID != RoomGrid.EMPTYGRIDID && buildCore.m_ID != coreExchange.m_ID && buildCore.m_ID != coreSrc.m_ID)
            {
                return(false);
            }
        }

        return(true);//ShipPutInfo.CheckExchangeRoom(core1.Data ,core2.Data);
    }