Example #1
0
    public void Build(Backpack b, System.Action <string, string, Sprite> desc)
    {
        setDescription = desc;
        client         = b;
        Clear();
        int n = 0;

        foreach (Item i in b)
        {
            ItemInfo ii = GetNext();
            ii.Build(i);
            ii.transform.localPosition = new Vector3(0f, +65 - n * 50 + 0);
            ii.gameObject.SetActive(true);
            ii.Equipped = (i is Equipment && b.IsEquipped((Equipment)i));
            ii.MouseoverCallback(MouseOver, i);
            n++;
        }
        Height = n * 50;
    }