Esempio n. 1
0
    public void GameLost()
    {
        player.transform.position = new Vector3(0.5f, -2.5f, 0);
        player.GetComponent <Rigidbody2D>().velocity = Vector2.zero;
        _pauseMenu.Pause();
        lostText.gameObject.SetActive(true);
        lostText.SetText("Lost with Score : " + score);
        score = 0;
        scoretext.SetText("Score : " + score);
        enemygen.ResetIteration();

        foreach (var enemy in GameObject.FindGameObjectsWithTag("Enemy"))
        {
            Destroy(enemy);
        }
    }