Ejemplo n.º 1
0
 void Update()
 {
     m_fOpenTime += Time.deltaTime;
     transform.SetAsLastSibling();
     if (m_fOpenTime > 16f)
     {
         m_fOpenTime = 0f;
         InterfaceMgr.getInstance().close(InterfaceMgr.WAIT_LOADING);
         //Debug.Log("wait_loadingwait_loadingwait_loadingwait_loadingwait_loading colse");
     }
 }
Ejemplo n.º 2
0
        public static void play()
        {
            bool flag = !combo_txt.showed;

            if (flag)
            {
                InterfaceMgr.getInstance().open(InterfaceMgr.COMBO_TEXT, null, false);
            }
            combo_txt.curTick = combo_txt.maxTick;
            combo_txt.comboNum++;
        }
        override public void onClosed()
        {
            InterfaceMgr.getInstance().floatUI.localScale = Vector3.one;

            if (m_current != null)
            {
                m_current.onClose();
            }
            //  GRMap.GAME_CAMERA.SetActive(true);
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_AUTOPLAY2);
        }
Ejemplo n.º 4
0
 private void OnEqp(GameObject go)
 {
     if (A3_VipModel.getInstance().Level >= 3)
     {
         InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_AUTOPLAY_EQP);
     }
     else
     {
         flytxt.instance.fly(ContMgr.getCont("a3_autoplay2_vip"));
     }
 }
Ejemplo n.º 5
0
 private void onUpdate(float s)
 {
     if (ani.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1f)
     {
         if (_handle != null)
         {
             _handle();
         }
         InterfaceMgr.getInstance().close(InterfaceMgr.CD_TIME);
     }
 }
Ejemplo n.º 6
0
        public static void show(Action handle, float sec, bool isMS = false, Action stopHandle = null, Vector3 v = new Vector3())
        {
            SelfRole.fsm.Stop();

            cdhandle        = handle;
            forceStophandle = stopHandle;
            secCD           = isMS ? (long)sec : (long)(sec * 1000);
            lastTimer       = secCD + NetClient.instance.CurServerTimeStampMS;
            pos             = v;
            InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.CD);
        }
Ejemplo n.º 7
0
            internal void <init> b__4_0(GameObject go)
            {
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_WINGINFO);
                bool flag = a3_ranking.isshow && a3_ranking.isshow.Toback;

                if (flag)
                {
                    a3_ranking.isshow.Toback.SetActive(true);
                    a3_ranking.isshow.Toback = null;
                }
            }
Ejemplo n.º 8
0
 public override void init()
 {
     InterfaceMgr.getInstance().open(InterfaceMgr.FLYTXT, null, false);
     InterfaceMgr.openByLua("flytxt", null);
     this.txtInfo1    = base.getComponentByPath <Text>("info1");
     this.txtInfo2    = base.getComponentByPath <Text>("info2");
     this.txtDesc     = base.getComponentByPath <Text>("desc");
     this.input       = base.getComponentByPath <InputField>("input");
     this.placeholder = base.getComponentByPath <Text>("input/Placeholder");
     base.getComponentByPath <Button>("y").onClick.AddListener(new UnityAction(this.onYClick));
     base.getComponentByPath <Button>("n").onClick.AddListener(new UnityAction(this.onNClick));
 }
Ejemplo n.º 9
0
        private void SetState(bool isshow, int state)
        {
            GRMap.GAME_CAMERA.SetActive(isshow);
            InterfaceMgr.getInstance().changeState(state);

            var go = transform.FindChild("ig_bg_bg");

            if (go != null)
            {
                go.gameObject.SetActive(false);
            }
        }
Ejemplo n.º 10
0
        public static void show(string str, float sec)
        {
            teachline.remainCD = sec;
            teachline.desc     = str;
            bool flag = teachline.instance != null;

            if (flag)
            {
                teachline.instance.showDesc();
            }
            InterfaceMgr.getInstance().open(InterfaceMgr.NEWBIE_LINE, null, false);
        }
Ejemplo n.º 11
0
 public override void onShowed()
 {
     instance = this;
     InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_FUNCTIONBAR);
     if (uiData != null)
     {
         dic_info = Shop_a3Model.getInstance().GetinfoByNPC_id((int)uiData[0]);
     }
     CreatrveObj();
     // change();
     //Invoke("ShowFirstItem", 0.2f);
 }
