public bool IsSpecialAvailable(SpecialSlot specialSlot) { //if (gameManager.playerProfile.data.level >= specialSlot.specialInfo.availableAtLevel) // return true; //else return false; }
public void SetSpecialSlot(int slot, ItemType itemType) { // Check the slot is valid. if (slot < 0 || slot > specialSlotsGO.transform.childCount) { return; } // Now get the correct slot. SpecialSlot ss = specialSlotsGO.transform.GetChild(slot).GetComponent <SpecialSlot> (); // Set the item type for the mouse over. ss.GetComponent <InspectorItemMouseOver> ().item = itemType; // Now tell it to update its sprite. ss.UpdateUITo(itemType); }
public void AddPressed(SpecialSlot slot) { Debug.Log("Add pressed " + slot.specialInfo.specialName); //int resAvail = gameManager.playerProfile.GetResource( slot.specialInfo.resIndex ); //if (resAvail >= slot.specialInfo.price) //{ // // TODO Collect out anim // gameManager.playerProfile.AddResource( slot.specialInfo.resIndex, -slot.specialInfo.price ); // //slot.specialInfo.count ++; //} //else //{ // Debug.Log("No money"); //} // if (gameManager.playerProfile. }