public void ChangeTool(ToolMode NewTool) { Tools[NewTool].OnBegin(); if (CurrentToolMode != NewTool) { CurrentTool.OnEnd(); } CurrentToolMode = NewTool; }
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; }