예제 #1
0
 void OnClickPvp(ButtonScript obj, object args, int param1, int param2)
 {
     if (GamePlayer.Instance.GetProperty(PropertyType.PT_Level) < 20)
     {
         //ErrorTipsUI.ShowMe(LanguageManager.instance.GetValue("cannotopen"));
         PopText.Instance.Show(LanguageManager.instance.GetValue("cannotopen"));
         return;
     }
     if (!TeamSystem.IsTeamOpenPvp())
     {
         //ErrorTipsUI.ShowMe(LanguageManager.instance.GetValue("teamlevelpvp"));
         PopText.Instance.Show(LanguageManager.instance.GetValue("teamlevelpvp"));
         return;
     }
     if (!TeamSystem.IsTeamLeader())
     {
         //ErrorTipsUI.ShowMe(LanguageManager.instance.GetValue("teamopen"));
         PopText.Instance.Show(LanguageManager.instance.GetValue("teamopen"));
         return;
     }
     else
     {
         NetConnection.Instance.requestMyJJCTeamMsg();
         NetConnection.Instance.joinPvpLobby();
     }
 }
예제 #2
0
    void Start()
    {
        UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0);
        UIManager.SetButtonEventHandler(startBtn.gameObject, EnumButtonEvent.OnClick, OnStart, 0, 0);
        UIManager.SetButtonEventHandler(stopBtn.gameObject, EnumButtonEvent.OnClick, OnStop, 0, 0);
        ArenaPvpSystem.Instance.PvpMatchingEnven  += new RequestEventHandler <bool>(PvpMatching);
        ArenaPvpSystem.Instance.playerTeamEnven   += new RequestEventHandler <COM_SimpleInformation[]>(PvpTeamEnven);
        ArenaPvpSystem.Instance.playerSingleEnven += new  RequestEventHandler <COM_SimpleInformation>(PvpSingleEnven);
        TeamSystem.OnUpdateTeamMB += UpdateTeamMBOk;
        TeamSystem.OnDelMenber    += OnDelTeamPlayerEnvt;

        UpdateMyInfo();

        ArenaSystem.Instance.openPvP      = true;
        ArenaPvpSystem.Instance.openPvpUI = true;
        OpenPanelAnimator.PlayOpenAnimation(this.panel);
        GameManager.chatobj.SetActive(true);
        Vector3 chatPos = new Vector3();

        chatPos = GameManager.chatobj.transform.localPosition;
        UIManager.Instance.AdjustUIDepth(GameManager.chatobj.transform);
        GameManager.chatobj.transform.localPosition = chatPos;

        startBtn.gameObject.SetActive(false);
        stopBtn.gameObject.SetActive(false);
        if (TeamSystem.IsTeamLeader())
        {
            startBtn.gameObject.SetActive(true);
        }
    }
예제 #3
0
 bool IsGTeamLeader()
 {
     if (TeamSystem.IsTeamLeader(GamePlayer.Instance.InstId))
     {
         return(true);
     }
     return(false);
 }
예제 #4
0
    void Start()
    {
        //UIManager.SetButtonEventHandler(iconBtn.gameObject, EnumButtonEvent.OnClick, OnRighticon, 0, 0);
        isLeader_ = TeamSystem.IsTeamLeader();

        //LeaderSprite ();
        //TeamSystem.OnTeamDirtyProps += updatePros;
        updatePros();
    }
예제 #5
0
    void OnClickJDW(ButtonScript obj, object args, int param1, int param2)
    {
        if (!GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Team))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("duiwuweikai"));
            return;
        }
        //if(!(((PlayerInst.openSubSystemFlag_) &(0x1 << (int)OpenSubSystemFlag.OSSF_Team)) != 0))
        //{
        //	PopText.Instance.Show(LanguageManager.instance.GetValue("Duifangduiwu"));
        //	return;
        //}
        SceneData ssd = SceneData.GetData(GameManager.SceneID);

        //if(ssd.sceneType_ == SceneType.SCT_AlonePK||ssd.sceneType_ == SceneType.SCT_TeamPK)
        //{
        //    PopText.Instance.Show(LanguageManager.instance.GetValue("bunengzudui"));
        //    return;
        //}
        if (ssd.sceneType_ == SceneType.SCT_GuildBattleScene)
        {
            if (!GuildSystem.IsInMyGuild(PlayerInst.instId_))
            {
                PopText.Instance.Show(LanguageManager.instance.GetValue("bunengyaoqingdifang"));
                return;
            }
        }
        if (TeamSystem.IsInTeam())
        {
            if (!TeamSystem.IsTeamLeader(GamePlayer.Instance.InstId))
            {
                PopText.Instance.Show(LanguageManager.instance.GetValue("onlyLeaderCanOperate"));
            }
            else
            {
                NetConnection.Instance.inviteTeamMember(PlayerInst.instName_);
                //PopText.Instance.Show(LanguageManager.instance.GetValue("yaoqingchenggong"));
                gameObject.SetActive(false);
            }
        }
        else
        {
            //NetConnection.Instance.jointLobby();

            COM_CreateTeamInfo cti = new COM_CreateTeamInfo();
            cti.type_ = TeamType.TT_MainQuest;
            cti.name_ = LanguageManager.instance.GetValue("autoTeam");
            //cti.pwd_ = passWordInput.text;
            cti.maxMemberSize_ = 5;
            cti.minLevel_      = 1;
            cti.maxLevel_      = (ushort)maxLevel;
            NetConnection.Instance.createTeam(cti);
            // NetConnection.Instance.inviteTeamMember(PlayerInst.instName_);
            PopText.Instance.Show(LanguageManager.instance.GetValue("yaoqingchenggong"));
        }
    }
예제 #6
0
 private void OnClickguajiBtn(ButtonScript obj, object args, int param1, int param2)
 {
     if (TeamSystem.IsInTeam() && !TeamSystem.IsTeamLeader() && !TeamSystem.AwayTeam(GamePlayer.Instance.InstId))
     {
         PopText.Instance.Show(LanguageManager.instance.GetValue("onlyLeader"));
         return;
     }
     NetConnection.Instance.autoBattle();
     Prebattle.Instance.ChangeWalkEff(Prebattle.WalkState.WS_Normal);
     guajiBtn.gameObject.SetActive(false);
     CloseguajiBtn.gameObject.SetActive(true);
 }
