Exemple #1
0
        void onExchange(GameObject go)
        {
            ExchangeModel exModel = ExchangeModel.getInstance();
            SXML          xml     = XMLMgr.instance.GetSXML("acution.exchange");

            diamand = xml.getInt("initial");
            if (PlayerModel.getInstance().gold < diamand * (exModel.Count + 1))
            {
                flytxt.instance.fly(ContMgr.getCont("a3_exchange_nozs"));
                return;
            }



            int num;

            if (A3_VipModel.getInstance().Level > 0)
            {
                num = A3_VipModel.getInstance().vip_exchange_num(3);
            }
            else
            {
                num = 10;
            }

            if ((num - exModel.Count) <= 0)
            {
                flytxt.instance.fly(ContMgr.getCont("a3_exchange_yj"));
                return;
            }

            ExchangeProxy exProxy = ExchangeProxy.getInstance();

            exProxy.Exchange();
        }
Exemple #2
0
        public void initproxy_ui()
        {
            b_load = true;
            IconHintMgr.getInsatnce().inituiisok = true;;
            IconHintMgr.getInsatnce().initui();
            //关闭第一次预加载的ui
            InterfaceMgr.getInstance().closeUiFirstTime();


            a3_activeOnlineProxy.getInstance().SendProxy(1);
            A3_signProxy.getInstance().sendproxy(1, 0);
            A3_SevenDayProxy.getInstance().SendProcy(1);
            LotteryProxy.getInstance().sendlottery((int)LotteryType.CurrentInfo);
            ExchangeProxy.getInstance().GetExchangeInfo();
            welfareProxy.getInstance().sendWelfare(welfareProxy.ActiveType.selfWelfareInfo);
            A3_AwardCenterServer.getInstance().SendMsg(A3_AwardCenterServer.SERVER_SELFDATA);  //福利数据

            //新手进主城检测摄像机
            SceneCamera.CheckLoginCam();
        }
Exemple #3
0
 public override void onClosed()
 {
     ExchangeProxy.getInstance().removeEventListener(ExchangeProxy.EVENT_EXCHANGE_SUC, onExchangeSuccess);
     ExchangeProxy.getInstance().removeEventListener(ExchangeProxy.EVENT_EXCHANGE_SYNC_COUNT, onSyncCount);
     CreateModelOnClosed();
 }
Exemple #4
0
 public override void onShowed()
 {
     ExchangeProxy.getInstance().addEventListener(ExchangeProxy.EVENT_EXCHANGE_SUC, onExchangeSuccess);
     ExchangeProxy.getInstance().addEventListener(ExchangeProxy.EVENT_EXCHANGE_SYNC_COUNT, onSyncCount);
     refreshCount();
 }