示例#1
0
 /// <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.");
 }
示例#2
0
        /// <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);
        }