Class TesseraTileBase
Inheritance
TesseraTileBase
Assembly: cs.temp.dll.dll
Syntax
public abstract class TesseraTileBase : MonoBehaviour
Fields
center
Where the center of tile is.
For big tiles that occupy more than one cell, it's the center of the cell with offset (0, 0, 0). Thie tile may not actually occupy that cell!
Declaration
Field Value
faceDetails
A list of outward facing faces.
For a normal cube tile, there are 6 faces. Each face contains adjacency information that indicates what other tiles can connect to it.
It is recommended you only edit this via the Unity Editor, or Get(Vector3Int, CellFaceDir) and AddOffset(Vector3Int)
Declaration
public List<OrientedFace> faceDetails
Field Value
instantiateChildrenOnly
If set, when being instantiated by a Generator, only children will get constructed.
If there are no children, then this effectively disables the tile from instantiation.
Declaration
public bool instantiateChildrenOnly
Field Value
offsets
A list of cells that this tile occupies.
For a normal cube tile, this just contains Vector3Int.zero, but it will be more for "big" tiles.
It is recommended you only edit this via the Unity Editor, or AddOffset(Vector3Int) and RemoveOffset(Vector3Int)
Declaration
public List<Vector3Int> offsets
Field Value
Type |
Description |
List<Vector3Int> |
|
palette
Set this to control the colors and names used for painting on the tile.
Defaults to defaultPalette.
Declaration
public TesseraPalette palette
Field Value
reflectable
If true, when generating, reflections in the x-axis will be used.
Declaration
Field Value
rotatable
If true, when generating, rotations of the tile will be used.
Declaration
Field Value
rotationGroupType
If rotatable is on, specifies what sorts of rotations are used.
Declaration
public RotationGroupType rotationGroupType
Field Value
tileSize
The size of one cell in the tile.
NB: This field is only used in the Editor - you must set tileSize to match.
Declaration
Field Value
Properties
CellType
Declaration
public abstract ICellType CellType { get; }
Property Value
Methods
AddOffset(Vector3Int)
Configures the tile as a "big" tile that occupies several cells.
Keeps offsets and faceDetails in sync.
Declaration
public abstract void AddOffset(Vector3Int o)
Parameters
Type |
Name |
Description |
Vector3Int |
o |
|
Get(Vector3Int, CellFaceDir)
Finds the face details for a cell with a given offeset.
Declaration
public FaceDetails Get(Vector3Int offset, CellFaceDir faceDir)
Parameters
Type |
Name |
Description |
Vector3Int |
offset |
|
CellFaceDir |
faceDir |
|
Returns
RemoveOffset(Vector3Int)
Configures the tile as a "big" tile that occupies several cells.
Keeps offsets and faceDetails in sync.
Declaration
public abstract void RemoveOffset(Vector3Int o)
Parameters
Type |
Name |
Description |
Vector3Int |
o |
|
TryGet(Vector3Int, CellFaceDir, out FaceDetails)
Finds the face details for a cell with a given offeset.
Declaration
public bool TryGet(Vector3Int offset, CellFaceDir faceDir, out FaceDetails details)
Parameters
Returns