Exemplo n.º 1
0
 public void AddUIItem(InventoryUISpace toAdd)
 {
     toAdd.position = lastPosition;
     lastPosition++;
     uiItems.Add(toAdd);
     UpdateUI();
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        uiSpace = new InventoryUISpace();
        SpriteRenderer cacheSprite = gameObject.GetComponent <SpriteRenderer>();

        uiSpace.color  = cacheSprite.color;
        uiSpace.sprite = cacheSprite.sprite;
        uiSpace.name   = gameObject.name;
        uiPanel        = GameObject.Find("KeyUI").GetComponent <KeyUIPanel>();
    }