public void UseItem()
    {
        switch (itemDefinition.itemType)
        {
        case ItemTypeDefinitions.HEALTH:
            charStats.ApplyHealth(itemDefinition.itemAmount);
            //Debug.Log(charStats.GetHealth());
            break;

        case ItemTypeDefinitions.MANA:
            charStats.ApplyMana(itemDefinition.itemAmount);
            break;

        case ItemTypeDefinitions.WEALTH:
            charStats.GiveWealth(itemDefinition.itemAmount);
            break;

        case ItemTypeDefinitions.WEAPON:
            //charStats.ChangeWeapon(this);
            break;

        case ItemTypeDefinitions.ARMOR:
            //charStats.ChangeArmor(this);
            break;
            //default:
        }
    }
 public void ApplyHealth(int healthAmount)
 {
     characterDefinition.ApplyHealth(healthAmount);
 }
Exemple #3
0
 public void ApplyHealth(float healthAmount)
 {
     CharacterDefinition.ApplyHealth(healthAmount);
 }