Ejemplo n.º 1
0
 void ProcessTranslationMobile()
 {
     if (Input.touches[0].phase == TouchPhase.Began)
     {
         staminaBar.SetRecharging(false);
         beginPos            = Input.touches[0].position;
         controlsEnabled     = false;
         currentMaxMagnitude = maxMagnitudeOfSlingVector;
         currentMaxTime      = maxTimeAtMaxSlingMagnitude;
         currentMaxTimeTemp  = currentMaxTime;
     }
     if (Input.touches[0].phase == TouchPhase.Moved)
     {
         //will just process sling vector to calculate if player can rotate on it
         ProcessVectorAndRotation();
     }
     if (Input.touches[0].phase == TouchPhase.Ended)
     {
         StartCoroutine(staminaBar.StartRecharging());
         ProcessSlingshot();
         controlsEnabled = true;
     }
 }