コード例 #1
0
ファイル: 2DView.cs プロジェクト: dankar/zombies
        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();
        }
コード例 #2
0
ファイル: Thumbnail.cs プロジェクト: amirsalah/moonview
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="parent"></param>
 public Thumbnail(SurfaceControl parent)
 {
     _parent = parent;
 }