Example #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();
        }
Example #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();
        }
Example #3
0
        private void onExchange(GameObject go)
        {
            ExchangeModel instance = ModelBase <ExchangeModel> .getInstance();

            bool flag = (ulong)ModelBase <PlayerModel> .getInstance().gold < (ulong)((long)this.diamand * (long)((ulong)(instance.Count + 1u)));

            if (flag)
            {
                flytxt.instance.fly("钻石不足", 0, default(Color), null);
            }
            else
            {
                bool flag2 = ModelBase <A3_VipModel> .getInstance().Level > 0;

                int num;
                if (flag2)
                {
                    num = ModelBase <A3_VipModel> .getInstance().vip_exchange_num(3);
                }
                else
                {
                    num = 10;
                }
                bool flag3 = (long)num - (long)((ulong)instance.Count) <= 0L;
                if (flag3)
                {
                    flytxt.instance.fly("兑换次数已用尽", 0, default(Color), null);
                }
                else
                {
                    ExchangeProxy instance2 = BaseProxy <ExchangeProxy> .getInstance();

                    instance2.Exchange();
                }
            }
        }
Example #4
0
 public override void onClosed()
 {
     ExchangeProxy.getInstance().removeEventListener(ExchangeProxy.EVENT_EXCHANGE_SUC, onExchangeSuccess);
     ExchangeProxy.getInstance().removeEventListener(ExchangeProxy.EVENT_EXCHANGE_SYNC_COUNT, onSyncCount);
     CreateModelOnClosed();
 }
Example #5
0
 public override void onShowed()
 {
     ExchangeProxy.getInstance().addEventListener(ExchangeProxy.EVENT_EXCHANGE_SUC, onExchangeSuccess);
     ExchangeProxy.getInstance().addEventListener(ExchangeProxy.EVENT_EXCHANGE_SYNC_COUNT, onSyncCount);
     refreshCount();
 }