Example #1
0
 public void RemoveEntity(IEntityLocationData entity)
 {
     _items.Remove(entity);
     entity.X = null;
     entity.Y = null;
     entity.Z = null;
 }
Example #2
0
 public void PutEntity(IEntityLocationData entity)
 {
     _items.Add(entity);
 }
Example #3
0
 public static WorldSpace ToWorldSpace(this IEntityLocationData self)
 {
     return(new WorldSpace(self.X.Value, self.Y.Value, self.Z.Value));
 }
Example #4
0
 public static WorldSpace?ToWorldSpaceOrDefault(this IEntityLocationData self)
 {
     return(self == null
         ? (WorldSpace?)null
         : new WorldSpace(self.X.GetValueOrDefault(), self.Y.GetValueOrDefault(), self.Z.GetValueOrDefault()));
 }
Example #5
0
 /// <summary>
 /// Add the entity to the location specified.
 /// Mutates the entities location data appropriately.
 /// </summary>
 /// <param name="x">World-space X coordinate</param>
 /// <param name="y">world-space Y coordinate</param>
 /// <param name="entity">Entity to relocate</param>
 public void PutEntity(long x, long y, IEntityLocationData entity)
 {
     base.PutEntity(new WorldSpace(x, y, 0), entity);
 }