internal static void OnStartGame() { options = POptions.ReadSettings <EfficientFetchOptions>() ?? new EfficientFetchOptions(); PUtil.LogDebug("EfficientFetch starting: Min Ratio={0:D}%".F(options. MinimumAmountPercent)); EfficientFetchManager.CreateInstance(options.GetMinimumRatio()); }
/// <summary> /// Destroys the current instance. /// </summary> public static void DestroyInstance() { if (Instance != null) { Instance.Dispose(); } Instance = null; }
internal static void OnEndGame() { PUtil.LogDebug("Destroying EfficientFetch"); EfficientFetchManager.DestroyInstance(); }
/// <summary> /// Creates the current instance. /// </summary> /// <param name="threshold">The threshold fraction for an efficient fetch.</param> public static void CreateInstance(float threshold) { DestroyInstance(); Instance = new EfficientFetchManager(threshold); }