public override void Awake() { base.Awake(); var t = controller.transform; m_Container = t.FindEx("Container").gameObject; m_WorldName_Label = t.GetComponent <UILabel>("Container/UIPanel/Tween/ServerBar/BG/WName"); VersionLabel = t.GetComponent <UILabel>("Container/UIPanel/Tween/DistributeAnchor/Layout/FullVersion"); TweenParent = t.GetComponent <TweenAlpha>("Container/UIPanel/Tween"); m_ResetGameBtnPanel = t.FindEx("Container/UIPanel/Tween/ResetGameButtonPanel").gameObject; controller.hudRoot = t.GetComponent <Transform>(); t.GetComponent <UIButton>("Container/UIPanel/Tween/ServerBar/BG").onClick.Add(new EventDelegate(OnSelectWorldBtnClick)); t.GetComponent <UIButton>("Container/UIPanel/Tween/EnterGameButtonPanel/Button").onClick.Add(new EventDelegate(OnEnterGameBtnClick)); t.GetComponent <UIButton>("Container/UIPanel/Tween/ResetGameButtonPanel/Button").onClick.Add(new EventDelegate(OnResetGameBtnClick)); t.GetComponent <UIButton>("Container/UIPanel/Tween/NoticeBtn").onClick.Add(new EventDelegate(OnNoticeBtnClick)); t.GetComponent <UIButton>("Container/UIPanel/Tween/OfficialWebBtn").onClick.Add(new EventDelegate(OnOfficialWebBtnClick)); if (ILRDefine.DEBUG || ILRDefine.USE_GM) { m_ResetGameBtnPanel.gameObject.CustomSetActive(true); } else { m_ResetGameBtnPanel.gameObject.CustomSetActive(false); } FusionAudio.PostGlobalMusicEvent("MUS_CampaignView_Demo", true); }
public override void OnEnter() { LoadingLogic.AddCustomProgress(10); EventManager.instance.Raise(eSimpleEventID.Combat_Enter); //日志记录 GM.AssetManager.RecordLoadStart("CombatViewAction", "OnEnter"); base.OnEnter(); FusionAudio.PostGlobalMusicEvent("MUS_CombatView_Demo", true); }
public override void OnEnter() { LoadingLogic.AddCustomProgress(10); base.OnEnter(); LTInstanceMapModel.Instance.LoadInstanceSpriteAtlas(); FusionAudio.PostGlobalMusicEvent("MUS_FuBen", true); if (LTMainHudManager.Instance.GetFromFirstBattleType()) { LTMainHudManager.Instance.SetsFromFirstBattleType(false); } Instance.LTInstanceConfigManager.LoadDatas(); }
public override void OnEnter() { LoadingLogic.AddCustomProgress(10); hudLoaded = false; sceneLoaded = false; PartitionObject.FlushAllAndUnload(); base.OnEnter(); FusionAudio.PostGlobalMusicEvent("MUS_CampaignView_Demo", true); Hotfix_LT.Messenger.AddListener <EnemyController, eBattleType>("AttackEnemyImediatly", AttackEnemyImediatly); Hotfix_LT.Messenger.Raise("LTSpeedSnatchEvent.IdleFollow"); MainlandViewAction(); LTWelfareModel.Instance.SetMaxCampaignLevel();//更新通关的最大章节 }
void OnDisable() { if (Application.isPlaying) { string music = MusicLoopEvent; // stop music if (!string.IsNullOrEmpty(music)) { FusionAudio.PostGlobalMusicEvent(music, false); } string ambient = AmbientLoopEvent; // stop ambient if (!string.IsNullOrEmpty(ambient)) { FusionAudio.PostAmbientSoundEvent(ambient, false); } } }
public override void OnDestroy() { FusionAudio.PostGlobalMusicEvent("MUS_CampaignView_Demo", false); base.OnDestroy(); }