Ejemplo n.º 12
0
 bool Toclose = false;//是否是点击关闭按钮关闭
 void OnClose(GameObject go)
 {
     if (currentTeam != null && teamList != null)
     {
         currentTeam.onClose();
         currentTeam.gameObject.SetActive(false);
         teamList.onClose();
         teamList.gameObject.SetActive(false);
     }
     Toclose = true;
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_SHEJIAO);
 }
 void ShowSetting()
 {
     tfSystemPanel.gameObject.SetActive(false);
     tfGamePanel.gameObject.SetActive(false);
     tfGiftBagPanel.gameObject.SetActive(false);
     if (m_game != null)
     {
         m_game = null;
     }
     m_current = null;
     InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_AUTOPLAY2);
 }
Ejemplo n.º 14
0
        void onfreeclick(GameObject go)
        {
            Vector3 vec = new Vector3(xml.getFloat("ux"), 0f, xml.getFloat("uy"));

            SelfRole.WalkToMap(vmap["id"], vec);
            InterfaceMgr.getInstance().close(InterfaceMgr.WORLD_MAP);
            InterfaceMgr.getInstance().close(InterfaceMgr.WORLD_MAP_SUB);
            if (a3_active.onshow)
            {
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_ACTIVE);
            }
        }
Ejemplo n.º 15
0
        private void routine_go(GameObject go)
        {
            bool flag = FunctionOpenMgr.instance.Check(FunctionOpenMgr.DAILY_TASK, true);

            if (flag)
            {
                ArrayList arrayList = new ArrayList();
                arrayList.Add(20005);
                InterfaceMgr.getInstance().open(InterfaceMgr.A3_TASK, arrayList, false);
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_GETGOLDWAY);
            }
        }
Ejemplo n.º 16
0
        public override void onShowed()
        {
            bool flag = this.uiData != null;

            if (flag)
            {
                InterfaceMgr.getInstance().floatUI.localScale = Vector3.zero;
                uint num = (uint)this.uiData[0];
                this.day_count = (uint)this.uiData[1];
                this.createAward(this.day_count);
            }
        }
Ejemplo n.º 17
0
        override public void onShowed()
        {
            InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_FUNCTIONBAR);
            GRMap.GAME_CAMERA.SetActive(false);
            a3_activeDegreeProxy.getInstance()?.SendGetPoint(1);
            onActive_Load();

            refreshMoney();
            do_Active();
            onLoad_Change();
            getComponentByPath <ScrollRect>("icon_go/scroll_rect").verticalNormalizedPosition = 1;
        }
Ejemplo n.º 18
0
        private void onBtnClose(GameObject go)
        {
            bool flag = a3_new_pet.instance != null;

            if (flag)
            {
                a3_new_pet.instance.openEveryLogin = false;
            }
            this.open = false;
            InterfaceMgr.getInstance().floatUI.localScale = Vector3.one;
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_EVERYDAYLOGIN);
        }
Ejemplo n.º 19
0
        public override void onShowed()
        {
            storydialog.instance = this;
            this.txt.text        = (this.uiData[0] as string);
            base.onShowed();
            bool flag = !GRMap.playingPlot && gameST._bUntestPlot;

            if (flag)
            {
                InterfaceMgr.getInstance().close(InterfaceMgr.STORY_DIALOG);
            }
        }
Ejemplo n.º 20
0
        public void onLoadInfo(Variant data)
        {
            debug.Log("pk模式的信息:" + data.dump());
            bool flag = data.ContainsKey("pk_state");

            if (flag)
            {
                ModelBase <PlayerModel> .getInstance().now_pkState = data["pk_state"];

                switch (ModelBase <PlayerModel> .getInstance().now_pkState)
                {
                case 0:
                    ModelBase <PlayerModel> .getInstance().pk_state = PK_TYPE.PK_PEACE;

                    break;

                case 1:
                    ModelBase <PlayerModel> .getInstance().pk_state = PK_TYPE.PK_PKALL;

                    ModelBase <PlayerModel> .getInstance().m_unPK_Param = ModelBase <PlayerModel> .getInstance().cid;

                    ModelBase <PlayerModel> .getInstance().m_unPK_Param2 = ModelBase <PlayerModel> .getInstance().cid;

                    break;

                case 2:
                    ModelBase <PlayerModel> .getInstance().pk_state = PK_TYPE.PK_TEAM;

                    ModelBase <PlayerModel> .getInstance().m_unPK_Param = ModelBase <PlayerModel> .getInstance().teamid;

                    ModelBase <PlayerModel> .getInstance().m_unPK_Param2 = ModelBase <PlayerModel> .getInstance().clanid;

                    break;
                }
                bool flag2 = a3_pkmodel._instance;
                if (flag2)
                {
                    a3_pkmodel._instance.ShowThisImage(data["pk_state"]);
                }
                bool flag3 = SelfRole.s_LockFX.gameObject != null;
                if (flag3)
                {
                    PkmodelAdmin.RefreshShow(SelfRole._inst.m_LockRole, false, false);
                }
                InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modPkState", "model/PlayerModel", new object[]
                {
                    ModelBase <PlayerModel> .getInstance().now_pkState,
                    true
                });
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_PKMODEL);
                NewbieModel.getInstance().hide();
            }
        }
Ejemplo n.º 21
0
 void onput(GameObject go)
 {
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_ITEMTIP);
     if (is_put_in)
     {
         BagProxy.getInstance().sendRoomItems(true, curid, cur_num);
     }
     else
     {
         BagProxy.getInstance().sendRoomItems(false, curid, cur_num);
     }
 }
Ejemplo n.º 22
0
        private void OnClose(GameObject go)
        {
            a3_expbar.instance.HideMailHint();
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_MAIL);

            var etor = title_gos.GetEnumerator();

            while (etor.MoveNext())
            {
                Destroy(etor.Current.Value);
            }
        }
Ejemplo n.º 23
0
        public override bool onLevelFinish(Variant msgData)
        {
            base.onLevelFinish(msgData);
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);
            if (a3_liteMiniBaseMap.instance != null)
            {
                a3_liteMiniBaseMap.instance.clear();
            }
            int waittime = 0;

            if (msgData.ContainsKey("win"))
            {
                int ct = msgData["win"];
                if (ct > 0)
                {
                    waittime = 1;
                }
            }
            //else if (!SelfRole._inst.isDead) {
            //	waittime = 5;
            //} //由于结束副本在死亡之前发,所以改成副本时间来判断
            if (muNetCleint.instance.CurServerTimeStamp < enterdata["end_tm"] - 1)
            {
                waittime = 1;
            }
            new timersManager().addTimer(
                3,
                (object o) =>
            {
                MonsterMgr._inst.clear();
            }
                );
            new timersManager().addTimer(
                waittime,
                (Action <object>)((object o) =>
            {
                //CollectAllDrops1();

                msgData["ltpid"] = enterdata["ltpid"];
                System.Collections.ArrayList al = new System.Collections.ArrayList();
                al.Add(msgData);
                double endtime = enterdata["end_tm"];
                double temp    = (double)UnityEngine.Mathf.Min(muNetCleint.instance.CurServerTimeStamp, (int)endtime) - entertimer;
                al.Add(temp);
                al.Add(data.kmNum);
                int t = (int)UnityEngine.Mathf.Max(0, PlayerModel.getInstance().exp - startExp);
                al.Add(t);
                InterfaceMgr.getInstance().ui_async_open((string)InterfaceMgr.A3_FB_FINISH, (System.Collections.ArrayList)al);
            })
                );

            return(true);
        }
Ejemplo n.º 24
0
        public static void show(string str, float sec)
        {
            remainCD = sec;
            desc     = str;

            if (instance != null)
            {
                instance.showDesc();
            }

            InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.NEWBIE_LINE);
        }
