示例#1
0
    void ChangeState(ShopStates newState)
    {
        prevState    = currentState;
        currentState = newState;

        // Highlighting and unhighlighting header buttons
        for (int i = 0; i < headerSettings.buttons.Length; i++)
        {
            headerSettings.buttons[i].color = i.Equals((int)currentState)
            ? headerSettings.highlighted : headerSettings.unhighlighted;
        }

        // Activating image
        selectedItem.EnableImage((int)currentState);

        //Setting tiles
        // content.SetDropdown((int)currentState);
        content.SetItems((int)currentState);
        OnClickItemButton(0); // select first tile in the start
    }
示例#2
0
 public void Closed()
 {
     states = ShopStates.closed;
     //showChestInv = false;
     shop.SetActive(false);
 }