Example #1
0
        private string View; // View = XY, ZY or ZX (Front,Left or Top)

        #endregion Fields

        #region Constructors

        public View2D(SdlDotNet.Windows.SurfaceControl Control, string View, object _blocks, object _items, int _gridsize, object _layers)
        {
            this.View = View;
            this.Control = Control;
            this.layerStatus = (bool[])_layers;

            this.Surf = new Surface(this.Control.Width, this.Control.Height);

            this.GridSurf = new Surface(this.Control.Width, this.Control.Height);
            this.BlockSurf = new Surface(this.Control.Width, this.Control.Height);
            this.TempSurf = new Surface(this.Control.Width, this.Control.Height);

            this.GridSize = _gridsize;

            this.blocks = _blocks;
            this.items = _items;

            SdlDotNet.Core.Events.Tick +=  new EventHandler<TickEventArgs>(OnTick);

            this.levelSize = 256;

            this.scrollLocalX = this.levelSize*this.GridSize/2;
            this.scrollLocalY = this.levelSize*this.GridSize/ 2;

            this.UpdateGrid();
            this.UpdateBlocks();
            this.UpdateTemp();
        }
Example #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="parent"></param>
 public Thumbnail(SurfaceControl parent)
 {
     _parent = parent;
 }