예제 #1
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);
    }