示例#1
0
        public void GenerateMap()
        {
            float[,] noiseMap = Noise.GenerateNoise(noiseSettings);
            _mapInfo          = new MapInfo();
            _mapInfo.GenerateMap(noiseMap, region);
            mapDisplay.DrawNoiseMap(_mapInfo);

            OnMapGenerated?.Invoke(_mapInfo);
        }
示例#2
0
    void DrawTrack(GameStateEventArgs e)
    {
        DrawBackground(e);

        _offsetVector = _envSettings.baseVector;

        _offsetVector.x += _prefabManager.borderLane.SetupLane(_gridManager.tilemapBase, _offsetVector, _envSettings.laneLength);

        GameAreaBoundsMin = _offsetVector.x;
        _offsetVector.x  += _prefabManager.trackLane.SetupLane(_gridManager.tilemapBase, _offsetVector, _envSettings.laneLength, e.playerCount + _envSettings.extraLanes);
        GameAreaBoundsMax = _offsetVector.x - 1;

        _offsetVector.x += _prefabManager.borderLane.SetupLane(_gridManager.tilemapBase, _offsetVector, _envSettings.laneLength);

        OnMapGenerated?.Invoke(GameAreaBoundsMin, GameAreaBoundsMax);
    }