Ejemplo n.º 1
0
    protected override void OnShown()
    {
        _new_item_list.ClearSelection();
        _new_item_list.RemoveChildrenToPool();


        for (int i = 0; i < items.Count; i++)
        {
            NewItem item = (NewItem)_new_item_list.AddItemFromPool();


            item.init(items[i]);
            item.onClick.Add(delegate() {
                if (_new_item_list.selectedIndex != -1)
                {
                    _confirm.visible = true;
                }
                if (PlayerData.getInstance().guideStage == 10)
                {
                    GuideManager.getInstance().showGuideConfirmChooseItem();
                    PlayerData.getInstance().guideStage = 11;
                }
            });
            item.GetChild("detail").onTouchBegin.Add(delegate() {
                //Debug.Log("Show Detail");
            });
        }


        _confirm.visible = false;

        if (PlayerData.getInstance().guideStage == 4)
        {
            GuideManager.getInstance().showGuideChooseItem();
            PlayerData.getInstance().guideStage = 10;
        }
    }