コード例 #1
0
ファイル: InterfaceMgr.cs プロジェクト: qxhusunren/test_ui1
    void Start()
    {
        _instance = this.GetComponent<InterfaceMgr> ();
        creatWinData (TEST);

        winLayer = winLayerObj.transform;
    }
コード例 #2
0
 public override void onClosed()
 {
     InterfaceMgr.getInstance().showLoadingBg(false);
     base.onClosed();
 }
コード例 #3
0
 void onClose(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.LOTTERY_CLOUD);
     InterfaceMgr.getInstance().open(InterfaceMgr.LOTTERY);
 }
コード例 #4
0
ファイル: RewardItemTip.cs プロジェクト: atom-chen/rongyaojt
 internal void ctor > b__4_0(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_MINITIP);
 }
コード例 #5
0
 void onClose(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_WIBG_SKIN);
 }
コード例 #6
0
 void onClose(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_EXCHANGE);
 }
コード例 #7
0
        void onViewAvatar_Change(Variant v)
        {
            //debug.Log("有人在我旁边换装了!!!~~~~~~~~~~~~~~~~~~~~~~~~");
            //debug.Log("有人在我旁边换装了!!!~~~~~~~~~~~~~~~~~~~~~~~~");
            //debug.Log("有人在我旁边换装了!!!~~~~~~~~~~~~~~~~~~~~~~~~");

            debug.Log("周围人状态变化:" + v.dump());
            uint iid = v["iid"];

            if (v.ContainsKey("serial_kp"))
            {
                if (v["iid"] == PlayerModel.getInstance().iid)
                {
                    if (SelfRole._inst != null)
                    {
                        PlayerModel.getInstance().serial = v["serial_kp"];
                        SelfRole._inst.serial = v["serial_kp"];
                        PlayerNameUIMgr.getInstance().refreserialCount(SelfRole._inst, v["serial_kp"]);
                    }
                }
            }
            if (v.ContainsKey("strike_back_tm"))
            {
                //反击buff时间戳玩家自己
                if (v["iid"] == PlayerModel.getInstance().iid)
                {
                    if (v.ContainsKey("strike_back_tm"))
                    {
                        if (SelfRole._inst != null)
                        {
                            SelfRole._inst.hidbacktime = v["strike_back_tm"];
                            if (v["strike_back_tm"] == 0)
                            {
                                PlayerModel.getInstance().hitBack = 0;
                                PlayerNameUIMgr.getInstance().refresHitback(SelfRole._inst, 0, true);
                            }
                            else
                            {
                                PlayerModel.getInstance().hitBack = SelfRole._inst.hidbacktime - (uint)NetClient.instance.CurServerTimeStamp;
                                PlayerNameUIMgr.getInstance().refresHitback(SelfRole._inst, (int)(SelfRole._inst.hidbacktime - (uint)NetClient.instance.CurServerTimeStamp), true);
                            }
                            //debug.Log("时间1:" + SelfRole._inst.hidbacktime + "时间2:" + (uint)NetClient.instance.CurServerTimeStamp);
                            //debug.Log("玩家自己受到时间:" + (int)(SelfRole._inst.hidbacktime - (uint)NetClient.instance.CurServerTimeStamp));
                        }
                    }
                }
                else
                {
                    OtherPlayerMgr._inst.refreshPlayerInfo(v);
                }
            }
            else
            {
                OtherPlayerMgr._inst.refreshPlayerInfo(v, false);
            }


            if (v.ContainsKey("title_sign"))
            {
                if (v["iid"] != PlayerModel.getInstance().iid)
                {
                    int  title_sign = v["title_sign"]._int;
                    uint cid        = v["cid"]._uint;
                    bool ishow      = false;
                    if (v.ContainsKey("title_sign_display"))
                    {
                        ishow = v["title_sign_display"];
                    }

                    PlayerNameUIMgr.getInstance().SetOtherTitle(cid, title_sign, ishow);
                }
            }

            //人物修改名字

            if (v.ContainsKey("name"))
            {
                if (v["iid"] == PlayerModel.getInstance().iid)
                {
                    PlayerModel.getInstance().name = v["name"];

                    if (SelfRole._inst != null)
                    {
                        SelfRole._inst.roleName = v["name"];

                        PlayerNameUIMgr.getInstance().refresName(SelfRole._inst);

                        InterfaceMgr.getInstance().close(InterfaceMgr.A3_CHANGE_NAME);
                    }
                }
                else
                {
                    ProfessionRole otherRole = OtherPlayerMgr._inst.GetOtherPlayer(v["iid"]);

                    otherRole.roleName = v["name"];

                    PlayerNameUIMgr.getInstance().refresName(otherRole);
                }
            }
        }
