コード例 #1
0
 public void Highlight(Tile center, int lower, int upper, Predicate <Tile> Match, Tile.HighlightColor color, bool isAdditive = true, int skipUnmatchedAfter = int.MaxValue)
 {
     foreach (Tile tile in BreadthFirstSearch(center, lower, upper, Match, skipUnmatchedAfter))
     {
         Highlight(tile, color, isAdditive);
     }
 }
コード例 #2
0
 /// <summary>
 /// High light tiles filtered by a certain mask within a certain interval of distance to a central tile with a given color
 /// </summary>
 /// <param name="center"> The central tile to concern </param>
 /// <param name="lower"> The lower boundary of the distance </param>
 /// <param name="upper"> The higher boundary of the distance </param>
 /// <param name="mask"> The mask for filtering </param>
 /// <param name="color"> The color to highlight with </param>
 /// <param name="skipUnmatched"> [optional] </param>
 public void Highlight(Tile center, int lower, int upper, Predicate <Tile> Match, Tile.HighlightColor color, bool isAdditive = true, bool skipUnmatched = false)
 {
     Highlight(center, lower, upper, Match, color, isAdditive, skipUnmatched ? 0 : int.MaxValue);
 }
コード例 #3
0
 public void Highlight(Tile center, int range, Predicate <Tile> Match, Tile.HighlightColor color, bool isAdditive = true, int skipUnmatchedAfter = int.MaxValue)
 {
     Highlight(center, 0, range, Match, color, isAdditive, skipUnmatchedAfter);
 }
コード例 #4
0
 /// <summary>
 /// High light tiles filtered by a certain mask within a certain range of a central tile with a given color
 /// </summary>
 /// <param name="center"> The central tile to concern </param>
 /// <param name="range"> The range to concern </param>
 /// <param name="mask"> The mask for filtering </param>
 /// <param name="color"> The color to highlight with </param>
 /// <param name="skipUnmatched"> [optional] </param>
 public void Highlight(Tile center, int range, Predicate <Tile> Match, Tile.HighlightColor color, bool isAdditive = true, bool skipUnmatched = false)
 {
     Highlight(center, 0, range, Match, color, isAdditive, skipUnmatched);
 }
コード例 #5
0
 public void Highlight(Tile center, int range, Tile.HighlightColor color, bool isAdditive = true, int skipUnmatchedAfter = int.MaxValue)
 {
     Highlight(center, 0, range, tile => true, color, isAdditive, skipUnmatchedAfter);
 }
コード例 #6
0
 /// <summary>
 /// High light tiles within a certain range of a central tile with a given color
 /// </summary>
 /// <param name="center"> The central tile to concern </param>
 /// <param name="range"> The range to concern </param>
 /// <param name="color"> The color to highlight with </param>
 /// <param name="skipUnmatched"> [optional] </param>
 public void Highlight(Tile center, int range, Tile.HighlightColor color, bool isAdditive = true, bool skipUnmatched = false)
 {
     Highlight(center, 0, range, tile => true, color, isAdditive, skipUnmatched);
 }
コード例 #7
0
    //public void wipeTiles()
    //{
    //    if (numHighlightedTiles > 0)
    //    {
    //        numHighlightedTiles = 0;
    //        foreach (Tile tile in grid)
    //        {
    //            //reset all tiles
    //            tile.Wipe();
    //        }
    //    }
    //}

    public void Highlight(Tile tile, Tile.HighlightColor color, bool isAdditive = true)
    {
        tile.Highlight(color, isAdditive);
        numHighlightedTiles++;
    }