public void ToggleElement(int index) { if (IntUtil.InRange(index, toggleButtons.Length)) { toggleButtons[index].Toggle(); } }
List <Dog> getAdoptedDogsForPage(int pageIndex) { int startIndex = getStartIndex(pageIndex); if (IntUtil.InRange(startIndex, dogCollection.Count)) { int endIndex = Mathf.Clamp(startIndex + dogsPerPage, 0, dogCollection.Count); return(dogCollection.GetRange(startIndex, endIndex - startIndex)); } else { return(new List <Dog>()); } }