Example #1
0
    private void StartLevel()
    {
        spawningObstacles    = false;
        spawningCollectibles = false;
        spawningEnemies      = false;
        SetScoreText("SPEED: x" + currentScoreMultiplier.ToString());

        InitializeEnvironmentColors();
        ResetScoreMultiplier();

        currentCollectedCollectibles = new int[totalCollectedCollectibles.Length];
        for (int i = 0; i < currentCollectedCollectibles.Length; i++)
        {
            currentCollectedCollectibles[i] = 0;
        }

        skipInfoText.gameObject.SetActive(false);

        levelStartTime    = Time.time;
        runningLevelIntro = true;

        playerTrailController.OnScoreMultiplierTimerChange(0, scoreMultiplierDuration);

        EventManager.BroadcastLevelIntroStart();
    }