Пример #1
0
 public SmallHouse(Orientation o, int X, int Z, Town t)
 {
     this._o = o;
     if (o == Orientation.NORTH || 0 == Orientation.SOUTH)
         _fp = new Footprint (8, 6);
     else
         _fp = new Footprint (6, 8);
     this._x = X;
     this._z = Z;
     this._id = _idCount++;
     if (!t.IsIDRegisted (2))
         t.RegisterID (2);
 }
Пример #2
0
 private bool RasterizeToMap(int X, int Y, Footprint FP, int To)
 {
     if (X < 0 || Y < 0 || X + FP.X >= 2 * _radius || Y + FP.Z >= 2 * _radius)
         return false;
     for (int x = 0; x < FP.X; ++x) {
         for (int y = 0; y < FP.Z; ++y) {
             _map [x, y] = To;
         }
     }
     return true;
 }