Example #1
0
    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);
                }
            }
        }
    }
Example #2
0
 /// <summary>
 /// 刷新战役进度
 /// </summary>
 void RefreshStageChapter(int nErrorCode)
 {
     if (nErrorCode == 0)
     {
         GotoChapter(StageDC.GetCompaignStageType(), StageDC.GetStageChapter(StageDC.GetCompaignStageType()), -1);
     }
     else
     {
         Debug.Log("获取数据失败:" + nErrorCode.ToString());
     }
 }
Example #3
0
 void OnTeamStage(UIButton sender)
 {
     if (m_type == StageType.Team)
     {
         return;
     }
     m_type    = StageType.Team;
     m_Chapter = StageDC.GetStageChapter(m_type);
     if (m_Chapter == 0)
     {
         NGUIUtil.ShowTipWndByKey("88800029", 0.5f);
     }
     UpdateData(m_type, m_Chapter);
 }
Example #4
0
    /// <summary>
    /// 点击事件
    /// </summary>
    public override bool OnClick()
    {
        StageMapWnd wnd = WndManager.FindDialog <StageMapWnd>();

        if (wnd == null)
        {
            wnd = WndManager.GetDialog <StageMapWnd>();
            if (wnd != null)
            {
                wnd.GotoChapter(StageDC.GetCompaignStageType(), StageDC.GetStageChapter(StageDC.GetCompaignStageType()), -1);
                MainTownScene.SaveCameraPosToCamPosTemp();
            }
        }
        return(true);
    }
Example #5
0
    /// <summary>
    /// 获得途径.
    /// </summary>
    private void AddGetWay()
    {
        AddBanner(0);
        List <int> lCounpart = StageM.GetRewardFromStage(m_ItemInfo.itemType);

        if (lCounpart == null || lCounpart.Count < 1)
        {
            return;
        }
        List <CounterPartInfo> lCounterInfo = StageM.GetCounterPartInfoList(lCounpart);

        if (lCounterInfo == null || lCounterInfo.Count < 1)
        {
            return;
        }

        Dictionary <int, int> dl      = new Dictionary <int, int>();
        PdbbbItem             pbbItem = null;
        GameObject            go2     = NDLoad.LoadWndItem("PdbbbItem", MyHead.Table.transform);

        pbbItem = go2.GetComponent <PdbbbItem>();
        if (pbbItem != null && pbbItem.MyHead.Table != null)
        {
            pbbItem.MyHead.Table.columns   = 2;
            pbbItem.MyHead.Table.padding.y = 10f;
            foreach (CounterPartInfo info in lCounterInfo)
            {
//				if(info.isboss == 0) continue;
                if (dl.ContainsKey(info.id))
                {
                    continue;
                }
                dl.Add(info.id, info.id);
                GameObject go = NDLoad.LoadWndItem("EquipComeFromItem", pbbItem.MyHead.Table.transform);
                if (go != null)
                {
                    EquipComeFromItem item = go.GetComponent <EquipComeFromItem>();
                    if (item)
                    {
                        item.SetCounterInfoData(info);
                        item.MyHead.BtnItemClick.OnClickEventHandler += (UIButton sender) =>
                        {
                            bool Open = StageDC.CheckOpenStage((StageType)info.type, info.id);
                            if (!Open)
                            {
                                NGUIUtil.ShowTipWndByKey(10000175);
                                return;
                            }

                            StageMapWnd wnd = WndManager.GetDialog <StageMapWnd>();
                            if (wnd != null)
                            {
                                wnd.SetMainMenuTop(false);

                                int stageNode = StageDC.GetStageNode(info.id);
                                int chapter   = StageDC.GetStageChapter(info.id);
                                wnd.GotoChapter((StageType)info.type, chapter, stageNode);
                            }
                            EquipInfoWnd InfoWnd = WndManager.FindDialog <EquipInfoWnd>();
                            if (InfoWnd != null)
                            {
                                WndManager.SetBeforeWnd(wnd, InfoWnd);
                            }
                        };;
                    }
                }
                pbbItem.MyHead.Table.Reposition();
                pbbItem.MyHead.Table.repositionNow = true;
            }
        }
    }