Ejemplo n.º 1
0
    public void FirstLevelSpawning()
    {
        numCoins   = 5;
        numHearts  = 1;
        numVehicle = 2;
        powerUpNum = 1;

        if (roadObjectCheck != 4 || roadObjectCheck != 8)
        {
            objectSpawner.CoinSpawner(numCoins);
            objectSpawner.HeartSpawner(numHearts);
            objectSpawner.CarSpawner(numVehicle);

            if (archwayCheck == 2)
            {
                roadObjectSpawner.ArchwaySpawner();
                archwayCheck = 0;
            }

            if (powerUpCheck == 2)
            {
                objectSpawner.PowerUpSpawner(powerUpNum);
                powerUpCheck = 0;
            }
            roadObjectCheck++;
            archwayCheck++;
            powerUpCheck++;
        }
        if (roadObjectCheck == 4)
        {
            roadObjectSpawner.RampSpawner();
            roadObjectCheck++;
        }

        if (roadObjectCheck == 8)
        {
            roadObjectSpawner.BridgeSpawner();
            roadObjectCheck = -1;
        }
    }