public ParallaxManager(JdGame game) : base(game) { _layers = new List<Layer>(); _spriteBatch = new SpriteBatch(game.GraphicsDevice); var camera = game.GetComponent<Camera2D>(); if (camera == null) throw new ArgumentException("Game does not contain a Camera2D component."); _camera = camera; _viewport = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height); }
public FocusPoint(Camera2D camera, Entity entity, params Entity[] entities) { _camera = camera; Points = new List<Entity> { entity }; Points.AddRange(entities); }