Class TileGridBuilder<TPoint>
Base class for tile grid builders where all the tiles are the same.
[Version(1, 8, 0)]
public abstract class TileGridBuilder<TPoint> : GridBuilder<TPoint>, ITileGrid<TPoint>, IGridBuilderBase, IGLScriptableObject where TPoint : IGridPoint<TPoint>
Type Parameters
TPoint
The type of point of the grid that this builder is building.
- Inheritance
-
GridBuilder<TPoint>TileGridBuilder<TPoint>
- Implements
-
ITileGrid<TPoint>
- Derived
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.runInEditModeComponent.GetComponent<T>()Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentsInParent<T>()Component.transformComponent.gameObjectComponent.tagObject.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.nameObject.hideFlags
- Extension Methods
Fields
alignment
[SerializeField]
[Tooltip("How the anchor of the grid lies relative to the grid.")]
protected MapAlignment alignment
Field Value
cellPrefab
[SerializeField]
[Tooltip("The object that will be used to display each cell.")]
protected TileCell cellPrefab
Field Value
cellSpacingFactor
[SerializeField]
[Tooltip("A factor that controls the spacing between cells.")]
protected Vector2 cellSpacingFactor
Field Value
colorFunction
[SerializeField]
[Tooltip("The color function to use to color cells.")]
protected ColorFunction colorFunction
Field Value
colors
[SerializeField]
[Tooltip("The colors to use to color cells.")]
[ContextMenuItem("Reset", "ResetColors")]
protected Color[] colors
Field Value
- Color[]
dimensions
[SerializeField]
[Tooltip("The width and height of your shape (in cells).")]
protected InspectableVectorPoint dimensions
Field Value
plane
[SerializeField]
[Tooltip("The 2D plane in which your grid will lie.")]
protected MapPlane plane
Field Value
size
[SerializeField]
[Tooltip("The size of your shape (in cells).")]
protected int size
Field Value
useColor
[SerializeField]
[Tooltip("Whether to set cells colors")]
protected bool useColor
Field Value
Properties
Alignment
public MapAlignment Alignment { get; set; }
Property Value
CellPrefab
Returns the cell prefab this builder uses to build the grid.
public TileCell CellPrefab { get; set; }
Property Value
CellSpacingFactor
public Vector2 CellSpacingFactor { get; set; }
Property Value
ColorFunction
public ColorFunction ColorFunction { get; set; }
Property Value
Colors
public Color[] Colors { get; set; }
Property Value
- Color[]
Dimensions
Returns the dimensions for this grid if it makes sense for the current shape. (The dimension field is hidden in the inspector if it does not make sense).
public VectorPoint Dimensions { get; set; }
Property Value
Grid
Returns the grid built with this builder.
public IGrid<TileCell, TPoint> Grid { get; protected set; }
Property Value
Map
Returns the map this builder used to built the grid.
public IMap3D<TPoint> Map { get; protected set; }
Property Value
- IMap3D<TPoint>
Plane
public MapPlane Plane { get; set; }
Property Value
Size
Returns the size for this grid if it makes sense for the current shape. (The dimension field is hidden in the inspector if it does not make sense).
public int Size { get; set; }
Property Value
UseColor
public bool UseColor { get; set; }
Property Value
Methods
CreateWindowedMap()
protected abstract WindowedMap<TPoint> CreateWindowedMap()
Returns
- WindowedMap<TPoint>
GetColorFunc(int, int, int)
protected abstract Func<TPoint, int> GetColorFunc(int x0, int x1, int y1)
Parameters
Returns
GetCustomGrid()
protected IGrid<TileCell, TPoint> GetCustomGrid()
Returns
InitGrid()
protected abstract void InitGrid()
Start()
public void Start()
__UpdatePresentation(bool)
public void __UpdatePresentation(bool forceUpdate)
Parameters
forceUpdate
bool