예제 #7
0
    IEnumerator DelayBattle(float dTime)
    {
        yield return(new WaitForSeconds(dTime));

        if (TeamSystem.IsInTeam())
        {
            if (TeamSystem.IsTeamLeader(GamePlayer.Instance.InstId))
            {
                NetConnection.Instance.jjcBattleGo(ArenaPvpSystem.Instance.TeamId);
            }
        }
    }
예제 #8
0
    public bool ParseNavMeshInfo(string info, NpcType type = NpcType.NT_None)
    {
        if (StageMgr.Loading)
        {
            return(false);
        }

        if (TeamSystem.IsTeamLeader() || !TeamSystem.IsInTeam() || TeamSystem.AwayTeam(GamePlayer.Instance.InstId))
        {
            if (type != NpcType.NT_None)
            {
                NetConnection.Instance.moveToNpc2(type);
                return(true);
            }

            if (string.IsNullOrEmpty(info))
            {
                return(false);
            }

            // "|" 为scene和zone分隔符
            // ";" 为scene和npc分隔符
            string[] parse;
            int      sceneId;
            if (info.Contains("|"))
            {
                parse   = info.Split('|');
                sceneId = int.Parse(parse[0]);
                int zoneId = int.Parse(parse[1]);
                NetConnection.Instance.moveToZone(sceneId, zoneId);
            }
            else
            {
                parse   = info.Split(';');
                sceneId = int.Parse(parse[0]);
                int npcId = int.Parse(parse[1]);

                NpcData npcd = NpcData.GetData(npcId);
                if (npcd.Type == NpcType.NT_Caiji1 || npcd.Type == NpcType.NT_Caiji2 || npcd.Type == NpcType.NT_Caiji3)
                {
                    NetConnection.Instance.moveToNpc2(npcd.Type);
                }
                else
                {
                    NetConnection.Instance.moveToNpc(npcId);
                }
                //Prebattle.Instance.selectedNpc_ = npcId;
            }
            return(true);
        }
        return(false);
    }
예제 #9
0
    public void OnSelJoin(GameObject go)
    {
        if (TeamSystem.IsInTeam() && !TeamSystem.IsTeamLeader(GamePlayer.Instance.InstId) && !TeamSystem.AwayTeam(GamePlayer.Instance.InstId))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("onlyLeaderCanOperate"), PopText.WarningType.WT_Tip);
            return;
        }

        string joinInfoo = (string)UIEventListener.Get(go).parameter;

        GameManager.Instance.ParseNavMeshInfo(joinInfoo, ConvertNpcType(activityType_));
        HongDongPanel.HidePanelByName(UIASSETS_ID.UIASSETS_DailyActivityPanel);
    }
예제 #10
0
    void teamCellsState()
    {
        for (int i = 0; i < teamCells.Count; i++)
        {
            TeamMemberCell tc = teamCells[i].GetComponent <TeamMemberCell>();

            if (i < TeamSystem._MyTeamInfo.maxMemberSize_)
            {
                if (tc.PlayerInst != null && tc.PlayerInst.isLeavingTeam_ && tc.modPos.childCount != 0)
                {
                    tc.StateSp.spriteName = "zanli";
                }
                else
                {
                    tc.StateSp.spriteName = "dengdaizhong";
                }

                if (TeamSystem.IsTeamLeader())
                {
                    if (tc.PlayerInst == null)
                    {
                        tc.OpenBtn.gameObject.SetActive(false);
                        tc.offBtn.gameObject.SetActive(true);
                    }
                }
            }
            else
            {
                if (tc.PlayerInst != null && tc.PlayerInst.isLeavingTeam_ && tc.modPos.childCount != 0)
                {
                    tc.StateSp.spriteName = "zanli";
                }
                else
                {
                    tc.StateSp.spriteName = "yiguanbi";
                }

                if (TeamSystem.IsTeamLeader())
                {
                    tc.OpenBtn.gameObject.SetActive(true);
                    tc.offBtn.gameObject.SetActive(false);
                }
            }
        }
        if (TeamSystem.IsTeamLeader())
        {
            openOrOffBtn();
        }
    }
예제 #11
0
 private void OnClose(ButtonScript obj, object args, int param1, int param2)
 {
     //NetConnection.Instance.stopMatching ();
     ArenaSystem.Instance.openPvP      = false;
     ArenaPvpSystem.Instance.openPvpUI = false;
     if (TeamSystem.IsTeamLeader())
     {
         NetConnection.Instance.warriorStop();
     }
     ArenaPvpSystem.Instance.PvpMatching = false;
     //NetConnection.Instance.exitPvpLobby();
     OpenPanelAnimator.CloseOpenAnimation(this.panel, () => {
         Hide();
     });
 }
예제 #12
0
//    public bool transforScene(int sceneId)
//    {
//        if(GamePlayer.Instance.isInBattle == false)
//        {
////			if(CopyData.IsCopyScene(GameManager.SceneID))
////			{
////				MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("likaifuben"),()=>{
////					NetConnection.Instance.exitCopy();
////					base.transforScene(sceneId);
////				});
////			}else
////			{
//                base.transforScene(sceneId);
////			}
//        }
//        return true;
//    }

    public bool move(float x, float z)
    {
        if (TeamSystem.IsInTeam() && !TeamSystem.IsTeamLeader() && !TeamSystem.AwayTeam(GamePlayer.Instance.InstId))
        {
            return(true);
        }
        Avatar player = Prebattle.Instance.GetSelf();

        if (player != null)
        {
            player.PlayerStoped_ = false;
        }
        base.move(x, z);
        return(true);
    }
