Esempio n. 1
0
        public override void onShowed()
        {
            this.tiptype = equip_tip_type.Bag_tip;
            base.transform.SetAsLastSibling();
            bool flag = this.uiData == null;

            if (!flag)
            {
                bool flag2 = this.uiData.Count != 0;
                if (flag2)
                {
                    this.item_data = (a3_BagItemData)this.uiData[0];
                    this.curid     = this.item_data.id;
                    this.tiptype   = (equip_tip_type)this.uiData[1];
                }
                base.transform.FindChild("info/use").gameObject.SetActive(false);
                base.transform.FindChild("info/sell").gameObject.SetActive(false);
                base.transform.FindChild("info/put").gameObject.SetActive(false);
                this.bodyNum.gameObject.SetActive(true);
                bool flag3 = this.tiptype == equip_tip_type.HouseOut_tip;
                if (flag3)
                {
                    this.is_put_in = false;
                    base.transform.FindChild("info/put/Text").GetComponent <Text>().text = "取出";
                    base.transform.FindChild("info/put").gameObject.SetActive(true);
                }
                else
                {
                    bool flag4 = this.tiptype == equip_tip_type.HouseIn_tip;
                    if (flag4)
                    {
                        this.is_put_in = true;
                        base.transform.FindChild("info/put/Text").GetComponent <Text>().text = "放入";
                        base.transform.FindChild("info/put").gameObject.SetActive(true);
                    }
                    else
                    {
                        bool flag5 = this.tiptype == equip_tip_type.Bag_tip;
                        if (flag5)
                        {
                            base.transform.FindChild("info/sell").gameObject.SetActive(true);
                            base.transform.FindChild("info/use").gameObject.SetActive(true);
                        }
                        else
                        {
                            bool flag6 = this.tiptype == equip_tip_type.Chat_tip;
                            if (flag6)
                            {
                                this.bodyNum.gameObject.SetActive(false);
                            }
                        }
                    }
                }
                this.initItemInfo();
            }
        }
Esempio n. 2
0
        public override void onShowed()
        {
            tiptype = equip_tip_type.Bag_tip;

            transform.SetAsLastSibling();

            if (uiData == null)
            {
                return;
            }
            if (uiData.Count != 0)
            {
                item_data = (a3_BagItemData)uiData[0];
                curid     = item_data.id;
                tiptype   = (equip_tip_type)uiData[1];
            }


            transform.FindChild("info/use").gameObject.SetActive(false);
            transform.FindChild("info/sell").gameObject.SetActive(false);
            transform.FindChild("info/put").gameObject.SetActive(false);
            transform.FindChild("info/out").gameObject.SetActive(false);
            getGameObjectByPath("info/bodyNum").SetActive(true);
            getGameObjectByPath("info/bodyNum/Text").SetActive(true);
            getGameObjectByPath("info/bodyNum/value").SetActive(true);
            getGameObjectByPath("info/bodyNum/coin").SetActive(true);
            transform.FindChild("info/use/Text").GetComponent <Text>().text  = ContMgr.getCont("a3_equiptip_sy");
            transform.FindChild("info/sell/Text").GetComponent <Text>().text = ContMgr.getCont("a3_equiptip_cs");
            transform.FindChild("info/out/Text").GetComponent <Text>().text  = ContMgr.getCont("a3_equiptip_qc");
            bodyNum.gameObject.SetActive(true);
            if (tiptype == equip_tip_type.HouseOut_tip)
            {
                is_put_in = false;
                transform.FindChild("info/put/Text").GetComponent <Text>().text = ContMgr.getCont("a3_equiptip_qc");
                transform.FindChild("info/put").gameObject.SetActive(true);
            }
            else if (tiptype == equip_tip_type.tip_forchushou)
            {
                transform.FindChild("info/out").gameObject.SetActive(true);
            }
            else if (tiptype == equip_tip_type.HouseIn_tip)
            {
                is_put_in = true;
                transform.FindChild("info/put/Text").GetComponent <Text>().text = ContMgr.getCont("a3_equiptip_fr");
                transform.FindChild("info/put").gameObject.SetActive(true);
            }
            else if (tiptype == equip_tip_type.Bag_tip)
            {
                transform.FindChild("info/sell").gameObject.SetActive(true);
                transform.FindChild("info/use").gameObject.SetActive(true);
                if (item_data.confdata.use_type == 21)
                {
                    transform.FindChild("info/use/Text").GetComponent <Text>().text = ContMgr.getCont("a3_equiptip_dh");
                }
                else
                {
                    transform.FindChild("info/use/Text").GetComponent <Text>().text = ContMgr.getCont("a3_equiptip_sy");
                }
            }
            else if (tiptype == equip_tip_type.Chat_tip)
            {
                bodyNum.gameObject.SetActive(false);
            }
            else if (tiptype == equip_tip_type.hallowtips)
            {
                //1:背包里  2:圣器背包里  3:穿在身上
                if (uiData[2] == null)
                {
                    return;
                }
                switch ((int)uiData[2])
                {
                case 1:
                    getGameObjectByPath("info/sell").SetActive(true);
                    getGameObjectByPath("info/use").SetActive(true);
                    getComponentByPath <Text>("info/use/Text").text = ContMgr.getCont("a3_equiptip_zb");
                    break;

                case 2:
                    getGameObjectByPath("info/sell").SetActive(true);
                    getComponentByPath <Text>("info/sell/Text").text = ContMgr.getCont("a3_equiptip_fj");


                    getGameObjectByPath("info/use").SetActive(true);
                    getComponentByPath <Text>("info/use/Text").text = ContMgr.getCont("a3_equiptip_zb");

                    getGameObjectByPath("info/bodyNum/Text").SetActive(false);
                    getGameObjectByPath("info/bodyNum/value").SetActive(false);
                    getGameObjectByPath("info/bodyNum/coin").SetActive(false);
                    break;

                case 3:
                    getGameObjectByPath("info/sell").SetActive(false);
                    getGameObjectByPath("info/use").SetActive(false);
                    getGameObjectByPath("info/out").SetActive(true);
                    getComponentByPath <Text>("info/out/Text").text = ContMgr.getCont("a3_equiptip_xx");
                    getGameObjectByPath("info/bodyNum").SetActive(false);
                    break;

                default:
                    break;
                }
            }
            UiEventCenter.getInstance().onWinOpen(uiName);

            initItemInfo();
        }