Beispiel #1
0
    public void OnEquipmentChanged(EquipmentScript ItemToAdd, EquipmentScript ItemToRemove)
    {
        if (ItemToAdd != null)
        {
            Defence.AddModifier(ItemToAdd.defenceModifier);

            Damage.AddModifier(ItemToAdd.damageModifier);

            Agility.AddModifier(ItemToAdd.agilityModifier);
        }

        if (ItemToRemove != null)
        {
            Defence.RemoveModifier(ItemToRemove.defenceModifier);

            Damage.RemoveModifier(ItemToRemove.damageModifier);

            Agility.RemoveModifier(ItemToRemove.agilityModifier);
        }
    }