Ejemplo n.º 25
0
        //public a3_rank(Window win, Transform tran)
        //    : base(win, tran)
        //{
        //}

        public override void init()
        {
            #region 初始化汉字
            getComponentByPath <Text>("background/att_bg_right/now_rankbg/Text").text = ContMgr.getCont("a3_rank_0");
            getComponentByPath <Text>("panel_centre/now_rankbg/Text").text            = ContMgr.getCont("a3_rank_0");
            getComponentByPath <Text>("panel_centre/now_attribute /Text").text        = ContMgr.getCont("a3_rank_1");
            getComponentByPath <Text>("panel_centre/next_attribute /Text").text       = ContMgr.getCont("a3_rank_2");
            // getComponentByPath<Text>("exp/exp_point/exp").text = ContMgr.getCont("a3_rank_3");
            getComponentByPath <Text>("panel_down/rule_btn/Text").text       = ContMgr.getCont("a3_rank_4");
            getComponentByPath <Text>("panel_down/showorhide_btn/Text").text = ContMgr.getCont("a3_rank_5");
            getComponentByPath <Text>("panel_down/upgrade_btn1/Text").text   = ContMgr.getCont("a3_rank_6");
            getComponentByPath <Text>("panel_down/upgrade_btn2/Text").text   = ContMgr.getCont("a3_rank_7");
            getComponentByPath <Text>("panel_down/showorhide_btn/Text").text = ContMgr.getCont("a3_rank_5");
            getComponentByPath <Text>("bg/title_img/title").text             = ContMgr.getCont("a3_rank_8");
            getComponentByPath <Text>("ruledes_bg/ruledes/title").text       = ContMgr.getCont("a3_rank_9");
            getComponentByPath <Text>("ruledes_bg/ruledes/des").text         = ContMgr.getCont("a3_rank_10");
            getComponentByPath <Text>("con/upgrade_btn1/Text").text          = ContMgr.getCont("a3_rank_11");
            getComponentByPath <Text>("con/upgrade_btn2/Text").text          = ContMgr.getCont("a3_rank_12");
            getComponentByPath <Text>("con/ranklist/0/0/1").text             = ContMgr.getCont("a3_rank_13");
            getComponentByPath <Text>("con/exp/exp_point/hint").text         = ContMgr.getCont("a3_rank_14");
            getComponentByPath <Text>("con/exp/exp_point/exp").text          = ContMgr.getCont("a3_rank_15");
            getComponentByPath <Text>("con/showon/Label").text = ContMgr.getCont("a3_rank_16");
            #endregion
            Debug.LogError("a3_rank");
            new BaseButton(transform.FindChild("close")).onClick = (GameObject g) => {
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_RANK);
                if (a3_sports_jdzc._instan != null && a3_sports_jdzc._instan.goBack)
                {
                    ArrayList arrs = new ArrayList();
                    arrs.Add("sports_jdzc");
                    InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SPORTS, arrs);
                }
            };
            addlv          = new BaseButton(transform.FindChild("con/upgrade_btn1"));
            addlv.onClick  = onAddLv;
            addlv1         = new BaseButton(transform.FindChild("con/upgrade_btn2"));
            addlv1.onClick = onAddLv;
            BaseButton showon = new BaseButton(transform.FindChild("con/showon"));
            showon.onClick = onShoeorHideTitile;
            BaseButton left = new BaseButton(transform.FindChild("con/left"));
            left.onClick = GoLeft;
            BaseButton right = new BaseButton(transform.FindChild("con/right"));
            right.onClick = GoRight;

            nowtitle     = getComponentByPath <Image>("con/header/Image");
            expslider    = getComponentByPath <Slider>("con/exp");
            exptext      = getComponentByPath <Text>("con/exp/Text");
            showontoggle = getComponentByPath <Toggle>("con/showon");
            showontext   = getComponentByPath <Text>("con/showon/Label");
            CreateList();
            nowshow = a3_RankModel.now_id;
        }
