Class FieldOfViewBehaviour
public class FieldOfViewBehaviour : GridBehaviour<PointyHexPoint>
- Inheritance
-
FieldOfViewBehaviour
- 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
angleInDegrees
public float angleInDegrees
Field Value
centerColor
public Color centerColor
Field Value
invisibleColor
public Color invisibleColor
Field Value
lookAtColor
public Color lookAtColor
Field Value
maxDistance
public float maxDistance
Field Value
obstacleColor
public Color obstacleColor
Field Value
visibilityGradient
public Gradient visibilityGradient
Field Value
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
PointyHexPointlookAt
PointyHexPointangleInDegrees
floatup
Vector3
Returns
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
Vector3halfplaneDirection1
Vector3halfplanePoint2
Vector3halfplaneDirection2
Vector3point
Vector3
Returns
IsInHalfplane(Vector3, Vector3, Vector3)
public static bool IsInHalfplane(Vector3 halfplanePoint, Vector3 halfplaneDirection, Vector3 point)
Parameters
Returns
OnLeftClick(PointyHexPoint)
public void OnLeftClick(PointyHexPoint clickedPoint)
Parameters
clickedPoint
PointyHexPoint
OnRightClick(PointyHexPoint)
public void OnRightClick(PointyHexPoint clickedPoint)
Parameters
clickedPoint
PointyHexPoint
UpdateViewCone()
public void UpdateViewCone()