Example #1
0
 private void AddScoreOnDistance(float offsetD)
 {
     if (distance >= offsetD)
     {
         startPosX = transform.position.x;
         distance  = 0f;
         GameParams.AddScore(1);
         GameParams.AddLastScore(1);
     }
     distance = transform.position.x - startPosX;
 }
Example #2
0
 private void Landing(string infoText, int score)
 {
     gm.GetGUI().infoDrop.SetActive(true);
     gm.GetGUI().drop.text = infoText;
     gm.GetGUI().valDrop.text = "+" + score.ToString();
     Debug.Log(infoText + " : " + score.ToString());
     GameParams.AddScore(score);
     GameParams.AddLastScore(score);
     GameParams.SetScore(GameParams.GetScore() * curValFlip);
     GameParams.SetLastScore(GameParams.GetScore());
     am.PlayLanding();
     curValFlip = 0;
     StartCoroutine(HideInfoDrop(1f));
     _backFlip = false;
 }
Example #3
0
 private void AddScoreInFliying(float time1, float time2)
 {
     if (!IsGrounded())
     {
         if (timerFly >= time1)
         {
             if (timerFlying >= time2)
             {
                 GameParams.AddScore(1);
                 GameParams.AddLastScore(1);
                 timerFlying = 0f;
             }
             timerFlying += Time.deltaTime;
         }
         timerFly += Time.deltaTime;
     }
     else if (IsGrounded())
     {
         timerFly    = 0f;
         timerFlying = 0f;
     }
 }