// Bubble Hurt Effect
    public void BubbleUpHurtEffect(string text, bool critical, FC_ELITE_TYPE type, bool isFromSkill, Vector3 pos)
    {
        float size_factor = 1.0f;
        Color color       = _normalColor;

        // Scale
        if (type == FC_ELITE_TYPE.Boss ||
            type == FC_ELITE_TYPE.MiniBoss)
        {
            size_factor = 2.0f;
        }
        else if (type == FC_ELITE_TYPE.Elite)
        {
            size_factor = 1.5f;
        }
        else
        {
            size_factor = 1.0f;
        }

        if (critical)
        {
            size_factor = 2.0f;
        }

        // Critical
        if (critical && type == FC_ELITE_TYPE.hero)
        {
            text        = "!";
            size_factor = 2.0f;
        }



        // Color
        if ((type != FC_ELITE_TYPE.hero) && (!isFromSkill))
        {
            color = _normalColor;
        }
        else if ((type != FC_ELITE_TYPE.hero) && (isFromSkill))
        {
            color = _goldedColor;
        }
        else if (type == FC_ELITE_TYPE.hero)
        {
            color = _bloodColor;
        }

        BubbleUpEffect(text, color, pos, size_factor);
    }
Example #2
0
    public void ChangeHP(int delta, bool critical, FC_ELITE_TYPE type, bool isFromSkill)
    {
        if (delta > 0)
        {
            BubbleUpHurtEffect(delta.ToString(), critical, type, isFromSkill);

            if ((type != FC_ELITE_TYPE.hero) && (_bloodBar.sliderValue <= 0f))
            {
                _bloodBar.gameObject.SetActive(false);
                _displayText.gameObject.SetActive(false);
                if (_icon != null)
                {
                    _icon.gameObject.SetActive(false);
                }
            }
        }
    }
Example #3
0
 // Hurt effect
 public void BubbleUpHurtEffect(string text, bool critical, FC_ELITE_TYPE type, bool isFromSkill)
 {
     BubbleEffectManager.Instance.BubbleUpHurtEffect(text, critical, type, isFromSkill, _bubbles.transform.position);
 }