Пример #1
0
 // Access other scripts' methods for the potion effects
 public void Effect()
 {
     if (inv.texInv == shop.itemTex[0])
     {
         // 1. HEALTH POTION
         HDScript.healthPotion();
     }
     if (inv.texInv == shop.itemTex[1])
     {
         // 2. MANA POTION
         manaScript.manaPotion();
     }
     if (inv.texInv == shop.itemTex[2])
     {
         // 3. SPEED POTION
         move.speedPotion();
     }
     if (inv.texInv == shop.itemTex[3])
     {
         // 4. ATTACK DAMAGE POTION
         playerStats.AttackDamagePotion();
     }
     if (inv.texInv == shop.itemTex[4])
     {
         // 5. MAX HEALTH POTION
         HDScript.maxHealthPotion();
     }
     if (inv.texInv == shop.itemTex[5])
     {
         // 6. SPELL DAMAGE POTION
         playerStats.SpellDamagePotion();
         //potion6 = true;
     }
 }