RuleBase
An abstract class in Root.Township, Alta.PAGaC.
Base asset for a PAGaC (procedural generation) rule: a 3D grid of tag lists, with one grid per configuration (probably rotations or variants).
- Listed in World generation
- Inherits or implements
GeneralValue - Derived types
GenerationRule,Rule - Attributes
DefaultMember
Constructors
| Member | What it is |
|---|---|
protected RuleBase() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
| Member | What it is |
|---|---|
protected int configurations | Number of tag configurations the rule has. Each is a full grid of tag lists. |
protected int[] serializedTagCounts | How many tags each cell has in serializedTags, probably. |
protected Tag[] serializedTags | Flat list of tags as stored in the asset, probably unpacked into tags on load. |
protected int sizeX | Width of the rule's grid in cells. |
protected int sizeY | Height of the rule's grid in cells. |
protected int sizeZ | Depth of the rule's grid in cells. |
protected List<Tag>[,,,] tags | The 4D grid of tag lists, indexed by configuration, x, y, z. Rebuilt from the serialized arrays on load. |
Properties
| Member | What it is |
|---|---|
int Configurations { get; } | Number of configurations the rule has, each with its own tag grid. |
List<Tag> this[int configuration, int x, int y, int z] { get; } | Indexer: the tag list at a configuration and cell. |
int SizeX { get; } | Width of the rule's grid in cells. |
int SizeY { get; } | Height of the rule's grid in cells. |
int SizeZ { get; } | Depth of the rule's grid in cells. |
List<Tag>[,,,] Tags { get; } | The tag lists, indexed by configuration, x, y and z. |
Used in
Members of other types that take, return or hold a RuleBase: