Skip to main content

BiomeSphere

A class in Root.Township, the global namespace.

A sphere of one biome in a procedural forest, with a seed, origin, radius and strength. Can be sent over the network.

Constructors​

MemberWhat it is
BiomeSphere(int seed, Vector3 origin, float radius, float strength, ForestBiome biome)Creates a BiomeSphere from stream.
BiomeSphere(Stream stream)Creates a BiomeSphere from stream.

Fields​

5 private and internal fields
MemberWhat it is
private ForestBiome biomeBacking field for Biome, serialized as a hash.
private Vector3 originBacking field for Origin, the sphere's centre.
private float radiusBacking field for Radius.
private int seedBacking field for Seed; added to the biome hash to seed Generated.
private float strengthBacking field for Strength.

Properties​

MemberWhat it is
ForestBiome Biome { get; }The forest biome in this sphere.
GeneratedBiome Generated { get; set; }The biome's generated values, seeded from the sphere's seed and the biome's hash.
Vector3 Origin { get; }Centre of the sphere.
float Radius { get; }Radius of the sphere.
int Seed { get; }The sphere's random seed.
float Strength { get; }How strongly the biome applies.

Methods​

MemberWhat it is
void Serialize(Stream stream)Reads or writes seed, origin, radius, strength and biome.

Used in​

Members of other types that take, return or hold a BiomeSphere: