/// <summary> /// Create the global instance of the UITextureManager. /// </summary> /// /// <param name="game"> /// The current Game object. /// </param> /// /// <exception cref="ArgumentNullException" /> public static void CreateInstance(Game game) { _instance = (_instance == null) ? new UIContentManager(game) : throw new InvalidOperationException("Instance already exists."); }
/// <summary> /// Attempt to get the instance for the manager. /// </summary> /// /// <param name="instance"> /// The instance that will be retrieved. /// </param> /// /// <returns> /// A boolean indicatint the success of retrieval. /// </returns> public static bool TryGetInstance(out UIContentManager instance) { instance = _instance; return((instance != null) ? true : false); }