コード例 #8
0
 void onCloseMap(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_LITEMINIBASEMAP2);
 }
コード例 #9
0
 private void onBtnCloseClick(GameObject go)
 {
     this.Toclose = true;
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_FIRESTRECHARGEAWARD);
 }
コード例 #10
0
 private void onBtnRechargeClick(GameObject go)
 {
     InterfaceMgr.getInstance().open(InterfaceMgr.A3_RECHARGE, null, false);
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_FIRESTRECHARGEAWARD);
 }
コード例 #11
0
 public override void onClosed()
 {
     InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_NORMAL);
     this.disposeAvatar();
     InterfaceMgr.getInstance().itemToWin(this.Toclose, this.uiName);
 }
コード例 #12
0
 //关闭
 private void OnCloseClick(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_HONOR);
 }
コード例 #13
0
 void wait_close()
 {
     b_close = true;
     //关闭第一次预加载的ui
     InterfaceMgr.getInstance().closeUiFirstTime();
 }
コード例 #14
0
 override public void onClosed()
 {
     welfareProxy.getInstance().removeEventListener(welfareProxy.SHOWDAILYRECHARGE, onShowDaily);
     InterfaceMgr.getInstance().floatUI.localScale = Vector3.one;
 }
コード例 #15
0
 internal void <init> b__18_3(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.TRANSMIT_PANEL);
 }
コード例 #16
0
        //public void refresh()
        //{
        //    int count = a3_EquipModel.getInstance().active_eqp.Count;
        //    if (count <= 0)
        //    {
        //        isthis.gameObject.SetActive(false);
        //        return;
        //    }
        //    isthis.gameObject.SetActive(true);
        //    isthis.transform.SetParent(tipObj[count].transform.FindChild("it"),false);
        //    isthis.localPosition = Vector3.zero;
        //}

        void onClose(GameObject go)
        {
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_LHLIANJIE);
        }
コード例 #17
0
 private void onClose(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_STORE);
 }
コード例 #18
0
        void onSelfAttchange(Variant msgData)
        {
            debug.Log("属性变换" + msgData.dump());
            if (msgData.ContainsKey("mpleft"))
            {
                PlayerModel.getInstance().modMp(msgData["mpleft"]);
            }
            if (msgData.ContainsKey("hp"))
            {
                PlayerModel.getInstance().modHp(msgData["hp"]);
            }

            if (msgData.ContainsKey("vipcard_life"))
            {
                if (msgData["vipcard_life"] == 1)
                {
                    A3_signProxy.getInstance().yueka = 2;
                }
                else
                {
                    if (msgData.ContainsKey("vipcard_month_end_time"))
                    {
                        if (msgData["vipcard_month_end_time"] <= NetClient.instance.CurServerTimeStamp)
                        {
                            A3_signProxy.getInstance().yueka = 0;
                        }
                        else
                        {
                            A3_signProxy.getInstance().yueka = 1;
                        }
                    }
                }
                if (a3_Recharge.isshow)
                {
                    a3_Recharge.isshow.refre_recharge();
                }
                A3_signProxy.getInstance().sendproxy(1, 0);
            }

            if (msgData.ContainsKey("first_double"))
            {
                foreach (int info in msgData["first_double"]._arr)
                {
                    if (RechargeModel.getInstance().rechargeMenu.ContainsKey(info))
                    {
                        if (RechargeModel.getInstance().rechargeMenu[info].first_double >= 1)
                        {
                            if (!RechargeModel.getInstance().firsted.Contains(info))
                            {
                                RechargeModel.getInstance().firsted.Add(info);
                            }
                        }
                        if (a3_Recharge.isshow)
                        {
                            a3_Recharge.isshow.refre_recharge();
                        }
                    }
                }
            }

            PlayerModel.getInstance().attrChangeCheck(msgData);
            PlayerModel.getInstance().attPointCheck(msgData);
            if (msgData.ContainsKey("max_hp"))
            {
                InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modHp", "model/PlayerModel", PlayerModel.getInstance().hp, msgData["max_hp"]._int);
            }
            if (msgData.ContainsKey("max_mp"))
            {
                InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modMp", "model/PlayerModel", PlayerModel.getInstance().mp, msgData["max_mp"]._int);
            }
        }
