コード例 #1
0
    public static ContinuousBeatBonus CalcuTaiguComboBonus(int comboCount)
    {
        ContinuousBeatBonus comboBonus = ContinuousBeatBonus.None;

        if (comboCount >= 80)
        {
            comboBonus = ContinuousBeatBonus.Lv5;
        }
        else if (comboCount >= 50)
        {
            comboBonus = ContinuousBeatBonus.Lv4;
        }
        else if (comboCount >= 30)
        {
            comboBonus = ContinuousBeatBonus.Lv3;
        }
        else if (comboCount >= 10)
        {
            comboBonus = ContinuousBeatBonus.Lv2;
        }
        else if (comboCount >= 5)
        {
            comboBonus = ContinuousBeatBonus.Lv1;
        }

        return(comboBonus);
    }
コード例 #2
0
ファイル: CTaiguAnimation.cs プロジェクト: happylays/tbb2
    void OnBeatCombo(int comboCount)
    {
        return;

        bool showSpecial = false;
        ContinuousBeatBonus beatBonus = CTaiguMatch.CalcuTaiguComboBonus(comboCount);

        if (beatBonus > ContinuousBeatBonus.None)
        {
            m_BeatCombo.gameObject.SetActive(true);
            m_BeatCombo.ChangeCount(comboCount);
            m_BeatCombo.PlayEffect();

            if (beatBonus >= ContinuousBeatBonus.Lv4)
            {
                showSpecial = true;
            }
        }
        else
        {
            m_BeatCombo.gameObject.SetActive(false);
            if (m_SpecialParticle1 != null)
            {
                m_SpecialParticle1.gameObject.SetActive(false);
            }
            if (m_SpecialParticle1 != null)
            {
                m_SpecialParticle2.gameObject.SetActive(false);
            }
        }
        if (m_SpecialParticleNormal != null)
        {
            m_SpecialParticleNormal.gameObject.SetActive(showSpecial);
        }
    }
コード例 #3
0
        public static ContinuousBeatBonus CalcuPerfectBonus(int perfectCount)
        {
            ContinuousBeatBonus perfectBonus = ContinuousBeatBonus.None;

            if (perfectCount >= 8)
            {
                perfectBonus = ContinuousBeatBonus.Lv5;
            }
            else if (perfectCount >= 5)
            {
                perfectBonus = ContinuousBeatBonus.Lv4;
            }
            else if (perfectCount >= 3)
            {
                perfectBonus = ContinuousBeatBonus.Lv3;
            }
            else if (perfectCount >= 2)
            {
                perfectBonus = ContinuousBeatBonus.Lv2;
            }
            else if (perfectCount >= 1)
            {
                perfectBonus = ContinuousBeatBonus.Lv1;
            }

            return(perfectBonus);
        }
コード例 #4
0
ファイル: TaiguCombo.cs プロジェクト: happylays/tbb2
    public void ChangeCount(int comboCount)
    {
        ContinuousBeatBonus beatBonus = CTaiguMatch.CalcuTaiguComboBonus(comboCount);

        if (beatBonus >= ContinuousBeatBonus.Lv1)
        {
            int numLevel   = 0;
            int comboLevel = 0;

            if (beatBonus == ContinuousBeatBonus.Lv5)
            {
                numLevel   = 2;
                comboLevel = 4;
            }
            else if (beatBonus == ContinuousBeatBonus.Lv4)
            {
                numLevel   = 1;
                comboLevel = 3;
            }
            else if (beatBonus == ContinuousBeatBonus.Lv3)
            {
                comboLevel = 2;
            }
            else if (beatBonus == ContinuousBeatBonus.Lv2)
            {
                comboLevel = 1;
            }

            int occupyIndex = 0;
            int divisor     = mDivisor;
            for (int index = 0; index < m_NumberRenderer.Length; ++index)
            {
                int numValue = comboCount / divisor;
                if (numValue > 0)
                {
                    SetNumRenderer(occupyIndex, numValue, numLevel, comboLevel);
                    ++occupyIndex;
                }
                else
                {
                    if (occupyIndex != 0)
                    {
                        SetNumRenderer(occupyIndex, numValue, numLevel, comboLevel);
                        ++occupyIndex;
                    }
                }

                comboCount %= divisor;
                divisor    /= 10;
            }

            for (; occupyIndex < m_NumberRenderer.Length; ++occupyIndex)
            {
                m_NumberRenderer[occupyIndex].gameObject.SetActive(false);
            }
        }
    }