Exemple #1
0
 public void ToggleElement(int index)
 {
     if (IntUtil.InRange(index, toggleButtons.Length))
     {
         toggleButtons[index].Toggle();
     }
 }
Exemple #2
0
    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>());
        }
    }