Ejemplo n.º 1
0
 public void CascateSell(GearFile file)
 {
     for (int x = -1; x <= 1; x++)
     {
         for (int y = -1; y <= 1; y++)
         {
             if (!(y == 0 && x == 0) && !(y == 1 && x == 1) && (x == 0 || y == 0))
             {
                 Vector2 pos  = new Vector2(x + file.x, y + file.y);
                 Gear    gear = GetGearByPos(pos);
                 if (gear != null)
                 {
                     if (!CheckTileIsOverAdd(pos))
                     {
                         gear.Sell();
                     }
                 }
                 gear = null;
             }
         }
     }
 }
Ejemplo n.º 2
0
 public virtual void SetFile(GearFile newFile)
 {
     file = newFile;
     UpdateTransform();
 }