예제 #1
0
    public void OnClickItemButton(int index)
    {
        // Debug.Log("index: " + index);
        selectedItem.prevIndex = selectedItem.index;
        selectedItem.index     = index;
        // Debug.Log("index: " + selectedItem.index);

        try { content.GetTile(selectedItem.prevIndex).Highlight = HighlightProperties.Normal; } catch (System.Exception e) { };
        content.GetTile(selectedItem.index).Highlight = HighlightProperties.Selected;

        Item item = Inventory.GetItem((int)currentState, index);

        // string setName = item.setName.Equals("") ? "" : " (" + item.setName + ")";

        // Image
        selectedItem.largeImage.sprite = item.image;
        selectedItem.image.sprite      = item.image;

        // Description
        selectedItem.description.text = "<size=35><color=#FF7900>" + item.name /* + setName */ + "</color></size>\n" + item.description;

        // Button
        selectedItem.SetButton((int)item.CurrentState);

        // Price
        selectedItem.SetPrice((int)item.CurrentState, item.price);

        Inventory.Manage3DItems((int)currentState, index);
        DistinctFunctionality();
    }
    public void OnClickBowlButton(int index)
    {
        // Item item = Inventory.GetItem(1, index);

        // Debug.Log("index: " + index);
        prevIndex    = currentIndex;
        currentIndex = index;

        try { content.GetTile(prevIndex).Highlight = content.GetTile(prevIndex).GetNormal(); } catch (System.Exception e) { };
        content.GetTile(currentIndex).Highlight = HighlightProperties.Selected;
    }