Exemple #1
0
        void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                Viewer.Dispose();
                Preview.Dispose();
                GridBlockMesh.Dispose();
                BasicBlockEffect.Dispose();
            }

            disposed = true;
        }
Exemple #2
0
        public Workspace(Game game)
        {
            if (game == null) throw new ArgumentNullException("game");
            Game = game;

            GraphicsDevice = game.GraphicsDevice;

            interBlockMeshLoadQueue = new InterBlockMeshLoadQueue();
            blockMeshLoadQueue = new BlockMeshLoadQueue(100);

            StorageBlockService = game.Services.GetRequiredService<IStorageBlockService>();

            Viewer = new Viewer(this);

            Preview = new Preview(this);

            GridBlockMesh = new GridBlockMesh(GraphicsDevice, 16, 0.1f, Color.White);

            BasicBlockEffect = new BasicBlockEffect(GraphicsDevice);
            BasicBlockEffect.EnableDefaultLighting();
        }
Exemple #3
0
        public Workspace(Game game)
        {
            if (game == null)
            {
                throw new ArgumentNullException("game");
            }
            Game = game;

            GraphicsDevice = game.GraphicsDevice;

            interBlockMeshLoadQueue = new InterBlockMeshLoadQueue();
            blockMeshLoadQueue      = new BlockMeshLoadQueue(100);

            StorageBlockService = game.Services.GetRequiredService <IStorageBlockService>();

            Viewer = new Viewer(this);

            Preview = new Preview(this);

            GridBlockMesh = new GridBlockMesh(GraphicsDevice, 16, 0.1f, Color.White);

            BasicBlockEffect = new BasicBlockEffect(GraphicsDevice);
            BasicBlockEffect.EnableDefaultLighting();
        }
 public LoadBlockMeshViewModel(Preview preview)
 {
     if (preview == null) throw new ArgumentNullException("preview");
     this.preview = preview;
 }