예제 #13
0
    private void OnChallengeBtn(ButtonScript obj, object args, int param1, int param2)
    {
        if (_curId != hundredSystem.instance.ChallengeNum)
        {
            //ErrorTipsUI.ShowMe(LanguageManager.instance.GetValue("hundredMax"));
            PopText.Instance.Show(LanguageManager.instance.GetValue("hundredMax"));
            return;
        }

        if (hundredSystem.instance.UseNum == 0)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("tioazhancishumei"));
            return;
        }

        if (TeamSystem.IsInTeam() && !TeamSystem.IsTeamLeader(GamePlayer.Instance.InstId))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("zuduizhongduichang"));
            return;
        }

        if (TeamSystem.IsInTeam())
        {
            COM_SimplePlayerInst[] team = TeamSystem.GetTeamMembers();
            if (team == null)
            {
                return;
            }
            //int level = 0;
            //GlobalValue.Get(Constant.C_PVPJJCOpenlevel, out level);
            for (int i = 0; i < team.Length; i++)
            {
                if (team[i].properties_[(int)PropertyType.PT_Level] < 35)
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("duiyuandengji"));
                    return;
                }
            }
        }



        NetConnection.Instance.enterHundredScene((int)_curId);
        //ChallengeData cData = ChallengeData.GetData ((int)_curId);
        //if(cData == null)
        //    return;
        //Prebattle.Instance.EnterNewScene (cData.senceId_);
    }
예제 #14
0
    void OnClickShowTips(ButtonScript obj, object args, int param1, int param2)
    {
        TeamMemberCell tcell = obj.GetComponent <TeamMemberCell> ();

        if (tcell.PlayerInst == null)
        {
            return;
        }
//		for(int i =0;i<TeamSystem.GetTeamMembers().Length;i++)
//		{
        if (isLeader_)
        {
            if (TeamSystem.IsTeamLeader((int)tcell.PlayerInst.instId_))
            {
                duaizhangTips.SetActive(false);
                duaiyuanTips.SetActive(false);
            }
            else
            {
                duaizhangTips.SetActive(true);
                TeamTips tp = duaizhangTips.GetComponent <TeamTips>();
                tp.uId = (int)tcell.PlayerInst.instId_;
                duaizhangTips.transform.localPosition = new Vector3(obj.transform.localPosition.x, obj.transform.localPosition.y, duaizhangTips.transform.localPosition.z);

                duaiyuanTips.SetActive(false);
            }
        }
        else
        {
            if (GamePlayer.Instance.InstId == (int)tcell.PlayerInst.instId_)
            {
                duaizhangTips.SetActive(false);
                duaiyuanTips.SetActive(false);
            }
            else
            {
                duaizhangTips.SetActive(false);
                duaiyuanTips.SetActive(true);
                duaiyuanTips.transform.localPosition = new Vector3(obj.transform.localPosition.x, obj.transform.localPosition.y, duaiyuanTips.transform.localPosition.z);
                UIManager.SetButtonEventHandler(tipsCloseBtn.gameObject, EnumButtonEvent.OnClick, OnClicktipsClose, 0, 0);
                UIManager.SetButtonEventHandler(HyBtn.gameObject, EnumButtonEvent.OnClick, OnClickHy, (int)tcell.PlayerInst.instId_, 0);
                UIManager.SetButtonEventHandler(playerInfoBtn.gameObject, EnumButtonEvent.OnClick, OnClickplayerInfo, (int)tcell.PlayerInst.instId_, 0);
            }
        }


//		}
    }
예제 #15
0
    public bool moveToZone(int sceneId, int zoneId)
    {
        if (TeamSystem.IsInTeam() && !TeamSystem.IsTeamLeader() && !TeamSystem.AwayTeam(GamePlayer.Instance.InstId))
        {
            return(true);
        }
        Avatar player = Prebattle.Instance.GetSelf();

        if (player != null)
        {
            player.PlayerStoped_ = false;
        }
        Prebattle.Instance.ChangeWalkEff(Prebattle.WalkState.WS_AFP);
        base.moveToZone(sceneId, zoneId);
        return(true);
    }
예제 #16
0
    void AddTeamItem(COM_SimplePlayerInst[] infos)
    {
        for (int i = 0; i < infos.Length; i++)
        {
            GameObject clone = GameObject.Instantiate(item) as GameObject;
            clone.SetActive(true);
            clone.transform.parent        = grid.transform;
            clone.transform.localPosition = Vector3.zero;
            clone.transform.localScale    = Vector3.one;
            MianteamListCell mcell = clone.GetComponent <MianteamListCell>();
            mcell.SimpleInformation = infos[i];
            if (mcell.SimpleInformation.isLeavingTeam_)
            {
                mcell.heiSp.gameObject.SetActive(true);
            }
            else
            {
                mcell.heiSp.gameObject.SetActive(false);
            }
            cells.Add(mcell);

            //svb.value = 1;
            if (TeamSystem.IsTeamLeader((int)infos[i].instId_))
            {
                mcell.LeadersP.spriteName = "duizhang(1)";
            }
            else
            {
                mcell.LeadersP.spriteName = "duiyuan(1)";
            }
            UIManager.SetButtonEventHandler(clone.gameObject, EnumButtonEvent.OnClick, OnClickShowTips, 0, 0);
            GlobalInstanceFunction.Instance.Invoke(() => {
                grid.repositionNow = true;
            }, 1);
        }

//		teamPanle.clipOffset = Vector2.zero;
//		teamPanle.transform.localPosition = Vector3.zero;
//		teamPanle.GetComponent<UIScrollView>().ResetPosition();
//		teamPanle.GetComponent<UIPanel>().clipOffset = Vector2.zero;
//		teamPanle.transform.localPosition = Vector3.zero;
        if (infos.Length == 0)
        {
            creataTeamBtn.gameObject.SetActive(true);
            UIManager.SetButtonEventHandler(creataTeamBtn.gameObject, EnumButtonEvent.OnClick, OnClickcreataTeamBtn, 0, 0);
        }
    }
