Ejemplo n.º 1
0
 private void Update()
 {
     if (global.GetIsGameOver() == true)
     {
         score.text     = PlayerPrefs.GetInt("score", 0).ToString();
         highScore.text = PlayerPrefs.GetInt("highScore", 0).ToString();
     }
 }
Ejemplo n.º 2
0
 void Update()
 {
     transform.Translate(transform.right * speed * direction * Time.deltaTime);
     if (global.GetIsGameOver() == true)
     {
         transform.Translate(-transform.up * GAME_OVER_SPEED * direction * Time.deltaTime);
     }
 }