void HorizontalTouch()
 {
     if (mousePosition.x > screenDimension.x / 2)
     {
         horizPos = HorizontalTouchPos.Right;
     }
     else if (mousePosition.x < screenDimension.x / 2)
     {
         horizPos = HorizontalTouchPos.Left;
     }
     else
     {
         horizPos = HorizontalTouchPos.None;
     }
 }
Beispiel #2
0
 void HorizontalTouch(Vector2 pos)
 {
     if (pos.x > screenDimension.x / 2)
     {
         horizPos       = HorizontalTouchPos.Right;
         secondTouchPos = pos;
         firstTouchPos  = Vector2.zero;
     }
     else if (pos.x < screenDimension.x / 2)
     {
         horizPos       = HorizontalTouchPos.Left;
         firstTouchPos  = pos;
         secondTouchPos = Vector2.zero;
         VerticleTouch(pos);
     }
     else
     {
         horizPos = HorizontalTouchPos.None;
     }
 }