Table of Contents

Class FieldOfViewBehaviour

Namespace
Gamelogic.Grids.Examples
Assembly
Assembly-CSharp.dll
public class FieldOfViewBehaviour : GridBehaviour<PointyHexPoint>
Inheritance
FieldOfViewBehaviour
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

angleInDegrees

public float angleInDegrees

Field Value

float

centerColor

public Color centerColor

Field Value

Color

invisibleColor

public Color invisibleColor

Field Value

Color

lookAtColor

public Color lookAtColor

Field Value

Color

maxDistance

public float maxDistance

Field Value

float

obstacleColor

public Color obstacleColor

Field Value

Color

visibilityGradient

public Gradient visibilityGradient

Field Value

Gradient

Methods

GetViewCone(IGrid<TileCell, PointyHexPoint>, IMap3D<PointyHexPoint>, PointyHexPoint, PointyHexPoint, float, Vector3)

public static IEnumerable<PointyHexPoint> GetViewCone(IGrid<TileCell, PointyHexPoint> grid, IMap3D<PointyHexPoint> map, PointyHexPoint center, PointyHexPoint lookAt, float angleInDegrees, Vector3 up)

Parameters

grid IGrid<TileCell, PointyHexPoint>
map IMap3D<PointyHexPoint>
center PointyHexPoint
lookAt PointyHexPoint
angleInDegrees float
up Vector3

Returns

IEnumerable<PointyHexPoint>

InitGrid()

When this behaviour is attached to a grid builder, this method is called once the grid is created, and all cells(tiles) have been instantiated.

Override this to implement custom initialisation code. (You can access the grid through the Grid property).

public override void InitGrid()

IsInCone(Vector3, Vector3, Vector3, Vector3, Vector3)

public static bool IsInCone(Vector3 halfplanePoint1, Vector3 halfplaneDirection1, Vector3 halfplanePoint2, Vector3 halfplaneDirection2, Vector3 point)

Parameters

halfplanePoint1 Vector3
halfplaneDirection1 Vector3
halfplanePoint2 Vector3
halfplaneDirection2 Vector3
point Vector3

Returns

bool

IsInHalfplane(Vector3, Vector3, Vector3)

public static bool IsInHalfplane(Vector3 halfplanePoint, Vector3 halfplaneDirection, Vector3 point)

Parameters

halfplanePoint Vector3
halfplaneDirection Vector3
point Vector3

Returns

bool

OnLeftClick(PointyHexPoint)

public void OnLeftClick(PointyHexPoint clickedPoint)

Parameters

clickedPoint PointyHexPoint

OnRightClick(PointyHexPoint)

public void OnRightClick(PointyHexPoint clickedPoint)

Parameters

clickedPoint PointyHexPoint

UpdateViewCone()

public void UpdateViewCone()