16 lines
553 B
C#
16 lines
553 B
C#
using Cryville.EEW.Core.Map;
|
|
using System.IO;
|
|
using UnityEngine;
|
|
|
|
namespace Cryville.EEW.Unity.Map {
|
|
sealed class EditorMapTileCacheManager : MapTileCacheManager {
|
|
protected override MapTileBitmapHolder CreateBitmapHolder(MapTileIndex index) => new(
|
|
index,
|
|
GameObject.Instantiate(PrefabBitmapHolder, Parent, false),
|
|
new($"https://tile.openstreetmap.org/{index.Z}/{index.NX}/{index.NY}.png")
|
|
);
|
|
|
|
protected override string GetCacheFilePath(MapTileIndex index) => Path.Combine(CacheDir, $"map_editor/{index.Z}/{index.NX}/{index.NY}");
|
|
}
|
|
}
|