Skip to content

TileCountsAttribute

namespace Griff.Scenes;
public sealed class TileCountsAttribute : FieldEditorAttribute

Marks a string property as tiles and how many of each, as tile:count pairs separated by commas, e.g. “0:20, 3:15” (a match board’s gems to collect). The Inspector lists them a row each, the tile picked off the tileset, with how many.

public override string Describe()
public override string? Problem(Component component, object? value)
public static IReadOnlyList<ValueTuple<int, int>> Read(string? text)

The pairs a string holds, those that read.

public static IReadOnlyDictionary<int, int> Totals(string? text)

How many of each tile the string says, a tile named twice adding up: what the game counts against (see KindCounts).