Beispiel #1
0
 public void RestartGame()
 {
     gameOverPanel.gameObject.SetActive(false);
     SceneManager.LoadScene(SceneManager.GetActiveScene().name);
     CarDistance.DistanceCalculater(CarDistanceState.Reset);
     AICar.aiCarMoveControl = false;
 }
Beispiel #2
0
 public void GameOver()
 {
     Game.gameManager.gameOverControl = true;
     CarDistance.DistanceCalculater(CarDistanceState.Stop);
     Game.gameManager.CheckBestDistance(CarDistance.GetCurrentDistance());
     bestDistanceText.text = "Best: " + SaveLoadSystem.LoadGameData().bestDistance.ToString("F1");
     gameOverPanel.gameObject.SetActive(true);
 }
Beispiel #3
0
 public override void CarMovement()
 {
     RotateCar();
     rb.velocity = gameObject.transform.forward * speed;
     CarDistance.DistanceCalculater(CarDistanceState.Start);
 }