Пример #1
0
    public void SecondLevelSpawning()
    {
        numCoins   = 8;
        numHearts  = 1;
        numVehicle = 1;
        powerUpNum = 1;
        if (roadObjectCheck != 4 || roadObjectCheck != 8)
        {
            objectSpawner.CoinSpawner(numCoins);
            objectSpawner.HeartSpawner(numHearts);
            objectSpawner.CarSpawner(numVehicle);
            objectSpawner.BusSpawner(numVehicle);

            if (damagedCheck == 3)
            {
                roadObjectSpawner.DamagedRoadSpawner();
                damagedCheck = -1;
            }
            if (archwayCheck == 2)
            {
                roadObjectSpawner.ArchwaySpawner();
                archwayCheck = 0;
            }

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

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