public void ClearItem() { spellItems = null; icon.sprite = null; icon.enabled = false; gameObject.SetActive(false); }
public void AddItem(SpellItems newItem) { spellItems = newItem; icon.sprite = spellItems.itemIcon; icon.enabled = true; gameObject.SetActive(true); }
public void UpdateSpellQuickSlotUI(SpellItems spell) { if (spell.itemIcon != null) { spellIcon.sprite = spell.itemIcon; spellIcon.enabled = true; } else { spellIcon.sprite = null; spellIcon.enabled = false; } }
public void ChangeSpellItem() { currentSpellIndex = currentSpellIndex + 1; if (currentSpellIndex == 0 && playerProfile.spellInSlot[0] != null) { currentSpell = playerProfile.spellInSlot[currentSpellIndex]; LoadSpellOnSlot(playerProfile.spellInSlot[currentSpellIndex]); } else if (currentSpellIndex == 0 && playerProfile.spellInSlot[0] == null) { currentSpellIndex = currentSpellIndex + 1; } else if (currentSpellIndex == 1 && playerProfile.spellInSlot[1] != null) { currentSpell = playerProfile.spellInSlot[currentSpellIndex]; LoadSpellOnSlot(playerProfile.spellInSlot[currentSpellIndex]); } else if (currentSpellIndex == 1 && playerProfile.spellInSlot[1] == null) { currentSpellIndex = currentSpellIndex + 1; } else if (currentSpellIndex == 2 && playerProfile.spellInSlot[2] != null) { currentSpell = playerProfile.spellInSlot[currentSpellIndex]; LoadSpellOnSlot(playerProfile.spellInSlot[currentSpellIndex]); } else if (currentSpellIndex == 2 && playerProfile.spellInSlot[2] == null) { currentSpellIndex = currentSpellIndex + 1; } else if (currentSpellIndex == 3 && playerProfile.spellInSlot[3] != null) { currentSpell = playerProfile.spellInSlot[currentSpellIndex]; LoadSpellOnSlot(playerProfile.spellInSlot[currentSpellIndex]); } else if (currentSpellIndex == 3 && playerProfile.spellInSlot[3] == null) { currentSpellIndex = currentSpellIndex + 1; } if (currentSpellIndex > playerProfile.spellInSlot.Length - 1) { currentSpellIndex = 0; currentSpell = playerProfile.spellInSlot[currentSpellIndex]; LoadSpellOnSlot(playerProfile.spellInSlot[currentSpellIndex]); } }
private void Start() { //weapon rightWeapon = playerProfile.weaponsInRightHandSlot[0]; leftWeapon = playerProfile.weaponsInLeftHandSlot[0]; weaponSlotManager.LoadWeaponOnSlot(rightWeapon, false); weaponSlotManager.LoadWeaponOnSlot(leftWeapon, true); //gear currentHelmetEquipment = playerProfile.helmetInSlot[0]; currentChestArmorEquipment = playerProfile.chestArmorInSlot[0]; currentBottomArmorEquipment = playerProfile.bottomArmorInSlot[0]; //item currentConsumable = playerProfile.itemInSlot[0]; LoadItemOnSlot(currentConsumable); //spell currentSpell = playerProfile.spellInSlot[0]; LoadSpellOnSlot(currentSpell); }
public void LoadSpellOnSlot(SpellItems spellItem) { quickSlotsUI.UpdateSpellQuickSlotUI(spellItem); }