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(); }
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); } }
public Point GetPointCartesian(int X, int Y) { return(RadarBase.GetPointCartesian(X, Y, this.m_owner)); }