Пример #1
0
 public void Draw(Graphics G, DrawMeta how)
 {
     G.DrawImage(
         img,
         how._where.X - (int)(10 * how._scale),
         how._where.Y - (int)(10 * how._scale),
         (int)(20 * how._scale),
         (int)(20 * how._scale));
 }
Пример #2
0
 public void Draw(Graphics G, DrawMeta how)
 {
     for (int i = 0; i < tiles.GetLength(0); i++)
     {
         for (int j = 0; j < tiles.GetLength(1); j++)
         {
             tiles[i, j].Draw(G, new DrawMeta(
                                  new Point((int)((-tiles.GetLength(0) / 2 + i) * 20 * how._scale),
                                            (int)((-tiles.GetLength(1) / 2 + j) * 20 * how._scale)),
                                  how));
         }
     }
 }
Пример #3
0
 public DrawMeta(Point offset, DrawMeta parentMeta)
 {
     this._scale    = parentMeta._scale;
     this._rotation = parentMeta._rotation;
     this._where    = new Point(parentMeta._where.X + offset.X, parentMeta._where.Y + offset.Y);
 }