Beispiel #1
0
    private void ProcessMapChunk(GetWorldMapResponse chunkInfo)
    {
        Debug.Log("Processing map chunk...");

        Debug.Log("Towns on the chunk: " + chunkInfo.Map.Towns.Count);
        Debug.Log("Trees on chank: " + chunkInfo.Map.Trees);
        Debug.Log("Plants on chank: " + chunkInfo.Map.Plants);
        Debug.Log("Stones on chank: " + chunkInfo.Map.Stones);

        PlayerPrefs.SetString("View", "Global");

        MapCache.StoreWorldChunk(chunkInfo);
        var heights = ProtoConverter.ToHeightsFromProto(chunkInfo.Map.Data);

        EventBus.instance.TerrainLoaded(heights, chunkInfo.Map.X, chunkInfo.Map.Y);
    }