/// <summary> /// Enables the FPS counter on the specific entity manager. /// Optionally set the color to use and the location to use. /// </summary> /// <param name="manager"></param> /// <param name="corner">The corner to draw the FPS counter to.</param> /// <param name="customFontColor">The color to use for drawing. Defaults to black.</param> public static void Enable(GameAbstraction manager, Corner corner = Corner.TopLeft, Color?customFontColor = null) { if (_instance != null) { return; } var color = customFontColor ?? Color.Black; manager.Add(_instance = new FpsCounter(corner, color)); }
/// <summary> /// Disables the FPS counter on the specific entity manager. /// </summary> /// <param name="manager"></param> public static void Disable(GameAbstraction manager) { manager.Remove(_instance); _instance = null; }