Exemple #1
0
        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);
        }
Exemple #2
0
 public static void Remove(this XDictionary <Coord3D, SpriteList <Sprite> > layerMap, Coord3D coord, Sprite item)
 {
     if (layerMap[coord].Contains(item))
     {
         layerMap[coord].Remove(item);
     }
 }
Exemple #3
0
 public static Coord2D To2D(this Coord3D coord)
 {
     return(new Coord2D(coord.X, coord.Y));
 }
Exemple #4
0
 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);
 }