コード例 #19
0
        public void btn_go(int i)
        {
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_ACTIVEDEGREE);
            switch (i)
            {
            //拍卖上架商品
            case 1:
                // Variant conf = SvrMapConfig.instance.getSingleMapConf((uint)GRMap.instance.m_nCurMapID);

                //原来只在主城拍卖,现在改掉了
                //if (GRMap.instance.m_nCurMapID != 10)
                //{
                //    flytxt.instance.fly(ContMgr.getCont("a3_activeDegree_please"));
                //}
                //else
                //{
                SelfRole.fsm.ChangeState(StateIdle.Instance);


                ArrayList dlt = new ArrayList();
                dlt.Add(1);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_AUCTION, dlt);
                // }
                break;

            //材料副本
            case 2:
                ArrayList dat1 = new ArrayList();
                dat1.Add(0);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_COUNTERPART, dat1);
                break;

            //魔炼之地
            case 3:
                ArrayList dl = new ArrayList();
                dl.Add("mlzd");
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_ACTIVE, dl);
                break;

            //金币副本
            case 4:
                ArrayList dat2 = new ArrayList();
                dat2.Add(0);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_COUNTERPART, dat2);
                break;

            //经验副本
            case 5:
                ArrayList dat3 = new ArrayList();
                dat3.Add(0);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_COUNTERPART, dat3);
                break;

            //击杀野外boss
            case 6:
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_ELITEMON);
                break;

            //强化装备
            case 7:
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_EQUIP);
                break;

            //托维尔墓穴
            case 8:
                ArrayList dat = new ArrayList();
                dat.Add(1);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_COUNTERPART, dat);
                break;

            //占卜
            case 9:
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_LOTTERY);
                break;

            //驯龙者的末日
            case 10:
                ArrayList dat10 = new ArrayList();
                dat10.Add(1);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_COUNTERPART, dat10);
                break;

            //血色丛林
            case 11:
                ArrayList dat11 = new ArrayList();
                dat11.Add(1);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_COUNTERPART, dat11);
                break;

            //兽灵秘境
            case 12:
                ArrayList dl12 = new ArrayList();
                dl12.Add("summonpark");
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_ACTIVE, dl12);
                break;
            }
        }
コード例 #20
0
        void onLvlUp(Variant msgData)
        {
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.function_open(a3_liteMinimap.instance.fun_i);
            }
            //NetClient.instance.dispatchEvent(
            //    GameEvent.Create(GAME_EVENT.ON_LVL_UP, this, msgData)
            //);
            //if (msgData.ContainsKey("pinfo"))
            //{
            //    NetClient.instance.dispatchEvent(
            //        GameEvent.Create(GAME_EVENT.R_PLAYER_INFO_CHANGED, this, null)
            //    );
            //    NetClient.instance.dispatchEvent(
            //        GameEvent.Create(GAME_EVENT.PLAYER_INFO_CHANGED, this, null)
            //    );
            //}

            //Variant plyInfo = new Variant();

            //NetClient.instance.dispatchEvent(
            //        GameEvent.Create(GAME_EVENT.MODIFY_TEAMMATE_DATA, this, msgData["lvlshare"])
            //    );
            debug.Log("收到升级或者转生的协议........." + msgData.dump());
            if (msgData.ContainsKey("cid"))
            {
                if (msgData["cid"] != PlayerModel.getInstance().cid)
                {
                    if (OtherPlayerMgr._inst != null && OtherPlayerMgr._inst.m_mapOtherPlayer.Count > 0)
                    {
                        if (OtherPlayerMgr._inst.m_mapOtherPlayer.ContainsKey(msgData["iid"]))
                        {
                            OtherPlayerMgr._inst.m_mapOtherPlayer[msgData["iid"]].zhuan = msgData["zhuan"];
                        }
                    }
                    //点击的角色在你身边升到1转以上了
                    if (SelfRole._inst != null && SelfRole._inst.m_LockRole != null && SelfRole._inst.m_LockRole.m_unIID == msgData["iid"])
                    {
                        PkmodelAdmin.RefreshShow(SelfRole._inst.m_LockRole, true);
                    }
                    //   // (SelfRole._inst.m_LockRole as ProfessionRole).lvl = msgData["lvl"];
                    //    //(SelfRole._inst.m_LockRole as ProfessionRole).zhuan= msgData["zhuan"];
                }
                else
                {
                    PlayerModel.getInstance().lvUp(msgData);
                    dispatchEvent(GameEvent.Create(EVENT_SELF_ON_LV_CHANGE, this, msgData));
                    if (msgData.ContainsKey("pinfo"))
                    {
                        InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modExp", "model/PlayerModel", (uint)msgData["pinfo"]["exp"]);
                    }
                    if (msgData.ContainsKey("mod_exp"))
                    {
                        flytxt.instance.fly("EXP+" + msgData["mod_exp"], 3);
                    }
                }
            }
            if (a3_QHmaster.instance != null)
            {
                a3_QHmaster.instance.refreshDashi();
            }
            dispatchEvent(GameEvent.Create(EVENT_ON_LV_CHANGE, this, msgData));
            ResetLvLProxy.getInstance().resetLvL();
        }
