void Start()
    {
        instances++;

        if (instances > 1)
        {
            Debug.LogWarning("Warning: There are more than one Level Generator at the level");
        }
        else
        {
            _instance = this;
        }

        defaultScrollSpeed    = scrollSpeed;
        scrollCloudSpeed      = scrollSpeed * 12.5f;
        scrollBackgroundSpeed = scrollCloudSpeed * 3;
        scrollForegroundSpeed = scrollCloudSpeed * 8;

        SpawnCloudLayer(1);
        SpawnCityBackgroundLayer(1);
    }
예제 #2
0
    void Start()
    {
        instances++;

        if (instances > 1)
        {
            Debug.LogWarning("There are more than one LevelSpawnManager");
        }
        else
        {
            _instance = this;
        }

        defaultScrollSpeed = scrollSpeed;

        CalculateScrollSpeeds();

        SetStartTriggersPosition();

        //Place cloud and city layer in the middle of the screen (x position)
        SpawnCloudLayer(PlaceLocation.Middle);
        SpawnCityBackgroundLayer(PlaceLocation.Normal);
        SpawnCityLayer(PlaceLocation.Middle);
    }