Example #1
0
    //Resets all values if player loses game
    public void Reset()
    {
        scoreScript.SaveHighScore();
        scoreScript.ResetPlayerScore();

        gameTime          = 0.0f;
        currentSpawnTimer = timeBetweenSpawns;
        droppedBalls      = 0;
        exitScript.currentSpawnedIngredients = 0;

        exitScript.Reset();

        lives = maxLives;

        foreach (GameObject obj in GameObject.FindGameObjectsWithTag("Bouncer"))
        {
            Destroy(obj);
        }

        foreach (GameObject obj in GameObject.FindGameObjectsWithTag("Trampoline"))
        {
            Destroy(obj);
        }
    }