Esempio n. 1
0
 public bool IsSpecialAvailable(SpecialSlot specialSlot)
 {
     //if (gameManager.playerProfile.data.level >= specialSlot.specialInfo.availableAtLevel)
     //	return true;
     //else
         return false;
 }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
    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.
    }