コード例 #1
0
 protected override void Select(BoundsInt position)
 {
     if (grid != null)
     {
         GridSelection.Select(brushTarget, position);
         gridBrush.Select(grid, brushTarget, position);
     }
 }
コード例 #2
0
ファイル: GridSelection.cs プロジェクト: danielparkdp/Wedge
        /// <summary>Creates a new GridSelection and sets it as the active GridSelection.</summary>
        /// <param name="target">The target GameObject for the GridSelection.</param>
        /// <param name="bounds">The cell coordinates of selection made.</param>
        public static void Select(Object target, BoundsInt bounds)
        {
            GridSelection newSelection = CreateInstance <GridSelection>();

            newSelection.m_PreviousSelection = Selection.activeObject;
            newSelection.m_Target            = target as GameObject;
            newSelection.m_Position          = bounds;
            Selection.activeObject           = newSelection;
            if (gridSelectionChanged != null)
            {
                gridSelectionChanged();
            }
        }
コード例 #3
0
 protected override void ClearGridSelection()
 {
     GridSelection.Clear();
 }