Exemple #1
0
    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:
            // TODO: Call change weapon
            //charStats.ChangeWeapon();
            break;

        case ItemTypeDefinitions.ARMOR:
            // TODO: Call change armor
            //charStats.ChangeArmor();
            break;
        }
    }
    public void UseItem()
    {
        switch (itemDefinition.itemType)
        {
        case ItemTypeDefinitions.HEALTH:
            charStats.ApplyHealth(itemDefinition.itemAmount);
            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;
        }
    }
Exemple #3
0
    public void UseItem()
    {
        switch (itemDefinition.itemType)
        {
        case ItemTypeDefinitions.HEALTH:
            charStats.ApplyHealth(itemDefinition.itemAmount);
            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:
            Debug.LogError("Can't Use this type of item: " + itemDefinition.itemType);
            break;
        }
    }
 void AddHealthAndMana()
 {
     if (characterDefinition.characterDefinition.currentHealth < characterDefinition.characterDefinition.maxHealth)
     {
         characterDefinition.ApplyHealth(characterDefinition.characterDefinition.charRenevalPoints);
     }
     if (characterDefinition.characterDefinition.currentMana < characterDefinition.characterDefinition.maxMana)
     {
         characterDefinition.ApplyMana(characterDefinition.characterDefinition.charRenevalPoints);
     }
 }
Exemple #5
0
    public void UseItem()
    {
        switch (ItemDefinition.itemType)
        {
        case ItemTypeDefinitions.HEALTH:
            _charStats.ApplyHealth(ItemDefinition.itemAmount);
            break;

        case ItemTypeDefinitions.WEAPON:
            _charStats.ChangeWeapon(this);
            break;
        }
    }
    public void UseItem()
    {
        switch (itemDefinition.itemType)
        {
        case ItemTypeDefinitions.HEALTH:
            charStats.ApplyHealth(itemDefinition.itemAmount);
            charStats.healthParticle.Play();
            break;

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

            break;

        case ItemTypeDefinitions.EXPERIENCE:
            charStats.GiveExperience(itemDefinition.itemAmount);
            charStats.expParticle.Play();

            break;
        }
    }
Exemple #7
0
    public void UseItem()
    {
        switch (itemDefinition.itemType)
        {
            case ItemTypeDefinitions.ARMOUR:
                {
                    characterStats.ChangeArmour(this);
                    break;
                }
            case ItemTypeDefinitions.BUFF:
                break;
            case ItemTypeDefinitions.EMPTY:
                break;
            case ItemTypeDefinitions.HEALTH:
                {
                    characterStats.ApplyHealth(itemDefinition.itemAmount);
                    break;
                }

            case ItemTypeDefinitions.MANA:
                {
                    characterStats.ApplyMana(itemDefinition.itemAmount);
                    break;
                };
            case ItemTypeDefinitions.WEALTH:
                {
                    characterStats.GiveWealth(itemDefinition.itemAmount);
                    break;
                }
            case ItemTypeDefinitions.WEAPON:
                {
                    characterStats.ChangeWeapon(this);
                    break;
                }
            default:
                break;
        }
    }