public void Update(GameTime gameTime, Camera camera, GraphicsDevice graphics) { var position = camera.ConvertWorldToScreen(TrackingObject.PhysicsBody.Position, graphics); if (Enabled) { Effect.Trigger(position); } Effect.Update((float)gameTime.ElapsedGameTime.TotalSeconds); Vector2 lightPosition = ConvertUnits.ToDisplayUnits(TrackingObject.Position); Light.LightPosition = new Vector3(lightPosition.X, lightPosition.Y, 0); }
public DeferredRenderer(Game1 game) : base(game) { m_scene = new Scene(game); m_camera = new Camera(Game); }