Beispiel #1
0
    public void GameRestart()
    {
        //SceneManager.LoadScene(0);
        player.transform.position = Vector3.zero;
        player.gameObject.SetActive(true);
        PlayerLife = DefaultPlayerLife - 1;
        ui.SetPlayerLife(PlayerLife);

        Score = 0;
        ui.SetScore(Score);
        ui.HideGameOver();

        hazardRoutine = StartCoroutine(Hazards());
        for (int i = 0; i < BGs.Length; i++)
        {
            BGs[i].StartScroll();
        }
    }