Esempio n. 1
0
        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>();
        }
Esempio n. 2
0
 private static void OnSignInCompleted(object sender, SignInCompletedEventArgs e)
 {
     SaveDataHandler.ResetCache();
     StatTracker.LoadAsync();
     if (!(Engine.Room is RoomMain) && !(Engine.Room is RoomInit))
     {
         Engine.ChangeRoom <RoomMain>();
     }
 }
Esempio n. 3
0
 private static void OnSignOutCompleted(object sender, SignOutCompletedEventArgs e)
 {
     XboxLiveObject.CurrentUser    = null;
     XboxLiveObject.CurrentContext = null;
     SaveDataHandler.ResetCache();
     StatTracker.Reset();
     if (!(Engine.Room is RoomMain) && !(Engine.Room is RoomInit))
     {
         Engine.ChangeRoom <RoomMain>();
     }
     XboxLiveObject.SignOutCompleted?.Invoke(sender, e);
 }