/// <summary> /// Updates the loading screen. /// </summary> public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); // If all the previous screens have finished transitioning // off, it is time to actually perform the load. if (otherScreensAreGone) { foreach (ManagedGameComponent screen in _ScreensToLoad) { if (screen != null) { ComponentManager.Add(screen); } } ComponentManager.Remove(this); // Once the load has finished, we use ResetElapsedTime to tell // the game timing mechanism that we have just finished a very // long frame, and that it should not try to catch up. G.Game.ResetElapsedTime(); } }
public Player() { ComponentManager <TransformComponent> .Add(this); ComponentManager <HealthComponent> .Add(this); }