Esempio n. 1
0
 void onStudy(GameObject go)
 {
     if (isCanStudy)
     {
         //点击开始研究
         A3_ygyiwuProxy.getInstance().SendYGinfo(3);
     }
     else
     {
         //点击加速研究
         A3_ygyiwuProxy.getInstance().SendYGinfo(4);
     }
 }
Esempio n. 2
0
        public override void onClosed()
        {
            disposeAvatar();
            this.transform.FindChild("tab_01").gameObject.SetActive(true);
            this.transform.FindChild("btn").gameObject.SetActive(true);
            this.transform.FindChild("tab_02").gameObject.SetActive(false);
            this.transform.FindChild("tab_01/info").gameObject.SetActive(false);
            A3_ygyiwuProxy.getInstance().removeEventListener(A3_ygyiwuProxy.EVENT_YWINFO, refreshinfo);
            A3_ygyiwuProxy.getInstance().removeEventListener(A3_ygyiwuProxy.EVENT_ZHISHIINFO, refoMy_yiwu);
            InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_NORMAL);
            GRMap.GAME_CAMERA.SetActive(true);

            if (skill_a3._instance && skill_a3._instance.toshilian)
            {
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.SKILL_A3);
                skill_a3._instance.toshilian = false;
            }
        }
Esempio n. 3
0
        public override void onShowed()
        {
            if (skill_a3._instance && skill_a3._instance.toshilian)
            {
                InterfaceMgr.getInstance().close(InterfaceMgr.SKILL_A3);
            }
            //into_God();
            //into_per();
            if (FunctionOpenMgr.instance.Check(FunctionOpenMgr.JL_SL))
            {
                getGameObjectByPath("btn/lockp").SetActive(false);
            }
            else
            {
                getGameObjectByPath("btn/lockp").SetActive(true);
            }
            A3_ygyiwuProxy.getInstance().addEventListener(A3_ygyiwuProxy.EVENT_YWINFO, refreshinfo);
            A3_ygyiwuProxy.getInstance().addEventListener(A3_ygyiwuProxy.EVENT_ZHISHIINFO, refoMy_yiwu);
            A3_ygyiwuProxy.getInstance().SendYGinfo(1);
            CloseIndex = 0;

            if (uiData != null && uiData.Count > 0)
            {
                index = (int)uiData[0];
            }
            else
            {
                index = 0;
            }
            ref_topText();
            GRMap.GAME_CAMERA.SetActive(false);
            InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_FUNCTIONBAR);
            transform.FindChild("ig_bg_bg").gameObject.SetActive(false);
            createAvatar();
            UiEventCenter.getInstance().onWinOpen(uiName);
            showIconHint();
        }
Esempio n. 4
0
        public override void init()
        {
            getComponentByPath <Text>("btn/doup/Text").text = ContMgr.getCont("a3_ygyiwu_0");
            getComponentByPath <Text>("tab_01/God/help_text/help/descTxt").text = ContMgr.getCont("a3_ygyiwu_1") + "\n" + ContMgr.getCont("a3_ygyiwu_2") + "\n" + ContMgr.getCont("a3_ygyiwu_3");

            instan = this;
            plane  = this.transform.FindChild("tab_01/info").gameObject;
            BaseButton close = new BaseButton(this.transform.FindChild("over"));

            IconHint      = this.transform.FindChild("btn/per_btn/IconHint").gameObject;
            close.onClick = onClose;
            BaseButton God_btn = new BaseButton(this.transform.FindChild("btn/God_btn"));

            God_btn.onClick = (GameObject go) =>
            {
                index = 0;
                ref_topText();
            };
            if (FunctionOpenMgr.instance.Check(FunctionOpenMgr.JL_SL))
            {
                getGameObjectByPath("btn/lockp").SetActive(false);
            }
            else
            {
                getGameObjectByPath("btn/lockp").SetActive(true);
            }
            new BaseButton(getTransformByPath("btn/lockp")).onClick = (GameObject go) =>
            {
                flytxt.instance.fly(ContMgr.getCont("func_limit_44"));
            };
            isthis = this.transform.FindChild("btn/this").gameObject;
            isthis.SetActive(false);
            BaseButton per_btn = new BaseButton(this.transform.FindChild("btn/per_btn"));

            per_btn.onClick = (GameObject go) =>
            {
                index = 1;
                ref_topText();
            };
            BaseButton study_btn = new BaseButton(this.transform.FindChild("tab_02/go"));

            study_btn.onClick = onStudy;

            BaseButton tachback = new BaseButton(this.transform.FindChild("tab_01/info/tach"));
            BaseButton back     = new BaseButton(this.transform.FindChild("tab_01/info/back"));

            new BaseButton(transform.FindChild("tab_01/God/help_God")).onClick = (GameObject go) =>
            {
                transform.FindChild("tab_01/God/help_text").gameObject.SetActive(true);
            };
            new BaseButton(transform.FindChild("tab_01/per/help_Pre")).onClick = (GameObject go) =>
            {
                transform.FindChild("tab_01/per/help_text").gameObject.SetActive(true);
            };

            new BaseButton(transform.FindChild("tab_01/God/help_text/close")).onClick    =
                new BaseButton(transform.FindChild("tab_01/God/help_text/tach")).onClick = (GameObject go) => { transform.FindChild("tab_01/God/help_text").gameObject.SetActive(false); };
            new BaseButton(transform.FindChild("tab_01/per/help_text/close")).onClick    =
                new BaseButton(transform.FindChild("tab_01/per/help_text/tach")).onClick = (GameObject go) => { transform.FindChild("tab_01/per/help_text").gameObject.SetActive(false); };
            back.onClick = tachback.onClick = (GameObject go) =>
            {
                if (index == 0)
                {
                    this.transform.FindChild("tab_01/God").gameObject.SetActive(true);
                }
                else if (index == 1)
                {
                    this.transform.FindChild("tab_01/per").gameObject.SetActive(true);
                }
                this.transform.FindChild("tab_01/info").gameObject.SetActive(false);
                this.transform.FindChild("btn").gameObject.SetActive(true);
            };
            BaseButton do_book = new BaseButton(this.transform.FindChild("btn/doup"));

            do_book.onClick = (GameObject go) =>
            {
                CloseIndex = 1;
                this.transform.FindChild("tab_01").gameObject.SetActive(false);
                this.transform.FindChild("btn").gameObject.SetActive(false);
                this.transform.FindChild("tab_02").gameObject.SetActive(true);
            };
            this.getEventTrigerByPath("tach").onDrag = OnDrag;
            studybar = this.transform.FindChild("tab_02/bar").GetComponent <Image>();
            into_God();
            into_per();
            A3_ygyiwuProxy.getInstance().SendYGinfo(2);
            refreshinfo(null);

            scrollControler = new ScrollControler();
            ScrollRect scroll = transform.FindChild("tab_01/God/view").GetComponent <ScrollRect>();

            scrollControler.create(scroll);

            scrollControler1 = new ScrollControler();
            ScrollRect scroll1 = transform.FindChild("tab_01/per/view").GetComponent <ScrollRect>();

            scrollControler1.create(scroll1);
        }