예제 #1
0
 public void Reload()
 {
     this.a.EntityManager.EntityAdded   -= new EventHandler <EventArgs <Entity> >(this.b);
     this.a.EntityManager.EntityRemoved -= new EventHandler <EventArgs <Entity> >(this.a);
     lock (this.b)
     {
         this.a.EntityManager.EntityAdded   += new EventHandler <EventArgs <Entity> >(this.b);
         this.a.EntityManager.EntityRemoved += new EventHandler <EventArgs <Entity> >(this.a);
         ReadOnlyCollection <Entity> local_1 = this.a.EntityManager.Entities;
         this.h.Clear();
         this.h.Capacity = local_1.Count;
         foreach (Entity item_0 in local_1)
         {
             RadarBase local_0 = this.a.EntityManager.ConvertEntityToRadar(item_0);
             if (local_0 != null)
             {
                 local_0.Owner = this;
                 local_0.Refresh();
                 this.h.Add(local_0);
             }
         }
         RadarBase local_0_1 = this.a.EntityManager.ConvertEntityToRadar(this.a.EntityManager.Me);
         local_0_1.Owner = this;
         local_0_1.Refresh();
         this.h.Add(local_0_1);
     }
     this.RefreshObjects();
 }
예제 #2
0
 private void b(object A_0, EventArgs <Entity> A_1)
 {
     lock (this.b)
     {
         RadarBase local_0 = this.a.EntityManager.ConvertEntityToRadar(A_1.Value);
         if (local_0 == null)
         {
             return;
         }
         local_0.Owner = this;
         local_0.Refresh();
         this.h.Add(local_0);
     }
 }
예제 #3
0
 public Point GetPointCartesian(int X, int Y)
 {
     return(RadarBase.GetPointCartesian(X, Y, this.m_owner));
 }