static int ConvertToMask(BoundaryPoint.Side side) { switch (side) { case BoundaryPoint.Side.Top: return(1); case BoundaryPoint.Side.Right: return(2); case BoundaryPoint.Side.Bottom: return(4); case BoundaryPoint.Side.Left: return(8); default: throw new System.ComponentModel.InvalidEnumArgumentException(); } }
MapEntrance BuildMapEntrance(BoundaryPoint.Side side) { return(new MapEntrance(side, (textureLength - openingLength) / 2, openingLength)); }
public MapEntrance(BoundaryPoint.Side side, int magnitude, int length) : this(new BoundaryPoint(side, magnitude), length) { }