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

A class meant to be overridden that handles a character's ability. More...

Inheritance diagram for MoreMountains.CorgiEngine.CharacterAbility:
MoreMountains.CorgiEngine.CorgiMonoBehaviour MoreMountains.CorgiEngine.CharacterAbilityNodeSwap MoreMountains.CorgiEngine.CharacterAutoMovement MoreMountains.CorgiEngine.CharacterBounce MoreMountains.CorgiEngine.CharacterButtonActivation MoreMountains.CorgiEngine.CharacterCrouch MoreMountains.CorgiEngine.CharacterCrushDetection MoreMountains.CorgiEngine.CharacterDangling MoreMountains.CorgiEngine.CharacterDash MoreMountains.CorgiEngine.CharacterDive MoreMountains.CorgiEngine.CharacterFallDamage MoreMountains.CorgiEngine.CharacterFly MoreMountains.CorgiEngine.CharacterFollowPath MoreMountains.CorgiEngine.CharacterGlide MoreMountains.CorgiEngine.CharacterGrabCarryAndThrow MoreMountains.CorgiEngine.CharacterGravity MoreMountains.CorgiEngine.CharacterGrip MoreMountains.CorgiEngine.CharacterGroundNormalGravity MoreMountains.CorgiEngine.CharacterHandleWeapon MoreMountains.CorgiEngine.CharacterHorizontalMovement MoreMountains.CorgiEngine.CharacterInventory MoreMountains.CorgiEngine.CharacterJetpack MoreMountains.CorgiEngine.CharacterJump MoreMountains.CorgiEngine.CharacterLadder MoreMountains.CorgiEngine.CharacterLedgeHang MoreMountains.CorgiEngine.CharacterLookUp MoreMountains.CorgiEngine.CharacterParticles MoreMountains.CorgiEngine.CharacterPause MoreMountains.CorgiEngine.CharacterPersistence MoreMountains.CorgiEngine.CharacterPush MoreMountains.CorgiEngine.CharacterPushCorgiController MoreMountains.CorgiEngine.CharacterRestartLevel MoreMountains.CorgiEngine.CharacterRoll MoreMountains.CorgiEngine.CharacterRun MoreMountains.CorgiEngine.CharacterSlopeOrientation MoreMountains.CorgiEngine.CharacterSpeed MoreMountains.CorgiEngine.CharacterSpeedAnalysis MoreMountains.CorgiEngine.CharacterStairs MoreMountains.CorgiEngine.CharacterStun MoreMountains.CorgiEngine.CharacterSurfaceFeedbacks MoreMountains.CorgiEngine.CharacterSwap MoreMountains.CorgiEngine.CharacterSwim MoreMountains.CorgiEngine.CharacterSwitchModel MoreMountains.CorgiEngine.CharacterTimeControl MoreMountains.CorgiEngine.CharacterWallClinging MoreMountains.CorgiEngine.CharacterWalljump MoreMountains.CorgiEngine.RetroCopter

Public Member Functions

virtual string HelpBoxText ()
 This method is only used to display a helpbox text at the beginning of the ability's inspector. More...
 
virtual void SetInputManager (InputManager inputManager)
 Sets a new input manager for this ability to get input from More...
 
virtual void BindAnimator ()
 Binds the animator from the character and initializes the animator parameters More...
 
virtual void ResetInput ()
 Resets all input for this ability. Can be overridden for ability specific directives More...
 
virtual void EarlyProcessAbility ()
 The first of the 3 passes you can have in your ability. Think of it as EarlyUpdate() if it existed More...
 
virtual void ProcessAbility ()
 The second of the 3 passes you can have in your ability. Think of it as Update() More...
 
virtual void LateProcessAbility ()
 The last of the 3 passes you can have in your ability. Think of it as LateUpdate() More...
 
virtual void UpdateAnimator ()
 Override this to send parameters to the character's animator. This is called once per cycle, by the Character class, after Early, normal and Late process(). More...
 
virtual void PermitAbility (bool abilityPermitted)
 Changes the status of the ability's permission More...
 
virtual void Flip ()
 Override this to specify what should happen in this ability when the character flips More...
 
virtual void ResetAbility ()
 Override this to reset this ability's parameters. It'll be automatically called when the character gets killed, in anticipation for its respawn. More...
 
virtual void PlayAbilityStartFeedbacks ()
 Plays the ability start sound effect More...
 
virtual void StopStartFeedbacks ()
 Stops the ability used sound effect More...
 
