Example #1
0
        /// <summary>
        /// Used to spawn a custom npc just as an example. Don't keep this code.
        /// GENERATE NPC AND CALL THE CODE
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SaveEvents_LoadChar(object sender, EventArgs e)
        {
            ExtendedNPC myNpc3 = assetPool.generateNPC(Genders.female, 0, 1, new StandardColorCollection(null, null, Color.Blue, null, Color.Yellow, null));
            MerchantNPC merch  = new MerchantNPC(new List <Item>()
            {
                new StardewValley.Object(475, 999)
            }, myNpc3);

            npcTracker.addNewNPCToLocation(Game1.getLocationFromName("BusStop", false), merch, new Vector2(2, 23));
        }
Example #2
0
        /// <summary>Raised after the player loads a save slot and the world is initialised.</summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event arguments.</param>
        private void OnSaveLoaded(object sender, SaveLoadedEventArgs e)
        {
            // TODO Used to spawn a custom npc just as an example. Don't keep this code. GENERATE NPC AND CALL THE CODE

            ExtendedNpc myNpc3 = assetPool.generateNPC(Genders.female, 0, 1, new StandardColorCollection(null, null, Color.Blue, null, Color.Yellow, null));
            MerchantNpc merch  = new MerchantNpc(new List <Item>()
            {
                new StardewValley.Object(475, 999)
            }, myNpc3);

            npcTracker.addNewNpcToLocation(Game1.getLocationFromName("BusStop", false), merch, new Vector2(2, 23));
        }