Example #1
0
    private void GetStarData()
    {
        m_totalStar = 0;
        m_haveStar  = 0;
        List <CounterPartInfo> l = StageDC.GetChaptersGate(m_Chapter, m_type);

        foreach (CounterPartInfo Item in l)
        {
            if (Item.isboss == 1)
            {
                m_totalStar += 3;
                if (StageDC.CheckOpenStage(m_type, Item.id) == true)
                {
                    m_haveStar += StageDC.GetPassStageStar(m_type, Item.id);
                }
            }
        }
    }
Example #2
0
    /// <summary>
    /// 初始化副本数据
    /// </summary>
    public void SetStageContext(StageType Type, int Chapter)
    {
        m_CounterInfo = StageDC.GetChaptersGate(Chapter, Type);

        if (m_CounterInfo == null || m_CounterInfo.Count == 0)
        {
            Debug.LogError("s_counterpartInfo is error");
            return;
        }
        if (m_StageNode == null || m_StageNode.Count == 0)
        {
            Debug.LogError("m_StageNode is error");
            return;
        }

        if (m_StageNode.Count < m_CounterInfo.Count)
        {
            NGUIUtil.ShowFreeSizeTipWnd(20000001, null, 30);
            return;
        }

        foreach (StageNode Node in m_StageNode)
        {
            if (Node == null)
            {
                Debug.LogError("Node is error");
                continue;
            }
            else
            {
                CounterPartInfo Info = FindCounterpartInfo(Type, Chapter, Node.m_Stage);
                if (Info == null)
                {
                    Node.gameObject.SetActive(false);
                    continue;
                }
                else
                {
                    Node.SetStageData(Type, Chapter, Info);
                }
            }
        }

        if (m_lbStageName != null)
        {
            m_lbStageName.text = "[ffffff]" + NGUIUtil.GetStringByKey("88800092") + m_CounterInfo[0].chapters.ToString() + NGUIUtil.GetStringByKey("88800093")
                                 + " " + m_CounterInfo[0].chaptersname;
        }
        else
        {
            Debug.LogError("m_lbStageName is null");
        }


        foreach (StageLine line in m_StageLine)
        {
            if (line == null)
            {
                Debug.LogError("Node is error");
                continue;
            }
            else
            {
                line.SetStageData(Type, Chapter);
            }
        }
    }