示例#1
0
 public abstract void DockAt(Port port);
示例#2
0
 public Vertex(Port port)
 {
     Port = port;
 }
示例#3
0
 public override Vector GetPortStalkPosition(Port port)
 {
     return GetPortPosition(port);
 }
示例#4
0
 public override Vector GetPortPosition(Port port)
 {
     var vertexPort = (VertexPort) port;
       return vertexPort.Vertex.Position;
 }
示例#5
0
 public override void DockAt(Port port)
 {
     Vertex.Port = port;
     Connection.RaiseChanged();
 }
示例#6
0
文件: Room.cs 项目: ChrisPC/trizbort
 public override Vector GetPortStalkPosition(Port port)
 {
     var outerBounds = InnerBounds;
     outerBounds.Inflate(Settings.ConnectionStalkLength);
     var compass = (CompassPort)port;
     Vector inner = InnerBounds.GetCorner(compass.CompassPoint);
     Vector outer = outerBounds.GetCorner(compass.CompassPoint);
     switch (compass.CompassPoint)
     {
         case CompassPoint.EastNorthEast:
         case CompassPoint.EastSouthEast:
         case CompassPoint.WestNorthWest:
         case CompassPoint.WestSouthWest:
             return new Vector(outer.X, inner.Y);
         case CompassPoint.NorthNorthEast:
         case CompassPoint.NorthNorthWest:
         case CompassPoint.SouthSouthEast:
         case CompassPoint.SouthSouthWest:
             return new Vector(inner.X, outer.Y);
         default:
             return outer;
     }
 }
示例#7
0
文件: Room.cs 项目: ChrisPC/trizbort
 public override Vector GetPortPosition(Port port)
 {
     // map the compass points onto our bounding rectangle
     var compass = (CompassPort)port;
     return InnerBounds.GetCorner(compass.CompassPoint);
 }