コード例 #1
0

        
コード例 #2
0
        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();
            }
        }
コード例 #3
0
 MapEntrance BuildMapEntrance(BoundaryPoint.Side side)
 {
     return(new MapEntrance(side, (textureLength - openingLength) / 2, openingLength));
 }
コード例 #4
0
 public MapEntrance(BoundaryPoint.Side side, int magnitude, int length)
     : this(new BoundaryPoint(side, magnitude), length)
 {
 }