/// <summary> /// Show/Hide the vendor. /// </summary> public void ToggleVendor(Toggle toggle) { CloseAllSheets(); if (toggle.isOn == true) { inventory.SetActive(true); vendor.SetActive(true); priceGroup.ShowPrices(true); } }
/// <summary> /// Show/Hide the equipments. /// </summary> public void ToggleEquipment() { if (equipment.activeSelf == false) { equipment.SetActive(true); priceGroup.ShowPrices(vendor.activeSelf); } else { equipment.SetActive(false); } }
/// <summary> /// Show/Hide the vendor. /// </summary> public void ToggleVendor(Toggle toggle) { CloseAllSheets(); if (toggle.isOn == true) { inventory.SetActive(true); vendor.SetActive(true); priceGroup.ShowPrices(true); // Sell items on double click clickEquipInventory.destinationGroup = vendorStackGroup; } else { // Equip items on double click clickEquipInventory.destinationGroup = equipmentStackGroup; } }
private PriceGroup priceGroup; // Player's price group /// <summary> /// Start this instance. /// </summary> void Start() { // Init existing items's internal state on scene start foreach (StackItem stackItem in AccessUtility.FindObjectsOfType <StackItem>()) { stackItem.Init(); } priceGroup = GetComponent <PriceGroup>(); Debug.Assert(equipment && inventory && vendor && skills && inventoryStackGroup && equipmentStackGroup && vendorStackGroup && clickEquipInventory && priceGroup, "Wrong settings"); priceGroup.ShowPrices(vendor.activeSelf); }
private PriceGroup priceGroup; // Player's price group /// <summary> /// Start this instance. /// </summary> void Start() { priceGroup = GetComponent <PriceGroup>(); Debug.Assert(equipment && inventory && vendor && skills && inventoryStackGroup && priceGroup, "Wrong settings"); priceGroup.ShowPrices(vendor.activeSelf); }