public static void GetFlags(this TileFlag flag, System.Action <TileFlag> action) { if (action == null) { return; } foreach (TileFlag value in Enum.GetValues(typeof(TileFlag))) { if (flag.HasAny(value)) { action(value); } } }
public static bool HasItem(this TileFlag flag) => flag.HasAny(TileFlag.Item);
public static bool HasFloor(this TileFlag flag) => flag.HasAny(TileFlag.Floor);
public static bool HasWall(this TileFlag flag) => flag.HasAny(TileFlag.Wall);
public static bool HasStepDown(this TileFlag flag) => flag.HasAny(TileFlag.StepDown);