fromAsset<T> static method

WorldMapReader<T> fromAsset<T>(
  1. String asset
)

Implementation

static WorldMapReader<T> fromAsset<T>(String asset) {
  switch (T) {
    case TiledMap:
      return TiledAssetReader(asset: asset) as WorldMapReader<T>;
    case SpritefusionMap:
      return SpritefusionAssetReader(asset: asset) as WorldMapReader<T>;
    default:
      throw Exception('There is not a WorldMapReader.asset to $T');
  }
}