コード例 #1
0
ファイル: ShipCanvasWnd.cs プロジェクト: 741645596/batgame
    void SaveSuccecd()
    {
        TouchMoveManager.ShowCanvas(false);
        MainCameraM.s_Instance.ResetCameraDataByHaven();
        MainCameraM.s_Instance.EnableOthOn(false);
        MainCameraM.s_Instance.SetCameraLimitParam(MainCameraM.s_reaLimitPyramidHavenView);
        MainCameraM.s_Instance.AutoMoveTo(MainCameraM.s_vHavenViewBoatviewCamPos, 0.3f);
        MainCameraM.s_Instance.EnableDrag(false);

        Life.Environment = LifeEnvironment.View;
        PutCanvasM.PutDownNewBuild();
        TouchMoveManager.DoTransgatePoint();
        m_IsSaving = true;

        if (MyHead.BtnReturn)
        {
            MyHead.BtnReturn.gameObject.SetActive(false);
        }
        if (MyHead.BtnNext)
        {
            MyHead.BtnNext.gameObject.SetActive(false);
        }
        CangKuWnd wnd = WndManager.FindDialog <CangKuWnd>();

        if (wnd)
        {
            wnd.gameObject.SetActive(false);
        }

        PutCanvasM.CanOperate = false;
        PutCanvasM.ShowRoomGridUI(false);
        TouchMoveManager.SetCurTouchMove(null);
        MainCameraM.s_Instance.EnableDrag(false);
        ShipPlan P = ShipPlanDC.GetCurShipPlan();

        P.CreateCanvans();
        GenerateShip.GenerateShipsWithAni();
    }
コード例 #2
0
    /// <summary>
    /// 销毁整个对象。
    /// </summary>
    public void DestroyShipBuild()
    {
        PutERR Err = PutERR.ERR_NORMAL;

        if (PutCanvasM.CheckCanRemove(m_Core, ref Err) == false)
        {
            if (Err == PutERR.ERR_NOLink)
            {
                NGUIUtil.ShowTipWndByKey("88800009", 1.0f);
            }
            else if (Err == PutERR.ERR_HaveChild)
            {
                NGUIUtil.ShowTipWndByKey("88800010", 1.0f);
            }
            else
            {
                NGUIUtil.ShowTipWndByKey("88800011", 1.0f);
            }
            return;
        }
        if (m_Core.m_type == ShipBuildType.BuildStair)
        {
            //导致楼梯不删除的原因
            BuildProperty building = GetComponent <BuildProperty>();
            if (building != null)
            {
                GameObject skin = building.m_goAllBodySkin[0];
                if (skin != null)
                {
                    GameObjectActionExcute    gae  = skin.AddComponent <GameObjectActionExcute>();
                    GameObjectActionColorFade fade = new GameObjectActionColorFade(false, 1f);
                    fade.m_complete = DeleteStair;//删除楼梯表现回调
                    gae.AddAction(fade);
                }
            }
        }
        if (m_Building != null)
        {
            if (m_Core.Data.IsGoldBuild())
            {
                NGUIUtil.ShowTipWndByKey("88800012", 1.0f);
                return;
            }
        }
        MoveWithRoom(MyCore());
        TouchMoveManager.DeleteShipBuild(m_Core);
        CangKuWnd wnd = WndManager.GetDialog <CangKuWnd>();

        PutCanvasM.RemoveBuildRoom(m_Core);
        CreateStair(m_Core);
        GenerateDeck();
        TouchMoveManager.DoTransgatePoint();
        if (m_tTarget != null)
        {
            if (m_Core.m_type != ShipBuildType.BuildStair)
            {
                FlyToCangKuDelete(m_tTarget.gameObject, false);
                if (wnd)
                {
                    wnd.RefreshTrapUI();
                }
            }
        }
        //Destroy(GoClickBuildBtns);
    }