public Vector3 GetGridPosition(Vector3 currentPositon) { return(GridPositionCalculator.GetNearestGridPosition(transform.position, currentPositon, GridDimmensions)); }
public void Initialize(int columnCount, int rowCount) { IsEditing = false; MouseCapturedIcon = null; MouseCapturedClickPosition = new Point(0.00D, 0.00D); ColumnCount = columnCount; RowCount = rowCount; //sets background to black Background = new SolidColorBrush(Colors.Transparent); GridCalculator = new GridPositionCalculator(this.Width, this.Height, ColumnCount, RowCount); IconStack_Realtime = new List<IIcon>(); IconStack_LastChanged = new List<IIcon>(); IconStack_LastCommitted = new List<IIcon>(); // make all of our collections be the size of the number of positions // based on the row/column count PadCollectionWithNull(IconStack_Realtime); PadCollectionWithNull(IconStack_LastChanged); PadCollectionWithNull(IconStack_LastCommitted); }