Ejemplo n.º 1
0
    public void StartGame()
    {
        goalNumber          = Random.Range(10, 25); //Temp
        teamBlue.goalNumber = goalNumber;
        teamRed.goalNumber  = goalNumber;
        EndNumber.text      = goalNumber.ToString();

        //randomly select starting team
        int startteam = Random.Range(0, 2);

        if (startteam == 0)
        {
            currentTeam = teamBlue;
        }
        else
        {
            currentTeam = teamRed;
        }

        ui.StartUI(currentTeam);
        spotlight.ChangeTeamLight(currentTeam);
        ui.ChangeEdgeColor(currentTeam);

        //Generating bricks
        goalNumber     = Random.Range(20, 50); //Temp
        numberOfBricks = 5;
        brickNumbers   = algorithm.GenerateBrickNumbers(goalNumber, numberOfBricks);
        brickManager.SpawnBricks(brickNumbers);
        brickManager.StartNumberRound();
    }