public override bool Equals(object obj) { if (!(obj is Coord3D)) { return(false); } Coord3D comp = (Coord3D)obj; return(comp.X == this.X && comp.Y == this.Y && comp.Z == this.Z); }
public static void Remove(this XDictionary <Coord3D, SpriteList <Sprite> > layerMap, Coord3D coord, Sprite item) { if (layerMap[coord].Contains(item)) { layerMap[coord].Remove(item); } }
public static Coord2D To2D(this Coord3D coord) { return(new Coord2D(coord.X, coord.Y)); }
public static void Add(this XDictionary <Coord3D, SpriteList <Sprite> > layerMap, Coord3D coord, Sprite item) { if (!layerMap.ContainsKey(coord)) { layerMap.Add(coord, new SpriteList <Sprite>()); } layerMap[coord].Add(item); }