Beispiel #1
0
 /*********
 ** Public methods
 *********/
 /// <summary>Construct an instance.</summary>
 /// <param name="contentCore">SMAPI's core content logic.</param>
 /// <param name="modFolderPath">The absolute path to the mod folder.</param>
 /// <param name="modID">The unique ID of the relevant mod.</param>
 /// <param name="modName">The friendly mod name for use in errors.</param>
 /// <param name="monitor">Encapsulates monitoring and logging.</param>
 public ContentHelper(ContentCoordinator contentCore, string modFolderPath, string modID, string modName, IMonitor monitor)
     : base(modID)
 {
     this.ContentCore        = contentCore;
     this.GameContentManager = contentCore.CreateGameContentManager(this.ContentCore.GetManagedAssetPrefix(modID) + ".content");
     this.ModContentManager  = contentCore.CreateModContentManager(this.ContentCore.GetManagedAssetPrefix(modID), modFolderPath, this.GameContentManager);
     this.ModName            = modName;
     this.Monitor            = monitor;
 }
Beispiel #2
0
        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="contentCore">SMAPI's core content logic.</param>
        /// <param name="modID">The unique ID of the relevant mod.</param>
        /// <param name="modName">The friendly mod name for use in errors.</param>
        /// <param name="monitor">Encapsulates monitoring and logging.</param>
        public GameContentHelper(ContentCoordinator contentCore, string modID, string modName, IMonitor monitor)
            : base(modID)
        {
            string managedAssetPrefix = contentCore.GetManagedAssetPrefix(modID);

            this.ContentCore        = contentCore;
            this.GameContentManager = contentCore.CreateGameContentManager(managedAssetPrefix + ".content");
            this.ModName            = modName;
            this.Monitor            = monitor;
        }