Exemplo n.º 1
0
    void HandlePetXP(int factor, int combo)
    {
        //int amount = factor * combo;
        int temp = factor * combo;

        if (m_PetStat.m_PregressingLevel + temp > m_PetStat.m_PregressingNextLevel)
        {
            m_IsLevelUp = true;
            m_PetStat.m_PregressingLevel = m_PetStat.m_PregressingLevel + temp - m_PetStat.m_PregressingNextLevel;
            temp = m_PetStat.m_PregressingNextLevel;
        }
        else
        {
            m_PetStat.m_PregressingLevel += temp;
            temp = m_PetStat.m_PregressingLevel;
        }
        //m_PetStat.m_PregressingLevel += (factor * combo);

        m_HealthBarController.ChangeValue(temp, m_PetStat.m_PregressingNextLevel, this);
    }