void Toggle(int _x, int _y, bool instant = false)
 {
     for (int i = 0; i < coveredSquares.Count; i++)
     {
         miniTF_Tile tile = grid.GetTile(
             _x + (int)coveredSquares[i].x,
             _y + (int)coveredSquares[i].y
             );
         if (tile != null)
         {
             tile.ToggleShowing(instant);
         }
     }
 }
示例#2
0
 void ActivateTiles(int _x, int _y, miniTF_ShapeDesc shape)
 {
     String[] lines = shape.shape.Split('\n');
     for (int y = 0; y < lines.Length; y++)
     {
         for (int x = 0; x < lines[y].Length; x++)
         {
             if (lines[y][x] == 'A')
             {
                 miniTF_Tile tile = GetTile(_x + x, _y + 2 - y);
                 if (tile != null)
                 {
                     tile.SetTileActive(true);
                     tile.ToggleShowing();
                 }
             }
         }
     }
 }