Esempio n. 1
0
    public bool UpdateGridUI()
    {
        if (!SetGrid)
        {
            return(false);
        }

        for (int x = 0; x < Inven_Grid.GetLength(1); x++)
        {
            for (int y = 0; y < Inven_Grid.GetLength(0); y++)
            {
                if (Inven_Grid[y, x] == 1)
                {
                    UIM.ChangeUI(UIM.UserInven_Grids[x + (y * Inven_Grid.GetLength(1))], HaveItems[y, x].UISprite);
                }
                else
                {
                    UIM.ChangeUI(UIM.UserInven_Grids[x + (y * Inven_Grid.GetLength(1))], null);
                }
            }
        }

        return(true);
    }