コード例 #21
0
 public override void onClosed()
 {
     InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_NORMAL);
     GRMap.GAME_CAMERA.SetActive(true);
 }
コード例 #22
0
 private void onclose(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_FUNCTIONBAR);
 }
コード例 #23
0
ファイル: login.cs プロジェクト: swordandhonor056/client_code
        private int m_nSDK_ReloginCount = 0; //因为不知的原因,平台登入取消了,或者是登入错误了,需要重新打开登入界面
        void Update()
        {
            if (m_nSDK_ReloginCount > 0)
            {
                debug.Log("平台的登入取消 " + m_nSDK_ReloginCount);
                m_nSDK_ReloginCount--;

                if (m_nSDK_ReloginCount == 0)
                {
                    debug.Log("平台的登入 " + m_nSDK_ReloginCount);
                    AnyPlotformSDK.Call_Cmd("login");
                }
            }

            if (goUpdate.active == true && curlineScale < 1f)
            {
                if (curlineScale < toLineScale)
                {
                    curlineScale += 0.01f;
                    if (curlineScale > 0.95f)
                    {
                        curlineScale = 1f;
                    }

                    updateline.localScale = new Vector3(curlineScale, 1, 1);

                    if (curlineScale == 1f)
                    {
                        if (canEnter)
                        {
                            changeState(0);
                        }
                        else
                        {
                            canEnter = true;
                        }
                    }
                }
            }

            if (curState == 0)
            {
                return;
            }

            if (curState == 1)
            {
                curState = 2;
            }
            else if (curState == 2)
            {
                aniCam.Play("cam_move");
                imageBg.gameObject.SetActive(true);
                maskColor.a   = 0f;
                imageBg.color = maskColor;
                curState      = 3;
            }
            else if (curState == 3)
            {
                float anilen = aniCam["cam_move"].normalizedTime;
                //  aniCam.
                if (anilen >= 1f)
                {
                    if (_overhandle != null)
                    {
                        _overhandle();
                    }
                    _overhandle = null;
                    curState    = 4;
                    maskColor.a = 1;
                    if (scene != null)
                    {
                        Destroy(scene);
                    }
                    scene = null;
                    if (GRMap.instance != null)
                    {
                        GRMap.instance.refreshLightMap();
                        LGUIMainUIImpl_NEED_REMOVE.getInstance().show_all();
                    }
                }
                else
                {
                    maskColor.a   = anilen;
                    imageBg.color = maskColor;
                }
            }
            else if (curState == 4)
            {
                if (maskColor.a <= 0.1f)
                {
                    curState = 5;
                    InterfaceMgr.ui_Camera_cam.gameObject.SetActive(true);
                    InterfaceMgr.ui_Camera_cam.gameObject.SetActive(true);
                    InterfaceMgr.getInstance().DisposeUI(InterfaceMgr.SERVE_CHOOSE);
                    InterfaceMgr.getInstance().DisposeUI(InterfaceMgr.LOGIN);
                }
                else
                {
                    maskColor.a  -= 0.05f;
                    imageBg.color = maskColor;
                }
            }
        }
コード例 #24
0
 void close()
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_PKSHOW);
     CancelInvoke("close");
 }
