/// <summary> /// Initializes the <see cref="GameTimeSettings"/>. This must only be called once and called as early as possible. /// </summary> /// <param name="settings">The settings instance.</param> /// <exception cref="ArgumentNullException"><paramref name="settings" /> is <c>null</c>.</exception> /// <exception cref="MethodAccessException">This method must be called once and only once.</exception> public static void Initialize(GameTimeSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } if (_instance != null) { throw new MethodAccessException("This method must be called once and only once."); } _instance = settings; }
/// <summary> /// Initializes the <see cref="GameTimeSettings"/>. This must only be called once and called as early as possible. /// </summary> /// <param name="settings">The settings instance.</param> /// <exception cref="ArgumentNullException"><paramref name="settings" /> is <c>null</c>.</exception> /// <exception cref="MethodAccessException">This method must be called once and only once.</exception> public static void Initialize(GameTimeSettings settings) { if (settings == null) throw new ArgumentNullException("settings"); if (_instance != null) throw new MethodAccessException("This method must be called once and only once."); _instance = settings; }