public override void OnPrepareSceneChange() { NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType()); NrLoadPageScreen.StepUpMain(1); this._mapLoader.Reset(); StageWorld.m_eBattleRoomType = eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_NONE; if (Scene.CurScene != Scene.Type.BATTLE) { NrLoadPageScreen.ShowHideLoadingImg(true); } else { StageWorld.m_eBattleRoomType = Battle.BATTLE.BattleRoomtype; if (Battle.BATTLE.Observer || StageWorld.m_eBattleRoomType == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_PREVIEW) { NrLoadPageScreen.ShowHideLoadingImg(true); } } if ((Scene.PreScene == Scene.Type.BATTLE || Scene.CurScene == Scene.Type.BATTLE || Scene.PreScene == Scene.Type.SOLDIER_BATCH || Scene.CurScene == Scene.Type.SOLDIER_BATCH) && (TsPlatform.IsLowSystemMemory || TsPlatform.IsEditor)) { NrTSingleton <NkClientLogic> .Instance.CharWarpRequest(0); GS_WARP_REQ gS_WARP_REQ = new GS_WARP_REQ(); gS_WARP_REQ.nMode = 1; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WARP_REQ, gS_WARP_REQ); } NmMainFrameWork.DeleteImage(); base.ResetCoTasks(); }
public override void OnPrepareSceneChange() { UnityEngine.Debug.Log("Performance Table Loading Start"); this.tableLoadingStartTime = Time.realtimeSinceStartup; NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.LOGIN_SELECT_PLATFORM_DLG); NrLoadPageScreen.LoginLatestChar = (NrTSingleton <NrMainSystem> .Instance.GetLatestPersonID() > 0L); if (NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea() == eSERVICE_AREA.SERVICE_ANDROID_BANDNAVER || NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea() == eSERVICE_AREA.SERVICE_ANDROID_BANDGOOGLE) { NrLoadPageScreen.LoginLatestChar = false; } NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType()); if (NrLoadPageScreen.LoginLatestChar) { NrLoadPageScreen.StepUpMain(3); } else { NrLoadPageScreen.StepUpMain(2); } NrLoadPageScreen.ShowHideLoadingImg(true); if (TsPlatform.IsMobile) { NmMainFrameWork.DeleteImage(); } NrTSingleton <PreloadDataTableMgr> .Instance.StopPreLoadTable(); }
public void PlayMovie() { string str = "intro"; string str2 = string.Format("{0}GameDrama/", Option.GetProtocolRootPath(Protocol.HTTP)); NmMainFrameWork.PlayMovieURL(str2 + str + ".mp4", true, false, true); }
private void Awake() { if (NmMainFrameWork.Is1stRunPassed) { return; } this.m_fBITime = Time.time + 15f; Screen.orientation = ScreenOrientation.LandscapeLeft; QualitySettings.vSyncCount = 0; NmMainFrameWork.ApplySmartFPS(); NrTSingleton <NrGlobalReference> .Instance.Init(); if (this.IsDevelopVersion()) { WWWItem._errorCallback = new ErrorCallback(NrTSingleton <CallbackMsgBoxManager> .Instance.OnMsgBox); } TsAudioManager.Instance.FirstInit(); if (TsPlatform.IsMobile) { this.ShowCompanyLogoMov(); NmMainFrameWork.ChagneResolution(); NmMainFrameWork.LoadImage(); } NrTSingleton <NrMainSystem> .Instance.Awake(); StageSystem.SetStartStage(new StageSystemCheck()); }
private void ClickSolMovie(IUIObject obj) { if (obj == null) { return; } int charkind = (int)obj.Data; NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(charkind); if (charKindInfo == null) { return; } string sOLINTRO = charKindInfo.GetCHARKIND_INFO().SOLINTRO; if (NrTSingleton <NrGlobalReference> .Instance.localWWW) { if (NrTSingleton <NrGlobalReference> .Instance.useCache) { string str = string.Format("{0}SOLINTRO/", Option.GetProtocolRootPath(Protocol.HTTP)); NmMainFrameWork.PlayMovieURL(str + sOLINTRO + ".mp4", true, false, true); } else { NmMainFrameWork.PlayMovieURL("http://klohw.ndoors.com/at2mobile_android/SOLINTRO/" + sOLINTRO + ".mp4", true, false, true); } } else { string str2 = string.Format("{0}SOLINTRO/", NrTSingleton <NrGlobalReference> .Instance.basePath); NmMainFrameWork.PlayMovieURL(str2 + sOLINTRO + ".mp4", true, false, true); } }
public void AudioPlay(string strMute) { UnityEngine.Debug.LogWarning("AutoPlay SET: " + strMute); bool bMute = strMute == "1"; CommonTasks.MuteAudioOnOff(bMute); if (strMute == "0") { if (Scene.CurScene <= Scene.Type.LOGIN) { NmMainFrameWork.AddBGM(); NrTSingleton <NrMainSystem> .Instance.m_bIsShowBI = true; NrTSingleton <PreloadDataTableMgr> .Instance.StopPreLoadTable(); } else if (Scene.CurScene == Scene.Type.BATTLE) { Battle_ResultTutorialDlg battle_ResultTutorialDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_RESULT_TUTORIAL_DLG) as Battle_ResultTutorialDlg; if (battle_ResultTutorialDlg != null) { if (!battle_ResultTutorialDlg.Visible) { battle_ResultTutorialDlg.Show(); } battle_ResultTutorialDlg.OpenTime = 0f; battle_ResultTutorialDlg.PlayMovie = false; battle_ResultTutorialDlg.m_bUpdateCheck = true; battle_ResultTutorialDlg.MovieTime = 0f; } if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID) { Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg; if (battle_Control_Dlg != null) { battle_Control_Dlg.MovieEnd(); } } } else if (NrTSingleton <NkQuestManager> .Instance.bPlayMovie) { NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG); if (npcTalkUI_DLG != null) { npcTalkUI_DLG.Show(); } NrTSingleton <NkQuestManager> .Instance.bPlayMovie = false; } NmMainFrameWork.m_bMoviePlay = false; } else { this.m_fBITime = Time.time + 15f; } }
public override void OnExit() { TsLog.Log("--- {0}.OnExit", new object[] { base.GetType().FullName }); NrLoadPageScreen.LoginLatestChar = false; NmMainFrameWork.RemoveBGM(true); Application.targetFrameRate = PlayerPrefs.GetInt("SaveFps", NmMainFrameWork.MAX_FPS); }
public override void OnPrepareSceneChange() { NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType()); NrLoadPageScreen.StepUpMain(1); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.LOGINRATING_DLG); NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.PREDOWNLOAD_DLG); NmMainFrameWork.DeleteImage(); }
private void _OnReceSelectToSelectBack(IUIObject obj) { NmMainFrameWork.AddBGM(); TsAudioManager.Instance.AudioContainer.RemoveBGM("intro"); this._OnBottomButtonSound(); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.RACE_SELECT_DLG); NrTSingleton <FormsManager> .Instance.Show(G_ID.CHAR_SELECT_DLG); this.m_SelectStep = E_CHAR_SELECT_STEP.CHAR_SELECT; }
private NmMainFrameWork GetMainFrameWork() { NmMainFrameWork mainFrameWork = NmMainFrameWork.GetMainFrameWork(); if (mainFrameWork == null) { Debug.LogError(" ERROR, PreloadDataTableMgr.cs, GetMainFrameWork(), NmMainFrameWork is Null "); return(null); } return(mainFrameWork); }
private void ClickOpening(IUIObject obj) { if (this.IsOpeningOn) { return; } string str = "intro"; string str2 = string.Format("{0}GameDrama/", Option.GetProtocolRootPath(Protocol.HTTP)); NmMainFrameWork.PlayMovieURL(str2 + str + ".mp4", true, false, true); this.IsOpeningOn = true; }
public override void OnPrepareSceneChange() { NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType()); NrLoadPageScreen.StepUpMain(1); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.LOGIN_SELECT_PLATFORM_DLG); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.LOGINRATING_DLG); this.PreDownloadDlg = (NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.PREDOWNLOAD_DLG) as Mobile_PreDownloadDlg); NmMainFrameWork.DeleteImage(); this.SetPlatformPath(); }
public void _CreateCharComplete() { TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "CUSTOMOZING", "CREATE-SUCCESS", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); TsAudioManager.Instance.AudioContainer.RemoveBGM("intro"); NmMainFrameWork.AddBGM(); eSERVICE_AREA currentServiceArea = NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea(); if (currentServiceArea == eSERVICE_AREA.SERVICE_ANDROID_KORGOOGLE || currentServiceArea == eSERVICE_AREA.SERVICE_ANDROID_KORQA) { NrTSingleton <AdWords> .Instance.CreateCharacterComplete(); } NrTSingleton <MATEventManager> .Instance.MeasureEvent("Registration"); }
private void _OnReceSelectToSelectBack(IUIObject obj) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.RACE_SELECT_DLG); NrTSingleton <FormsManager> .Instance.Show(G_ID.CHAR_SELECT_DLG); MsgHandler.Handle("SetSelectStep", new object[] { E_CHAR_SELECT_STEP.CHAR_SELECT }); NmMainFrameWork.AddBGM(); TsAudioManager.Instance.AudioContainer.RemoveBGM("intro"); }
public void GoIntro() { this.m_CameraAniPlay.Add(E_CHAR_SELECT_STEP.CREATE_SELECT, new Action <object>(this._OnRaceSelect), new object[] { E_CAMARA_STATE_ANI.INTRO1, E_CAMARA_STATE_ANI.INTROTOCREATE }); NrTSingleton <FormsManager> .Instance.Hide(G_ID.CHAR_SELECT_DLG); this.m_isConnectGameServer = false; this.m_SelectStep = E_CHAR_SELECT_STEP.INTRO; TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "CUSTOMIZING", "CHAR-CREATION", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); NmMainFrameWork.RemoveBGM(false); }
public void StopPreLoadTable() { if (this.m_PreloadCoroutine == null) { return; } NmMainFrameWork mainFrameWork = this.GetMainFrameWork(); if (mainFrameWork == null) { return; } Debug.LogError("StopPreLoadTable"); mainFrameWork.StopCoroutine(this.m_PreloadCoroutine); this.m_PreloadCoroutine = null; GC.Collect(); }
public static void RemoveBGM(bool Fadeout) { if (!Fadeout) { UnityEngine.Object.DestroyImmediate(NmMainFrameWork.MobileStartBGM); NmMainFrameWork.MobileStartBGM = null; } else { if (NmMainFrameWork.MobileStartBGM == null) { NmMainFrameWork.AddBGM(); if (NmMainFrameWork.MobileStartBGM == null) { return; } } NmMainFrameWork.MobileStartBGM.GetComponent <TsAudioAdapterBGM>().FadeOut(); } }
private void Update() { DeviceOrientation deviceOrientation = Input.deviceOrientation; if (deviceOrientation == DeviceOrientation.LandscapeLeft) { Screen.orientation = ScreenOrientation.LandscapeLeft; } else if (deviceOrientation == DeviceOrientation.LandscapeRight) { Screen.orientation = ScreenOrientation.LandscapeRight; } if (!PatchFinalList.Instance.isLoadedOrSkipped) { return; } if (!NrTSingleton <NrGlobalReference> .Instance.IsSetServiceArea()) { return; } if (NmMainFrameWork.Is1stRunPassed) { NrTSingleton <NrMainSystem> .Instance.Update(); } else { StageSystem.Update(); } if (Scene.CurScene <= Scene.Type.LOGIN && !NrTSingleton <NrMainSystem> .Instance.m_bIsShowBI && this.m_fBITime < Time.time) { CommonTasks.MuteAudioOnOff(false); NmMainFrameWork.AddBGM(); NrTSingleton <NrMainSystem> .Instance.m_bIsShowBI = true; } if (NmMainFrameWork.m_bMoviePlay && NmMainFrameWork.m_MoviePlayTime < Time.time) { this.AudioPlay("0"); } }
public void ShowResultFx() { this.m_OpenTime = 0f; if (!this.m_bPlayMovie) { this.m_waitImg.Visible = false; string text = "UI/Drama/TUTORIAL.mp4"; text = text.ToLower(); string path = string.Format("{0}/{1}", NrTSingleton <NrGlobalReference> .Instance.basePath, text); if (File.Exists(path)) { this.m_bPlayMovie = false; this.m_bUpdateCheck = true; Debug.LogError("TUTORIAL MOVIE NOT EXIST"); return; } NmMainFrameWork.PlayMovieURL(path, true, false, true); this.m_bPlayMovie = true; this.MovieTime = Time.realtimeSinceStartup; this.m_bUpdateCheck = false; } }
public void StartPreLoadTable() { NmMainFrameWork mainFrameWork = this.GetMainFrameWork(); if (mainFrameWork == null) { return; } if (this.m_PreloadCoroutine != null) { Debug.LogError(" ERROR, PreloadDataTableMgr.cs, StartPreLoadTable(), m_PreloadCoroutine is Not Null "); return; } float realtimeSinceStartup = Time.realtimeSinceStartup; if (this.IsPatchTableExist()) { Debug.LogError("PatchTableCheckTime : " + (Time.realtimeSinceStartup - realtimeSinceStartup).ToString()); return; } Debug.LogError("PatchTableCheckTime : " + (Time.realtimeSinceStartup - realtimeSinceStartup).ToString()); this.m_PreloadCoroutine = mainFrameWork.StartCoroutine(TableDataLoad.Load()); }
public static void BatchSoldiers(Queue <long> soldierIDQueue) { SoldierBatch_AutoBatchTool.ResetGridPosition(); NmMainFrameWork.GetMainFrameWork().StartCoroutine(SoldierBatch_AutoBatchTool.SyncBatchSolCombinationInEmptyGrid(soldierIDQueue)); }
public override void OnEnter() { string text = string.Format("{0} OnEnter OnEnter Memory = {1}MB", base.GetType().FullName, TsPlatform.Operator.GetAppMemory()); TsPlatform.FileLog(text); TsLog.LogWarning(text, new object[0]); if (!TsPlatform.IsEditor && TsPlatform.IsAndroid && SystemInfo.processorCount < 2) { IntroMsgBoxDlg introMsgBoxDlg = (IntroMsgBoxDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.INTROMSGBOX_DLG); if (introMsgBoxDlg != null) { string textFromPreloadText = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("10"); introMsgBoxDlg.SetBtnChangeName(NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("8")); introMsgBoxDlg.SetMsg(null, null, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("8"), textFromPreloadText, eMsgType.MB_OK); } } if (TsPlatform.IsEditor) { NmMainFrameWork.AddBGM(); } if (TsPlatform.IsAndroid) { PlayGamesPlatform.DebugLogEnabled = true; PlayGamesPlatform.Activate(); } TsLog.Log("====== {0}.OnEnter", new object[] { base.GetType().FullName }); Scene.ChangeSceneType(this.SceneType()); if (Camera.main != null && Camera.main.gameObject != null) { DefaultCameraController component = Camera.main.gameObject.GetComponent <DefaultCameraController>(); if (component == null) { Camera.main.gameObject.AddComponent <DefaultCameraController>(); } GameObject target = GameObject.Find("MainFramework"); UnityEngine.Object.DontDestroyOnLoad(target); } else { NrMainSystem.CheckAndSetReLoginMainCamera(); } if (NrTSingleton <NrMainSystem> .Instance.m_ReLogin) { TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.WorldScene); TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.BattleScene); base.StartTaskSerial(this.LoadLoginSleep()); base.StartTaskSerial(CommonTasks.LoadEmptyMainScene()); base.StartTaskSerial(CommonTasks.ClearAudioStack()); base.StartTaskSerial(CommonTasks.MemoryCleaning(true, 8)); NmMainFrameWork.LoadImage(); NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.LOGINBG_DLG); } base.StartTaskSerial(CommonTasks.SetGUIBehaviourScene()); if (!NrTSingleton <NrMainSystem> .Instance.m_ReLogin && TsPlatform.IsEditor) { string strFileName = string.Format("{0}/../SystemData/ServerList.txt", Application.dataPath); NrConnectTable nrConnectTable = new NrConnectTable(); nrConnectTable.AddServerList(strFileName); } if (!TsPlatform.IsEditor) { base.StartTaskSerial(this._RequestNoticeCheck()); base.StartTaskSerial(this._RequestNoticePage()); NrTSingleton <NrMainSystem> .Instance.m_bIsAutoLogin = true; } base.StartTaskSerial(this._RequestLoginNexonAuthorize()); base.StartTaskSerial(this._StageProcess()); base.StartTaskSerial(CommonTasks.FinalizeChangeScene(true)); }
public void ShowCompanyLogoMov() { string str = string.Empty; string text = "LOHBI.mp4"; if (Application.platform == RuntimePlatform.IPhonePlayer) { str = Application.dataPath + "/Raw/"; } else if (Application.platform == RuntimePlatform.Android) { str = Application.temporaryCachePath + "/"; if (!File.Exists(str + text)) { WWW wWW = new WWW("jar:file://" + Application.dataPath + "!/assets/" + text); while (!wWW.isDone) { } if (!string.IsNullOrEmpty(wWW.error)) { UnityEngine.Debug.Log(string.Concat(new string[] { "Error unpacking 'jar:file://", Application.dataPath, "!/assets/", text, "'" })); str = string.Empty; } File.WriteAllBytes(str + text, wWW.bytes); } else { WWW wWW2 = new WWW("jar:file://" + Application.dataPath + "!/assets/" + text); while (!wWW2.isDone) { } if (!string.IsNullOrEmpty(wWW2.error)) { UnityEngine.Debug.Log(string.Concat(new string[] { "Error unpacking 'jar:file://", Application.dataPath, "!/assets/", text, "'" })); str = string.Empty; } if (wWW2.bytes.Length != File.ReadAllBytes(str + text).Length) { File.WriteAllBytes(str + text, wWW2.bytes); } } } else { str = Application.dataPath + "/StreamingAssets/"; } if (!TsPlatform.IsEditor) { string path = str + text; NmMainFrameWork.PlayMovieURL(path, false, true, true); } }