Beispiel #1
0
 public void unload(TilesetManager manager)
 {
     foreach (var tileset in tilesets)
     {
         manager.removeTileset(tileset);
     }
 }
Beispiel #2
0
        public void initialize(PluginManager pluginManager, IServiceCollection serviceCollection)
        {
            var manager = new TilesetManager();
            var loader  = new TilesetLoader(manager);

            serviceCollection.TryAddSingleton <TilesetManager>(manager);
            pluginManager.addSubsystemResources("Tileset", loader);
        }
Beispiel #3
0
        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;
 }