예제 #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);
 }