Class HeightMap<TPoint>
- Namespace
- Gamelogic.Grids.GoldenSkull
- Assembly
- Assembly-CSharp.dll
The base class of grid behaviours that uses a heightmap to select sprites and stack heights.
[ExecuteInEditMode]
public class HeightMap<TPoint> : GridBehaviour<TPoint> where TPoint : IGridPoint<TPoint>
Type Parameters
TPoint
The type of the point.
- Inheritance
-
GridBehaviour<TPoint>HeightMap<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
firstLevelHeightOffset
public float firstLevelHeightOffset
Field Value
flatFirstLevel
public bool flatFirstLevel
Field Value
frequency
The frequency to sample the image at.
public float frequency
Field Value
heightMap
The height map to use to select sprites. This greyscale value of the color is used. This image should be tileable, it should be set to enable reading / writing, and its wrap mode should be set to repeat.
public Texture2D heightMap
Field Value
heightScale
The height scale to use for offsets.
public float heightScale
Field Value
maxStackHeight
The maximum height
public int maxStackHeight
Field Value
sprites
The sprites that this behaviour selects from for the grid from highest to lowest.
public Sprite[] sprites
Field Value
- Sprite[]
Methods
GetImageMap()
Gets a 2D map that converts grid points to image points.
protected virtual IMap<TPoint> GetImageMap()
Returns
- IMap<TPoint>
Init()
public void Init()