Пример #1
0
    public void SelectThisItem(SaloonView item)
    {
        if (selectedItem)
        {
            selectedItem.GetComponent <Button> ().interactable = true;
        }

        selectedItem = item;
        selectedItem.GetComponent <Button> ().interactable = false;
        ConfirmationButton.interactable = true;
    }
Пример #2
0
    /// <summary>
    /// Deletes all dresses after closed button in clicked to prevent duplicating items.
    /// </summary>
    public void DeleteAllItems()
    {
        selectedItem = null;
        ConfirmationButton.interactable = false;

        for (int i = 0; i < HairContainer.transform.childCount; i++)
        {
            GameObject.Destroy(HairContainer.transform.GetChild(i).gameObject);
        }

        for (int i = 0; i < PurchasedHairContainer.transform.childCount; i++)
        {
            GameObject.Destroy(PurchasedHairContainer.transform.GetChild(i).gameObject);
        }
    }