コード例 #25
0
ファイル: login.cs プロジェクト: swordandhonor056/client_code
 void onChoose()
 {
     InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.SERVE_CHOOSE);
 }
コード例 #26
0
        public override void init()
        {
            inittext();
            this.getEventTrigerByPath("left_bg/hero").onDrag = OnDrag;
            #region getobj
            contain       = getGameObjectByPath("right_bg/top/scroll_view/contain");
            image         = getGameObjectByPath("right_bg/top/scroll_view/image");
            c_jihuo_obj   = getGameObjectByPath("right_bg/com/Panel/jihuo");
            c_name        = getComponentByPath <Text>("right_bg/com/Panel/name");
            c_shuxing     = getComponentByPath <Text>("right_bg/com/Panel/shuxing");
            c_info        = getComponentByPath <Text>("right_bg/com/Panel/info");
            c_time        = getComponentByPath <Text>("right_bg/com/Panel/time");
            btn_buy_obj   = getGameObjectByPath("right_bg/down/buy");
            btn_dress_obj = getGameObjectByPath("right_bg/down/wear");
            buy_bg        = getGameObjectByPath("buy_bg");
            contain1      = getGameObjectByPath("buy_bg/scollBuy/content");
            panel         = getGameObjectByPath("right_bg/com/Panel");
            txt           = getGameObjectByPath("right_bg/com/txt");
            xiongjia_obj  = getGameObjectByPath("left_bg/xj");
            wuqi_obj      = getGameObjectByPath("left_bg/wq");
            jihuo_info    = getGameObjectByPath("right_bg/com/Panel/Panel");
            jihuo_bg      = getGameObjectByPath("jihuo_bg");
            tips          = getGameObjectByPath("tip");
            #endregion
            #region Btn
            btn_close             = new BaseButton(getTransformByPath("btn_close"));
            btn_close.onClick     = (GameObject go) => { InterfaceMgr.getInstance().close(InterfaceMgr.A3_FASHIONSHOW); };
            btn_retutn            = new BaseButton(getTransformByPath("left_bg/btn_retutn"));
            btn_retutn.onClick    = (GameObject go) => { returnOnclick(); };
            btn_buy_clsoe         = new BaseButton(getTransformByPath("buy_bg/touchClose"));
            btn_buy_clsoe.onClick = (GameObject go) => { buy_bg.SetActive(false); };
            btn_buy             = new BaseButton(getTransformByPath("right_bg/down/buy"));
            btn_buy.onClick     = (GameObject go) => { /*buy_bg.SetActive(true);*/ openbuyOnClick(go); };
            btn_dress           = new BaseButton(getTransformByPath("right_bg/down/wear"));
            btn_dress.onClick   = (GameObject go) => { dressinOnClick(go); };
            btn_buy_no          = new BaseButton(getTransformByPath("jihuo_bg/no"));
            btn_buy_no.onClick  = (GameObject go) => { jihuo_bg.SetActive(false); };
            btn_buy_yes         = new BaseButton(getTransformByPath("jihuo_bg/yes"));
            btn_buy_yes.onClick = (GameObject go) => {
                if (enough_item)
                {
                    jihuo_bg.SetActive(false);
                    a3_fashionshowProxy.getInstance().SendProxys(3, null, nowchooseid, jihuo_type);
                }
                else
                {
                    jihuo_bg.SetActive(false);
                    ArrayList data1 = new ArrayList();
                    data1.Add(a3_BagModel.getInstance().getItemDataById(need_id));
                    data1.Add(InterfaceMgr.A3_FASHIONSHOW);
                    InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_ITEMLACK, data1);
                }
                //flytxt.instance.fly(ContMgr.getCont("a3_fashionshow22"));
            };
            btn_tips               = new BaseButton(getTransformByPath("left_bg/btn_tip"));
            btn_tips.onClick       = (GameObject go) => { tips.SetActive(true); };
            btn_tips_close         = new BaseButton(getTransformByPath("tip/close"));
            btn_tips_close.onClick = (GameObject go) => { tips.SetActive(false); };


            szToggle1 = getComponentByPath <Toggle>("right_bg/down/shizhuang");
            szToggle1.onValueChanged.AddListener((bool v) =>
            {
                bool shows = szToggle1.isOn ? false : true;
                a3_fashionshowProxy.getInstance().SendProxys(4, null, show: shows);
            });
            fyToggle1 = getComponentByPath <Toggle>("right_bg/down/feiyi");
            fyToggle1.onValueChanged.AddListener((bool v) =>
            {
                if (!FunctionOpenMgr.instance.Check(FunctionOpenMgr.PET_SWING))
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_fashionshow16"));
                    fyToggle1.isOn = true;
                }
                else
                {
                    if (!v)
                    {
                        m_proAvatar.set_wing(SelfRole._inst.get_wingid(), SelfRole._inst.get_windfxid());
                    }
                    else
                    {
                        m_proAvatar.set_wing(0, 0);
                    }
                }
                // bool shows = szToggle1.isOn ? false : true;
                //a3_fashionshowProxy.getInstance().SendProxys(4, null, show: shows);
            });
            #endregion
            #region TabControl
            _tabControl = new TabControl();
            _tabControl.onClickHanle = OnSwitch;
            _tabControl.create(getGameObjectByPath("right_bg/top/Panel"), this.gameObject);
            #endregion

            creatrveObj();
        }
