Corgi Engine v9.3
MoreMountains.CorgiEngine.AIActionClimbLadder Class Reference

This Action will let the AI agent you put it on climb ladders, up, down, or in any direction More...

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

Public Types

enum  Modes { ClimbUp , ClimbDown , ClimbAny , None }
 
- Public Types inherited from MoreMountains.Tools.AIAction
enum  InitializationModes { EveryTime , OnlyOnce }
 

Public Member Functions

override void Initialization ()
 On init we grab all the components we'll need More...
 
override void PerformAction ()
 On PerformAction we try climbing a ladder if possible More...
 
override void OnExitState ()
 When exiting the state we reset our ladder input 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

Modes Mode = Modes.ClimbAny
 whether the AI should climb up, down, or any direction on ladders it encounters More...
 
float CooldownBetweenClimbsDuration = 1f
 a duration, in seconds, during which the agent can't change input duration after having climbed a ladder More...
 
- Public Attributes inherited from MoreMountains.Tools.AIAction
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...
 

Protected Member Functions

virtual void ClimbLadder ()
 This method changes ladder input based on our settings and ladder position More...
 
virtual void StoreLastFrame ()
 We store our ladder and climbing state More...
 
virtual void OnRevive ()
 When reviving we reset our ladder input More...
 
virtual void ResetLadderInput ()
 
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
 
Health _health
 
CharacterHorizontalMovement _characterHorizontalMovement
 
CharacterLadder _characterLadder
 
Vector2 _ladderInput
 
bool _climbingLastFrame
 
Ladder _ladderLastFrame
 
float _yInputLastFrame
 
float _timeSinceLastClimb
 
- Protected Attributes inherited from MoreMountains.Tools.AIAction
bool _initialized
 
AIBrain _brain
 

Static Protected Attributes

const float _threshold = 0.5f
 

Additional Inherited Members

- Properties inherited from MoreMountains.Tools.AIAction
virtual bool ActionInProgress [getset]
 
virtual bool ShouldInitialize [get]
 

Detailed Description

This Action will let the AI agent you put it on climb ladders, up, down, or in any direction

Member Enumeration Documentation

◆ Modes

Enumerator
ClimbUp 
ClimbDown 
ClimbAny 
None 

Member Function Documentation

◆ ClimbLadder()

virtual void MoreMountains.CorgiEngine.AIActionClimbLadder.ClimbLadder ( )
protectedvirtual

This method changes ladder input based on our settings and ladder position

◆ Initialization()

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

On init we grab all the components we'll need

Reimplemented from MoreMountains.Tools.AIAction.

◆ OnDisable()

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

On disable we stop listening for OnRevive events

◆ OnEnable()

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

On enable we start listening for OnRevive events

◆ OnExitState()

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

When exiting the state we reset our ladder input

Reimplemented from MoreMountains.Tools.AIAction.

◆ OnRevive()

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

When reviving we reset our ladder input

◆ PerformAction()

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

On PerformAction we try climbing a ladder if possible

Implements MoreMountains.Tools.AIAction.

◆ ResetLadderInput()

virtual void MoreMountains.CorgiEngine.AIActionClimbLadder.ResetLadderInput ( )
protectedvirtual

◆ StoreLastFrame()

virtual void MoreMountains.CorgiEngine.AIActionClimbLadder.StoreLastFrame ( )
protectedvirtual

We store our ladder and climbing state

Member Data Documentation

◆ _character

Character MoreMountains.CorgiEngine.AIActionClimbLadder._character
protected

◆ _characterHorizontalMovement

CharacterHorizontalMovement MoreMountains.CorgiEngine.AIActionClimbLadder._characterHorizontalMovement
protected

◆ _characterLadder

CharacterLadder MoreMountains.CorgiEngine.AIActionClimbLadder._characterLadder
protected

◆ _climbingLastFrame

bool MoreMountains.CorgiEngine.AIActionClimbLadder._climbingLastFrame
protected

◆ _controller

CorgiController MoreMountains.CorgiEngine.AIActionClimbLadder._controller
protected

◆ _health

Health MoreMountains.CorgiEngine.AIActionClimbLadder._health
protected

◆ _ladderInput

Vector2 MoreMountains.CorgiEngine.AIActionClimbLadder._ladderInput
protected

◆ _ladderLastFrame

Ladder MoreMountains.CorgiEngine.AIActionClimbLadder._ladderLastFrame
protected

◆ _threshold

const float MoreMountains.CorgiEngine.AIActionClimbLadder._threshold = 0.5f
staticprotected

◆ _timeSinceLastClimb

float MoreMountains.CorgiEngine.AIActionClimbLadder._timeSinceLastClimb
protected

◆ _yInputLastFrame

float MoreMountains.CorgiEngine.AIActionClimbLadder._yInputLastFrame
protected

◆ CooldownBetweenClimbsDuration

float MoreMountains.CorgiEngine.AIActionClimbLadder.CooldownBetweenClimbsDuration = 1f

a duration, in seconds, during which the agent can't change input duration after having climbed a ladder

◆ Mode

Modes MoreMountains.CorgiEngine.AIActionClimbLadder.Mode = Modes.ClimbAny

whether the AI should climb up, down, or any direction on ladders it encounters


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