//进入副本 public void EnterCopy() { m_bEnterNvWa = true; if (this.m_nvWaState != ENvWaState.StartBattle) { NvWaStartPanel.NvWaStartParam param = new NvWaStartPanel.NvWaStartParam { itemId = this.NvWaJumpItemId, OkCd = 10, OkDelegate = OkBtnDelegate, CancelDelegate = CancelBtnDelegate }; this.m_nvWaStartTime = UnityEngine.Time.realtimeSinceStartup + 10; //开始界面最多10s DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.NvWaStartPanel, data: param); } DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.NvWaPanel); stCopyInfo info = new stCopyInfo(); info.bShow = true; info.bShowBattleInfoBtn = false; DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MainPanel, UIMsgID.eShowCopyInfo, info); DataManager.Manager <ComBatCopyDataManager>().CopyCDAndExitData = new CopyCDAndExitInfo { bShow = true, bShowBattleInfoBtn = false }; }
public void EnterCopy() { stCopyInfo info = new stCopyInfo(); info.bShow = true; info.bShowBattleInfoBtn = true; DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MainPanel, UIMsgID.eShowCopyInfo, info); DataManager.Manager <ComBatCopyDataManager>().CopyCDAndExitData = new CopyCDAndExitInfo { bShow = true, bShowBattleInfoBtn = true }; }
//进入副本 public void EnterCopy() { stCopyInfo info = new stCopyInfo(); info.bShow = true; info.bShowBattleInfoBtn = false; DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MainPanel, UIMsgID.eShowCopyInfo, info); DataManager.Manager <ComBatCopyDataManager>().CopyCDAndExitData = new CopyCDAndExitInfo { bShow = true, bShowBattleInfoBtn = false }; SetCampNpOnTrigger(m_CampCombatResultInfo.m_MyCampCombatInfo.camp); Engine.Utility.EventEngine.Instance().AddVoteListener((int)Client.GameVoteEventID.AUTOAtOnceRECOVER, DoVoteEvent);//吃瞬药投票 }
/// <summary> /// 进入副本 /// </summary> public void EnterCopy() { this.b_InAnswerCopy = true; this.m_playerAnswerReslut = 0; stCopyInfo info = new stCopyInfo(); info.bShow = true; info.bShowBattleInfoBtn = false; DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MainPanel, UIMsgID.eShowCopyInfo, info); DataManager.Manager <ComBatCopyDataManager>().CopyCDAndExitData = new CopyCDAndExitInfo { bShow = true, bShowBattleInfoBtn = false }; }
//进入副本 public void EnterCopy() { stCopyInfo info = new stCopyInfo(); info.bShow = true; info.bShowBattleInfoBtn = false; DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MainPanel, UIMsgID.eShowCopyInfo, info); DataManager.Manager <ComBatCopyDataManager>().CopyCDAndExitData = new CopyCDAndExitInfo { bShow = true, bShowBattleInfoBtn = false }; DataManager.Manager <UIPanelManager>().HidePanel(PanelID.TopBarPanel); DataManager.Manager <UIPanelManager>().HidePanel(PanelID.ArenaPanel); m_bEnterArena = true; m_bStartBattle = false; Engine.Utility.EventEngine.Instance().AddVoteListener((int)GameVoteEventID.AUTORECOVER, DoVoteEvent);//吃药投票 }
public void OnEnterCopy(stEntertCopyUserCmd_S cmd) { m_dicTeammateStatus.Clear(); m_dicEnterZoneStatus.Clear(); m_dicSendEnterZoneTime.Clear(); CopyDataBase cdb = GameTableManager.Instance.GetTableItem <CopyDataBase>(cmd.copy_base_id); if (cdb != null) { m_uEnterCopyID = cmd.copy_base_id; uint campCopyId = 4001; //阵营战 if (m_uEnterCopyID != campCopyId) { m_uCopyCountDown = cdb.keepTime - cmd.copy_live_time; } Client.IMapSystem mapsys = ClientGlobal.Instance().GetMapSystem(); if (mapsys != null) { mapsys.SetEnterZoneCallback(OnEnterZone); } //进入副本时 初始化波数数据 InitWaveIdListByCopyId(); //进入副本接口 ICopy copy = GetCopyByCopyID(m_uEnterCopyID); if (copy != null) { copy.EnterCopy(); } else { stCopyInfo info = new stCopyInfo(); info.bShow = true; info.bShowBattleInfoBtn = false; DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MainPanel, UIMsgID.eShowCopyInfo, info); this.CopyCDAndExitData = new CopyCDAndExitInfo { bShow = true, bShowBattleInfoBtn = false }; } //副本中关闭消息推送界面 if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.MessagePushPanel)) { DataManager.Manager <UIPanelManager>().HidePanel(PanelID.MessagePushPanel); } if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.MissionAndTeamPanel)) { DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MissionAndTeamPanel, UIMsgID.eCopyEnter, null); } Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.COMBOT_ENTER_EXIT, new Client.stCombotCopy() { copyid = cmd.copy_base_id, enter = true }); //进入副本标志 m_bIsEnterCopy = true; } }
void ClearCopyData() { //退出副本 stExitCopyUserCmd_CS cmd = new stExitCopyUserCmd_CS() { copy_base_id = 0 }; Client.IMapSystem mapsys = ClientGlobal.Instance().GetMapSystem(); if (mapsys != null) { mapsys.SetEnterZoneCallback(null); } ICopy copy = GetCopyByCopyID(m_uEnterCopyID); if (copy != null) { copy.ExitCopy(); } m_uEnterCopyID = 0; m_nLastKillWave = 0; m_nLastTransmitWave = 0; m_dicEnterZoneStatus.Clear(); m_dicSendEnterZoneTime.Clear(); this.CopyCDAndExitData = null; //清副本目标数据 CleanCopyTargetData(); stCopyInfo info = new stCopyInfo(); info.bShow = false; DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MainPanel, UIMsgID.eShowCopyInfo, info); if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.MissionAndTeamPanel)) { DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MissionAndTeamPanel, UIMsgID.eCopyExit, null); } Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.COMBOT_ENTER_EXIT, new Client.stCombotCopy() { copyid = cmd.copy_base_id, exit = true }); IControllerSystem cs = ClientGlobal.Instance().GetControllerSystem(); if (cs == null) { Engine.Utility.Log.Error("ExecuteCmd: ControllerSystem is null"); return; } if (cs.GetCombatRobot().Status != CombatRobotStatus.STOP) { cs.GetCombatRobot().Stop(); } IPlayer player = ClientGlobal.Instance().MainPlayer; if (player != null) { player.SendMessage(EntityMessage.EntityCommand_StopMove, player.GetPos()); CmdManager.Instance().Clear();//清除寻路 } //退出副本标志 m_bIsEnterCopy = false; }
public override bool OnMsg(UIMsgID msgid, object param) { if (msgid == UIMsgID.eSetRoleProperty)//添加主角的时候刷新界面 { // Client.IEntity entity = (Client.IEntity)param; Client.IEntity entity = param as Client.IEntity; if (entity != null) { //SetRoleHp(entity); //SetRoleMp(entity); //SetRoleExp(entity); //SetRolePkModel(entity); //if (m_label_lablePower != null) //{ // m_label_lablePower.text = entity.GetProp((int)FightCreatureProp.Power).ToString(); //} SetRoleHpMpExpPkPower(entity); } } else if (msgid == UIMsgID.stShowBuff) { stShowBuffInfo info = (stShowBuffInfo)param; if (info.IsMainRole) { ArrayList list = DataManager.Manager <BuffDataManager>().MainRoleBuffList; RefreshBuffIcon(m_trans_MainRoleBUffContainer, list); ShowBuffInfo(m_trans_MainRoleBUffContainer, true); } else { ArrayList list = DataManager.Manager <BuffDataManager>().TargetBuffList; RefreshBuffIcon(m_trans_TargetBUffContainer, list); ShowBuffInfo(m_trans_TargetBUffContainer, false); } } else if (msgid == UIMsgID.eRefreshEnemyList) { GameCmd.stEnmityDataUserCmd_S cmd = (GameCmd.stEnmityDataUserCmd_S)param; OnEnemyList(cmd); } else if (msgid == UIMsgID.eShowCopyInfo) { stCopyInfo info = (stCopyInfo)param; ShowFBWidgetUI(info.bShow, info.bShowBattleInfoBtn); } else if (msgid == UIMsgID.eSkillBtnRefresh) {//走新手引导 OnUIEvent SetSkillIcon(); } else if (msgid == UIMsgID.eSkillChangeState) { LearnSkillDataManager data = DataManager.Manager <LearnSkillDataManager>(); if (m_widget_SkillBtns != null) { Quaternion rotation = m_widget_SkillBtns.transform.localRotation; if (data.CurState == SkillSettingState.StateTwo) { m_widget_SkillBtns.transform.DORotate(new Vector3(0, 0, 125), rotTime); } else { m_widget_SkillBtns.transform.DORotate(new Vector3(0, 0, 0), rotTime); } SetPlayerSkillIcon(); uint stateSkill = data.GetCurStateSkillIDByJob(); ExecutePublicCD(stateSkill); } data.SetCurStateSkillList(); } else if (msgid == UIMsgID.eSkillShowPetSkill) { if (m_lstSkillBtns.Count > 9) { m_lstSkillBtns[9].Refresh(); } } else if (msgid == UIMsgID.eShortcutList) { InitShortcutGrid();//快捷使用道具 } else if (msgid == UIMsgID.eShortcutRect) { Vector3 pos = (Vector3)param; PointInRectEvent(pos); } else if (msgid == UIMsgID.eShortcutRect) { Vector3 pos = (Vector3)param; PointInRectEvent(pos); } else if (msgid == UIMsgID.eRefreshNpcBelong) { stRefreshNPCBelongParam data = (stRefreshNPCBelongParam)param; UpdateTargetStatus(data.npcid, data.teamid, data.ownerid, data.clanid, data.ownerName); } else if (msgid == UIMsgID.eAnswerState) { InitAnswerUI(); } return(true); }