Example #1
0
 public bool GetSnapPoint(out SnapPoint point)
 {
     point = this._snapPoint;
     if (this._snapPoint != null)
     {
         this._snapPoint.Calculate(this);
     }
     return(this._snapPoint != null);
 }
Example #2
0
 public void SetSnapPoint(string name, int id, Vector2?anchor = null, Vector2?offset = null)
 {
     if (!anchor.HasValue)
     {
         anchor = new Vector2?(new Vector2(0.5f));
     }
     if (!offset.HasValue)
     {
         offset = new Vector2?(Vector2.Zero);
     }
     this._snapPoint = new SnapPoint(name, id, anchor.Value, offset.Value);
 }