Corgi Engine  v8.8
MoreMountains.CorgiEngine.AIActionFlyPatrol Class Reference

This Action will make the Character fly until it hits a wall or a hole while following a path. More...

Inheritance diagram for MoreMountains.CorgiEngine.AIActionFlyPatrol:
MoreMountains.Tools.AIAction

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...
 
- Public Member Functions inherited from MoreMountains.Tools.AIAction
virtual void OnEnterState ()
 Describes what happens when the brain enters the state this action is in. Meant to be overridden. More...
 

Public Attributes

bool ChangeDirectionOnObstacle = true
 if set to true, the agent will change direction when hitting an obstacle More...
 
bool ResetPositionOnDeath = true
 if this is true, the character will automatically return to its initial position on revive More...
 
- Public Attributes inherited from MoreMountains.Tools.AIAction
InitializationModes InitializationMode
 
string Label
 a label you can set to organize your AI Actions, not used by anything else More...
 

Protected Member Functions

virtual void FlyPatrol ()
 This method initiates all the required checks and moves the character More...
 
virtual void OnDrawGizmosSelected ()
 Draws bounds gizmos More...
 
virtual void CheckForObstacles ()
 Checks for a wall and changes direction if it meets one 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...
 
- Protected Member Functions inherited from MoreMountains.Tools.AIAction
virtual void Awake ()
 On Awake we grab our AIBrain More...
 

Protected Attributes

CorgiController _controller
 
Character _character
 
CharacterFly _characterFly
 
Health _health
 
Vector2 _direction
 
Vector2 _startPosition
 
Vector2 _initialDirection
 
Vector3 _initialScale
 
float _distanceToTarget
 
Vector3 _initialPosition
 
MMPath _mmPath
 
Vector3 _mmPathPointLastFrame
 
int _mmPathIndexLastFrame
 
float _waitDelay = 0f
 
- Protected Attributes inherited from MoreMountains.Tools.AIAction
bool _initialized
 
AIBrain _brain
 

Additional Inherited Members

- Public Types inherited from MoreMountains.Tools.AIAction
enum  InitializationModes { InitializationModes.EveryTime, InitializationModes.OnlyOnce }
 
- Properties inherited from MoreMountains.Tools.AIAction
virtual bool ActionInProgress [get, set]
 
virtual bool ShouldInitialize [get]
 

Detailed Description

This Action will make the Character fly until it hits a wall or a hole while following a path.

Member Function Documentation

◆ ChangeDirection()

virtual void MoreMountains.CorgiEngine.AIActionFlyPatrol.ChangeDirection ( )
protectedvirtual

Changes the current movement direction

◆ CheckForObstacles()

virtual void MoreMountains.CorgiEngine.AIActionFlyPatrol.CheckForObstacles ( )
protectedvirtual

Checks for a wall and changes direction if it meets one

◆ FlyPatrol()

virtual void MoreMountains.CorgiEngine.AIActionFlyPatrol.FlyPatrol ( )
protectedvirtual

This method initiates all the required checks and moves the character

◆ Initialization()

override void MoreMountains.CorgiEngine.AIActionFlyPatrol.Initialization ( )
virtual

On init we grab all the components we'll need

Reimplemented from MoreMountains.Tools.AIAction.

◆ OnDisable()

virtual void MoreMountains.CorgiEngine.AIActionFlyPatrol.OnDisable ( )
protectedvirtual

On disable we stop listening for OnRevive events

◆ OnDrawGizmosSelected()

virtual void MoreMountains.CorgiEngine.AIActionFlyPatrol.OnDrawGizmosSelected ( )
protectedvirtual

Draws bounds gizmos

◆ OnEnable()

virtual void MoreMountains.CorgiEngine.AIActionFlyPatrol.OnEnable ( )
protectedvirtual

On enable we start listening for OnRevive events

◆ OnExitState()

override void MoreMountains.CorgiEngine.AIActionFlyPatrol.OnExitState ( )
virtual

When exiting the state we reset our movement

Reimplemented from MoreMountains.Tools.AIAction.

◆ OnRevive()

virtual void MoreMountains.CorgiEngine.AIActionFlyPatrol.OnRevive ( )
protectedvirtual

When reviving we make sure our directions are properly setup

◆ PerformAction()

override void MoreMountains.CorgiEngine.AIActionFlyPatrol.PerformAction ( )
virtual

On PerformAction we patrol

Implements MoreMountains.Tools.AIAction.

Member Data Documentation

◆ _character

Character MoreMountains.CorgiEngine.AIActionFlyPatrol._character
protected

◆ _characterFly

CharacterFly MoreMountains.CorgiEngine.AIActionFlyPatrol._characterFly
protected

◆ _controller

CorgiController MoreMountains.CorgiEngine.AIActionFlyPatrol._controller
protected

◆ _direction

Vector2 MoreMountains.CorgiEngine.AIActionFlyPatrol._direction
protected

◆ _distanceToTarget

float MoreMountains.CorgiEngine.AIActionFlyPatrol._distanceToTarget
protected

◆ _health

Health MoreMountains.CorgiEngine.AIActionFlyPatrol._health
protected

◆ _initialDirection

Vector2 MoreMountains.CorgiEngine.AIActionFlyPatrol._initialDirection
protected

◆ _initialPosition

Vector3 MoreMountains.CorgiEngine.AIActionFlyPatrol._initialPosition
protected

◆ _initialScale

Vector3 MoreMountains.CorgiEngine.AIActionFlyPatrol._initialScale
protected

◆ _mmPath

MMPath MoreMountains.CorgiEngine.AIActionFlyPatrol._mmPath
protected

◆ _mmPathIndexLastFrame

int MoreMountains.CorgiEngine.AIActionFlyPatrol._mmPathIndexLastFrame
protected

◆ _mmPathPointLastFrame

Vector3 MoreMountains.CorgiEngine.AIActionFlyPatrol._mmPathPointLastFrame
protected

◆ _startPosition

Vector2 MoreMountains.CorgiEngine.AIActionFlyPatrol._startPosition
protected

◆ _waitDelay

float MoreMountains.CorgiEngine.AIActionFlyPatrol._waitDelay = 0f
protected

◆ ChangeDirectionOnObstacle

bool MoreMountains.CorgiEngine.AIActionFlyPatrol.ChangeDirectionOnObstacle = true

if set to true, the agent will change direction when hitting an obstacle

◆ ResetPositionOnDeath

bool MoreMountains.CorgiEngine.AIActionFlyPatrol.ResetPositionOnDeath = true

if this is true, the character will automatically return to its initial position on revive


The documentation for this class was generated from the following file: