//vet inte om denna ska vara eller den undre ska testa båda imorgon, denna är dock inte min... public Vector2 convertToVisualCoords(Vector2 coordinates, ExplosionManager explosion) { float visualX = coordinates.X * sizeOfWindow - (explosion.Width / 2) + zeroCord.X; float visualY = coordinates.Y * sizeOfWindow - (explosion.Height / 2) + zeroCord.Y; return new Vector2(visualX, visualY); }
/// <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); Texture2D explosion = Content.Load<Texture2D>("explosion"); camera = new Camera(graphics.GraphicsDevice.Viewport); explosionManager = new ExplosionManager(spriteBatch, explosion, camera); // TODO: use this.Content to load your game content here }