private static void GenerateForegroundStructure(HexList4D <HexForegroundComponent> foreground, int radius, ForegroundTypes type, ForegroundTypes badType, int value, int count, float chance, float diffChance) { for (int i = 0; i < count; i++) { GenerateRecursiveF(foreground, type, badType, HexMath.RandomPosition(radius), value, chance, diffChance); } }
private static void GenerateBackgroundStructure(HexList4D <HexBackgroundComponent> background, int radius, BackroundTypes type, BackroundTypes badType, int count, float chance, float diffChance) { for (int i = 0; i < count; i++) { GenerateRecursiveB(background, type, badType, HexMath.RandomPosition(radius), chance, diffChance); } }
//todo hexagonal public void Fill(int radius) { for (int i = -radius; i < radius; i++) { for (int j = -radius; j < radius; j++) { if (MathFast.Abs(HexMath.GetZ(i, j)) <= radius) { Add(i, j, new T()); } } } }