コード例 #27
0
        private void OnClickToGetExp(int type)
        {
            A3_VipModel vipModel = A3_VipModel.getInstance();


            if (!offLineModel.CanGetExp)
            {
                flytxt.instance.fly(ContMgr.getCont("off_line_empty"));
                InterfaceMgr.getInstance().close(InterfaceMgr.OFFLINEEXP);
                a3_expbar.instance.getGameObjectByPath("operator/LightTips/btnAuto_off_line_exp").SetActive(false);
                return;
            }
            offline_item.Clear();
            offline = true;
            switch (type)
            {
            case 1:

                if (fenjie.isOn == true)
                {
                    OffLineExpProxy.getInstance().sendType(1, true);
                }
                else
                {
                    OffLineExpProxy.getInstance().sendType(1, false);
                }
                currentType = 1;
                break;

            case 2:

                if (PlayerModel.getInstance().money < OffLineModel.getInstance().GetCost(2))
                {
                    flytxt.instance.fly(ContMgr.getCont("off_line_exp_money"));
                }
                else
                {
                    if (fenjie.isOn == true)
                    {
                        OffLineExpProxy.getInstance().sendType(2, true);
                    }
                    else
                    {
                        OffLineExpProxy.getInstance().sendType(2, false);
                    }
                }
                currentType = 2;
                break;

            case 3:
                if (PlayerModel.getInstance().gold < OffLineModel.getInstance().GetCost(3))
                {
                    flytxt.instance.fly(ContMgr.getCont("off_line_exp_gold"));
                }
                //else if (vipModel.Level < vip_lite(3))
                //    flytxt.instance.fly(ContMgr.getCont("off_line_exp_vip"));
                else
                {
                    if (fenjie.isOn == true)
                    {
                        OffLineExpProxy.getInstance().sendType(3, true);
                    }
                    else
                    {
                        OffLineExpProxy.getInstance().sendType(3, false);
                    }
                }
                currentType = 3;
                break;

            case 4:
                if (PlayerModel.getInstance().gold < OffLineModel.getInstance().GetCost(4))
                {
                    flytxt.instance.fly(ContMgr.getCont("off_line_exp_gold"));
                }
                //else if (vipModel.Level < vip_lite(4))
                //    flytxt.instance.fly(ContMgr.getCont("off_line_exp_vip"));
                else
                {
                    if (fenjie.isOn == true)
                    {
                        OffLineExpProxy.getInstance().sendType(4, true);
                    }
                    else
                    {
                        OffLineExpProxy.getInstance().sendType(4, false);
                    }
                }
                currentType = 4;
                break;

            default:
                break;
            }
        }
コード例 #28
0
 public override void onShowed()
 {
     InterfaceMgr.getInstance().showLoadingBg(true);
     base.onShowed();
 }
コード例 #29
0
ファイル: LGOutGame.cs プロジェクト: atom-chen/rongyaojt
 internal void <tryOpenUI> b__20_0()
 {
     InterfaceMgr.getInstance().open(InterfaceMgr.A3_SELECTCHA, null, false);
 }
