bool ShowCollectTip(GameCmd.UninterruptActionType action) { //if (!DataManager.Manager<CampCombatManager>().isEnterScene && !DataManager.Manager<CityWarManager>().EnterCityWar) //{ // return false; //} return(action != GameCmd.UninterruptActionType.UninterruptActionType_SkillCJ && action != GameCmd.UninterruptActionType.UninterruptActionType_DEMON); }
public void StartSliderByEvent(float duration, GameCmd.UninterruptActionType type) { if (DataManager.Manager <SliderDataManager>().IsReadingSlider&& type == m_UninterruptActionType) { if (type == GameCmd.UninterruptActionType.UninterruptActionType_GOHOME) { m_duration = duration; m_startTime = UnityEngine.Time.realtimeSinceStartup; return; } Log.LogGroup("ZDY", "StartSliderByEvent 在读条中" + type.ToString()); return; } if (type == GameCmd.UninterruptActionType.UninterruptActionType_DEMON) { bool canRide = Engine.Utility.EventEngine.Instance().DispatchVote((int)Client.GameVoteEventID.RIDE_CANRIDE, null); if (!canRide) { m_UninterruptActionType = GameCmd.UninterruptActionType.UninterruptActionType_None; return; } } else if (type == GameCmd.UninterruptActionType.UninterruptActionType_GOHOME) { } m_UninterruptActionType = type; //DataManager.Manager<SliderDataManager>().IsReadingSlider = true; IsReadingSlider = true; if (type != GameCmd.UninterruptActionType.UninterruptActionType_SkillCJ) { Engine.Utility.EventEngine.Instance().AddEventListener((int)GameEventID.ENTITYSYSTEM_ENTITYBEGINMOVE, MoveCancel); } DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.SliderPanel, panelShowAction: (panel) => { DispatchValueUpdateEvent(new ValueUpdateEventArgs() { key = SliderDataEnum.Begin.ToString() }); }); //Log.Info("slider duration is " + duration.ToString()); //DataManager.Manager<SliderDataManager>().IsBreak = false; bbreak = false; bOver = false; m_duration = duration; //DataManager.Manager<TaskDataManager>().IsShowSlider = true; m_startTime = UnityEngine.Time.realtimeSinceStartup; m_uCurrentProcess = 0; TimerAxis.Instance().SetTimer(m_uSliderTimerID, m_uInterval, this); }
public void SetCollectType(GameCmd.UninterruptActionType type) { if (type == GameCmd.UninterruptActionType.UninterruptActionType_SYDJ) { this.value = "使用道具中"; } else { this.value = "采集中"; } }
public void HideSlider(GameCmd.UninterruptActionType type = GameCmd.UninterruptActionType.UninterruptActionType_None) { if (type == GameCmd.UninterruptActionType.UninterruptActionType_None) { type = m_UninterruptActionType; } if (type == m_UninterruptActionType) { DispatchValueUpdateEvent(new ValueUpdateEventArgs() { key = SliderDataEnum.End.ToString(), oldValue = type }); TimerAxis.Instance().KillTimer(m_uSliderTimerID, this); CleanSliderDelagateData(); m_UninterruptActionType = GameCmd.UninterruptActionType.UninterruptActionType_None; } }
void EndSlider() { if (!bOver) { bOver = true; if (m_UninterruptActionType == GameCmd.UninterruptActionType.UninterruptActionType_DEMON || m_UninterruptActionType == GameCmd.UninterruptActionType.UninterruptActionType_SkillCJ || m_UninterruptActionType == GameCmd.UninterruptActionType.UninterruptActionType_CangBaoTuCJ) { EventEngine.Instance().DispatchEvent((int)GameEventID.SKILLGUIDE_PROGRESSEND, new stGuildEnd() { action = m_UninterruptActionType, uid = MainPlayerHelper.GetPlayerID() }); } else if (m_UninterruptActionType != GameCmd.UninterruptActionType.UninterruptActionType_SkillCJ) { GameCmd.stNotifyUninterruptEventMagicUserCmd_CS cmd = new GameCmd.stNotifyUninterruptEventMagicUserCmd_CS(); cmd.etype = GameCmd.stNotifyUninterruptEventMagicUserCmd_CS.EventType.EventType_Over; cmd.desid = MainPlayerHelper.GetPlayerID(); cmd.actiontype = (uint)m_UninterruptActionType; NetService.Instance.Send(cmd); } //DataManager.Manager<TaskDataManager>().IsShowSlider = false; Engine.Utility.EventEngine.Instance().RemoveEventListener((int)GameEventID.ENTITYSYSTEM_ENTITYBEGINMOVE, MoveCancel); DispatchValueUpdateEvent(new ValueUpdateEventArgs() { key = SliderDataEnum.End.ToString(), oldValue = m_UninterruptActionType }); m_UninterruptActionType = GameCmd.UninterruptActionType.UninterruptActionType_None; IsReadingSlider = false; //倒计时截至 代理中处理 if (m_progessEndDel != null) { m_progessEndDel.Invoke(); m_progessEndDel = null; //DataManager.Manager<TaskDataManager>().IsShowSlider = false; } } }
void m_SliderData_ValueUpdateEvent(object sender, ValueUpdateEventArgs e) { if (e.key == SliderDataEnum.ShowProcess.ToString()) { } else if (e.key == SliderDataEnum.Begin.ToString()) { if (m_slider_SkillProgressBar != null) { m_slider_SkillProgressBar.Set(0); } bShow = true; ShowSprite(); } else if (e.key == SliderDataEnum.End.ToString()) { bShow = false; HideSprite(); if (e.oldValue != null) { GameCmd.UninterruptActionType type = (GameCmd.UninterruptActionType)e.oldValue; if (type == GameCmd.UninterruptActionType.UninterruptActionType_CangBaoTuCJ) { //重置一下实体 因为藏宝图的锄头需要在挖宝打断时重新置回默认的物品模型 DataManager.Manager <SuitDataManager>().RebackWeaponSuit(); // IPlayer treasurer = MainPlayerHelper.GetMainPlayer(); // if (treasurer != null) // { // ChangeEquip ce = new ChangeEquip(); // ce.nSuitID = 0; // ce.pos = Client.EquipPos.EquipPos_Weapon; // ce.nStateType = treasurer.GetProp((int)PlayerProp.SkillStatus); // treasurer.SendMessage(EntityMessage.EntityCommand_ChangeEquip, ce); // } } } HideSelf(); } }
bool IsClickNpcAction(GameCmd.UninterruptActionType action) { return(action == GameCmd.UninterruptActionType.UninterruptActionType_CampCJ || action == GameCmd.UninterruptActionType.UninterruptActionType_SYDJ || action == GameCmd.UninterruptActionType.UninterruptActionType_CJ); }
bool ShowCollectTip(GameCmd.UninterruptActionType action) { return(action != GameCmd.UninterruptActionType.UninterruptActionType_SkillCJ && action != GameCmd.UninterruptActionType.UninterruptActionType_DEMON); }