virtual void PlayAbilityStopFeedbacks ()
 Plays the ability stop sound effect More...
 
virtual void RegisterAnimatorParameter (string parameterName, AnimatorControllerParameterType parameterType, out int parameter)
 Registers a new animator parameter to the list More...
 

Public Attributes

MMFeedbacks AbilityStartFeedbacks
 the feedbacks to play when the ability starts More...
 
MMFeedbacks AbilityStopFeedbacks
 the feedbacks to play when the ability stops More...
 
bool AbilityPermitted = true
 if true, this ability can perform as usual, if not, it'll be ignored. You can use this to unlock abilities over time for example More...
 
CharacterStates.MovementStates[] BlockingMovementStates
 an array containing all the blocking movement states. If the Character is in one of these states and tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while Idle or Swimming, for example. More...
 
CharacterStates.CharacterConditions[] BlockingConditionStates
 an array containing all the blocking condition states. If the Character is in one of these states and tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while dead, for example. More...
 
Weapon.WeaponStates[] BlockingWeaponStates
 an array containing all the blocking weapon states. If one of the character's weapons is in one of these states and yet the character tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while attacking, for example. More...
 

Protected Member Functions

virtual void Start ()
 On Start(), we call the ability's intialization More...
 
virtual void Initialization ()
 Gets and stores components for further use More...
 
virtual void InitializeAnimatorParameters ()
 Adds required animator parameters to the animator parameters list if they exist More...
 
virtual void InternalHandleInput ()
 Internal method to check if an input manager is present or not More...
 
virtual void HandleInput ()
 Called at the very start of the ability's cycle, and intended to be overridden, looks for input and calls methods if conditions are met More...
 
virtual void OnRespawn ()
 Override this to describe what should happen to this ability when the character respawns More...
 
virtual void OnDeath ()
 Override this to describe what should happen to this ability when the character respawns More...
 
virtual void OnHit ()
 Override this to describe what should happen to this ability when the character takes a hit More...
 
virtual void OnEnable ()
 On enable, we bind our respawn delegate More...
 
virtual void OnDisable ()
 On disable, we unbind our respawn delegate More...
 

Protected Attributes

Character _character
 
Transform _characterTransform
 
Health _health
 
CharacterHorizontalMovement _characterHorizontalMovement
 
CorgiController _controller
 
InputManager _inputManager
 
CameraController _sceneCamera
 
Animator _animator
 
CharacterStates _state
 
SpriteRenderer _spriteRenderer
 
MMStateMachine< CharacterStates.MovementStates_movement
 
MMStateMachine< CharacterStates.CharacterConditions_condition
 
bool _abilityInitialized = false
 
CharacterGravity _characterGravity
 
float _verticalInput
 
float _horizontalInput
 
bool _startFeedbackIsPlaying = false
 
List< CharacterHandleWeapon_handleWeaponList
 

Properties

virtual bool AbilityAuthorized [get]
 
virtual bool AbilityInitialized [get]
 true if the ability has already been initialized More...
 

Detailed Description

A class meant to be overridden that handles a character's ability.

Member Function Documentation

◆ BindAnimator()

virtual void MoreMountains.CorgiEngine.CharacterAbility.BindAnimator ( )
virtual

Binds the animator from the character and initializes the animator parameters

◆ EarlyProcessAbility()

virtual void MoreMountains.CorgiEngine.CharacterAbility.EarlyProcessAbility ( )
virtual

The first of the 3 passes you can have in your ability. Think of it as EarlyUpdate() if it existed

◆ Flip()

virtual void MoreMountains.CorgiEngine.CharacterAbility.Flip ( )
virtual

Override this to specify what should happen in this ability when the character flips

Reimplemented in MoreMountains.CorgiEngine.CharacterHandleWeapon, MoreMountains.CorgiEngine.CharacterJetpack, and MoreMountains.CorgiEngine.CharacterSwitchModel.

◆ HandleInput()

virtual void MoreMountains.CorgiEngine.CharacterAbility.HandleInput ( )
protectedvirtual

◆ HelpBoxText()

virtual string MoreMountains.CorgiEngine.CharacterAbility.HelpBoxText ( )
virtual

This method is only used to display a helpbox text at the beginning of the ability's inspector.

