Esempio n. 1
0
 private void SwipeAction()
 {
     if (FindObjectOfType <Camera>().pixelHeight > FindObjectOfType <Camera>().pixelWidth)
     {
         if ((firstTouch - lastTouch) > 3.5f)
         {
             textHandler.ButtonNextChapter();
         }
         else if ((firstTouch - lastTouch) < -3.5f)
         {
             textHandler.ButtonPreviousChapter();
         }
     }
     else
     {
         if ((firstTouch - lastTouch) > 7f)
         {
             textHandler.ButtonNextChapter();
         }
         else if ((firstTouch - lastTouch) < -7f)
         {
             textHandler.ButtonPreviousChapter();
         }
     }
 }