예제 #1
0
 /// <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);
     }
 }
예제 #3
0
 /// <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;
     }
 }
예제 #4
0
    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);
    }
예제 #5
0
    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);
    }