Exemplo n.º 1
0
    /// <summary>
    /// Function that starts the game.
    /// </summary>
    public void StartGame()
    {
        score          = 0;
        scoreText.text = "Score: 0";

        panelGameOver.SetActive(false);
        panelMenu.SetActive(false);

        player.SetActive(true);
        playerClass.ResetValues();

        minWait = 1f;
        maxWait = 1.5f;

        CleanScene();

        StartCoroutine(InstantiateCloud());
        StartCoroutine(IncreaseScore());
        StartCoroutine(InstantiateObject());

        speed = 7f;
        ChangeSpeed(speed);
    }