Corgi Engine
v9.0
|
Add this class to a character and it'll be able to "roll" along surfaces, with options to go through enemies, and keep controlling direction Animator parameters : Rolling, StartedRolling More...
Public Types | |
enum | SuccessiveRollsResetMethods { SuccessiveRollsResetMethods.Grounded, SuccessiveRollsResetMethods.Time } |
Public Member Functions | |
override string | HelpBoxText () |
This method is only used to display a helpbox text at the beginning of the ability's inspector. More... | |
override void | ProcessAbility () |
The second of the 3 passes you can have in your ability. Think of it as Update() More... | |
virtual void | StartRoll () |
Causes the character to roll or dive (depending on the vertical movement at the start of the roll) More... | |
virtual bool | RollConditions () |
This method evaluates the internal conditions for a roll (cooldown between rolls, amount of rolls left) and returns true if a roll can be performed, false otherwise More... | |
virtual void | SetSuccessiveRollsLeft (int newAmount) |
A method to reset the amount of successive rolls left More... | |
virtual bool | RollAuthorized () |
This method evaluates the external conditions (state, other abilities) for a roll, and returns true if a roll can be performed, false otherwise More... | |
virtual void | InitiateRoll () |
initializes all parameters prior to a roll and triggers the pre roll feedbacks More... | |
virtual void | StopRoll () |
Stops the roll coroutine and resets all necessary parts of the character More... | |
override void | UpdateAnimator () |
At the end of the cycle, we update our animator's Rolling state More... | |
override void | ResetAbility () |
On reset ability, we cancel all the changes made More... | |
Public Member Functions inherited from MoreMountains.CorgiEngine.CharacterAbility | |
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 | LateProcessAbility () |
The last of the 3 passes you can have in your ability. Think of it as LateUpdate() 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 | 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 | |
float | RollDuration = 0.5f |
the duration of the roll, in seconds More... | |
float | RollSpeed = 3f |
the speed of the roll (a multiplier of the regular walk speed) More... | |
bool | BlockHorizontalInput = false |
if this is true, horizontal input won't be read, and the character won't be able to change direction during a roll More... | |
bool | PreventDamageCollisionsDuringRoll = false |
if this is true, no damage will be applied during the roll, and the character will be able to go through enemies More... | |
MMAim | Aim |
the roll's aim properties More... | |
float | MinimumInputThreshold = 0.1f |
the minimum amount of input required to apply a direction to the roll More... | |
bool | FlipCharacterIfNeeded = true |
if this is true, the character will flip when rolling and facing the roll's opposite direction More... | |
float | RollCooldown = 1f |
the duration of the cooldown between 2 rolls (in seconds) More... | |
bool | LimitedRolls = false |
whether or not rolls can be performed infinitely More... | |
int | SuccessiveRollsAmount = 1 |
the amount of successive rolls a character can perform, only if rolls are not infinite More... | |
int | SuccessiveRollsLeft = 1 |
the amount of rollss left (runtime value only), only if rolls are not infinite More... | |
float | SuccessiveRollsResetDuration = 2f |
when in time reset mode, the duration, in seconds, after which the amount of rolls left gets reset, only if rolls are not infinite More... | |
Public Attributes inherited from MoreMountains.CorgiEngine.CharacterAbility | |
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 | |
override void | Initialization () |
Initializes our aim instance More... | |
override void | HandleInput () |
At the start of each cycle, we check if we're pressing the roll button. If we More... | |
virtual void | HandleAmountOfRollsLeft () |
Checks if conditions are met to reset the amount of rolls left More... | |
virtual void | ComputeRollDirection () |
Computes the roll direction based on the selected options More... | |
virtual void | CheckFlipCharacter () |
Checks whether or not a character flip is required, and flips the character if needed More... | |
virtual IEnumerator | RollCoroutine () |
Coroutine used to move the player in a direction over time More... | |
override void | InitializeAnimatorParameters () |
Adds required animator parameters to the animator parameters list if they exist More... | |
Protected Member Functions inherited from MoreMountains.CorgiEngine.CharacterAbility | |
virtual void | Start () |
On Start(), we call the ability's intialization More... | |
virtual void | InternalHandleInput () |
Internal method to check if an input manager is present or not 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... | |
Static Protected Attributes | |
const string | _rollingAnimationParameterName = "Rolling" |
const string | _startedRollingAnimationParameterName = "StartedRolling" |
Additional Inherited Members | |
Properties inherited from MoreMountains.CorgiEngine.CharacterAbility | |
virtual bool | AbilityAuthorized [get] |
virtual bool | AbilityInitialized [get] |
true if the ability has already been initialized More... | |
Add this class to a character and it'll be able to "roll" along surfaces, with options to go through enemies, and keep controlling direction Animator parameters : Rolling, StartedRolling
|
protectedvirtual |
Checks whether or not a character flip is required, and flips the character if needed
|
protectedvirtual |
Computes the roll direction based on the selected options
|
protectedvirtual |
Checks if conditions are met to reset the amount of rolls left
|
protectedvirtual |
At the start of each cycle, we check if we're pressing the roll button. If we
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
virtual |
This method is only used to display a helpbox text at the beginning of the ability's inspector.
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protectedvirtual |
Initializes our aim instance
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protectedvirtual |
Adds required animator parameters to the animator parameters list if they exist
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
virtual |
initializes all parameters prior to a roll and triggers the pre roll feedbacks
|
virtual |
The second of the 3 passes you can have in your ability. Think of it as Update()
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
virtual |
On reset ability, we cancel all the changes made
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
virtual |
This method evaluates the external conditions (state, other abilities) for a roll, and returns true if a roll can be performed, false otherwise
|
virtual |
This method evaluates the internal conditions for a roll (cooldown between rolls, amount of rolls left) and returns true if a roll can be performed, false otherwise
|
protectedvirtual |
Coroutine used to move the player in a direction over time
|
virtual |
A method to reset the amount of successive rolls left
newAmount |
|
virtual |
Causes the character to roll or dive (depending on the vertical movement at the start of the roll)
|
virtual |
Stops the roll coroutine and resets all necessary parts of the character
|
virtual |
At the end of the cycle, we update our animator's Rolling state
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
staticprotected |
MMAim MoreMountains.CorgiEngine.CharacterRoll.Aim |
the roll's aim properties
bool MoreMountains.CorgiEngine.CharacterRoll.BlockHorizontalInput = false |
if this is true, horizontal input won't be read, and the character won't be able to change direction during a roll
bool MoreMountains.CorgiEngine.CharacterRoll.FlipCharacterIfNeeded = true |
if this is true, the character will flip when rolling and facing the roll's opposite direction
bool MoreMountains.CorgiEngine.CharacterRoll.LimitedRolls = false |
whether or not rolls can be performed infinitely
float MoreMountains.CorgiEngine.CharacterRoll.MinimumInputThreshold = 0.1f |
the minimum amount of input required to apply a direction to the roll
bool MoreMountains.CorgiEngine.CharacterRoll.PreventDamageCollisionsDuringRoll = false |
if this is true, no damage will be applied during the roll, and the character will be able to go through enemies
float MoreMountains.CorgiEngine.CharacterRoll.RollCooldown = 1f |
the duration of the cooldown between 2 rolls (in seconds)
float MoreMountains.CorgiEngine.CharacterRoll.RollDuration = 0.5f |
the duration of the roll, in seconds
float MoreMountains.CorgiEngine.CharacterRoll.RollSpeed = 3f |
the speed of the roll (a multiplier of the regular walk speed)
int MoreMountains.CorgiEngine.CharacterRoll.SuccessiveRollsAmount = 1 |
the amount of successive rolls a character can perform, only if rolls are not infinite
int MoreMountains.CorgiEngine.CharacterRoll.SuccessiveRollsLeft = 1 |
the amount of rollss left (runtime value only), only if rolls are not infinite
float MoreMountains.CorgiEngine.CharacterRoll.SuccessiveRollsResetDuration = 2f |
when in time reset mode, the duration, in seconds, after which the amount of rolls left gets reset, only if rolls are not infinite