Example #1
0
 public void Setup(Shoe currentItem)
 {
     item            = currentItem;
     icon.texture    = item.GetIconAsTexture();
     nameLabel.text  = item.name;
     priceLabel.text = item.price.ToString();
 }
Example #2
0
    // initialize information of panel by information of chosen item
    public void Init(Shoe currentShoe)
    {
        //title.text = currentItem.name;
        //price.text = currentItem.price.ToString();
        //company.text = currentItem.company;
        icon.texture = currentShoe.GetIconAsTexture();
        UIManager.Instance.shopPanel.url = currentShoe.link;

        CurrentCustomShoe.SetCurrentCustomShoe(currentShoe.id);



        if (currentShoe.isCustomizable)
        {
            Customize.DeleteSelectParts();
            Customize.AddSelectParts(JSONHandler.GetPartsListByShoeId(currentShoe.id));
            Customize.gameObject.SetActive(true);

            // 각 파트별로 첫번쨰 옵션으로 초기화.
            //foreach (CustomizingPart part in JSONHandler.GetPartsListByShoeId(currentShoe.id)){
            //    part.GetMaterial().mainTexture = JSONHandler.GetOptionsListByPartId(part.id)[0].GetTexture();
            //}
        }
    }