コード例 #1
0
 public void SelectChildSubGrid(int index)
 {
     if (index >= 0 && index < _selectedSubGrid.GetChildSubGrids().Count)
     {
         _selectedSubGrid = _selectedSubGrid.GetChildSubGrids()[index];
     }
     SceneView.RepaintAll();
 }
コード例 #2
0
        public void DrawSubGrid(NavGridTool tool)
        {
            if (currentMode != Mode.EDIT)
            {
                return;
            }



            SubGrid selectedSubGrid = tool.SelectedSubGrid;

            List <SubGrid> subGrids = selectedSubGrid.GetChildSubGrids();

            //If the current SubGrid has child SubGrids
            if (subGrids.Count > 0)
            {
                DrawSubGridHandle(selectedSubGrid, selectedSubGrid, SUBGRID_COLOR);

                for (int i = 0; i < subGrids.Count; i++)
                {
                    if (DrawSubGridHandle(subGrids[i], selectedSubGrid, SUBGRID_COLOR))
                    {
                        tool.SelectChildSubGrid(i);
                        return;
                    }
                }
            }
            else
            {
                DrawNodeHandles(tool, selectedSubGrid);
            }
        }