Class ChunkMesh
Contains all data that is required to render a single Tycoon Tile map chunk.
Assembly: TycoonTerrainAssembly.dll
Syntax
public class ChunkMesh : IMesh
Constructors
ChunkMesh(int2)
Declaration
public ChunkMesh(int2 position)
Parameters
Type |
Name |
Description |
Unity.Mathematics.int2 |
position |
|
Fields
CliffMesh
Declaration
Field Value
Type |
Description |
UnityEngine.Mesh |
|
SurfaceMesh
Declaration
Field Value
Type |
Description |
UnityEngine.Mesh |
|
WaterCliffMesh
Declaration
public Mesh WaterCliffMesh
Field Value
Type |
Description |
UnityEngine.Mesh |
|
WaterMesh
Declaration
Field Value
Type |
Description |
UnityEngine.Mesh |
|
Methods
GetCliffMaterial(Int32)
Gets the cliff material for a given tile type identifier.
Declaration
public Material GetCliffMaterial(int id)
Parameters
Type |
Name |
Description |
Int32 |
id |
The tile type identifier.
|
Returns
Type |
Description |
UnityEngine.Material |
|
GetSurfaceMaterial(Int32)
Gets the surface material for a given tile type identifier.
Declaration
public Material GetSurfaceMaterial(int id)
Parameters
Type |
Name |
Description |
Int32 |
id |
The tile type identifier.
|
Returns
Type |
Description |
UnityEngine.Material |
|
SetTerrainTypeMapping(TerrainTypeCollectionAsset, Dictionary<TileType, Int32>, Dictionary<TileType, Int32>)
Sets the terrain type mapping.
Declaration
public void SetTerrainTypeMapping(TerrainTypeCollectionAsset terrainTypeCollection, Dictionary<TileType, int> surfaceMapping, Dictionary<TileType, int> cliffMapping)
Parameters
Explicit Interface Implementations
IMesh.Render(Matrix4x4, TerrainTypeCollectionAsset, Int32, ShadowCastingMode, Boolean)
Declaration
void IMesh.Render(Matrix4x4 matrix, TerrainTypeCollectionAsset TerrainTypes, int layer, ShadowCastingMode shadowCastingMode, bool receiveShadows)
Parameters
Implements
See Also