예제 #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);
             }
         }
     }
 }