Ejemplo n.º 1
0
        void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

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

            disposed = true;
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 4
0
 public LoadBlockMeshViewModel(Preview preview)
 {
     if (preview == null) throw new ArgumentNullException("preview");
     this.preview = preview;
 }