Reimplemented in MoreMountains.CorgiEngine.CharacterSurfaceFeedbacks, MoreMountains.CorgiEngine.CharacterWalljump, MoreMountains.CorgiEngine.CharacterGrabCarryAndThrow, MoreMountains.CorgiEngine.CharacterGravity, MoreMountains.CorgiEngine.CharacterSpeedAnalysis, MoreMountains.CorgiEngine.CharacterButtonActivation, MoreMountains.CorgiEngine.CharacterCrushDetection, MoreMountains.CorgiEngine.CharacterJump, MoreMountains.CorgiEngine.CharacterFallDamage, MoreMountains.CorgiEngine.CharacterGroundNormalGravity, MoreMountains.CorgiEngine.CharacterHandleWeapon, MoreMountains.CorgiEngine.CharacterHorizontalMovement, MoreMountains.CorgiEngine.CharacterStairs, MoreMountains.CorgiEngine.CharacterSwim, MoreMountains.CorgiEngine.CharacterPause, MoreMountains.CorgiEngine.CharacterRun, MoreMountains.CorgiEngine.CharacterSlopeOrientation, MoreMountains.CorgiEngine.CharacterWallClinging, MoreMountains.CorgiEngine.CharacterCrouch, MoreMountains.CorgiEngine.CharacterDangling, MoreMountains.CorgiEngine.CharacterDash, MoreMountains.CorgiEngine.CharacterGlide, MoreMountains.CorgiEngine.CharacterGrip, MoreMountains.CorgiEngine.CharacterJetpack, MoreMountains.CorgiEngine.CharacterLookUp, MoreMountains.CorgiEngine.CharacterRestartLevel, MoreMountains.CorgiEngine.CharacterRoll, MoreMountains.CorgiEngine.CharacterStun, MoreMountains.CorgiEngine.CharacterSwap, MoreMountains.CorgiEngine.CharacterLedgeHang, MoreMountains.CorgiEngine.CharacterPush, MoreMountains.CorgiEngine.CharacterDive, MoreMountains.CorgiEngine.CharacterFly, and MoreMountains.CorgiEngine.CharacterPushCorgiController.

◆ Initialization()

virtual void MoreMountains.CorgiEngine.CharacterAbility.Initialization ( )
protectedvirtual

Gets and stores components for further use

Reimplemented in MoreMountains.CorgiEngine.CharacterJump, MoreMountains.CorgiEngine.CharacterDash, MoreMountains.CorgiEngine.CharacterGravity, MoreMountains.CorgiEngine.CharacterHorizontalMovement, MoreMountains.CorgiEngine.CharacterHandleWeapon, MoreMountains.CorgiEngine.CharacterSurfaceFeedbacks, MoreMountains.CorgiEngine.CharacterStairs, MoreMountains.CorgiEngine.CharacterGrabCarryAndThrow, MoreMountains.CorgiEngine.CharacterRoll, MoreMountains.CorgiEngine.CharacterInventory, MoreMountains.CorgiEngine.CharacterAutoMovement, MoreMountains.CorgiEngine.CharacterSpeedAnalysis, MoreMountains.CorgiEngine.CharacterWalljump, MoreMountains.CorgiEngine.CharacterJetpack, MoreMountains.CorgiEngine.CharacterLadder, MoreMountains.CorgiEngine.CharacterCrushDetection, MoreMountains.CorgiEngine.CharacterCrouch, MoreMountains.CorgiEngine.CharacterFallDamage, MoreMountains.CorgiEngine.CharacterSlopeOrientation, MoreMountains.CorgiEngine.CharacterTimeControl, MoreMountains.CorgiEngine.CharacterPushCorgiController, MoreMountains.CorgiEngine.CharacterWallClinging, MoreMountains.CorgiEngine.CharacterButtonActivation, MoreMountains.CorgiEngine.CharacterSwitchModel, MoreMountains.CorgiEngine.CharacterGrip, MoreMountains.CorgiEngine.CharacterPush, MoreMountains.CorgiEngine.CharacterFly, MoreMountains.CorgiEngine.CharacterLedgeHang, MoreMountains.CorgiEngine.CharacterFollowPath, MoreMountains.CorgiEngine.CharacterGlide, MoreMountains.CorgiEngine.CharacterSwap, MoreMountains.CorgiEngine.RetroCopter, MoreMountains.CorgiEngine.CharacterBounce, MoreMountains.CorgiEngine.CharacterPersistence, and MoreMountains.CorgiEngine.CharacterDamageDash.

◆ InitializeAnimatorParameters()

◆ InternalHandleInput()

virtual void MoreMountains.CorgiEngine.CharacterAbility.InternalHandleInput ( )
protectedvirtual