Ejemplo n.º 26
0
        public override void onEnd()
        {
            base.onEnd();
            data.kmNum = 0;
            isOpen     = false;
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }

            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);


            //InterfaceMgr.openByLua("herohead2");
            InterfaceMgr.doCommandByLua("a1_low_fightgame.show_heroih_cs", "ui/interfaces/low/a1_low_fightgame");

            if (tragethead.instance != null)
            {
                tragethead.instance.inFB = false;
            }
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);
            LevelProxy.getInstance().sendGet_lvl_cnt_info(1);
            a1_gamejoy.inst_skillbar.m_skillbar_hp_Add_btn.gameObject.SetActive(showHpBtn);

            if (a3_expbar.instance)
            {
                a3_expbar.instance.showBtnIcon(true);
            }

            if (a3_equipup.instance)
            {
                a3_equipup.instance.showbtnIcom(true);
            }

            if (a1_gamejoy.inst_joystick)
            {
                a1_gamejoy.inst_joystick.show_btnIcon(true);
            }

            if (a3_liteMinimap.instance)
            {
                a3_liteMinimap.instance.showbtnIcon(true);
            }
        }
        void SetNeedItem()
        {
            if (!A3_SummonModel.getInstance().GetSummons().ContainsKey(CurSummonID))
            {
                return;
            }
            a3_BagItemData data   = A3_SummonModel.getInstance().GetSummons()[CurSummonID];
            List <SXML>    reset  = sumXml.GetNodeList("reset");
            int            itemid = 0;
            int            num    = 0;

            foreach (SXML it in reset)
            {
                if (data.summondata.star == it.getInt("star"))
                {
                    itemid     = it.getInt("need_item_id");
                    NeedItemId = itemid;
                    num        = it.getInt("need_item_sum");
                    break;
                }
            }
            if (itemid > 0 && num != 0)
            {
                for (int i = 0; i < tranObj.transform.FindChild("needitem/icon").childCount; i++)
                {
                    GameObject.Destroy(tranObj.transform.FindChild("needitem/icon").GetChild(i).gameObject);
                }
                a3_ItemData itemdata = a3_BagModel.getInstance().getItemDataById((uint)itemid);
                GameObject  icon     = IconImageMgr.getInstance().createA3ItemIcon(itemdata);
                icon.transform.SetParent(tranObj.transform.FindChild("needitem/icon"), false);
                new BaseButton(icon.transform).onClick = (GameObject go) =>
                {
                    ArrayList arr = new ArrayList();
                    arr.Add((uint)itemid);
                    arr.Add(1);
                    InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_MINITIP, arr);
                };
                int haveCount = a3_BagModel.getInstance().getItemNumByTpid((uint)itemid);
                if (num <= haveCount)
                {
                    tranObj.transform.FindChild("needitem/count").GetComponent <Text>().text = "<color=#00FF56FF>" + haveCount + "/" + num + "</color>";
                    //tranObj.transform.FindChild("todo").GetComponent<Button>().interactable = true;
                    CanDo_change = true;
                }
                else
                {
                    tranObj.transform.FindChild("needitem/count").GetComponent <Text>().text = "<color=#f90e0e>" + haveCount + "/" + num + "</color>";
                    //tranObj.transform.FindChild("todo").GetComponent<Button>().interactable = false;
                    CanDo_change = false;
                }
            }
        }
Ejemplo n.º 28
0
        public override bool onLevelFinish(Variant msgData)
        {
            base.onLevelFinish(msgData);
            //CollectAllDrops1();
            if (a3_liteMiniBaseMap.instance != null)
            {
                a3_liteMiniBaseMap.instance.clear();
            }
            int waittime = 0;

            a3_insideui_fb.instance.transform.FindChild("normal/btn_quitfb").gameObject.SetActive(false);
            if (msgData.ContainsKey("win"))
            {
                int ct = msgData["win"];
                if (ct > 0)
                {
                    waittime = 3;
                }
            }
            //else if (!SelfRole._inst.isDead) {
            //	waittime = 5;
            //} //由于结束副本在死亡之前发,所以改成副本时间来判断
            if (muNetCleint.instance.CurServerTimeStamp < enterdata["end_tm"] - 1)
            {
                waittime = 3;
            }
            new timersManager().addTimer(
                3,
                (object o) =>
            {
                MonsterMgr._inst.clear();
            }
                );
            new timersManager().addTimer(
                waittime,
                (Action <object>)((object o) =>
            {
                //CollectAllDrops1();

                msgData["ltpid"] = enterdata["ltpid"];
                System.Collections.ArrayList al = new System.Collections.ArrayList();
                al.Add(msgData);
                double endtime = enterdata["end_tm"];
                double temp    = (double)UnityEngine.Mathf.Min(muNetCleint.instance.CurServerTimeStamp, (int)endtime) - entertimer;
                al.Add(temp);
                al.Add(killnum);
                al.Add(moneynum);
                InterfaceMgr.getInstance().ui_async_open((string)InterfaceMgr.A3_FB_FINISH, (System.Collections.ArrayList)al);
            })
                );
            return(true);
        }
Ejemplo n.º 29
0
        void onBtnClicks(GameObject go)
        {
            //for (int i = 0; i < objs.Length; i++)
            //{
            //    objs[i].transform.FindChild("bg/"+i).gameObject.SetActive(true);

            //}
            //go.SetActive(false);
            //go.transform.parent.transform.FindChild("now_txt").gameObject.SetActive(true);
            a3_PkmodelProxy.getInstance().sendProxy(int.Parse(go.name));
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_PKMODEL);
            NewbieModel.getInstance().hide();
        }
Ejemplo n.º 30
0
        private void onShowDaily(GameEvent e)
        {
            Variant data = e.data;
            uint    num  = data["day_count"];
            bool    flag = num == 7u;

            if (flag)
            {
                this._toggleImage.gameObject.SetActive(true);
                this._canget.gameObject.SetActive(false);
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_EVERYDAYLOGIN);
            }
        }