示例#1
0
文件: Mod.cs 项目: popovn/tModLoader
 public void AddNPC(string name, ModNPC npc, string texture)
 {
     int id = NPCLoader.ReserveNPCID();
     npc.npc.name = name;
     npc.npc.type = id;
     npcs[name] = npc;
     NPCLoader.npcs[id] = npc;
     npc.texture = texture;
     npc.mod = this;
 }
示例#2
0
		public void AddNPC(string name, ModNPC npc, string texture, string[] altTextures = null)
		{
			int id = NPCLoader.ReserveNPCID();
			npc.npc.name = name;
			npc.npc.type = id;
			npcs[name] = npc;
			NPCLoader.npcs.Add(npc);
			npc.texture = texture;
			npc.altTextures = altTextures;
			npc.mod = this;
		}