public void ToggleVisualisationAid(bool toggle) { PathfindingVisualisationAid = toggle; if (PathfindingVisualisationAid) { //shouldn't need to do this but just incase gridVisualisation.ResetGridVisualisation(); gridVisualisation.ChangeToGoalNodeColourOnly(goalNode); } else { gridVisualisation.ResetGridVisualisation(); gridVisualisation.ChangeToGoalNodeColourOnly(goalNode); } }
public void ToggleVisualisationAid(bool toggle) { PathfindingVisualisationAid = toggle; if (PathfindingVisualisationAid) { //shouldn't need to do this but just incase gridVisualisation.ResetGridVisualisation(); foreach (var unit in unitData) { if (!(unitData.Count > 1)) { unit.UnitSearchVisualisation(); } unit.UnitPathVisualisation(); gridVisualisation.ChangeToGoalNodeColourOnly(goalNode); } } else { gridVisualisation.ResetGridVisualisation(); gridVisualisation.ChangeToGoalNodeColourOnly(goalNode); } }