예제 #17
0
    void AddItem()
    {
        for (int i = 0; i < TeamSystem.GetTeamMembers().Length; i++)
        {
            GameObject go = Instantiate(item) as GameObject;
            go.SetActive(true);
            go.transform.parent     = grid.transform;
            go.transform.localScale = Vector3.one;
            UITexture tex = go.GetComponent <UITexture>();

            PlayerData       pdata  = PlayerData.GetData((int)TeamSystem.GetTeamMembers()[i].properties_[(int)PropertyType.PT_TableId]);
            EntityAssetsData enData = EntityAssetsData.GetData(pdata.lookID_);
            HeadIconLoader.Instance.LoadIcon(enData.assetsIocn_, tex);
            UILabel [] las = go.GetComponentsInChildren <UILabel>();
            for (int j = 0; j < las.Length; j++)
            {
                if (las[j].name.Equals("duizhanLabel"))
                {
                    las[j].text = TeamSystem.GetTeamMembers()[i].instName_;
                }
                if (las[j].name.Equals("zhiyeLabel"))
                {
                    las[j].text = Profession.get((JobType)TeamSystem.GetTeamMembers()[i].properties_[(int)PropertyType.PT_Profession], (int)TeamSystem.GetTeamMembers()[i].properties_[(int)PropertyType.PT_ProfessionLevel]).jobName_;
                }
                if (las[j].name.Equals("dengjiLabel"))
                {
                    las[j].text = TeamSystem.GetTeamMembers()[i].properties_[(int)PropertyType.PT_Level].ToString();
                }
                if (las[j].name.Equals("titleLabel"))
                {
                    if (TeamSystem.IsTeamLeader((int)TeamSystem.GetTeamMembers()[i].instId_))
                    {
                        las[j].text = LanguageManager.instance.GetValue("duizhang");
                    }
                    else
                    {
                        las[j].text = LanguageManager.instance.GetValue("duiyuan");
                    }
                }
            }
        }
    }
예제 #18
0
    private void OnFunBtn(GameObject obj, COM_ContactInfo info)
    {
        if (info == null)
        {
            return;
        }
        if (_selectFriendBtn != null)
        {
            _selectFriendBtn.GetComponent <UISprite> ().spriteName = "jn_jinlan";
        }
        _selectFriendBtn = obj;
        _selectFriendBtn.GetComponent <UISprite> ().spriteName = "jn_jinlanliang";
        _selectFriend = info;


        if (FriendSystem.Instance().offens_.Contains(_selectFriend) && !FriendSystem.Instance().friends_.Contains(_selectFriend))
        {
            funAddFriend.gameObject.SetActive(true);
        }
        else
        {
            funAddFriend.gameObject.SetActive(false);
        }

        funPane.gameObject.SetActive(true);

        if (TeamSystem.IsInTeam() && TeamSystem.IsTeamLeader())
        {
            ctlTeamBtn.gameObject.GetComponentInChildren <UILabel>().text = LanguageManager.instance.GetValue("yaoqingrudui");
        }
        else
        {
            if (TeamSystem.IsInTeam())
            {
                ctlTeamBtn.gameObject.GetComponentInChildren <UILabel>().text = LanguageManager.instance.GetValue("haoyoushenqingrudui");;
            }
        }

        funBtns.transform.position = new Vector3(funBtns.transform.position.x, obj.gameObject.transform.position.y, 0f);
    }
예제 #19
0
 private void OnCtlTeamBtn(ButtonScript obj, object args, int param1, int param2)
 {
     if (_selectFriend == null)
     {
         return;
     }
     funPane.gameObject.SetActive(false);
     if (TeamSystem.IsInTeam() && TeamSystem.IsTeamLeader())
     {
         NetConnection.Instance.inviteTeamMember(_selectFriend.name_);
     }
     else
     {
         if (!TeamSystem.IsInTeam())
         {
             NetConnection.Instance.requestJoinTeam(_selectFriend.name_);
         }
         else
         {
             PopText.Instance.Show(LanguageManager.instance.GetValue("yizaiduiwuqong"));
         }
     }
 }
예제 #20
0
    private void OnClickzh(ButtonScript obj, object args, int param1, int param2)
    {
        if (CopyData.IsCopyScene(GameManager.SceneID))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("bunengzhaohuan"));
            return;
        }

        for (int i = 0; i < TeamSystem.GetTeamMembers().Length; i++)
        {
            if (!TeamSystem.IsTeamLeader((int)TeamSystem.GetTeamMembers()[i].instId_))
            {
                if (TeamSystem.GetTeamMembers()[i].isLeavingTeam_)
                {
                    NetConnection.Instance.teamCallMember((int)TeamSystem.GetTeamMembers()[i].instId_);
                }
            }
        }



        tipsObj.SetActive(false);
    }
예제 #21
0
    public void PvpMatching(bool matching)
    {
        if (!pkObj.activeSelf)
        {
            pkObj.SetActive(true);
        }
        if (matching)
        {
            startBtn.gameObject.SetActive(false);
            stopBtn.gameObject.SetActive(false);
            closeBtn.gameObject.SetActive(false);
            if (TeamSystem.IsTeamLeader())
            {
                stopBtn.gameObject.SetActive(true);
            }

            for (int i = 0; i < rightPlayers.Count; i++)
            {
                //rightPlayers[i].gameObject.SetActive(true);
                rightPlayers[i].StartRoll();
            }
        }
        else
        {
            startBtn.gameObject.SetActive(false);
            stopBtn.gameObject.SetActive(false);
            closeBtn.gameObject.SetActive(true);
            if (TeamSystem.IsTeamLeader())
            {
                startBtn.gameObject.SetActive(true);
            }
            for (int i = 0; i < rightPlayers.Count; ++i)
            {
                rightPlayers[i].StopRoll();
            }
        }
    }
