Ejemplo n.º 1
0
 void DetermineActiveChapter()
 {
     if (Mathf.Abs(rectTransform.anchoredPosition.y - restingY) > basePanelSeparation / 2)
     {
         if (activeChapter < chapterPanels.Length && rectTransform.anchoredPosition.y > restingY)
         {
             activeChapter++;
             UIChapterPanel.UpdateAllRestingY();
         }
         else if (activeChapter > 1 && rectTransform.anchoredPosition.y <= restingY)
         {
             activeChapter--;
             UIChapterPanel.UpdateAllRestingY();
         }
     }
 }
Ejemplo n.º 2
0
 public static void ShiftToNewActivePanel(int newActiveChapter)
 {
     activeChapter = newActiveChapter;
     UIChapterPanel.UpdateAllRestingY();
 }