Table of Contents

Class TileGridBuilder<TPoint>

Namespace
Gamelogic.Grids
Assembly
Assembly-CSharp.dll

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.runInEditMode
Component.GetComponent<T>()
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentsInParent<T>()
Component.transform
Component.gameObject
Component.tag
Object.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.name
Object.hideFlags
Extension Methods

Fields

alignment

[SerializeField]
[Tooltip("How the anchor of the grid lies relative to the grid.")]
protected MapAlignment alignment

Field Value

MapAlignment

cellPrefab

[SerializeField]
[Tooltip("The object that will be used to display each cell.")]
protected TileCell cellPrefab

Field Value

TileCell

cellSpacingFactor

[SerializeField]
[Tooltip("A factor that controls the spacing between cells.")]
protected Vector2 cellSpacingFactor

Field Value

Vector2

colorFunction

[SerializeField]
[Tooltip("The color function to use to color cells.")]
protected ColorFunction colorFunction

Field Value

ColorFunction

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

InspectableVectorPoint

plane

[SerializeField]
[Tooltip("The 2D plane in which your grid will lie.")]
protected MapPlane plane

Field Value

MapPlane

size

[SerializeField]
[Tooltip("The size of your shape (in cells).")]
protected int size

Field Value

int

useColor

[SerializeField]
[Tooltip("Whether to set cells colors")]
protected bool useColor

Field Value

bool

Properties

Alignment

public MapAlignment Alignment { get; set; }

Property Value

MapAlignment

CellPrefab

Returns the cell prefab this builder uses to build the grid.

public TileCell CellPrefab { get; set; }

Property Value

TileCell

CellSpacingFactor

public Vector2 CellSpacingFactor { get; set; }

Property Value

Vector2

ColorFunction

public ColorFunction ColorFunction { get; set; }

Property Value

ColorFunction

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

VectorPoint

Grid

Returns the grid built with this builder.

public IGrid<TileCell, TPoint> Grid { get; protected set; }

Property Value

IGrid<TileCell, TPoint>

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

MapPlane

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

int

UseColor

public bool UseColor { get; set; }

Property Value

bool

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

x0 int
x1 int
y1 int

Returns

Func<TPoint, int>

GetCustomGrid()

protected IGrid<TileCell, TPoint> GetCustomGrid()

Returns

IGrid<TileCell, TPoint>

InitGrid()

protected abstract void InitGrid()

Start()

public void Start()

__UpdatePresentation(bool)

public void __UpdatePresentation(bool forceUpdate)

Parameters

forceUpdate bool