コード例 #30
0
        public void Init()
        {
            _instance             = this;
            itemTeamInfoPrefabDic = new Dictionary <uint, itemTeamInfoPrefab>();
            BaseButton btnJoinTeam = new BaseButton(transform.FindChild("right/bottom/btnJoinTeam"));

            btnJoinTeam.onClick = onBtnJoinTeamClick;
            BaseButton btnCreateTeam = new BaseButton(transform.FindChild("right/bottom/btnCreateTeam"));

            btnCreateTeam.onClick = onBtnCreateClick;
            team_object           = transform.FindChild("team_object").gameObject;

            team_objectPanel = team_object.transform.FindChild("Dropdown").gameObject.GetComponent <Dropdown>();

            team_objectPanel.captionText.text = ContMgr.getCont("a3_teamPanel_16");
            for (int i = 0; i < team_objectPanel.options.Count; i++)
            {
                team_objectPanel.options[i].text = ContMgr.getCont("a3_teamPanel_" + (i + 16));
            }

            team_object.SetActive(false);

            BaseButton btn_1_object = new BaseButton(transform.FindChild("team_object/btn_1"));

            btn_1_object.onClick = onbtn_1_Click;
            BaseButton btn_0_object = new BaseButton(transform.FindChild("team_object/btn_0"));

            btn_0_object.onClick = onbtn_0_Click;

            BaseButton btnRefresh = new BaseButton(transform.FindChild("right/bottom/btnRefresh"));

            btnRefresh.onClick = onBtnRefreshClick;
            new BaseButton(transform.FindChild("right/bottom/speedteam")).onClick = (GameObject go) =>
            {
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SPEEDTEAM);
            };


            Toggle togShowNearbyPanel = transform.FindChild("right/main/body/showNearby").GetComponent <Toggle>();

            togShowNearbyPanel.onValueChanged.AddListener(onShowNearby);
            getProfessionSprite();

            #region 初始化汉字
            getComponentByPath <Text>("title/txts/txtCaptain").text            = ContMgr.getCont("a3_teamPanel_0");
            getComponentByPath <Text>("title/txts/txtLvl").text                = ContMgr.getCont("a3_teamPanel_1");
            getComponentByPath <Text>("title/txts/txtKnightage").text          = ContMgr.getCont("a3_teamPanel_2");
            getComponentByPath <Text>("title/txts/txtMap").text                = ContMgr.getCont("a3_teamPanel_3");
            getComponentByPath <Text>("title/txts/txtMembCount").text          = ContMgr.getCont("a3_teamPanel_4");
            getComponentByPath <Text>("right/main/body/showNearby/Label").text = ContMgr.getCont("a3_teamPanel_5");
            getComponentByPath <Text>("right/bottom/btnRefresh/Text").text     = ContMgr.getCont("a3_teamPanel_6");
            getComponentByPath <Text>("right/bottom/btnCreateTeam/Text").text  = ContMgr.getCont("a3_teamPanel_7");
            getComponentByPath <Text>("right/bottom/btnJoinTeam/Text").text    = ContMgr.getCont("a3_teamPanel_8");
            getComponentByPath <Text>("right/bottom/speedteam/Text").text      = ContMgr.getCont("a3_teamPanel_9");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/team_pre/4/apply/Text").text = ContMgr.getCont("a3_teamPanel_15");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/btnWatch/Text").text         = ContMgr.getCont("a3_teamPanel_10");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/txtLvl").text       = ContMgr.getCont("a3_teamPanel_1");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/txtKnightage").text = ContMgr.getCont("a3_teamPanel_2");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/txtMap").text       = ContMgr.getCont("a3_teamPanel_11");
            getComponentByPath <Text>("team_object/text").text           = ContMgr.getCont("a3_teamPanel_12");
            getComponentByPath <Text>("team_object/btn_0/text").text     = ContMgr.getCont("a3_teamPanel_13");
            getComponentByPath <Text>("team_object/btn_1/text").text     = ContMgr.getCont("a3_teamPanel_14");
            getComponentByPath <Text>("team_object/Dropdown/Label").text = ContMgr.getCont("a3_teamPanel_16");

            ScrollControler scrollControer0 = new ScrollControler();
            scrollControer0.create(getComponentByPath <ScrollRect>("right/main/body/Panel"));
            #endregion
        }
コード例 #31
0
ファイル: login.cs プロジェクト: atom-chen/rongyaojt
 private void onChoose()
 {
     InterfaceMgr.getInstance().open(InterfaceMgr.SERVE_CHOOSE, null, false);
 }