Class NavObject
A NavObject, situated within a grid-based game environment, exhibits diverse behaviors and interactions, ranging from controllable characters to collectibles and automated enemies
Inherited Members
Namespace: Axis.Navigation
Assembly: cs.temp.dll.dll
Syntax
public sealed class NavObject : AxisGameObject
Fields
AllObjects
Publis static list of all objects available in the scene
Declaration
public static List<NavObject> AllObjects
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<T><NavObject> |
Bounciness
Declaration
public float Bounciness
Field Value
Type | Description |
---|---|
float |
DrawGizmos
Wether to render gizmos in editor
Declaration
public bool DrawGizmos
Field Value
Type | Description |
---|---|
bool |
floatDistance
Distance to float up in Y axis from reference position
Declaration
public float floatDistance
Field Value
Type | Description |
---|---|
float |
LogUpdateTime
Declaration
public bool LogUpdateTime
Field Value
Type | Description |
---|---|
bool |
OnCollider
Declaration
public NavObjectColliderEvents OnCollider
Field Value
Type | Description |
---|---|
NavObjectColliderEvents |
OnDisabled
Object containing events this NavObject will dispatch on disabling process
Declaration
public DisableEvents OnDisabled
Field Value
Type | Description |
---|---|
DisableEvents |
OnEnabled
Object containing events this NavObject will dispatch on enabling process
Declaration
public EnableEvents OnEnabled
Field Value
Type | Description |
---|---|
EnableEvents |
OnLink
Object containing events this NavObject will dispatch when interacting with links
Declaration
public LinkEvents OnLink
Field Value
Type | Description |
---|---|
LinkEvents |
OnNavmesh
Object containing events this NavObject will dispatch when interacting with navmeshmatrix
Declaration
public NavmeshEvents OnNavmesh
Field Value
Type | Description |
---|---|
NavmeshEvents |
OnZone
Object containing events this NavObject will dispatch when interacting with navzones
Declaration
public ZoneEvents OnZone
Field Value
Type | Description |
---|---|
ZoneEvents |
PileUp
Declaration
public PileOption PileUp
Field Value
Type | Description |
---|---|
PileOption |
RampNormal
Wether to rotate this object by ramp tiles
Declaration
public bool RampNormal
Field Value
Type | Description |
---|---|
bool |
SnapToFloor
Wether to snap this object to the current tile floor when enabled
Declaration
public bool SnapToFloor
Field Value
Type | Description |
---|---|
bool |
SnapToGrid
Wether to snap this object to the current tile horizontal position when enabled
Declaration
public bool SnapToGrid
Field Value
Type | Description |
---|---|
bool |
Properties
CurrentMatrix
Current matrix this NavObject is inside
Declaration
public NavmeshMatrix CurrentMatrix { get; set; }
Property Value
Type | Description |
---|---|
NavmeshMatrix |
CurrentState
This NavObject state
Declaration
public MovementState CurrentState { get; set; }
Property Value
Type | Description |
---|---|
MovementState |
FloatDistance
If this NavObject is floating, this property returns the float distance offset
Declaration
public float FloatDistance { get; }
Property Value
Type | Description |
---|---|
float |
ForceRenderingOff
Wether this renderer and children renderers are off
Declaration
public bool ForceRenderingOff { get; set; }
Property Value
Type | Description |
---|---|
bool |
GroundDistance
Distance in Y axis from the current tile height
Declaration
public float GroundDistance { get; }
Property Value
Type | Description |
---|---|
float |
GroundY
Declaration
public float GroundY { get; }
Property Value
Type | Description |
---|---|
float |
HasTileChanged
Declaration
public bool HasTileChanged { get; }
Property Value
Type | Description |
---|---|
bool |
IsNested
Wether this NavObject is disabled inside another NavObject
Declaration
public bool IsNested { get; set; }
Property Value
Type | Description |
---|---|
bool |
Position
Current reference position of this NavObject
Declaration
public Vector3 Position { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
PulseScaleStrength
Strength of pulsating animation
Declaration
public float PulseScaleStrength { get; set; }
Property Value
Type | Description |
---|---|
float |
SelfSpinSpeed
Spinning animation speed in each axis
Declaration
public Vector3 SelfSpinSpeed { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
WalkableThrough
Declaration
public bool WalkableThrough { get; }
Property Value
Type | Description |
---|---|
bool |
WaveHorizontalStrength
Strength of the horizontal wave animation
Declaration
public float WaveHorizontalStrength { get; set; }
Property Value
Type | Description |
---|---|
float |
WaveVerticalStrength
Strength of the vertical wave animation
Declaration
public float WaveVerticalStrength { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
CorrectMeshScale()
Declaration
public void CorrectMeshScale()
EnterLink()
If current tile has a NavLink execute entering
Declaration
public void EnterLink()
FixToFloor()
Declaration
public void FixToFloor()
HitFeedback(Vector3)
Animate hit impact feedback in the given direction
Declaration
public void HitFeedback(Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | direction | Impact direction |
HitFeedbackFrom(Transform)
Animate hit impact feedback from direction of a transform source
Declaration
public void HitFeedbackFrom(Transform source)
Parameters
Type | Name | Description |
---|---|---|
Transform | source | Impact source Transform |
HitFeedbackTo(Transform)
Animate hit impact feedback in the direction of a transform target
Declaration
public void HitFeedbackTo(Transform source)
Parameters
Type | Name | Description |
---|---|---|
Transform | source | Impact target Transform |
LookAt(Vector2)
Immediate set look direction
Declaration
public void LookAt(Vector2 direction)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | direction | New look direction |
LookTurn(float)
Rotate this NavObject Z axis towards specified angle
Declaration
public void LookTurn(float angle)
Parameters
Type | Name | Description |
---|---|---|
float | angle | Target angle to reach |
LookTurn(Vector2, float)
Rotate this NavObject Z axis to look in specified direction
Declaration
public void LookTurn(Vector2 direction, float max = 180)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | direction | Direction to reach |
float | max | Max angle to move towards |
LookTurnBackward()
Immediate set look direction to absolute world backward
Declaration
public void LookTurnBackward()
LookTurnForward()
Immediate set look direction to absolute world forward
Declaration
public void LookTurnForward()
LookTurnLeft()
Immediate set look direction to absolute world left
Declaration
public void LookTurnLeft()
LookTurnRight()
Immediate set look direction to absolute world right
Declaration
public void LookTurnRight()
LookTurnTo(Vector3, float)
Rotate this NavObject Z axis to look at specified world position
Declaration
public void LookTurnTo(Vector3 position, float max = 180)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | Position to look at |
float | max | Max angle to move towards |
ObjectStickTo(NavObject, Vector3)
Stick this NavObject to another with an offset
Declaration
public void ObjectStickTo(NavObject other, Vector3 offset)
Parameters
Type | Name | Description |
---|---|---|
NavObject | other | The other NavObject to stick to |
Vector3 | offset | The offset position |
OnTransformChildrenChanged()
Declaration
protected override void OnTransformChildrenChanged()
Overrides
ResetRotation()
Declaration
public void ResetRotation()
SnapHorizontally()
Declaration
public void SnapHorizontally()
StopMovement()
Declaration
public void StopMovement()
Teleport(NavLink, NavLink)
Execute teleport from first NavLink to another NavLink
Declaration
public IEnumerator Teleport(NavLink from, NavLink to)
Parameters
Type | Name | Description |
---|---|---|
NavLink | from | NavLink to teleport from |
NavLink | to | NavLink to teleport to |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Teleport(Vector3, NavLink)
Execute teleport from current position to nearest tile of another position
Declaration
public IEnumerator Teleport(Vector3 position, NavLink config = null)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | Destiny position |
NavLink | config | One NavLink to use as animation source |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Teleport(Vector3)
Execute teleport from current position to the nearest tile available of another position.
Declaration
public void Teleport(Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | Next position |