public void Retrieve(TileInfo info, Action <Texture2D> onTextureLoaded)
        {
//			return LoadImage(info);
            LoadImageWithCoroutine(info, onTextureLoaded);
        }
 private string GetFileName(TileInfo info) => Path.Combine(_cacheFolderPath, $"{info}.png");
Beispiel #3
0
 public void FreeTile(TileInfo info)
 {
     Object.Destroy(_usedTiles[info]);
     _usedTiles.Remove(info);
 }
 private void LoadImageWithCoroutine(TileInfo info, Action <Texture2D> onTextureLoaded)
 {
     Dispatcher.Instance.StartCoroutine(LoadImageCoroutine(info, onTextureLoaded));
 }
Beispiel #5
0
 public void RequestTileTexture(TileInfo info, Action <Texture2D> onThumbReady,
                                Action <Texture2D> onMainTextureReady)
 {
     onMainTextureReady?.Invoke(GetTileTexture(info));
 }