public void ReStart()
 {
     playerController.StopCarOn();
     audioRestart = audioRestart.GetComponent <AudioSource>();
     audioRestart.PlayDelayed(0f);
     estadoJogo = GameState.RUN;
     menu.SetActive(false);
     HazzardScript.SetActive(true);
     hazzardScript2.SetActive(true);
     bonusScript.SetActive(true);
     HazzardScript3.SetActive(true);
     timmerLevel1 = 180f;
     //player.transform.parent.position = new Vector3(3.7f, 0f, -0.1015625f);
     player.transform.position = new Vector3(-1.4f, -11.7f, 0.0f);
     player.transform.rotation = new Quaternion(0.0f, 0.0f, 0.7f, 0.7f);
     // print("POSIÇÃO" + player.transform.position);
 }
Beispiel #2
0
    //when player clicks the button Try Again and restart the position, timmer, hazzards

    public void ReStart()
    {
        //lose_gainGameTimeScript = .GetComponent<BonusHazardScript>();
        //lose_gainGameTimeScript.ResetBonus();
        playerController.StopCarOn();
        audioRestart = audioRestart.GetComponent <AudioSource>();
        audioRestart.PlayDelayed(0f);
        audioCity.Play();
        estadoJogo = GameState.RUN;
        menu.SetActive(false);
        HazzardScript.SetActive(true);
        hazzardScript2.SetActive(true);
        bonusScript.SetActive(true);
        timmerLevel1 = 300f;

        //player.transform.parent.position = new Vector3(3.7f, 0f, -0.1015625f);
        player.transform.position = new Vector3(-3.5f, -6.55f, -0.1015625f);
        player.transform.rotation = new Quaternion(0.0f, 0.0f, 0.7f, 0.7f);
        print("POSIÇÃO" + player.transform.position);
    }