public override void onClosed()
        {
            this.transform.FindChild("btn_stone/cnt").gameObject.SetActive(true);
            this.transform.FindChild("btn_stone/icon").gameObject.SetActive(true);
            this.transform.FindChild("btn_gld/cnt").gameObject.SetActive(true);
            this.transform.FindChild("btn_gld/icon").gameObject.SetActive(true);
            this.transform.FindChild("btn_gld/Text").gameObject.SetActive(true);
            this.transform.FindChild("btn_gld/Text").gameObject.SetActive(true);

            InterfaceMgr.getInstance().floatUI.localScale = Vector3.one;
            if (GameObject.Find("GAME_CAMERA/myCamera"))
            {
                GameObject cameraOBJ = GameObject.Find("GAME_CAMERA/myCamera");
                if (cameraOBJ.GetComponent <DeathShader>())
                {
                    cameraOBJ.GetComponent <DeathShader>().enabled = false;
                }
            }
            instans = null;

            if (A3_SummonModel.getInstance().GetSummons().ContainsKey(A3_SummonModel.getInstance().toAttackID))
            {
                A3_SummonProxy.getInstance().sendChuzhan(A3_SummonModel.getInstance().toAttackID);
                A3_SummonModel.getInstance().toAttackID = 0;
            }
        }
Example #2
0
        public override void onClosed()
        {
            InterfaceMgr.getInstance().floatUI.localScale = Vector3.one;
            bool flag = GameObject.Find("GAME_CAMERA/myCamera");

            if (flag)
            {
                GameObject gameObject = GameObject.Find("GAME_CAMERA/myCamera");
                bool       flag2      = gameObject.GetComponent <DeathShader>();
                if (flag2)
                {
                    gameObject.GetComponent <DeathShader>().enabled = false;
                }
            }
            a3_relive.instans = null;
        }
        public override void onShowed()
        {
            closeWindow();
            instans = this;
            this.transform.FindChild("btn_gld/Text_free").gameObject.SetActive(false);
            this.transform.FindChild("btn_stone/Text_free").gameObject.SetActive(false);
            recharge.SetActive(false);
            InterfaceMgr.getInstance().floatUI.localScale = Vector3.zero;
            if (GameObject.Find("GAME_CAMERA/myCamera"))
            {
                GameObject cameraOBJ = GameObject.Find("GAME_CAMERA/myCamera");
                if (!cameraOBJ.GetComponent <DeathShader>())
                {
                    cameraOBJ.AddComponent <DeathShader>();
                }
                else
                {
                    cameraOBJ.GetComponent <DeathShader>().enabled = true;
                }
            }
            //timer = 0;
            //origin_tm = 3;
            here_time = 30;
            jdzc_time = Xml_jdzc.getInt("revive");
            btn_gld.gameObject.SetActive(false);
            btn_stone.gameObject.SetActive(false);
            btn_backleft.gameObject.SetActive(false);
            btn_backmid.gameObject.SetActive(false);
            spost_relive.gameObject.SetActive(false);
            //btn_stone.interactable = false;
            //btn_gld.interactable = false;
            //btn_backmid.interactable = false;
            //btn_backleft.interactable = false;

            RefreshBackTownBtn();
            if (!PlayerModel.getInstance().inFb)
            {
                RefreshOriginBtn();
            }

            if (CanReviveOrigin() == 0)
            {//地图不允许原地复活
                btn_backmid.gameObject.SetActive(true);
            }
            else if (CanReviveOrigin() == 1)
            {
                if (HasRespawnStone())
                {
                    btn_stone.gameObject.SetActive(true);
                    btn_backleft.gameObject.SetActive(true);
                }
                else
                {
                    btn_gld.gameObject.SetActive(true);
                    btn_backleft.gameObject.SetActive(true);
                }
            }
            else if (CanReviveOrigin() == 3)
            {
                //不可复活,自动本场景复活点复活
                spost_relive.gameObject.SetActive(true);
            }

            // BattleProxy.getInstance().addEventListener(BattleProxy.EVENT_DIE, refInfo);

            if (uiData != null)
            {
                one = (BaseRole)uiData[0];
            }
            refInfo();
            InterfaceMgr.getInstance().closeAllWin(InterfaceMgr.A3_RELIVE);

            if (A3_SummonModel.getInstance().GetSummons().ContainsKey(A3_SummonModel.getInstance().nowShowAttackID))
            {
                A3_SummonModel.getInstance().toAttackID = A3_SummonModel.getInstance().nowShowAttackID;
                A3_SummonProxy.getInstance().sendZhaohui();
            }

            NewbieModel.getInstance().hide();
        }
Example #4
0
        public override void onShowed()
        {
            this.closeWindow();
            a3_relive.instans = this;
            this.recharge.SetActive(false);
            InterfaceMgr.getInstance().floatUI.localScale = Vector3.zero;
            bool flag = GameObject.Find("GAME_CAMERA/myCamera");

            if (flag)
            {
                GameObject gameObject = GameObject.Find("GAME_CAMERA/myCamera");
                bool       flag2      = !gameObject.GetComponent <DeathShader>();
                if (flag2)
                {
                    gameObject.AddComponent <DeathShader>();
                }
                else
                {
                    gameObject.GetComponent <DeathShader>().enabled = true;
                }
            }
            this.timer     = 0f;
            this.origin_tm = 3;
            this.btn_gld.gameObject.SetActive(false);
            this.btn_stone.gameObject.SetActive(false);
            this.btn_backleft.gameObject.SetActive(false);
            this.btn_backmid.gameObject.SetActive(false);
            this.btn_stone.interactable    = false;
            this.btn_gld.interactable      = false;
            this.btn_backmid.interactable  = false;
            this.btn_backleft.interactable = false;
            this.RefreshBackTownBtn();
            this.RefreshOriginBtn();
            bool flag3 = !this.CanReviveOrigin();

            if (flag3)
            {
                this.btn_backmid.gameObject.SetActive(true);
            }
            else
            {
                bool flag4 = this.HasRespawnStone();
                if (flag4)
                {
                    this.btn_stone.gameObject.SetActive(true);
                    this.btn_backleft.gameObject.SetActive(true);
                }
                else
                {
                    this.btn_gld.gameObject.SetActive(true);
                    this.btn_backleft.gameObject.SetActive(true);
                }
            }
            bool flag5 = this.uiData != null;

            if (flag5)
            {
                this.one = (BaseRole)this.uiData[0];
            }
            this.refInfo();
            InterfaceMgr.getInstance().closeAllWin(InterfaceMgr.A3_RELIVE);
        }