Exemple #1
0
 private void ProcessIdlePhaseInput(Vector2 positionInWorldSpace, TouchPhase touchPhase)
 {
     if (touchPhase == TouchPhase.Began)
     {
         foreach (Ball ball in balls)
         {
             // If player clicked on an idle ball, load it into the slingshot
             if (ball.state == Ball.States.idle && ball.ballCollider.bounds.Contains(positionInWorldSpace))
             {
                 if (slingshot.LoadSlingshot(ball))
                 {
                     state = States.slingArmed;
                 }
             }
         }
     }
 }