예제 #22
0
    public void NpcOpenUI(UIASSETS_ID id)
    {
        switch (id)
        {
        case UIASSETS_ID.UIASSETS__BabySkillLearning:
            BabySkillLearning.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_ProfessionPanel:
            ProfessionPanel.SwithShowMe();
            //UIBase.AsyncLoad(UIASSETS_ID.UIASSETS_ProfessionPanel);
            break;

        case UIASSETS_ID.UIASSETS_ExchangePanel:
            Exchange.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS__LearningUI:
            if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Bar))
            {
                LearningUI.SwithShowMe();
            }
            break;

        case UIASSETS_ID.UIASSETS_FamilyPanel:
            FamilyPanelUI.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_FamilinfoPanel:
            MyFamilyInfo.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_FamilShopPanel:
            FamilyShopUI.SwithShowMe(true);
            break;

        case UIASSETS_ID.UIASSETS__StoreUI:
            if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Shop))
            {
                StoreUI.SwithShowMe(2);
            }
            break;

        case UIASSETS_ID.UIASSETS__Arena:
            if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_JJC))
            {
                ArenaUI.SwithShowMe();
            }
            else
            {
                int level = 0;
                GlobalValue.Get(Constant.C_PVPJJCOpenlevel, out level);
                if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < level)
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("EN_OpenBaoXiangLevel"));
                    return;
                }
            }
            break;

        case UIASSETS_ID.UIASSETS_ArenaPvpPanel:
            if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_PVPJJC))
            {
                bool isOpen = ActivitySystem.Instance.GetInfoState(7) == ActivitySystem.ActivityInfo.ActivityState.AS_Open;
                if (!isOpen)
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("jjcmeikai"));
                    return;
                }

                if (TeamSystem.IsInTeam())
                {
                    if (!TeamSystem.IsTeamLeader())
                    {
                        PopText.Instance.Show(LanguageManager.instance.GetValue("teamopen"));
                        return;
                    }

                    COM_SimplePlayerInst[] team = TeamSystem.GetTeamMembers();
                    if (team == null || team.Length < 3)
                    {
                        PopText.Instance.Show(LanguageManager.instance.GetValue("arenapvpnum"));
                        return;
                    }
                    if (team != null && team.Length > 0)
                    {
                        for (int i = 0; i < team.Length; i++)
                        {
                            if (team[i].isLeavingTeam_)
                            {
                                PopText.Instance.Show(LanguageManager.instance.GetValue("teamMemberLeavingNoopen"));
                                return;
                            }
                        }

                        int level = 0;
                        GlobalValue.Get(Constant.C_PVPJJCOpenlevel, out level);
                        for (int i = 0; i < team.Length; i++)
                        {
                            if (team[i].properties_[(int)PropertyType.PT_Level] < level)
                            {
                                PopText.Instance.Show(LanguageManager.instance.GetValue("duiyuandengji"));
                                return;
                            }
                        }
                    }
                }
                else
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("pvpzudui"));
                    return;
                }

                NetConnection.Instance.joinWarriorchoose();

                //NetConnection.Instance.requestpvprank();
                //NetConnection.Instance.requestMyJJCTeamMsg();
                //ArenaPvpPanelUI.SwithShowMe();
            }
            else
            {
                int level = 0;
                GlobalValue.Get(Constant.C_PVPJJCOpenlevel, out level);
                if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < level)
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("EN_OpenBaoXiangLevel"));
                    return;
                }
            }
            break;

        case UIASSETS_ID.UIASSETS__WordMapUI:
            WorldMap.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_GatherPanel:
            SkillViewUI.SwithShowMe(1);
            break;

        case UIASSETS_ID.UIASSETS_AuctionHousePanel:
            if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_AuctionHouse))
            {
                if (AuctionHouseSystem.Open_ == false)
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("AuctionHouseClosed"), PopText.WarningType.WT_Warning);
                    return;
                }
                AuctionHousePanel.SwithShowMe();
            }
            break;

        case UIASSETS_ID.UIASSETS_HundredUI:
            if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Hundred))
            {
                HundredUI.SwithShowMe();
            }
            break;

        case UIASSETS_ID.UIASSETS_EmailPanel:
            EmailUI.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_LookchiPanel:
            LookTreeUI.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_PetTemple:
            PetTemple.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_FanilyBank:
            FanilyBankUI.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_FamilyCollection:
            FamilyCollectionUI.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_GuildBattlePanel:
            GuildBattleEnterScene.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_FamilyMonster:
        {
            if (FamilySystem.instance.GuildMember != null && (int)GuildSystem.GetGuildMemberSelf((int)GamePlayer.Instance.InstId).job_ >= (int)GuildJob.GJ_VicePremier)
            {
                FamilyMonsterUI.SwithShowMe();
            }
            else
            {
                PopText.Instance.Show(LanguageManager.instance.GetValue("EN_CommandPositionLess"));
            }
        }
        break;

        case UIASSETS_ID.UIASSETS_CopyOpenPanel:
            CopyOpenUI.SwithShowMe();
            break;

        case UIASSETS_ID.UIASSETS_EmployeeTask:
            NetConnection.Instance.requestEmployeeQuest();
            break;

        case UIASSETS_ID.UIASSETS_EquipUIPanel:
            EquipUIPanel.SwithShowMe();
            break;
        }
    }
