Esempio n. 1
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.R))
        {
            //Application.LoadLevel(Application.loadedLevel);

            SceneManager.LoadScene(0);
        }


        if (morte != vida) //vida
        {
            morte = vida;  //vida
            StartCoroutine(tempo());
            //Instantiate(addPlayer, transform.position, transform.rotation);
        }
        if (morte <= 0)
        {
            DestroyByContact.Destroy(gameObject);
        }



        if (score > 500)
        {
            nivel = 2;
        }
        if (score > 1000)
        {
            nivel = 3;
        }
        if (score > 1100)
        {
            nivel = 4;
        }
    }