Internal method to check if an input manager is present or not

◆ LateProcessAbility()

virtual void MoreMountains.CorgiEngine.CharacterAbility.LateProcessAbility ( )
virtual

◆ OnDeath()

◆ OnDisable()

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

◆ OnEnable()

◆ OnHit()

virtual void MoreMountains.CorgiEngine.CharacterAbility.OnHit ( )
protectedvirtual

Override this to describe what should happen to this ability when the character takes a hit

Reimplemented in MoreMountains.CorgiEngine.CharacterHandleWeapon.

◆ OnRespawn()

virtual void MoreMountains.CorgiEngine.CharacterAbility.OnRespawn ( )
protectedvirtual

Override this to describe what should happen to this ability when the character respawns

Reimplemented in MoreMountains.CorgiEngine.CharacterGravity, MoreMountains.CorgiEngine.CharacterHandleWeapon, and MoreMountains.CorgiEngine.CharacterFallDamage.

◆ PermitAbility()

virtual void MoreMountains.CorgiEngine.CharacterAbility.PermitAbility ( bool  abilityPermitted)
virtual

Changes the status of the ability's permission

Parameters
abilityPermittedIf set to true ability permitted.

◆ PlayAbilityStartFeedbacks()

virtual void MoreMountains.CorgiEngine.CharacterAbility.PlayAbilityStartFeedbacks ( )
virtual

Plays the ability start sound effect

◆ PlayAbilityStopFeedbacks()

virtual void MoreMountains.CorgiEngine.CharacterAbility.PlayAbilityStopFeedbacks ( )
virtual

Plays the ability stop sound effect

◆ ProcessAbility()

virtual void MoreMountains.CorgiEngine.CharacterAbility.ProcessAbility ( )
virtual

The second of the 3 passes you can have in your ability. Think of it as Update()

Reimplemented in MoreMountains.CorgiEngine.CharacterJump, MoreMountains.CorgiEngine.CharacterWalljump, MoreMountains.CorgiEngine.CharacterJetpack, MoreMountains.CorgiEngine.CharacterAutoMovement, MoreMountains.CorgiEngine.CharacterFly, MoreMountains.CorgiEngine.CharacterHandleWeapon, MoreMountains.CorgiEngine.CharacterGlide, MoreMountains.CorgiEngine.CharacterDash, MoreMountains.CorgiEngine.CharacterHorizontalMovement, MoreMountains.CorgiEngine.CharacterStairs, MoreMountains.CorgiEngine.CharacterSurfaceFeedbacks, MoreMountains.CorgiEngine.CharacterRoll, MoreMountains.CorgiEngine.CharacterFollowPath, MoreMountains.CorgiEngine.CharacterInventory, MoreMountains.CorgiEngine.CharacterTimeControl, MoreMountains.CorgiEngine.CharacterLookUp, MoreMountains.CorgiEngine.CharacterRun, MoreMountains.CorgiEngine.CharacterSlopeOrientation, MoreMountains.CorgiEngine.CharacterLadder, MoreMountains.CorgiEngine.CharacterCrushDetection, MoreMountains.CorgiEngine.CharacterCrouch, MoreMountains.CorgiEngine.CharacterFallDamage, MoreMountains.CorgiEngine.CharacterParticles, MoreMountains.CorgiEngine.CharacterLedgeHang, MoreMountains.CorgiEngine.CharacterSwim, MoreMountains.CorgiEngine.CharacterPushCorgiController, MoreMountains.CorgiEngine.CharacterWallClinging, MoreMountains.CorgiEngine.CharacterGrip, MoreMountains.CorgiEngine.CharacterPush, MoreMountains.CorgiEngine.RetroCopter, MoreMountains.CorgiEngine.CharacterDangling, and MoreMountains.CorgiEngine.CharacterGroundNormalGravity.

◆ RegisterAnimatorParameter()

virtual void MoreMountains.CorgiEngine.CharacterAbility.RegisterAnimatorParameter ( string  parameterName,
AnimatorControllerParameterType  parameterType,
out int  parameter 
)
virtual

Registers a new animator parameter to the list

Parameters
parameterNameParameter name.
parameterTypeParameter type.

◆ ResetAbility()

◆ ResetInput()

virtual void MoreMountains.CorgiEngine.CharacterAbility.ResetInput ( )
virtual

Resets all input for this ability. Can be overridden for ability specific directives

◆ SetInputManager()

