public void RemoveEntity(IEntityLocationData entity) { _items.Remove(entity); entity.X = null; entity.Y = null; entity.Z = null; }
public void PutEntity(IEntityLocationData entity) { _items.Add(entity); }
public static WorldSpace ToWorldSpace(this IEntityLocationData self) { return(new WorldSpace(self.X.Value, self.Y.Value, self.Z.Value)); }
public static WorldSpace?ToWorldSpaceOrDefault(this IEntityLocationData self) { return(self == null ? (WorldSpace?)null : new WorldSpace(self.X.GetValueOrDefault(), self.Y.GetValueOrDefault(), self.Z.GetValueOrDefault())); }
/// <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); }