public static void Initialize(ContentManager content, Player gamePlayer) { Content = content; player = gamePlayer; background = Content.Load<Texture2D>(@"Images\forest04"); //keyboardState = keys; }
/// <summary> /// Allows the game component to perform any initialization it needs to before starting /// to run. This is where it can query for any required services and load content. /// </summary> public override void Initialize() { spriteBatch = new SpriteBatch(Game.GraphicsDevice); player = new Player(Game.Content, new Vector2(0, Game.Window.ClientBounds.Height - 109)); // This needs to happen in LevelManager now LevelManager.Initialize(Game.Content,player); base.Initialize(); }