Files
riversong-code-showcase/Source/Riversong/Game/WorldGen/ChunkGenerators/GrassTileMask.cs
2026-05-21 16:04:49 +02:00

17 lines
400 B
C#

using Unity.Collections;
namespace DanieleMarotta.RiversongCodeShowcase
{
public struct GrassTileMask : IGrassTileMask
{
public NativeArray<int> Heightmap;
public NativeArray<FertilityMapValue> Fertility;
public bool CanGenerateAtTile(int tileIndex)
{
return Heightmap[tileIndex] > 0 && Fertility[tileIndex].MaxFertility == 0;
}
}
}