예제 #1
0
 public void ChangeTool(ToolMode NewTool)
 {
     Tools[NewTool].OnBegin();
     if (CurrentToolMode != NewTool)
     {
         CurrentTool.OnEnd();
     }
     CurrentToolMode = NewTool;
 }
예제 #2
0
        public void ChangeTool(ToolMode NewTool)
        {
            if (NewTool != ToolMode.SelectUnits)
            {
                SelectedObjects = new List <Body>();
            }

            // Todo: Should probably clean up existing tool even if they are the same tool.
            Tools[NewTool].OnBegin();
            if (CurrentToolMode != NewTool)
            {
                CurrentTool.OnEnd();
            }
            CurrentToolMode = NewTool;
        }