예제 #23
0
    void OnClickTalk(ButtonScript obj, object args, int param1, int param2)
    {
        if (!Talking())
        {
            bool battleEntered = false;
            if (QuestId != 0) ///任务相关
            {
                if (QuestSystem.IsQuestFinish(QuestId))
                {
                    QuestData qda = QuestData.GetData(QuestId);
                    if (qda.questType_ == QuestType.QT_GiveItem || qda.questType_ == QuestType.QT_GiveBaby)
                    {
                        //TurnOnUIPlanel.SwithShowMe(QuestId,_NpcId);
                    }
                    else
                    {
                        NetConnection.Instance.submitQuest2(_NpcId, QuestId, 0);
                        QuestSystem.LocalSubmitQuest(QuestId);
                    }


                    ///这里做任务连续操作
                    if (LinkQuest())
                    {
                        return;
                    }
                }
                else if (QuestSystem.IsQuestAcceptable(QuestId))
                {
                    if (!IsJobQuestSame(QuestId))
                    {
                        //PopText.Instance.Show(LanguageManager.instance.GetValue( "bunengjie"));
                        QuestSystem.TryAcceptQuest(QuestId);
                    }
                    //else
//					{
//						QuestSystem.TryAcceptQuest(QuestId);
//					}
                }
                QuestId = 0;
                HideMe();
            }
            else if (NpcId == 0)
            {
                if (BattleId != 0) ///如果有战斗直接进战斗
                {
                    if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < 23)
                    {
                        GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_EnterNPCBattle, BattleId);
                        GamePlayer.Instance.wait4EnterBattleId = BattleId;
                        NetConnection.Instance.enterBattle(BattleId);
                        if (BattleId == GlobalValue.GuideBattleID)
                        {
                            GuideManager.Instance.InBattleGuide_ = true;
                        }
                        HideMe();
                    }
                    else
                    {
                        MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("WillEnterBattle"), () =>
                        {
                            battleEntered = true;
                            GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_EnterNPCBattle, BattleId);
                            GamePlayer.Instance.wait4EnterBattleId = BattleId;
                            NetConnection.Instance.enterBattle(BattleId);
                            if (BattleId == GlobalValue.GuideBattleID)
                            {
                                GuideManager.Instance.InBattleGuide_ = true;
                            }
                        });
                    }
                }
                HideMe();
                if (TeamSystem.IsTeamLeader())
                {
                    NetConnection.Instance.leaderCloseDialog();
                }
            }
            else if (QuestSystem.IsQuestAcceptableNpc(_NpcId) || QuestSystem.IsQuestFinishNpc(_NpcId)) ///如果没有战斗 但是有任务 那就显示任务小框
            {
                bool hideQuest = false;
                //如果可接没有东西
                //排除不可接职业任务
                int[] hideJobQuestIdx = CutJobQuest();
                if (firstDisplayQuest_)
                {
                    firstDisplayQuest_ = false;
                    HideMe();
                }

                NpcTaskName.text = _NpcData.Name;

                List <int> aQuestList = QuestSystem.GetQuestAcceptableNpc(_NpcId);
                for (int i = 0; i < hideJobQuestIdx.Length; ++i)
                {
                    aQuestList.RemoveAt(hideJobQuestIdx[i]);
                    for (int j = i + 1; j < hideJobQuestIdx.Length; ++j)
                    {
                        hideJobQuestIdx[j] -= 1;
                    }
                }
                if (QuestSystem.IsFDailyQuest())
                {
                    for (int i = aQuestList.Count - 1; i >= 0; i--)
                    {
                        QuestData qdd = QuestData.GetData(aQuestList[i]);
                        if (qdd.questKind_ == QuestKind.QK_Daily)
                        {
                            aQuestList.RemoveAt(i);
                        }
                    }
                }

                List <int> qlist = QuestSystem.GetQuestByFinishNpc(_NpcId);
                qlist.AddRange(aQuestList);
                RefreshItems(qlist.ToArray());
                GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_NpcRenwuUIOpen, qlist.Count > 0? qlist[0]: 0);
                firstDisplayQuest_ = true;
                Duihua.gameObject.SetActive(false);
                if (qlist.Count == 0)
                {
                    HideMe();
                }
//				if(IsKinDaily(aQuestList))
//				{
//					HideMe();
//				}
                NpcTask.SetActive(qlist.Count != 0);
            }
            else if (_NpcData != null && _NpcData.AssetsId != 0)
            {
                //UIBase.AsyncLoad(_NpcData.AssetsId);
                GlobalInstanceFunction.Instance.NpcOpenUI(_NpcData.AssetsId);
                HideMe();
            }
            else
            {
                HideMe();
            }

            if (!battleEntered)
            {
                if (BattleId != 0) ///如果有战斗直接进战斗
                {
                    //新手直接进
                    if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < 23)
                    {
                        GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_EnterNPCBattle, BattleId);
                        GamePlayer.Instance.wait4EnterBattleId = BattleId;
                        NetConnection.Instance.enterBattle(BattleId);
                        if (BattleId == GlobalValue.GuideBattleID)
                        {
                            GuideManager.Instance.InBattleGuide_ = true;
                        }
                        HideMe();
                    }
                    else
                    {
                        MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("WillEnterBattle"), () =>
                        {
                            GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_EnterNPCBattle, BattleId);
                            GamePlayer.Instance.wait4EnterBattleId = BattleId;
                            NetConnection.Instance.enterBattle(BattleId);
                            if (BattleId == GlobalValue.GuideBattleID)
                            {
                                GuideManager.Instance.InBattleGuide_ = true;
                            }
                            HideMe();
                        });
                    }
                }
            }

            bool scriptDeal = false;
            //如果没有battle 就把npcid抛给脚本
            if (BattleId == 0)
            {
                scriptDeal = GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_NpcTalked, _NpcId, TalkId_);
            }

            if (!scriptDeal)
            {
                if (_NpcId != 0)
                {
                    NetConnection.Instance.talkedNpc(_NpcId);
                }
            }
        }
    }
