Пример #1
0
    public void Display()
    {
        /*
         * foreach (Transform child in Transform){
         *      Destroy (child.gameObject);
         * }
         */

        foreach (ItemEntry item in XMLManager.ins.itemDB.list)
        {
            ItemBlock newBlock = Instantiate(blockPrefab) as ItemBlock;
            newBlock.transform.SetParent(transform, false);
            newBlock.Display(item);
        }
    }
Пример #2
0
    public void Display()
    {
        foreach (Transform child in transform)
        {
            Destroy(child.gameObject);
        }

        foreach (ItemEntry item in XMLManager.instance.itemDB.list)
        {
            ItemBlock newBlock = Instantiate(blockPrefab) as ItemBlock;
            newBlock.transform.SetParent(transform, false);

            // set ui of the item
            newBlock.Display(item);
        }
    }
Пример #3
0
 // Update is called once per frame
 public void Display()
 {
     ItemList = checkListToDisplay();
     foreach (Transform child in transform)
     {
         Destroy(child.gameObject);
         Debug.Log("Hello");
     }
     foreach (ItemEntry item in ItemList)
     {
         ItemBlock newBlock = Instantiate <ItemBlock>(blockPrefab);
         newBlock.transform.SetParent(transform, false);
         newBlock.name = item.itemName;
         newBlock.Display(item);
     }
     StartCoroutine(Reposition());
 }
    public void Display()
    {
        //cleanup UI each times when you load the store
        foreach (Transform child in transform)
        {
            Destroy(child.gameObject);
        }



        foreach (ItemEntry item in XMLManager.ins.ItemDB.list)
        {
            ItemBlock newBlock = Instantiate(blockprefab) as ItemBlock;
            newBlock.transform.SetParent(transform, false);
            newBlock.Display(item);
        }
    }