Beispiel #1
0
 public void RemoveSpawner(GroundSpawner spwner)
 {
     //Delete the spawned NPC if any!
     if (spwner.CurrentNPC != null)
     {
         RemoveTempChar(spwner.CurrentNPC);
     }
     Entities[0].Spawners.Remove(spwner);
 }
Beispiel #2
0
        public GroundSpawner GetSpawner(string name)
        {
            GroundSpawner found = Entities[0].Spawners.Find((GroundSpawner ch) => { return(ch.EntName == name); });

            if (found == null)
            {
                //Maybe warn or something??
            }
            return(found);
        }
 protected GroundSpawner(GroundSpawner other) : base(other)
 {
     NPCName         = other.NPCName;
     NPCChar         = new CharData(other.NPCChar);
     EntityCallbacks = new HashSet <LuaEngine.EEntLuaEventTypes>();
     foreach (LuaEngine.EEntLuaEventTypes ev in other.EntityCallbacks)
     {
         EntityCallbacks.Add(ev);
     }
     ScriptEvents = new Dictionary <LuaEngine.EEntLuaEventTypes, ScriptEvent>();
     foreach (LuaEngine.EEntLuaEventTypes ev in other.ScriptEvents.Keys)
     {
         ScriptEvents.Add(ev, (ScriptEvent)other.ScriptEvents[ev].Clone());
     }
 }
Beispiel #4
0
 public void AddSpawner(GroundSpawner spwn)
 {
     Entities[0].Spawners.Add(spwn);
 }
Beispiel #5
0
 public void AddSpawner(GroundSpawner spwn)
 {
     Spawners.Add(spwn);
 }