コード例 #1
0
        /// <summary>Event that is called when the game launches.</summary>
        /// <param name="sender">The object</param>
        /// <param name="e">The Game Launched Event argument</param>
        /// <remarks>This is used to load the content packs and dresser.png</remarks>
        private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
        {
            //Add an AssetEditor to ignore hair for new hats
            if (Config.NewHatsIgnoreHair)
            {
                Helper.Content.AssetEditors.Add(new HatEditor(this));
            }

            //Load the dresser image and read the content packs
            Game1.content.Load <Texture2D>($"Mods/{this.ModManifest.UniqueID}/dresser.png");
            PackHelper.ReadContentPacks();
        }
コード例 #2
0
        /// <summary>
        /// Event that is called when the game launches.
        /// </summary>
        /// <param name="sender"> The object</param>
        /// <param name="e"> The Game Launched Event argument</param>
        /// <remarks> This is used to load the content packs and dresser.png</remarks>
        private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
        {
            // Add an AssetEditor to ignore hair for new hats
            if (Config.NewHatsIgnoreHair)
            {
                Helper.Content.AssetEditors.Add(new HatEditor(this));
            }

            if (IsJsonAssetsInstalled)
            {
                DresserJson = new DresserHandlerJson(this);
            }

            // Read The Content Packs
            PackHelper.ReadContentPacks();
        }