public override bool Update(bool hasFocus) { if (base.Update(hasFocus) == false) { return(false); } if (!m_musicPlayed)// && MySandboxGame.TotalTimeInMilliseconds - m_timeFromMenuLoadedMS >= PLAY_MUSIC_AFTER_MENU_LOADED_MS) { if (MyGuiScreenGamePlay.Static == null) { MyAudio.Static.PlayMusic(MyPerGameSettings.MainMenuTrack); } m_musicPlayed = true; } #if !XB1 if (MyReloadTestComponent.Enabled && State == MyGuiScreenState.OPENED) { MyReloadTestComponent.DoReload(); } #endif return(true); }
public override bool Update(bool hasFocus) { if (base.Update(hasFocus) == false) { return(false); } //MySandboxGame.GraphicsDeviceManager.DbgDumpLoadedResources(true); //MyTextureManager.DbgDumpLoadedTextures(true); if (m_downloadNewsTask.IsComplete && m_downloadedNewsFinished) { if (m_downloadedNewsOK) { DownloadNewsCompleted(); m_newsControl.State = MyGuiControlNews.StateEnum.Entries; } else { m_newsControl.State = MyGuiControlNews.StateEnum.Error; m_newsControl.ErrorText = MyTexts.Get(MyCommonTexts.NewsDownloadingFailed); } m_downloadedNewsFinished = false; } if (!m_musicPlayed)// && MySandboxGame.TotalTimeInMilliseconds - m_timeFromMenuLoadedMS >= PLAY_MUSIC_AFTER_MENU_LOADED_MS) { if (MyGuiScreenGamePlay.Static == null) { MyAudio.Static.PlayMusic(MyPerGameSettings.MainMenuTrack); } m_musicPlayed = true; } #if !XB1 if (MyReloadTestComponent.Enabled && State == MyGuiScreenState.OPENED) { MyReloadTestComponent.DoReload(); } #endif // !XB1 return(true); }