Ejemplo n.º 1
0
        public void RemoveStatusEffect(Entity.StatusEffect effect)
        {
            _currentEffects.Remove(effect);
            switch (effect.EffectType)
            {
            case Entity.StatusType.Attacking:
            case Entity.StatusType.Healing:
                DestroyIcon(effect.amount > 0 ? IconType.Buff : IconType.Debuff);
                break;

            case Entity.StatusType.Mitigation:
                DestroyIcon(IconType.Shield);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Ejemplo n.º 2
0
        public void AddStatusEffect(Entity.StatusEffect effect)
        {
            _currentEffects.Add(effect);

            switch (effect.EffectType)
            {
            case Entity.StatusType.Attacking:
            case Entity.StatusType.Healing:
                CreateIcon(effect.amount > 0 ? buffIconPrefab : debuffIconPrefab,
                           effect.amount > 0 ? IconType.Buff : IconType.Debuff);
                break;

            case Entity.StatusType.Mitigation:
                // shield
                CreateIcon(shieldIconPrefab, IconType.Shield);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }