예제 #1
0
 //Retruns either mouse or ball x position, depending if autoPlay is enabled in the GameManager
 private float GetXPosition()
 {
     if (gameManger.IsAutoPlayEnabled())
     {
         //Ball X position
         return(levelBall.transform.position.x);
     }
     else
     {   // Mouse X position - X position relative to screen size
         return(Input.mousePosition.x / Screen.width * screenWidthUnits);
     }
 }