Пример #1
0
    protected void CreateFloatingText(string text, bool isDamage = true)
    {
        DamagePopupText instance = Instantiate(popupTextPrefab, transform);

        if (!isDamage)
        {
            instance.damageText.color = Color.yellow;
        }
        instance.SetText(text);
    }
Пример #2
0
    private void CreateFloatingText(string text, bool heal = false)
    {
        DamagePopupText instance = Instantiate(popupTextPrefab, transform);

        if (heal)
        {
            instance.damageText.color = Color.green;
        }
        instance.SetText(text);
    }