![]() |
Corgi Engine v9.3
|
This Action will make the Character patrol while jumping until it (optionally) hits a wall or a hole. More...
Public Member Functions | |
override void | Initialization () |
On init we grab all the components we'll need More... | |
![]() | |
override void | PerformAction () |
On PerformAction we patrol More... | |
override void | OnExitState () |
When exiting the state we reset our movement More... | |
![]() | |
virtual void | OnEnterState () |
Describes what happens when the brain enters the state this action is in. Meant to be overridden. More... | |
Protected Member Functions | |
override void | Patrol () |
This method initiates all the required checks and moves the character More... | |
![]() | |
virtual void | CheckForWalls () |
Checks for a wall and changes direction if it meets one More... | |
bool | DetectObstaclesRegularLayermask () |
Returns true if an obstacle is colliding with this AI, using its controller layer masks More... | |
bool | DetectObstaclesCustomLayermask () |
Returns true if an obstacle is in front of the character, using a custom layer mask More... | |
virtual void | CheckForHoles () |
Checks for holes More... | |
virtual void | ChangeDirection () |
Changes the current movement direction More... | |
virtual void | OnRevive () |
When reviving we make sure our directions are properly setup More... | |
virtual void | OnEnable () |
On enable we start listening for OnRevive events More... | |
virtual void | OnDisable () |
On disable we stop listening for OnRevive events More... | |
![]() | |
virtual void | Awake () |
On Awake we grab our AIBrain More... | |
Protected Attributes | |
CharacterJump | _characterJump |
![]() | |
CorgiController | _controller |
Character | _character |
Health | _health |
CharacterHorizontalMovement | _characterHorizontalMovement |
Vector2 | _direction |
Vector2 | _startPosition |
Vector2 | _initialDirection |
Vector3 | _initialScale |
float | _distanceToTarget |
Vector2 | _raycastOrigin |
RaycastHit2D | _raycastHit2D |
Vector2 | _obstacleDirection |
![]() | |
bool | _initialized |
AIBrain | _brain |
Additional Inherited Members | |
![]() | |
enum | InitializationModes { EveryTime , OnlyOnce } |
![]() | |
bool | ChangeDirectionOnWall = true |
If set to true, the agent will change direction when hitting a wall. More... | |
bool | AvoidFalling = false |
If set to true, the agent will try and avoid falling. More... | |
Vector3 | HoleDetectionOffset = new Vector3(0, 0, 0) |
The offset the hole detection should take into account. More... | |
float | HoleDetectionRaycastLength = 1f |
the length of the ray cast to detect holes More... | |
bool | UseCustomLayermask = false |
Whether to use a custom layermask, or simply use the platform mask defined at the character level. More... | |
LayerMask | ObstaclesLayermask = LayerManager.ObstaclesLayerMask |
if using a custom layer mask, the list of layers considered as obstacles by this AI More... | |
float | ObstaclesDetectionRaycastLength = 0.5f |
the length of the horizontal raycast we should use to detect obstacles that may cause a direction change More... | |
Vector2 | ObstaclesDetectionRaycastOrigin = new Vector2(0.5f, 0f) |
the origin of the raycast (if casting against the same layer this object is on, the origin should be outside its collider, typically in front of it) More... | |
bool | ResetPositionOnDeath = true |
if this is true, the character will automatically return to its initial position on revive More... | |
![]() | |
InitializationModes | InitializationMode |
whether initialization should happen only once, or every time the brain is reset More... | |
string | Label |
a label you can set to organize your AI Actions, not used by anything else More... | |
![]() | |
virtual bool | ActionInProgress [getset] |
virtual bool | ShouldInitialize [get] |
This Action will make the Character patrol while jumping until it (optionally) hits a wall or a hole.
|
virtual |
On init we grab all the components we'll need
Reimplemented from MoreMountains.CorgiEngine.AIActionPatrol.
|
protectedvirtual |
This method initiates all the required checks and moves the character
Reimplemented from MoreMountains.CorgiEngine.AIActionPatrol.
|
protected |