public virtual void OnNotify(NotifyType notifyType, INotifyArgs notifyArgs) { foreach (var entity in Entities) { entity.OnNotify(notifyType, notifyArgs); } }
private void S_CUserLoginResHandle(INotifyArgs notify) { LoginManager.Instance.CreateActorButtonEnable = true; LoginManager.Instance.DeleteActorButtonEnable = true; LoginManager.Instance.EnterTownButtonEnable = true; LoginManager.Instance.NewSSUserLoginRes = (NewSSUserLoginRes)notify; if (LoginManager.Instance.NewSSUserLoginRes.lPromptFlag == 0) { //保存用户名和密码 PlayerPrefs.SetString("PlayerId", LoginManager.Instance.Account); PlayerPrefs.SetString("PlayerPwd", LoginManager.Instance.Pwd); if (LoginManager.Instance.NewSSUserLoginRes.lActorNum == 0) { //显示创建角色界面 PlatformLoginBehaviour.message += " LoginUIPanel Trigger CreateRole :"; UIEventManager.Instance.TriggerUIEvent(UIEventType.ShowLodingUI, UI.Login.LoginUIType.CreatRole); } else { //显示选择角色界面 PlatformLoginBehaviour.message += " LoginUIPanel Trigger RoleSelect :"; GameDataManager.Instance.ResetData(DataType.ActorSelector, LoginManager.Instance.NewSSUserLoginRes.SSActorInfos); UIEventManager.Instance.TriggerUIEvent(UIEventType.ShowLodingUI, UI.Login.LoginUIType.SelectRole); } } else { //提示登录失败 UI.MessageBox.Instance.Show(3, "", LanguageTextManager.GetString("IDS_H1_236"), LanguageTextManager.GetString("IDS_H2_13"), null); } }
void CreateTeamInfoItemsHandle(INotifyArgs e) { SMsgTeamNum_SC sMsgTeamNum = (SMsgTeamNum_SC)e; //ShowWorldTeamInfo(); TeamOrganizePanel.CreateTeamInfoItems(sMsgTeamNum); }
private void GoodsOperateSmeltHandle(INotifyArgs inotifyArgs) { SMsgGoodsOperateEquipmentStrength_SC sMsgGoodsOperateEquipmentStrength_SC = (SMsgGoodsOperateEquipmentStrength_SC)inotifyArgs; GameObject eff = null; if (sMsgGoodsOperateEquipmentStrength_SC.bySucess == 0) { //失败 SoundManager.Instance.PlaySoundEffect("Sound_UIEff_Equipment_Fail"); eff = m_currStrenghType == PackBtnType.Strength?StrengthFailedEff:StarUpgradeFailedEff; } else { //成功 SoundManager.Instance.PlaySoundEffect("Sound_UIEff_Equipment_Success"); m_equipListBehaviour.StrenAndStarUpgradeSuccess(); eff = m_currStrenghType == PackBtnType.Strength?StrengthSuccessEff:StarUpgradeSuccessEff; if (m_currStrenghType == PackBtnType.StarUpgrade) { var starUpgradePos = m_equipListBehaviour.CurrrEquipDetails.m_equipItemMainProperty.StarLev.transform.position; StartCoroutine(GoodsOperateSmeltEff(StrengthUpgradeEff, starUpgradePos)); } } StartCoroutine(GoodsOperateSmeltEff(eff, null)); var byStrengthType = (Equipment_Strength_Type)sMsgGoodsOperateEquipmentStrength_SC.byStrengthType; TraceUtil.Log(SystemModel.Rocky, (byStrengthType == Equipment_Strength_Type.EQUIPMENT_NORMAL_STRENGTH_TYPE?"普通强化返回":"星阶升级返回") + sMsgGoodsOperateEquipmentStrength_SC.bySucess.ToString()); }
void PVPFindPlayerHandle(INotifyArgs arg) { SMSGEctypeFindPlayer_SC findPackage = (SMSGEctypeFindPlayer_SC)arg; if (findPackage.byFindNum <= 0) { MessageBox.Instance.Show(4, "", LanguageTextManager.GetString("IDS_H1_352"), LanguageTextManager.GetString("IDS_H2_55"), RefreshInterface); return; } m_IsFindPVPPlayer = true; var playerInfo = findPackage.EctypePvpPlayer; PVPBattleManager.Instance.SavePVPPlayerData(playerInfo);//储存pvp玩家信息 CompetitorView.ShowHeroModelView(playerInfo.byKind); //Label_competitorName.gameObject.SetActive(true); Name_competitor.SetActive(true); Label_competitorName.text = findPackage.EctypePvpPlayer.szName; //显示 ChallengeButton.SetButtonActive(false); ChallengeButtonEffect.SetActive(false); InfoBoardTweenPos.gameObject.SetActive(false);//强制不显示信息面板 //ChallengeButton.ButtonText.text = LanguageTextManager.GetString("IDS_H1_353"); ChallengeFoundTip.SetActive(true); ChallengeLabel.SetActive(false); CancelInvoke("BeginSearch"); PVPSearchEffect.SetActive(false); StartCoroutine("ReadyEnter"); }
//清理排行榜数据 void ClearRankingListHandle(INotifyArgs arg) { m_rankInfoCtrlList.ApplyAllItem(p => { Destroy(p.gameObject); }); m_rankInfoCtrlList.Clear(); ItemPageManager_Rank.InitPager(1, 1, 0);//重置默认值 }
/// <summary> /// 减速检测 /// </summary> private void BulletHitSlowMotionCheck(INotifyArgs args) { BulletHitData bulletHitData = (BulletHitData)args; var vocation = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION; int bulletId = 0; var slowMonitorCondition = m_stepItem.SlowMonitorCondition.Split('+'); var monsterId = m_stepItem.SlowMonitorTarget; switch (vocation) { case 1: //剑客 bulletId = int.Parse(slowMonitorCondition[0]); break; case 4: //刺客 bulletId = int.Parse(slowMonitorCondition[1]); break; } if (bulletHitData.BulletId == bulletId && monsterId == bulletHitData.BeFightId) { RemoveEventHandler(EventTypeEnum.HitMonsterForGuide.ToString(), BulletHitSlowMotionCheck); if (m_stepItem != null && m_stepItem.SlowMonitorType == 1) { ClearGuideStepUIEffect(); RefreshGuideStepUI(true); StartCoroutine("SlowMotionHandle"); AddEventHandler(EventTypeEnum.FireSkillForGuide.ToString(), SlowMotionFinish); } } }
//private void GoToBattleHandle(INotifyArgs notify) //{ // NewbieGuideManager.Instance.IsGuideFinish = true; // GoToBattle(); //} //public void OnClosePanel(object obj) //{ // //transform.localPosition = new Vector3(0, 0, -1000); // Destroy(gameObject); //} //没有队伍列表 void TeamNoFoundListHandle(INotifyArgs e) { LoadingUI.Instance.Close(); //print("ShowCreatTeamMessage"); MessageBox.Instance.Show(4, "", LanguageTextManager.GetString("IDS_H1_160"), LanguageTextManager.GetString("IDS_H2_4"), LanguageTextManager.GetString("IDS_H2_28"), SureCreateTeam, null); }
private void SlowMotionFinish(INotifyArgs args) { SkillFireData skillFireData = (SkillFireData)args; var vocation = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION; int skillId = 0; var slowMonitorFinishTarget = m_stepItem.SlowMonitorFinishTarget.Split('+'); switch (vocation) { case 1: //剑客 skillId = int.Parse(slowMonitorFinishTarget[0]); break; case 4: //刺客 skillId = int.Parse(slowMonitorFinishTarget[1]); break; } //减速完成条件满足 if (skillFireData.SkillId == skillId) { StopSlowMotionAction(); NetServiceManager.Instance.InteractService.SendEctypeDialogOver(); //减速结束,通知服务器 if (m_buttonFlashing != null) { DestroyImmediate(m_buttonFlashing); } } }
void ReceiveXiuLianAccountHandle(INotifyArgs arg) { SMsgActionXiuLianInfo_SC sMsgActionXiuLianInfo_SC = (SMsgActionXiuLianInfo_SC)arg; TraceUtil.Log("[XiuLianInfo]" + sMsgActionXiuLianInfo_SC.byXiuLianType + " , " + sMsgActionXiuLianInfo_SC.XiuLianTime + " , " + sMsgActionXiuLianInfo_SC.XiuLianNum); switch ((XiuLianType)sMsgActionXiuLianInfo_SC.byXiuLianType) { case XiuLianType.OFFLINE_XIULIAN_TYPE: //离线修为下发 Panel_PracticeOutcomes.ShowPanel(PlayerRoomPracticeOutcomesPanel.LineType.Offline, sMsgActionXiuLianInfo_SC); ResetPracticeTime(); break; case XiuLianType.ONLINE_XIULIAN_TYPE: //在线修为下发 Panel_PracticeOutcomes.ShowPanel(PlayerRoomPracticeOutcomesPanel.LineType.Online, sMsgActionXiuLianInfo_SC); ResetPracticeTime(); break; case XiuLianType.ROOMDES_XIULIAN_TYPE: break; case XiuLianType.BREAK_XIULIAN_TYPE: //突破修为下发 Panel_PracticeOutcomes.ShowPanel(PlayerRoomPracticeOutcomesPanel.LineType.Online, sMsgActionXiuLianInfo_SC); break; default: break; } }
public void AddFriendSuccessHandle(INotifyArgs notifyArgs) { if (IsShow) { ShowFriendListPanel(null); } }
void TeamMemberReadyHandle(INotifyArgs e) { SMsgTeamMemberReadyResult_SC readyResult = (SMsgTeamMemberReadyResult_SC)e; //bool isReady = ((TEAM_MEMBER_STATUS)readyResult.byResultCode) == TEAM_MEMBER_STATUS.TEAM_MEMBER_READY_STATUS ? true : false; TeamRoomPanel.UpdateTeamMemberReadyState(readyResult.dwActorID, readyResult.byResultCode); }
/// <summary> /// 检测路障被攻击事件 /// </summary> /// <param name="inotifyArgs">Inotify arguments.</param> public void RoadblockBeHurt(INotifyArgs inotifyArgs) //设置各种属性 { SMsgBattleCalculateEffect_SC fightResult = (SMsgBattleCalculateEffect_SC)inotifyArgs; if (ISDefenceEctype) { if (MonsterManager.Instance.IsMonsterBossType(fightResult.uidFighter)) { //提示大门正在受到攻击 if (m_bossTipsCD >= m_commonDefineCDTime) { SoundManager.Instance.PlaySoundEffect("Sound_UIEff_DefenceDownTips"); StartCoroutine(ShowEventTips(true, "IDS_I15_11")); m_bossTipsCD = 0; } return; } } //这个所有副本// foreach (var monster in this.RoadblockEntityModes.Values) { if (monster.EntityDataStruct.SMsg_Header.uidEntity == fightResult.uidFighter) { //显示 路障正在被攻击 事件提示 if (m_roadblockTipsCD >= m_commonDefineCDTime) { SoundManager.Instance.PlaySoundEffect("Sound_UIEff_DefenceDownTips"); StartCoroutine(ShowEventTips(true, monster.tipIDS)); //"IDS_I15_9")); m_roadblockTipsCD = 0; } break; } } }
/// <summary> /// Notify all attached managers (and the game instance, if applicable) of an application-wide state change. /// </summary> /// <param name="notifyType">The notification type.</param> /// <param name="notifyArgs">Any applicable arguments or details to carry with the notification.</param> public static void Notify(NotifyType notifyType, INotifyArgs notifyArgs) { foreach (var observer in observers) { observer.OnNotify(notifyType, notifyArgs); } }
//任务完成,请空当前任务引导列表 private void TaskFinished(INotifyArgs args) { var taskConfigData = (TaskState)args; m_taskFinishAppearButton = taskConfigData.TaskNewConfigData.AppearButton; TaskAward(taskConfigData); }
/// <summary> /// 没有引导时 点击处理 /// </summary> /// <param name="args"></param> private void ClickNoneGuideBtnHandle(INotifyArgs args) { if (m_newGuideConfigData != null) { TaskFinishGuideInvokeHandle(null); } }
void TeamMemberLeaveHandle(INotifyArgs e) { SMsgTeamMemberLeave_SC teamMemberLeave = (SMsgTeamMemberLeave_SC)e; var playerData = PlayerManager.Instance.FindHeroDataModel(); if (teamMemberLeave.dwActorID == playerData.ActorID) { ShowWorldTeamInfo(); if (isKick) { //MessageBox.Instance.Show(4, "", LanguageTextManager.GetString("IDS_H1_162"), LanguageTextManager.GetString("IDS_H2_55")); MessageBox.Instance.ShowTips(4, LanguageTextManager.GetString("IDS_H1_162"), 1f); //刷新队伍 TeamOrganizePanel.OnRefreshWorldTeamInfoClick(0); } } else { //先删除之前的队员model TeamRoomPanel.DeleteHeroModels(); var teamData = TeamManager.Instance.MyTeamProp; TeamRoomPanel.UpdateTeammateInfo(new SMsgTeamNum_SC() { SMsgTeamProps = new SMsgTeamProp_SC[1] { teamData } }); } }
void TeamNoFoundListHandle(INotifyArgs arg) { if (transform.localPosition == Vector3.zero) { MessageBox.Instance.Show(4, "", LanguageTextManager.GetString("IDS_H1_160"), LanguageTextManager.GetString("IDS_H2_4"), LanguageTextManager.GetString("IDS_H2_28"), SureCreateTeam, null); } }
void Show(INotifyArgs inotifyArgs) { IsGameSettlement = true; // Debug.LogWarning("开始结算:" + Time.time); UIEventManager.Instance.TriggerUIEvent(UIEventType.ReceiveSettleAccount, inotifyArgs); this.sMSGEctypeSettleAccounts = (SMSGEctypeSettleAccounts)inotifyArgs; ShowWinEffect(); }
void GotoStroyLineHandle(INotifyArgs notifyArgs) { //切换到剧情 // PlayerManager.Instance.LockPlayOnSceneChange(false); m_curSceneName = StroyLineDataManager.Instance.GetStroySceneName(); //m_curSceneName = "StroyLine01"; GotoState(GameState.GAME_STATE_STORYLINE, true); }
private void UpdateViaNotify(INotifyArgs e) { EntityDataUpdateNotify notify = (EntityDataUpdateNotify)e; if (m_currentVipLevel != PlayerDataManager.Instance.GetPlayerVIPLevel()) { RefreshTitle(); } }
void UpdateViaNotify(INotifyArgs iNotifyArgs) { EntityDataUpdateNotify entityDataUpdateNotify = (EntityDataUpdateNotify)iNotifyArgs; if (entityDataUpdateNotify.IsHero && entityDataUpdateNotify.nEntityClass == TypeID.TYPEID_PLAYER) { Updatelabel(); } }
private void EquipSkill(INotifyArgs obj) { //技能装备完成。 SingleSkillInfoList.SetEquipSkills(); //刷新装备栏 AssemblySkill.SkillEquipSuucess(SingleSkillInfoList.EquipSkillsList, SkillList.CurrentSelectedItem); SkillList.FocusSkillItem(null); SkillList.CurrentSelectedItem = null; }
private void UpdateViaNotify(INotifyArgs inotifyArgs)//设置各种属性 { EntityDataUpdateNotify entityDataUpdateNotify = (EntityDataUpdateNotify)inotifyArgs; if (entityDataUpdateNotify.IsHero && entityDataUpdateNotify.nEntityClass == TypeID.TYPEID_PLAYER) { SetHeroData(); } }
public void UpdateViaNotify(INotifyArgs inotifyArgs) //设置各种属性 { EntityDataUpdateNotify entityDataUpdateNotify = (EntityDataUpdateNotify)inotifyArgs; if (IsShow && entityDataUpdateNotify.IsHero && entityDataUpdateNotify.nEntityClass == TypeID.TYPEID_PLAYER) { UpdateAttribute(); } }
void UpdateViaNotify(INotifyArgs inotifyArgs) //设置各种属性 { EntityDataUpdateNotify entityDataUpdateNotify = (EntityDataUpdateNotify)inotifyArgs; if (entityDataUpdateNotify.IsHero && entityDataUpdateNotify.nEntityClass == TypeID.TYPEID_PLAYER) { UpdateButtonStatus(); } }
private void HidePlayerDirectArrow(INotifyArgs args) { //玩家脚底指引箭头 if (m_PlayerDirect != null) { GameObject.Destroy(m_PlayerDirect.gameObject); } m_dynamicPoint = false; }
public void UpdateViaNotify(INotifyArgs inotifyArgs)//设置各种属性 { EntityDataUpdateNotify entityDataUpdateNotify = (EntityDataUpdateNotify)inotifyArgs; if (entityDataUpdateNotify.IsHero && entityDataUpdateNotify.nEntityClass == TypeID.TYPEID_PLAYER) { UpdateInfoPanelInfo(); } }
void ResetStatus(INotifyArgs inotifyArgs) { EntityDataUpdateNotify entityDataUpdateNotify = (EntityDataUpdateNotify)inotifyArgs; if (entityDataUpdateNotify.IsHero && entityDataUpdateNotify.nEntityClass == TypeID.TYPEID_PLAYER) { SetHeroStatus(); } }
private void PlayerGotoSceneReadyHandle(INotifyArgs notifyArgs) { SetBattleSceneLoaded(); //检查阻挡,刷特效 if (SceneDataManager.Instance.CacheInitBlocks != null && SceneDataManager.Instance.CacheInitBlocks.Count > 0) { SceneDataManager.Instance.CacheInitBlocks.ApplyAllItem(P => BlockAppear(P)); } }