Corgi Engine
v9.0
|
Add this component to a character and it'll be able to jetpack Animator parameters : Jetpacking (bool) More...
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... | |
virtual void | JetpackStart () |
Causes the character to start its jetpack. More... | |
virtual void | JetpackStop () |
Causes the character to stop its jetpack. More... | |
override void | ProcessAbility () |
Every frame, we check if our character is colliding with the ceiling. If that's the case we cap its vertical force More... | |
override void | Flip () |
Flips the jetpack's emitter horizontally More... | |
override void | ResetAbility () |
When the character dies we stop its jetpack More... | |
override void | UpdateAnimator () |
At the end of each cycle, we send our character's animator the current jetpacking status 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 | 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 | MovingPlatformsJumpCollisionOffDuration =0.05f |
the duration (in seconds) during which we'll disable the collider when taking off jetpacking from a moving platform More... | |
ParticleSystem | ParticleEmitter |
the jetpack associated to the character More... | |
float | JetpackForce = 2.5f |
the force applied by the jetpack More... | |
bool | JetpackUnlimited = false |
true if the character has unlimited fuel for its jetpack More... | |
float | JetpackFuelDuration = 5f |
the maximum duration (in seconds) of the jetpack More... | |
float | JetpackRefuelCooldown =1f |
the jetpack refuel cooldown, in seconds More... | |
float | RefuelSpeed = 0.5f |
the speed at which the jetpack refuels More... | |
float | MinimumFuelRequirement = 0.2f |
the minimum amount of fuel required in the tank to be able to jetpack again More... | |
AudioClip | JetpackRefueledSfx |
The sound to play when the jetpack is refueled again. More... | |
float | JetpackFuelDurationLeft = 0f |
the remaining jetpack fuel duration (in seconds) 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 () |
On Start(), we grab our particle emitter if there's one, and setup our fuel reserves More... | |
override void | HandleInput () |
Every frame, we check input to see if we're pressing or releasing the jetpack button More... | |
virtual void | TurnJetpackElementsOff () |
Stops the jetpack sounds, particles and state More... | |
virtual void | BurnFuel () |
Consumes fuel if needed More... | |
virtual void | Refuel () |
Refuels the jetpack if needed More... | |
virtual void | UpdateJetpackBar () |
Updates the GUI jetpack bar. More... | |
virtual void | PlayJetpackRefueledSfx () |
Plays a sound when the jetpack is fully refueled 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... | |
Protected Attributes | |
bool | _refueling = false |
bool | _jetpacking = true |
Vector3 | _initialPosition |
AudioSource | _jetpackUsedSound |
WaitForSeconds | _jetpackRefuelCooldownWFS |
float | _timer |
float | _jetpackStoppedAt |
int | _jetpackingAnimationParameter |
Protected Attributes inherited from MoreMountains.CorgiEngine.CharacterAbility | |
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 |
Static Protected Attributes | |
const string | _jetpackingAnimationParameterName = "Jetpacking" |
Properties | |
virtual bool | FuelLeft [get] |
returns true if this jetpack still has fuel left, false otherwise More... | |
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 component to a character and it'll be able to jetpack Animator parameters : Jetpacking (bool)
|
protectedvirtual |
Consumes fuel if needed
|
virtual |
Flips the jetpack's emitter horizontally
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protectedvirtual |
Every frame, we check input to see if we're pressing or releasing the jetpack button
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 |
On Start(), we grab our particle emitter if there's one, and setup our fuel reserves
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protectedvirtual |
Adds required animator parameters to the animator parameters list if they exist
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
virtual |
Causes the character to start its jetpack.
|
virtual |
Causes the character to stop its jetpack.
|
protectedvirtual |
Plays a sound when the jetpack is fully refueled
|
virtual |
Every frame, we check if our character is colliding with the ceiling. If that's the case we cap its vertical force
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protectedvirtual |
Refuels the jetpack if needed
|
virtual |
When the character dies we stop its jetpack
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protectedvirtual |
Stops the jetpack sounds, particles and state
|
virtual |
At the end of each cycle, we send our character's animator the current jetpacking status
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protectedvirtual |
Updates the GUI jetpack bar.
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float MoreMountains.CorgiEngine.CharacterJetpack.JetpackForce = 2.5f |
the force applied by the jetpack
float MoreMountains.CorgiEngine.CharacterJetpack.JetpackFuelDuration = 5f |
the maximum duration (in seconds) of the jetpack
float MoreMountains.CorgiEngine.CharacterJetpack.JetpackFuelDurationLeft = 0f |
the remaining jetpack fuel duration (in seconds)
float MoreMountains.CorgiEngine.CharacterJetpack.JetpackRefuelCooldown =1f |
the jetpack refuel cooldown, in seconds
AudioClip MoreMountains.CorgiEngine.CharacterJetpack.JetpackRefueledSfx |
The sound to play when the jetpack is refueled again.
bool MoreMountains.CorgiEngine.CharacterJetpack.JetpackUnlimited = false |
true if the character has unlimited fuel for its jetpack
float MoreMountains.CorgiEngine.CharacterJetpack.MinimumFuelRequirement = 0.2f |
the minimum amount of fuel required in the tank to be able to jetpack again
float MoreMountains.CorgiEngine.CharacterJetpack.MovingPlatformsJumpCollisionOffDuration =0.05f |
the duration (in seconds) during which we'll disable the collider when taking off jetpacking from a moving platform
ParticleSystem MoreMountains.CorgiEngine.CharacterJetpack.ParticleEmitter |
the jetpack associated to the character
float MoreMountains.CorgiEngine.CharacterJetpack.RefuelSpeed = 0.5f |
the speed at which the jetpack refuels
|
get |
returns true if this jetpack still has fuel left, false otherwise