예제 #24
0
 public void UpdateUI()
 {
     if (!TeamSystem.IsInTeam())
     {
         tuichuBtn.gameObject.SetActive(false);
         return;
     }
     tuichuBtn.gameObject.SetActive(true);
     UIManager.SetButtonEventHandler(tuichuBtn.gameObject, EnumButtonEvent.OnClick, OnClickTuichu, 0, 0);
     // is leader
     isLeader_ = TeamSystem.IsTeamLeader();
     duaiyuanObj.gameObject.SetActive(!isLeader_);
     duaizhangObj.gameObject.SetActive(isLeader_);
     mubiaoObj.SetActive(true);
     teamnameObj.SetActive(true);
     teamnameLabel.text = TeamSystem._MyTeamInfo.name_;
     mubiaoLabel.text   = LanguageManager.instance.GetValue(TeamSystem._MyTeamInfo.type_.ToString()) + "(" + TeamSystem._MyTeamInfo.minLevel_.ToString() + "级" + "-" + TeamSystem._MyTeamInfo.maxLevel_.ToString() + "级" + ")";
     huobanBtn.gameObject.SetActive(isLeader_);
     if (huobanBtn.gameObject.activeSelf)
     {
         UIManager.SetButtonEventHandler(huobanBtn.gameObject, EnumButtonEvent.OnClick, OnClickHuoban, 0, 0);
     }
     if (duaizhangObj.activeSelf)
     {
         UIManager.SetButtonEventHandler(hanhuaBt.gameObject, EnumButtonEvent.OnClick, OnClickHuanhua, 0, 0);
         UIManager.SetButtonEventHandler(XiugaiBtn.gameObject, EnumButtonEvent.OnClick, OnClickXiugai, 0, 0);
         UIManager.SetButtonEventHandler(YaoqingBtn.gameObject, EnumButtonEvent.OnClick, OnClickYaoqing, 0, 0);
     }
     else if (duaiyuanObj.activeSelf)
     {
         UIManager.SetButtonEventHandler(zanshiBtn.gameObject, EnumButtonEvent.OnClick, OnClickzanshi, 0, 0);
         UIManager.SetButtonEventHandler(backTeamBtn.gameObject, EnumButtonEvent.OnClick, OnClickbackTeam, 0, 0);
     }
     COM_SimplePlayerInst[] members = TeamSystem.GetTeamMembers();
     for (int i = 0; i < members.Length; i++)
     {
         if (isLeader_)
         {
             if (TeamSystem.IsTeamLeader((int)members[i].instId_))
             {
                 UpdateMaxMenberS();
             }
         }
         else
         {
             ShowTeamPosition();
             //HidenMaxMenberSizeUI();
         }
         for (int j = 0; j < teamCells.Count; j++)
         {
             TeamMemberCell tecll = teamCells[j].GetComponent <TeamMemberCell>();
             if (tecll.modPos.transform.childCount == 0)
             {
                 continue;
             }
             if (int.Parse(teamCells[j].name) == members[i].instId_)
             {
                 if (TeamSystem.IsTeamLeader((int)members[i].instId_))
                 {
                     tecll.duizhangSp.spriteName = "duizhang";
                 }
                 else
                 {
                     tecll.duizhangSp.spriteName = "duiyuan";
                 }
                 if (tecll.PlayerInst != null)
                 {
                     if (tecll.PlayerInst.isLeavingTeam_)
                     {
                         backTeamBtn.gameObject.SetActive(true);
                         zanshiBtn.gameObject.SetActive(false);
                         tecll.heiObj.SetActive(true);
                         tecll.StateSp.spriteName = "zanli";
                         tecll.OpenBtn.gameObject.SetActive(false);
                         tecll.offBtn.gameObject.SetActive(false);
                     }
                     else
                     {
                         backTeamBtn.gameObject.SetActive(false);
                         zanshiBtn.gameObject.SetActive(true);
                         tecll.heiObj.SetActive(false);
                     }
                 }
             }
         }
     }
     openOrOffBtn();
 }
예제 #25
0
    public void OnJoin(GameObject go)
    {
        SceneData ssdata = SceneData.GetData(GameManager.SceneID);

        if (ssdata.sceneType_ == SceneType.SCT_GuildBattleScene)
        {
            MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("querenlikai"), () => {
                if (daData_.activityKind_ == ActivityType.ACT_Family_0 ||
                    daData_.activityKind_ == ActivityType.ACT_Family_1 ||
                    daData_.activityKind_ == ActivityType.ACT_Family_2 ||
                    daData_.activityKind_ == ActivityType.ACT_Family_3 ||
                    daData_.activityKind_ == ActivityType.ACT_Family_4)
                {
                    if (!GuildSystem.IsInGuild())
                    {
                        PopText.Instance.Show(LanguageManager.instance.GetValue("guildCanJoin"), PopText.WarningType.WT_Warning);
                        return;
                    }
                }

                if (TeamSystem.IsInTeam() && !TeamSystem.IsTeamLeader(GamePlayer.Instance.InstId) && !TeamSystem.AwayTeam(GamePlayer.Instance.InstId))
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("onlyLeaderCanOperate"), PopText.WarningType.WT_Tip);
                    return;
                }
                string joinInfo = (string)UIEventListener.Get(go).parameter;

                GameManager.Instance.ParseNavMeshInfo(joinInfo, ConvertNpcType(activityType_));
                HongDongPanel.HidePanelByName(UIASSETS_ID.UIASSETS_DailyActivityPanel);
            }, false, null, null, "", "", 2000, true);
            return;
        }



        if (daData_.activityKind_ == ActivityType.ACT_Family_0 ||
            daData_.activityKind_ == ActivityType.ACT_Family_1 ||
            daData_.activityKind_ == ActivityType.ACT_Family_2 ||
            daData_.activityKind_ == ActivityType.ACT_Family_3 ||
            daData_.activityKind_ == ActivityType.ACT_Family_4)
        {
            if (!GuildSystem.IsInGuild())
            {
                PopText.Instance.Show(LanguageManager.instance.GetValue("guildCanJoin"), PopText.WarningType.WT_Warning);
                return;
            }
        }

        if (TeamSystem.IsInTeam() && !TeamSystem.IsTeamLeader(GamePlayer.Instance.InstId) && !TeamSystem.AwayTeam(GamePlayer.Instance.InstId))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("onlyLeaderCanOperate"), PopText.WarningType.WT_Tip);
            return;
        }
        string joinInfos = (string)UIEventListener.Get(go).parameter;

        GameManager.Instance.ParseNavMeshInfo(joinInfos, ConvertNpcType(activityType_));
        HongDongPanel.HidePanelByName(UIASSETS_ID.UIASSETS_DailyActivityPanel);
        //if(string.IsNullOrEmpty(joinInfo))
        //{
        //NPCInfo npc = GameManager.Instance.GetGuaiWuGongChengNpc();
        //if (npc == null)
        //{
        //    ClientLog.Instance.LogError("没有找到怪物攻城NPC");
        //}
        //else
        //    joinInfo = string.Format("{0},{1};{2}", npc.sceneId_, npc.areaNum_, npc.id_);
        //    return;
        //}

        //string[] infos = joinInfo.Split(';');
        //string[] sceneInfo = infos[0].Split(',');
        //int sceneId = int.Parse(sceneInfo[0]);
        //int sceneAreaNum = 0;
        //bool tryGetAreaNumByNpc = false;
        //if (sceneInfo.Length > 1)
        //    sceneAreaNum = int.Parse(sceneInfo[1]);
        //else
        //    tryGetAreaNumByNpc = true;
        //int npcId = 0;
        //Vector2 destPos = Vector2.zero;
        //if (infos.Length > 1)
        //{
        //    if (infos[1].Contains(","))
        //    {
        //        string[] pos = infos[1].Split(',');
        //        destPos = new Vector2(float.Parse(pos[0]), float.Parse(pos[1]));
        //    }
        //    else
        //    {
        //        npcId = int.Parse(infos[1]);
        //    }
        //}
        //else
        //{
        //    string xml = SceneSimpleData.GetData(sceneId).sceneXml_;
        //    int bornId = SceneData.GetBornPosEntryID(xml);
        //    destPos = SceneData.GetEntryPos(xml, bornId);
        //}

        //bool APEOn = false;
        //if (npcId != 0)
        //{
        //    if (tryGetAreaNumByNpc)
        //    {
        //        //NPCInfo destNpc = GameManager.Instance.GetNpc(sceneId, npcId);
        //        //if (destNpc == null)
        //        //{
        //        //    // npc has not refresh finished.
        //        //    tryGetAreaNumByNpc = false;
        //        //    return;
        //        //}
        //        //else
        //        //{
        //        //    sceneAreaNum = destNpc.areaNum_;
        //        //}
        //        //tryGetAreaNumByNpc = false;
        //    }
        //    APEOn = Traveller.Instance.Launch().TravelTo(sceneId, sceneAreaNum, npcId);
        //}
        //else if (destPos != Vector2.zero)
        //    APEOn = Traveller.Instance.Launch().TravelTo(sceneId, sceneAreaNum, new Vector3(destPos.x, 0f, destPos.y));
        //if (APEOn)
        //{
        //    GamePlayer.Instance.IsNotAutoPathing = true;
        //    Prebattle.Instance.UpdateAutoPathingAction();
        //    Prebattle.Instance.ExcuteOnePathAction();
        //    Prebattle.Instance.SwitchAFPEffect(true);
        //}
    }
