public void DisplayItemDetails(RPGItem item, InventoryGUIType type, BasicGUIController gui)
	{
		Enable();
		activeGUIController = gui;
		nameLabel.text = item.Name;
		descriptionLabel.text = item.Description;
		GameObject atlas = Resources.Load(item.AtlasName) as GameObject;
		icon.atlas = atlas.GetComponent<UIAtlas>();
		icon.spriteName = item.IconPath;
		for (int i = 0; i < allButtons.Length; i++) {
			allButtons[i].SetActive(false);
				}
		if(type == InventoryGUIType.quickInventory)
		{
			if(item.IsEquippable)
				EquipButton.SetActive(true);
		}
		else if(type == InventoryGUIType.Inventory)
		{
			if(item.IsEquippable)
				EquipButton.SetActive(true);
			DestroyButton.SetActive(true);
		}
		int count = 0;
		for (int i = 0; i < allButtons.Length; i++) {
			if(allButtons[i].activeSelf)
			{
				allButtons[i].transform.localPosition = new Vector3(buttonsStartPos.localPosition.x + count*buttonsGap, buttonsStartPos.localPosition.y, buttonsStartPos.localPosition.z);
				count++;
			}
		}
	}
Ejemplo n.º 2
0
	public void LoadShopItemTile(InventoryItem item, BasicGUIController newOwner, InventoryGUIType type, int i)
	{
		index = i;
		owner = newOwner;
		switch (type)
		{
		case InventoryGUIType.Shop:
			unStockButton.SetActive(false);
			break;
		case InventoryGUIType.Playershop:
			unStockButton.SetActive(true);
			break;
		}
		LoadGeneric(item);
		itemTileType = type;
	}
Ejemplo n.º 3
0
	public void LoadBlank(BasicGUIController newOwner, InventoryGUIType type, int i)
	{
		index = i;
		owner = newOwner;
		itemTileType = type;
		nonBlankObject.SetActive(false);
		blankCover.SetActive(true);
		tile.color = blankColor;
		quantityTag.SetActive(false);
		isBlank = true;
		collider.enabled = true;
	}
	public void DisplayItemDetails(InventoryItem item, InventoryGUIType type, BasicGUIController gui)
	{
		DisplayItemDetails(item.rpgItem, type, gui);

	}
Ejemplo n.º 5
0
	public void LoadItemTile(InventoryItem item, BasicGUIController newOwner, InventoryGUIType type, int i)
	{
		index = i;
		owner = newOwner;
		switch (type)
		{
		case InventoryGUIType.Inventory:
			draggable = false;
			canDisplayNew = true;
			canDisplayTick = true;
			canDisplayQuantity = true;
			break;
		case InventoryGUIType.quickInventory:
			if(item.rpgItem.ItemCategory == ItemType.Armor || item.rpgItem.ItemCategory == ItemType.NakedArmor)
				canDisplayQuantity = false;
			else
				canDisplayQuantity = true;
			draggable = true;
			canDisplayNew = false;
			canDisplayTick = true;

			break;
		case InventoryGUIType.Shop:
			draggable = false;
			canDisplayNew = false;
			canDisplayTick = false;
			canDisplayQuantity = true;
			break;
		case InventoryGUIType.Reward:
			draggable = false;
			canDisplayNew = false;
			canDisplayTick = false;
			canDisplayQuantity = false;
			break;
		case InventoryGUIType.Other:
			draggable = true;
			canDisplayNew = false;
			canDisplayTick = true;
			break;
		}
		LoadGeneric(item);
		itemTileType = type;
	}