コード例 #1
0
ファイル: TrapShowWnd.cs プロジェクト: 741645596/batgame
    void BtnGetSoulStone_OnClickEventHandler(UIButton sender)
    {
        sdata.s_itemtypeInfo itemInfo = ItemM.GetItemInfo(m_Info.fragmentTypeID);//当前灵魂石
        ItemComeFromWnd      wnd      = WndManager.GetDialog <ItemComeFromWnd>();

        wnd.SetData(itemInfo, null, m_Info, 4);
    }
コード例 #2
0
ファイル: ItemComeFromItem.cs プロジェクト: 741645596/batgame
    void BtnItemClick_OnClickHander(UIButton sender)
    {
        if (m_counterInfo != null)
        {
            bool Open = StageDC.CheckOpenStage((StageType)m_counterInfo.type, m_counterInfo.id);
            if (!Open)
            {
                NGUIUtil.ShowTipWndByKey(10000175);
                return;
            }

            StageMapWnd wnd = WndManager.GetDialog <StageMapWnd>();
            if (wnd != null)
            {
                wnd.SetMainMenuTop(false);
                int stageNode = StageDC.GetStageNode(m_counterInfo.id);
                int chapter   = StageDC.GetStageChapter(m_counterInfo.id);
                wnd.GotoChapter((StageType)m_counterInfo.type, chapter, stageNode);
                ItemComeFromWnd itemComeWnd = WndManager.FindDialog <ItemComeFromWnd>();
                if (itemComeWnd != null)
                {
                    WndManager.SetBeforeWnd(wnd, itemComeWnd);
                }
            }
        }
    }
コード例 #3
0
ファイル: NeedItemNumItem.cs プロジェクト: 741645596/batgame
    void BtnClick_OnClickHander(UIButton sender)
    {
//		ItemComeFromWnd wnd = WndManager.GetDialog<ItemComeFromWnd>();
        sdata.s_itemtypeInfo itemInfo = ItemM.GetItemInfo(m_itemType);        //当前灵魂石
        ItemComeFromWnd      wnd      = WndManager.GetDialog <ItemComeFromWnd>();

        wnd.SetData(itemInfo, null, null, 1);
    }
コード例 #4
0
    void BtnSure_OnClickEventHandler(UIButton sender)
    {
        switch (m_wndType)
        {
        case 1:    //确定
            BtnWndBg_OnClickEventHandler(null);
            break;

        case 2:    //合成公式
            TweenLeft();
            EquipComposeWnd wnd = WndManager.GetDialog <EquipComposeWnd>();
            if (wnd)
            {
                EnableBtn(false);
                wnd.SetData(m_iItemTypeID);
            }
            break;

        case 3:    //穿装备
            PdbycWnd wnd1 = WndManager.FindDialog <PdbycWnd>();
            if (wnd1)
            {
                wnd1.SetEquipDataNoReady();
            }
            MyHead.BtnSure.isEnabled = false;
            SoldierDC.Send_SoldierEquipRequest(m_soldierInfo.ID, m_posIndex);
            WndManager.DestoryDialog <EquipmentInfoWnd>();
            break;

        case 4:    //购买
            //堆叠数量上限判定
            bool overLimit = ItemDC.CheckItemOverLimit(m_iItemTypeID, m_iBuyCount);
            if (overLimit)
            {
                NGUIUtil.ShowTipWndByKey(30000030);
                break;
            }
            //持有代币是否足够
            bool currencyEnough = UserDC.CheckCurrencyEnough(m_iBuyCurrency, m_iBuyPrice);
            if (currencyEnough)
            {
            }
            else
            {
                string currencyName = NGUIUtil.GetStringByKey(99700000 + m_iBuyCurrency);
                string tipText      = string.Format(NGUIUtil.GetStringByKey(30000029), currencyName);
                //NGUIUtil.ShowTipWnd(tipText);
                NGUIUtil.ShowFreeSizeTipWnd(tipText);
            }
            break;

        case 5:    //获得途径
            ItemComeFromWnd Formwnd = WndManager.GetDialog <ItemComeFromWnd>();
            s_itemtypeInfo  info    = ItemM.GetItemInfo(m_iItemTypeID);
            Formwnd.SetData(info, m_soldierInfo, null);
            break;
        }
    }
コード例 #5
0
    /// <summary>
    ///  显示获取灵魂石窗口
    /// </summary>
    void BtnGetSoulStone_OnClickEventHandler(UIButton sender)
    {
        s_itemtypeInfo info = ItemM.GetItemInfo(m_soldierInfo.fragmentTypeID);

        if (info != null)
        {
            ItemComeFromWnd wnd = WndManager.GetDialog <ItemComeFromWnd>();
            if (wnd != null)
            {
                wnd.SetData(info, m_soldierInfo, null, 2);
            }
        }
    }
コード例 #6
0
 public void BtnSelect_OnClickEventHandler(UIButton sender)
 {
     if (m_canExist == true)        //可召唤但未召唤的炮弹兵
     {
         SummonHeroWnd wnd = WndManager.GetDialog <SummonHeroWnd>();
         if (wnd != null)
         {
             wnd.SetData(Info, null, 1);
         }
     }
     else                                                                        //不可召唤的炮弹兵 目前不做处理
     {
         sdata.s_itemtypeInfo itemInfo = ItemM.GetItemInfo(Info.fragmentTypeID); //当前灵魂石
         ItemComeFromWnd      wnd      = WndManager.GetDialog <ItemComeFromWnd>();
         wnd.SetData(itemInfo, Info, null, 3);
     }
 }
コード例 #7
0
 public void BtnSelect_OnClickEventHandler(UIButton sender)
 {
     if (myParent != null && m_ItemType == 1 && m_TrapState == TrapState.Exit)
     {
         TrapShowWnd wnd = WndManager.GetDialog <TrapShowWnd>();
         wnd.SetBuildInfo(m_Info, myParent.m_Build);
     }
     else if (m_TrapState == TrapState.CanSum)
     {
         SummonHeroWnd wnd = WndManager.GetDialog <SummonHeroWnd>();
         if (wnd != null)
         {
             wnd.SetData(null, m_Info, 2);
         }
     }
     else if (m_TrapState == TrapState.CanNotSum)
     {
         sdata.s_itemtypeInfo itemInfo = ItemM.GetItemInfo(m_Info.fragmentTypeID);            //当前灵魂石
         ItemComeFromWnd      wnd      = WndManager.GetDialog <ItemComeFromWnd>();
         wnd.SetData(itemInfo, null, m_Info, 5);
     }
 }