Beispiel #1
0
    public void exchange(int sid, Card _c)
    {
        this.c = _c;
        ExchangeFPort exf = FPortManager.Instance.getFPort("ExchangeFPort") as ExchangeFPort;

        exf.exchange(sid, 1, exchangeOK);
    }
Beispiel #2
0
 void sureExchange(MessageHandle msg)
 {
     if (msg.buttonID == MessageHandle.BUTTON_RIGHT)
     {
         ExchangeFPort exf = FPortManager.Instance.getFPort("ExchangeFPort") as ExchangeFPort;
         exf.exchange((tmpMsg.msgInfo as Exchange).sid, tmpMsg.msgNum, receiveOK);
     }
     else
     {
         tmpMsg = null;
         MaskWindow.UnlockUI();
     }
 }
Beispiel #3
0
 public void sureExchange(MessageHandle msg)
 {
     if (msg.msgEvent == msg_event.dialogOK)
     {
         tmpMsg = msg;
         ExchangeFPort exf = FPortManager.Instance.getFPort("ExchangeFPort") as ExchangeFPort;
         exf.exchange((msg.msgInfo as Exchange).sid, msg.msgNum, receiveOK);
         //	UiManager.Instance.applyMask();
     }
     else
     {
         tmpMsg = null;
     }
 }
Beispiel #4
0
 /// <summary>
 /// 点击事件
 /// </summary>
 public override void buttonEventBase(GameObject gameObj)
 {
     base.buttonEventBase(gameObj);
     if (gameObj.name == "close")
     {
         this.dialogCloseUnlockUI = true;
     }
     else if (gameObj.name == "buttonMake")
     {
         ExchangeFPort exf = FPortManager.Instance.getFPort("ExchangeFPort") as ExchangeFPort;
         exf.exchange(sample.noitceItemSid, now, receiveOK);
     }
     finishWindow();
 }
 /// <summary>
 /// 合成窗口确定按钮的回调
 /// </summary>
 /// <param name="msg"></param>
 public void compound(MessageHandle msg)
 {
     if (msg.msgEvent == msg_event.dialogOK)
     {
         ExchangeFPort   exf          = FPortManager.Instance.getFPort("ExchangeFPort") as ExchangeFPort;
         List <Exchange> exchangeList = ExchangeManagerment.Instance.getCanExchangeWNCard();
         ExchangeSample  sample;
         for (int i = 0; i < exchangeList.Count; i++)
         {
             sample = ExchangeSampleManager.Instance.getExchangeSampleBySid(exchangeList[i].sid);
             if (sample.exchangeSid == tempProp.sid)
             {
                 exf.exchange(exchangeList[i].sid, msg.msgNum, compoundOK);
             }
         }
     }
 }
    public override void DoClickEvent()
    {
        base.DoClickEvent();
        int count = ExchangeManagerment.Instance.getCanExchangeNum(exchange);

        if (count <= 0)
        {
            MaskWindow.UnlockUI();
            return;
        }
        if (exchange != null)
        {
            if (checkStoreFull())
            {
//				MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage ("s0393"));
                UiManager.Instance.openDialogWindow <MessageWindow>((msgwin) => {
                    msgwin.initWindow(1, LanguageConfigManager.Instance.getLanguage("s0040"), null, LanguageConfigManager.Instance.getLanguage("s0393"), null);
                });
                return;
            }
            GuideManager.Instance.doGuide();
            if (fatherWindow is ExChangeWindow)
            {
                getExchangeTipContent(exchange);
                UiManager.Instance.openDialogWindow <BuyWindow>((win) => {
                    win.setExchangeTipsContent(exchangeNames, exchangeValues);
                    win.init(exchange, getPracticalNum(exchange.getExchangeSample(), count), 1, constResourcesPath.NONE, (fatherWindow as ExChangeWindow).sureExchange);
                    win.dialogCloseUnlockUI = false;
                });
            }
            else if (fatherWindow is NoticeWindow)
            {
                UiManager.Instance.openDialogWindow <BuyWindow>((win) => {
                    win.init(exchange, getPracticalNum(exchange.getExchangeSample(), count), 1, constResourcesPath.NONE, (fatherWindow as NoticeWindow).show.GetComponent <NoticeActivityExchangeContent>().receiveGift);
                    win.dialogCloseUnlockUI = false;
                });
            }
            else if (fatherWindow is CardStoreWindow)
            {
                bool           isNew  = false;
                ExchangeSample sample = exchange.getExchangeSample();
                Card           c      = null;
                if (sample.type == PrizeType.PRIZE_CARD)
                {
                    c = CardManagerment.Instance.createCard(sample.exchangeSid);
                }
                (fatherWindow as CardStoreWindow).exchange(exchange.sid, c);
            }
            else if (fatherWindow is StoreWindow)
            {
                if (exchange.getExchangeSample().type == PrizeType.PRIZE_MAGIC_WEAPON)
                {
                    ExchangeFPort exf = FPortManager.Instance.getFPort("ExchangeFPort") as ExchangeFPort;
                    exf.exchange(exchange.sid, 1, showLuckEffect);
                }
                else
                {
                    (fatherWindow as StoreWindow).exchange(exchange.sid);
                }
            }
            else if (fatherWindow is MagicWeaponStoreWindow)
            {
                ExchangeFPort exf = FPortManager.Instance.getFPort("ExchangeFPort") as ExchangeFPort;
                exf.exchange(exchange.sid, 1, showLuckEffect);
            }
        }
    }
Beispiel #7
0
    public void exchange(int sid)
    {
        ExchangeFPort exf = FPortManager.Instance.getFPort("ExchangeFPort") as ExchangeFPort;

        exf.exchange(sid, 1, exchangeOK);
    }