public bool IsSelected(Selectable selectable) { for (int i = 0; i < selected.Count; i++) { if (selectable == selected[i]) { return true; } } return false; }
public void RemoveSelected(Selectable newSelected) { selected.Remove(newSelected); newSelected.SetSelectionStatus(false); }
public void AddToSelected(Selectable newSelected) { if (!IsSelected(newSelected) && newSelected.IsSelectable) { selected.Add(newSelected); newSelected.SetSelectionStatus(true); } }
public void SetSelected(Selectable newSelected) { if (newSelected.IsSelectable) { ClearSelection(); AddToSelected(newSelected); } }