Exemple #1
0
 public void AddGlobalNPC(string name, GlobalNPC globalNPC)
 {
     globalNPC.mod         = this;
     globalNPC.Name        = name;
     this.globalNPCs[name] = globalNPC;
     NPCLoader.globalNPCs.Add(globalNPC);
 }
Exemple #2
0
        private void AutoloadGlobalNPC(Type type)
        {
            GlobalNPC globalNPC = (GlobalNPC)Activator.CreateInstance(type);

            globalNPC.mod = this;
            string name = type.Name;

            if (globalNPC.Autoload(ref name))
            {
                AddGlobalNPC(name, globalNPC);
            }
        }