Ejemplo n.º 1
0
    public void Show(ItemReceiveData[] items)
    {
        if (items.Length == 0)
        {
            return;
        }

        if (!isInit)
        {
            isInit = true;
            canvas.sortingOrder = (int)SceneType.RECEIVE_ITEM;
        }

        for (int i = 0; i < items.Length; i++)
        {
            ItemReceive ir = Instantiate(prefabItemReceive, parentItems);
            ir.SetData(items[i]);
        }
        trFrame.localScale = Vector3.zero;

        canvas.enabled = true;
        prevSceneType  = _SceneManager.instance.activeSceneType;
        _SceneManager.instance.activeSceneType = SceneType.RECEIVE_ITEM;
        trFrame.LeanScale(Vector3.one, _SceneManager.TWEEN_DURATION);
    }
Ejemplo n.º 2
0
    public void AddItemReceive(Dictionary <string, object> info)
    {
        Transform item = Instantiate(ItemReceive) as Transform;

        gridViewReceive.gameObject.GetComponent <UIGrid>().AddChild(item);
        item.localScale = new Vector3(1, 1, 1);
        ItemReceive itemReceive = item.gameObject.GetComponent <ItemReceive>();

        itemReceive.SetData(info, this);
    }