public LoadingState(LoadContentFunction loadFunction, GraphicsDevice graphicsDevice, SpriteBatch spriteBatch, SpriteFont UIFont) { _graphicsDevice = graphicsDevice; _spriteBatch = spriteBatch; _loadingComplete = false; _loadFunction = loadFunction; _animatedMessage = _loadingTextBase; _loadStateReporter = new LoadStateReporter(); _loadingMessageDimensions = FontManager.Instance.BangersLarge.MeasureString(_animatedMessage); _loadingMessagePosition = new Vector2( (_graphicsDevice.Viewport.Width - _loadingMessageDimensions.X) / 2, (_graphicsDevice.Viewport.Height - _loadingMessageDimensions.Y) / 2); ThreadHelper.RunAsync(LoadContentMain); }
public ContentManager(string dataPath, LoadContentFunction <T> lcf) { this.dataPath = dataPath; this.load = lcf; }
public static LoadingState GetLoadingState(LoadContentFunction loadFunction) { return new LoadingState(loadFunction, DancePartyGame.Instance.GraphicsDevice, DancePartyGame.Instance.SpriteBatch, FontManager.Instance.BangersLarge); }