/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); spark = Content.Load<Texture2D>("spark"); smoke = Content.Load<Texture2D>("particlesmoke"); explosion = Content.Load<Texture2D>("explosion"); fireSound = Content.Load<SoundEffect>("firesound.wav"); camera = new Camera(graphics.GraphicsDevice.Viewport); Vector2 startPosition = new Vector2(0.5f, 0.5f); gameWindow = camera.GetGameWindow(); gameView = new GameController(spark, smoke, explosion, gameWindow, startPosition, spriteBatch, camera, fireSound); smokeSystem = new SmokeSystem(); // TODO: use this.Content to load your game content here }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); spark = Content.Load<Texture2D>("spark"); smoke = Content.Load<Texture2D>("particlesmoke"); explosion = Content.Load<Texture2D>("explosion"); //Vector2 startPosition = new Vector2(graphics.GraphicsDevice.Viewport.Bounds.Width / 2.0f, graphics.GraphicsDevice.Viewport.Bounds.Height / 2.0f); camera = new Camera(graphics.GraphicsDevice.Viewport); Vector2 startPosition = new Vector2(0.5f, 0.5f); gameWindow = camera.GetGameWindow(); gameView = new GameController(spark, smoke, explosion, gameWindow, startPosition); ss = new SmokeSystem(); gameView.Initiate(); // TODO: use this.Content to load your game content here }