Пример #1
0
 public override void onShowed()
 {
     Refresh();
     A3_RankProxy.getInstance().addEventListener(A3_RankProxy.RANKADDLV, Refresh);
     A3_RankProxy.getInstance().addEventListener(A3_RankProxy.RANKREFRESH, Refresh);
     UiEventCenter.getInstance().onWinOpen(uiName);
 }
Пример #2
0
 public override void onShowed()
 {
     RefreshInfos(a3_RankModel.now_id);
     refreshAch_point();
     A3_RankProxy.getInstance().addEventListener(A3_RankProxy.RANKADDLV, onAddLvOver);
     A3_RankProxy.getInstance().addEventListener(A3_RankProxy.RANKREFRESH, OnRefresh);
 }
Пример #3
0
        //打开
        public override void onShowed()
        {
            UIClient.instance.addEventListener(UI_EVENT.ON_MONEY_CHANGE, RefreshBdyb);

            A3_RankProxy.getInstance().sendProxy(A3_RankProxy.ON_GET_ACHIEVEMENT_PRIZE);//获取玩家成就信息

            A3_RankProxy.getInstance().addEventListener(A3_RankProxy.RANKREFRESH, RefreshPage);
            A3_RankProxy.getInstance().addEventListener(A3_RankProxy.ON_ACHIEVEMENT_CHANGE, OnRefreshPageEvent);
            A3_RankProxy.getInstance().addEventListener(A3_RankProxy.ON_GET_ACHIEVEMENT_PRIZE, OnShowGetPrize);
            A3_RankProxy.getInstance().addEventListener(A3_RankProxy.ON_REACH_ACHIEVEMENT, OnRefreshPageEvent);
            A3_RankProxy.getInstance().sendProxy(A3_RankProxy.ON_GET_ACHIEVEMENT_PRIZE);
            achModel.OnAchievementChange += OnPointChange;
            OnPointChange();
            base.onShowed();
        }
Пример #4
0
        //关闭
        public override void onClosed()
        {
            A3_RankProxy.getInstance().removeEventListener(A3_RankProxy.RANKREFRESH, RefreshPage);
            A3_RankProxy.getInstance().removeEventListener(A3_RankProxy.ON_ACHIEVEMENT_CHANGE, OnRefreshPageEvent);
            A3_RankProxy.getInstance().removeEventListener(A3_RankProxy.ON_GET_ACHIEVEMENT_PRIZE, OnShowGetPrize);
            A3_RankProxy.getInstance().removeEventListener(A3_RankProxy.ON_REACH_ACHIEVEMENT, OnRefreshPageEvent);
            UIClient.instance.removeEventListener(UI_EVENT.ON_MONEY_CHANGE, RefreshBdyb);

            achModel.OnAchievementChange -= OnPointChange;

            ClearContainer();
            scrollPage.StopMovement();

            base.onClosed();
        }
 public override void onShowed()
 {
     if (uiData == null)
     {
         tc.setSelectedIndex(0, true);
     }
     else
     {
         int index = (int)uiData[0];
         tc.setSelectedIndex(index, true);
     }
     GRMap.GAME_CAMERA.SetActive(false);
     UiEventCenter.getInstance().onWinOpen(uiName);
     A3_RankProxy.getInstance().sendProxy(A3_RankProxy.ON_GET_ACHIEVEMENT_PRIZE);//获取玩家成就信息
 }
Пример #6
0
 void onAddLv(GameObject go)
 {
     if (PlayerModel.getInstance().ach_point >= 100)
     {
         if (go.name == "upgrade_btn1")
         {
             A3_RankProxy.getInstance().sendProxy(A3_RankProxy.RANKADDLV, 1);
         }
         else if (go.name == "upgrade_btn2")
         {
             A3_RankProxy.getInstance().sendProxy(A3_RankProxy.RANKADDLV, 2);
         }
     }
     else
     {
         flytxt.instance.fly(ContMgr.getCont("a3_rank_nomw"));
     }
 }
Пример #7
0
 void onShoeorHideTitile(GameObject go)
 {
     if (a3_RankModel.now_id > 0)
     {
         if (a3_RankModel.nowisactive)
         {
             a3_RankModel.nowisactive   = false;
             onShoeorHideTitileTxt.text = ContMgr.getCont("a3_rank_showch");
         }
         else
         {
             a3_RankModel.nowisactive   = true;
             onShoeorHideTitileTxt.text = ContMgr.getCont("a3_rank_noshowch");
         }
         A3_RankProxy.getInstance().sendProxy(A3_RankProxy.RANKREFRESH, -1, a3_RankModel.nowisactive);
     }
     else
     {
         flytxt.instance.fly(ContMgr.getCont("a3_rank_nohave"), 1);
     }
 }
Пример #8
0
 public override void onClosed()
 {
     A3_RankProxy.getInstance().removeEventListener(A3_RankProxy.RANKADDLV, Refresh);
     A3_RankProxy.getInstance().removeEventListener(A3_RankProxy.RANKREFRESH, Refresh);
 }
Пример #9
0
 public void refreshAch_point()
 {
     A3_RankProxy.getInstance().sendProxy(A3_RankProxy.RANKREFRESH);
     ach_num.text = "" + Globle.getBigText((uint)PlayerModel.getInstance().ach_point);
 }
Пример #10
0
 void onShoeorHideTitile(GameObject go)
 {
     A3_RankProxy.getInstance().sendProxy(A3_RankProxy.RANKREFRESH, -1, showontoggle.isOn);
     a3_RankModel.nowisactive = showontoggle.isOn;
     Refresh();
 }
Пример #11
0
        private void OnGetPrzieClick(GameObject go)
        {
            uint id = uint.Parse(go.transform.parent.name);

            A3_RankProxy.getInstance().GetAchievementPrize(id);
        }