Exemplo n.º 1
0
    void UpdateSweepAwardFellowExp()
    {
        m_nFellowExpCurStep = 0;
        int             nCurLevel = -1;
        FellowContainer container = GameManager.gameManager.PlayerDataPool.FellowContainer;

        if (container != null)
        {
            Fellow fellow = container.GetFellowByGuid(Singleton <ObjManager> .GetInstance().MainPlayer.CurFellowObjGuid);
            if (fellow != null)
            {
                nCurLevel = fellow.Level;
            }
        }

        if (m_nFellowLevelBeforeSweep == nCurLevel)
        {
            MyTweenNum tw = new MyTweenNum();
            tw.From = m_FellowExpSlider.value;
            tw.To   = CalFellowExpSliderValue();
            m_FellowExpTweenNumList.Add(tw);
        }
        else if (m_nFellowLevelBeforeSweep < nCurLevel)
        {
            for (int i = m_nFellowLevelBeforeSweep; i <= nCurLevel; ++i)
            {
                MyTweenNum tw = new MyTweenNum();
                if (i == m_nFellowLevelBeforeSweep)
                {
                    tw.From = m_FellowExpSlider.value;
                    tw.To   = 1f;
                    m_FellowExpTweenNumList.Add(tw);
                }
                else if (i > m_nFellowLevelBeforeSweep && i < nCurLevel)
                {
                    tw.From = 0f;
                    tw.To   = 1f;
                    m_FellowExpTweenNumList.Add(tw);
                }
                else if (i == nCurLevel)
                {
                    tw.From = 0;
                    tw.To   = CalFellowExpSliderValue();
                    m_FellowExpTweenNumList.Add(tw);
                }
            }
        }
    }
Exemplo n.º 2
0
    void UpdateSweepAwardExp()
    {
        m_nExpCurStep = 0;
        int            nCurLevel  = -1;
        Obj_MainPlayer mainPlayer = Singleton <ObjManager> .Instance.MainPlayer;

        if (null != mainPlayer)
        {
            nCurLevel = mainPlayer.BaseAttr.Level;
        }

        if (m_nLevelBeforeSweep == nCurLevel)
        {
            MyTweenNum tw = new MyTweenNum();
            tw.From = m_ExpSlider.value;
            tw.To   = CalExpSliderValue();
            m_ExpTweenNumList.Add(tw);
        }
        else if (m_nLevelBeforeSweep < nCurLevel)
        {
            for (int i = m_nLevelBeforeSweep; i <= nCurLevel; ++i)
            {
                MyTweenNum tw = new MyTweenNum();
                if (i == m_nLevelBeforeSweep)
                {
                    tw.From = m_ExpSlider.value;
                    tw.To   = 1f;
                    m_ExpTweenNumList.Add(tw);
                }
                else if (i > m_nLevelBeforeSweep && i < nCurLevel)
                {
                    tw.From = 0f;
                    tw.To   = 1f;
                    m_ExpTweenNumList.Add(tw);
                }
                else if (i == nCurLevel)
                {
                    tw.From = 0;
                    tw.To   = CalExpSliderValue();
                    m_ExpTweenNumList.Add(tw);
                }
            }
        }
    }