Changes

Jump to navigation Jump to search
53 bytes removed ,  17:21, 23 May 2018
Line 80: Line 80:  
* Add entries to Data\animationDescriptions (if you want custom animations in their schedule)
 
* Add entries to Data\animationDescriptions (if you want custom animations in their schedule)
   −
All of the above can be done with IAssetLoaders/IAssetEditors or Content Patcher. Finally, spawn the NPC with a SMAPI mod:
+
All of the above can be done with IAssetLoaders/IAssetEditors or Content Patcher. Finally, spawn the NPC with a SMAPI mod. The different constructors are:
    
<source lang='c#'>
 
<source lang='c#'>
  NPC npc = new NPC(AnimatedSprite sprite, Vector2 position, int facingDir, string name);
+
  public NPC(AnimatedSprite sprite, Vector2 position, int facingDir, string name);
</source>
+
  public NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDir, string name, Dictionary<int, int[]> schedule, Texture2D portrait, bool eventActor);
 
+
  public NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDirection, string name, bool datable, Dictionary<int, int[]> schedule, Texture2D portrait);
or
  −
 
  −
<source lang='c#'>
  −
  NPC npc = new NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDir, string name, Dictionary<int, int[]> schedule, Texture2D portrait, bool eventActor);
  −
</source>
  −
 
  −
or
  −
 
  −
<source lang='c#'>
  −
  NPC npc = NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDirection, string name, bool datable, Dictionary<int, int[]> schedule, Texture2D portrait);
   
</source>
 
</source>
  
9

edits

Navigation menu