Class Region¶
Represents a region
Namespace: VoxelTycoon
Constructors¶
Region(int, Xz, Xz, Xz, int, int)¶
Creates a new region.
Declaration
Type | Name | Description |
---|---|---|
int | id | Region's ID |
Xz | minIndex | Minimum index |
Xz | maxIndex | Maximum index |
Xz | center | Center of the region |
int | tier | Tier of the region |
int | subregionSize | Size of the region |
Region(StateBinaryReader)¶
Creates a new region from provided binary reader.
Declaration
Type | Name | Description |
---|---|---|
StateBinaryReader | reader | Reader with region values |
Properties¶
Area¶
Represents the region's area.
Declaration
Type | Description |
---|---|
HashSet<Xz> | List of Xzs included in the region |
Biome¶
Region's biome.
Declaration
Type | Description |
---|---|
Biome | Region's biome |
Center¶
Region's center.
Declaration
Type | Description |
---|---|
Xz | Coordinates(Xz) of the region's center |
Cities¶
Region's cities.
Declaration
Type | Description |
---|---|
ImmutableList<City> | List of the region's cities |
ColliderPath¶
Region's collider path.
Declaration
Type | Description |
---|---|
Vector2[] | List of 2D vectors representing the path |
Deposits¶
Region's deposits.
Declaration
Type | Description |
---|---|
ImmutableList<Deposit> | List of the region's deposits |
Id¶
Region's ID.
Declaration
Type | Description |
---|---|
int | Region's ID |
MaxIndex¶
Region's max index.
Declaration
Type | Description |
---|---|
Xz | Region's max index |
MinIndex¶
Region's min index.
Declaration
Type | Description |
---|---|
Xz | Region's min index |
Name¶
Region's name.
Declaration
Type | Description |
---|---|
string | Region's name |
Price¶
Region's price.
Declaration
Type | Description |
---|---|
double | Region's price |
State¶
Current state of the region.
Declaration
Type | Description |
---|---|
RegionState | Region's state |
Subregions¶
Sub regions of the region.
Declaration
Type | Description |
---|---|
List<Xz> | List of the sub regions |
Tier¶
Region's tier.
Declaration
Type | Description |
---|---|
int | Region's tier |
Methods¶
GetDistance(Xz)¶
Gets the distance beween ?.
Declaration
Parameters
Type | Name | Description |
---|---|---|
int | regionIndex | ? |
InvalidateBorderOpacity()¶
Invalidates the region's border opacity.
Declaration
InvalidateBorderVisibility()¶
Invalidates the region's border visibility.
Declaration
OnDrawGizmos()¶
Probably called when gizmos is drawn.
Declaration
RegisterDeposit(Deposit)¶
Registers a deposit in the region.
Declaration
Parameters
Type | Name | Description |
---|---|---|
Deposit | deposit | Deposit to register |
SetState(RegionState)¶
Sets the region's state.
Declaration
Parameters
Type | Name | Description |
---|---|---|
RegionState | state | Region state to be set on the region |
UnregisterDeposit(Deposit)¶
Unregisters a deposit in the region.
Declaration
Parameters
Type | Name | Description |
---|---|---|
Deposit | deposit | Deposit to unregister |
Write(StateBinaryWriter)¶
Probably writes the region's values.
Declaration
Type | Name | Description |
---|---|---|
StateBinaryWriter | writer | Writer with region values |