示例#1
0
 public void Clear()
 {
     if (MobRemoved != null)
     {
         MobRemoveEventArgs m = new MobRemoveEventArgs(-1);
         foreach (System.EventHandler <MobRemoveEventArgs> e in MobRemoved?.GetInvocationList())
         {
             e.BeginInvoke(this, m, e.EndInvoke, null);
         }
     }
     objectToMobMap.Clear();
 }
示例#2
0
 public void Clear()
 {
     if (MobRemoved != null)
     {
         MobRemoveEventArgs m = new MobRemoveEventArgs(-1);
         foreach (System.EventHandler <MobRemoveEventArgs> e in MobRemoved?.GetInvocationList())
         {
             Task.Run(() => e.Invoke(this, m));
         }
     }
     objectToMobMap.Clear();
 }
示例#3
0
 public void RemoveMob(int objectId)
 {
     if (objectToMobMap.ContainsKey(objectId))
     {
         objectToMobMap.Remove(objectId);
         if (MobRemoved != null)
         {
             MobRemoveEventArgs m = new MobRemoveEventArgs(objectId);
             foreach (System.EventHandler <MobRemoveEventArgs> e in MobRemoved?.GetInvocationList())
             {
                 e.BeginInvoke(this, m, e.EndInvoke, null);
             }
         }
     }
 }