protected override void LoadContent() { base.LoadContent(); ContentHolder.Init(this, CustomContentLocations.TextureLocations); Levels.Init(); #if !ANDROID && !IOS Engine.SpawnInstance <ControlFullscreen>(); #endif Engine.SpawnInstance <ControlBack>(); Engine.SpawnInstance <Background>(); #if DEBUG Engine.SpawnInstance(new DebuggerWithTerminal(ContentHolder.Get(AvailableFonts.retro_computer))); #endif #if ADS #if ANDROID #if AMAZON Engine.SpawnInstance <AndroidAds>(); #endif #endif #endif #if XBOX_LIVE XboxLiveObject.SignOutCompleted += XboxLiveStatsManager.OnSignOutCompleted; XboxLiveObject.SignInCompleted += XboxLiveStatsManager.OnSignInCompleted; ExitEvent += XboxLiveStatsManager.OnExitGame; XboxLiveObject.SignIn(); #endif Engine.ChangeRoom <RoomInit>(); }
public void OnAdError(IAdErrorEvent error_event) { // If an error occurs just destroy the AdsManager and set the state to Done to resume gameplay. System.Diagnostics.Debug.WriteLine("Error: " + error_event.Error); if (error_event.Error.ErrorCode == AdError.AdErrorCode.VastEmptyResponse) { this.NoAdsFoundTimer.Mark(); this.State = AdState.NoAdsFound; Action exec = () => { this.Finish(); }; Engine.SpawnInstance(new TimedExecution(2100, exec, true, false)); } else { this.Finish(); } }