//Checks if the systemsprites in a list should be drawn to the screen public static void CheckObjectUsage(Game1 Game, List <GameObjectOverworld> list) { for (int i = 0; i < list.Count; i++) { Nullable <Rectangle> cameraView = CollisionDetection.CurrentViewRectangle(Game.camera.cameraPos, Game); if (list[i].position.X - list[i].sprite.SourceRectangle.Value.Width / 2 <= cameraView.Value.Width && list[i].position.X + list[i].sprite.SourceRectangle.Value.Width / 2 >= cameraView.Value.X && list[i].position.Y - list[i].sprite.SourceRectangle.Value.Height / 2 <= cameraView.Value.Height && list[i].position.Y + list[i].sprite.SourceRectangle.Value.Height / 2 >= cameraView.Value.Y) { list[i].IsUsed = true; } else { list[i].IsUsed = false; } } }