예제 #26
0
    private void OnClickShowTips(ButtonScript obj, object args, int param1, int param2)
    {
        tipsObj.SetActive(true);
        MianteamListCell mcell = obj.GetComponent <MianteamListCell> ();

        if (TeamSystem.IsTeamLeader())
        {
            if (TeamSystem.IsTeamLeader((int)mcell.SimpleInformation.instId_))
            {
                ZHBtn.gameObject.SetActive(true);
                JHYBtn.gameObject.SetActive(false);
                CKBtn.gameObject.SetActive(false);
                ZSBtn.gameObject.SetActive(false);
                LKbtn.gameObject.SetActive(true);
                GDBtn.gameObject.SetActive(false);
            }
            else
            {
                if (mcell.SimpleInformation.isLeavingTeam_)
                {
                    ZHBtn.gameObject.SetActive(false);
                    JHYBtn.gameObject.SetActive(true);
                    CKBtn.gameObject.SetActive(true);
                    ZSBtn.gameObject.SetActive(false);
                    LKbtn.gameObject.SetActive(false);
                    GDBtn.gameObject.SetActive(false);
                }
                else
                {
                    ZHBtn.gameObject.SetActive(false);
                    JHYBtn.gameObject.SetActive(true);
                    CKBtn.gameObject.SetActive(true);
                    ZSBtn.gameObject.SetActive(false);
                    LKbtn.gameObject.SetActive(false);
                    GDBtn.gameObject.SetActive(false);
                }
            }
        }
        else
        {
            if (mcell.SimpleInformation.instId_ == GamePlayer.Instance.InstId)
            {
                if (mcell.SimpleInformation.isLeavingTeam_)
                {
                    GDBtn.gameObject.SetActive(true);
                    ZSBtn.gameObject.SetActive(false);
                }
                else
                {
                    GDBtn.gameObject.SetActive(false);
                    ZSBtn.gameObject.SetActive(true);
                }

                LKbtn.gameObject.SetActive(true);
                ZHBtn.gameObject.SetActive(false);
                JHYBtn.gameObject.SetActive(false);
                CKBtn.gameObject.SetActive(false);
            }
            else
            {
                ZSBtn.gameObject.SetActive(false);
                LKbtn.gameObject.SetActive(false);
                ZHBtn.gameObject.SetActive(false);
                JHYBtn.gameObject.SetActive(true);
                CKBtn.gameObject.SetActive(true);
                GDBtn.gameObject.SetActive(false);
            }
        }

        SimplePInst = mcell.SimpleInformation;
        gridTips.Reposition();
        UISprite sp = tipsObj.GetComponent <UISprite>();

        sp.height = (int)(btnCount() * gridTips.cellHeight) + 30;
        UIManager.SetButtonEventHandler(ZSBtn.gameObject, EnumButtonEvent.OnClick, OnClickZS, 0, 0);
        UIManager.SetButtonEventHandler(LKbtn.gameObject, EnumButtonEvent.OnClick, OnClickLK, 0, 0);
        UIManager.SetButtonEventHandler(ZHBtn.gameObject, EnumButtonEvent.OnClick, OnClickzh, 0, 0);
        UIManager.SetButtonEventHandler(JHYBtn.gameObject, EnumButtonEvent.OnClick, OnClickJHY, 0, 0);
        UIManager.SetButtonEventHandler(CKBtn.gameObject, EnumButtonEvent.OnClick, OnClickCK, 0, 0);
        UIManager.SetButtonEventHandler(GDBtn.gameObject, EnumButtonEvent.OnClick, OnClickGDBtn, 0, 0);
        UIManager.SetButtonEventHandler(tipsCloseBtn.gameObject, EnumButtonEvent.OnClick, OnClicktipsClose, 0, 0);
    }