示例#1
0
 public BoulderView(Point loc, int w, int h, BoulderLevel defLevel)
 {
     this.DoubleBuffered = true;
     this.BorderStyle = BorderStyle.FixedSingle;
     this.Width = w;
     this.Height = h;
     this.Location = loc;
     this.Paint += Render;
     world = new int[2,2];
 }
示例#2
0
 /// <summary>
 /// Generate a new BoulderEntity for all the level
 /// </summary>
 /// <param name="lev"></param>
 public void LoadLevel(BoulderLevel lev)
 {
     this.Changed = true;
     this.Width = lev.width;
     this.Height= lev.height;
     this.World = new BoulderEntity[lev.width, lev.height];
     for (int x = 0; x < lev.width; x++)
     {
         for (int y = 0; y < lev.height; y++)
         {
             this.World[x, y] = createBoulderEntity(lev.world[x + y * lev.width], x, y);
         }
     }
 }