public static void Update(float deltaTime) { if (Camera == null) { return; } if (Camera.RequiresRender) { // Draw it right now: // Note that this also resets timer. Camera.DrawNow(); } // Advance timer so we can know when to destroy it: Camera.Timer += deltaTime; // Been around too long? if (Camera.Timer > TextureCamera.MaxTime) { // Destroy the camera - it's been unused for 5 seconds: Camera.Destroy(); } }