private void OnClickLK(ButtonScript obj, object args, int param1, int param2) { SceneData ssdata = SceneData.GetData(GameManager.SceneID); if (ssdata.sceneType_ == SceneType.SCT_Instance) { if (CopyData.IsCopyScene(GameManager.SceneID)) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("likaifuben"), () => { NetConnection.Instance.exitCopy(); }); } else { NetConnection.Instance.exitTeam(); NetConnection.Instance.exitLobby(); } } else { NetConnection.Instance.exitTeam(); NetConnection.Instance.exitLobby(); } tipsObj.SetActive(false); }
void OnClickDoYER(ButtonScript obj, object args, int param1, int param2) { SceneData ssdata = SceneData.GetData(GameManager.SceneID); if (ssdata.sceneType_ == SceneType.SCT_Instance) { if (CopyData.IsCopyScene(GameManager.SceneID)) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("likaifuben"), () => { NetConnection.Instance.exitCopy(); Prebattle.Instance.ActiveEnterScene(2); }); } } else if (ssdata.sceneType_ == SceneType.SCT_GuildBattleScene) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("likaijiazuzhan"), () => { Prebattle.Instance.ActiveEnterScene(2); }); } else { Prebattle.Instance.ActiveEnterScene(2); } Hide(); }
void OnClickbackTeam(ButtonScript obj, object args, int param1, int param2) { int sceneid = TeamSystem.GetMyTeamLeader().sceneId_; if (CopyData.IsCopyScene(sceneid)) { PopText.Instance.Show(LanguageManager.instance.GetValue("fubenguidui")); return; } NetConnection.Instance.backTeam(); // zanshiBtn.gameObject.SetActive (true); // backTeamBtn.gameObject.SetActive (false); }
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); }
private void OnClickOtherFamily(ButtonScript obj, object args, int param1, int param2) { Prebattle.Instance.ChangeWalkEff(Prebattle.WalkState.WS_Normal); Prebattle.Instance.StopSelfActorMove(); SceneData ssdata = SceneData.GetData(GameManager.SceneID); if (CopyData.IsCopyScene(GameManager.SceneID)) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("likaifuben"), () => { NetConnection.Instance.exitCopy(); NetConnection.Instance.transforScene(1100); }); } else if (ssdata.sceneType_ == SceneType.SCT_GuildBattleScene) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("querenlikai"), () => { NetConnection.Instance.transforScene(1100); }); } else { NetConnection.Instance.transforScene(1100); } }
void RefreshTaskItemData() { questgrid.transform.DetachChildren(); foreach (GameObject go in _QuestItems) { GameObject.Destroy(go); } _QuestItems.Clear(); MainTaskUICell mcell = null; //第一个永远显示主线任务 不要乱动 GameObject clone = null; if (!CopyData.IsCopyScene(GameManager.SceneID)) { clone = GameObject.Instantiate(questitem) as GameObject; _QuestItems.Add(clone); questgrid.AddChild(clone.transform); clone.transform.localPosition = Vector3.zero; clone.transform.localScale = Vector3.one; clone.SetActive(true); mcell = clone.GetComponent <MainTaskUICell>(); if (QuestSystem.IsMainKindEmpty()) {///没有主线任务 int next = QuestSystem.GetFirstAcceptableMainKindId(); if (next == 0) { next = QuestSystem.GetFirstComplateMainKindId(); if (next != 0) { QuestData qdata = QuestData.GetData(next); qdata = QuestData.GetData(qdata.postQuest_); if (qdata != null) { mcell.targetLabel.text = ""; mcell.descLabel.text = string.Format("需要升到{0}级才能接任务!", qdata.needLevel_); } } } else { QuestData qdata = QuestData.GetData(next); mcell.QData = qdata; //mcell.targetLabel.text = ""; //mcell.descLabel.text = "接任务!"; GetInfoOnClick gioc = clone.GetComponent <GetInfoOnClick>(); if (gioc == null) { gioc = clone.gameObject.AddComponent <GetInfoOnClick>(); } gioc.param_ = qdata.id_; } } else { // if(!CopyData.IsCopyScene(GameManager.SceneID)) // { mcell.QuestInst = QuestSystem.GetDoingMainKind(); GetInfoOnClick gioc = clone.GetComponent <GetInfoOnClick>(); if (gioc == null) { gioc = clone.gameObject.AddComponent <GetInfoOnClick>(); } gioc.param_ = mcell.QuestInst.questId_; // } // } } for (int i = 0; i < QuestSystem.CurrentList.Count; i++) { QuestData qdata = QuestData.GetData((int)QuestSystem.CurrentList[i].questId_); if (CopyData.IsCopyScene(GameManager.SceneID)) { if (qdata.questKind_ != QuestKind.QK_Copy) { continue; } } else { if (qdata.questKind_ == QuestKind.QK_Main) { continue; ///主线任务 去你妈的 } } clone = GameObject.Instantiate(questitem) as GameObject; _QuestItems.Add(clone); clone.SetActive(true); UIManager.SetButtonEventHandler(clone, EnumButtonEvent.OnClick, OnClickReceive, qdata.id_, 0); questgrid.AddChild(clone.transform); clone.transform.localPosition = Vector3.zero; clone.transform.localScale = Vector3.one; mcell = clone.GetComponent <MainTaskUICell>(); mcell.QuestInst = QuestSystem.CurrentList[i]; GetInfoOnClick gioc = clone.GetComponent <GetInfoOnClick>(); if (gioc == null) { gioc = clone.gameObject.AddComponent <GetInfoOnClick>(); } gioc.param_ = QuestSystem.CurrentList[i].questId_; questgrid.repositionNow = true; } if (_QuestItems.Count > 0) { GuideManager.Instance.RegistGuideAim(_QuestItems[0], GuideAimType.GAT_QuestMiniFirst); } if (_QuestItems.Count > 1) { GuideManager.Instance.RegistGuideAim(_QuestItems[1], GuideAimType.GAT_QuestMiniSecond); } GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_MainTaskFlushOk); }