public void unload(TilesetManager manager) { foreach (var tileset in tilesets) { manager.removeTileset(tileset); } }
public void initialize(PluginManager pluginManager, IServiceCollection serviceCollection) { var manager = new TilesetManager(); var loader = new TilesetLoader(manager); serviceCollection.TryAddSingleton <TilesetManager>(manager); pluginManager.addSubsystemResources("Tileset", loader); }
public void load(TilesetManager manager) { VirtualFileSystem vfs = VirtualFileSystem.Instance; foreach (var file in vfs.listFiles(locName, "*.tiles.json", recursive)) { using (var reader = new StreamReader(vfs.openStream(file, Engine.Resources.FileMode.Open, Engine.Resources.FileAccess.Read))) { var tileset = JsonConvert.DeserializeObject <Tileset>(reader.ReadToEnd()); manager.addTileset(tileset); tilesets.Add(tileset); } } }
public TilesetGroup(TilesetManager manager) { this.manager = manager; }
public TilesetLoader(TilesetManager manager) { this.manager = manager; }