Exemple #1
0
    public void AddEffect(StatusEffect statusEffect)
    {
        StatusEffectUIIcon temp = Instantiate(prefab, transform);

        temp.SetEffect(statusEffect);
        icons.Add(temp);
    }
Exemple #2
0
    public void RemoveEffect(StatusEffect statusEffect)
    {
        StatusEffectUIIcon toRemove = null;

        foreach (StatusEffectUIIcon icon in icons)
        {
            if (icon.effect == statusEffect)
            {
                toRemove = icon;
                break;
            }
        }
        icons.Remove(toRemove);
        Destroy(toRemove.gameObject);
    }