virtual void MoreMountains.CorgiEngine.CharacterAbility.SetInputManager ( InputManager  inputManager)
virtual

Sets a new input manager for this ability to get input from

Parameters
inputManager

◆ Start()

virtual void MoreMountains.CorgiEngine.CharacterAbility.Start ( )
protectedvirtual

On Start(), we call the ability's intialization

◆ StopStartFeedbacks()

virtual void MoreMountains.CorgiEngine.CharacterAbility.StopStartFeedbacks ( )
virtual

Stops the ability used sound effect

◆ UpdateAnimator()

Member Data Documentation

◆ _abilityInitialized

bool MoreMountains.CorgiEngine.CharacterAbility._abilityInitialized = false
protected

◆ _animator

Animator MoreMountains.CorgiEngine.CharacterAbility._animator
protected

◆ _character

Character MoreMountains.CorgiEngine.CharacterAbility._character
protected

◆ _characterGravity

CharacterGravity MoreMountains.CorgiEngine.CharacterAbility._characterGravity
protected

◆ _characterHorizontalMovement

CharacterHorizontalMovement MoreMountains.CorgiEngine.CharacterAbility._characterHorizontalMovement
protected

◆ _characterTransform

Transform MoreMountains.CorgiEngine.CharacterAbility._characterTransform
protected

◆ _condition

MMStateMachine<CharacterStates.CharacterConditions> MoreMountains.CorgiEngine.CharacterAbility._condition
protected

◆ _controller

CorgiController MoreMountains.CorgiEngine.CharacterAbility._controller
protected

◆ _handleWeaponList

List<CharacterHandleWeapon> MoreMountains.CorgiEngine.CharacterAbility._handleWeaponList
protected

◆ _health

Health MoreMountains.CorgiEngine.CharacterAbility._health
protected

◆ _horizontalInput

float MoreMountains.CorgiEngine.CharacterAbility._horizontalInput
protected

◆ _inputManager

InputManager MoreMountains.CorgiEngine.CharacterAbility._inputManager
protected

◆ _movement

MMStateMachine<CharacterStates.MovementStates> MoreMountains.CorgiEngine.CharacterAbility._movement
protected

◆ _sceneCamera

CameraController MoreMountains.CorgiEngine.CharacterAbility._sceneCamera
protected

◆ _spriteRenderer

SpriteRenderer MoreMountains.CorgiEngine.CharacterAbility._spriteRenderer
protected

◆ _startFeedbackIsPlaying

bool MoreMountains.CorgiEngine.CharacterAbility._startFeedbackIsPlaying = false
protected

◆ _state

CharacterStates MoreMountains.CorgiEngine.CharacterAbility._state
protected

◆ _verticalInput

float MoreMountains.CorgiEngine.CharacterAbility._verticalInput
protected

◆ AbilityPermitted

bool MoreMountains.CorgiEngine.CharacterAbility.AbilityPermitted = true

if true, this ability can perform as usual, if not, it'll be ignored. You can use this to unlock abilities over time for example

◆ AbilityStartFeedbacks

MMFeedbacks MoreMountains.CorgiEngine.CharacterAbility.AbilityStartFeedbacks

the feedbacks to play when the ability starts

◆ AbilityStopFeedbacks

MMFeedbacks MoreMountains.CorgiEngine.CharacterAbility.AbilityStopFeedbacks

the feedbacks to play when the ability stops

◆ BlockingConditionStates

CharacterStates.CharacterConditions [] MoreMountains.CorgiEngine.CharacterAbility.BlockingConditionStates

an array containing all the blocking condition states. If the Character is in one of these states and tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while dead, for example.

◆ BlockingMovementStates

CharacterStates.MovementStates [] MoreMountains.CorgiEngine.CharacterAbility.BlockingMovementStates

an array containing all the blocking movement states. If the Character is in one of these states and tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while Idle or Swimming, for example.

◆ BlockingWeaponStates

Weapon.WeaponStates [] MoreMountains.CorgiEngine.CharacterAbility.BlockingWeaponStates

an array containing all the blocking weapon states. If one of the character's weapons is in one of these states and yet the character tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while attacking, for example.

Property Documentation

◆ AbilityAuthorized

virtual bool MoreMountains.CorgiEngine.CharacterAbility.AbilityAuthorized
get

◆ AbilityInitialized

virtual bool MoreMountains.CorgiEngine.CharacterAbility.AbilityInitialized
get

true if the ability has already been initialized


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