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

Add this class on a character and it'll be able to dash just like the regular dash, and apply damage to everything its DamageOnTouch zone touches More...

Inheritance diagram for MoreMountains.CorgiEngine.CharacterDamageDash:
MoreMountains.CorgiEngine.CharacterDash MoreMountains.CorgiEngine.CharacterAbility MoreMountains.CorgiEngine.CorgiMonoBehaviour

Public Member Functions

override void InitiateDash ()
 When we start to dash, we activate our damage object More...
 
override void StopDash ()
 When we stop dashing, we disable our damage object More...
 
- Public Member Functions inherited from MoreMountains.CorgiEngine.CharacterDash
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 StartDash ()
 Causes the character to dash or dive (depending on the vertical movement at the start of the dash) More...
 
virtual bool DashConditions ()
 This method evaluates the internal conditions for a dash (cooldown between dashes, amount of dashes left) and returns true if a dash can be performed, false otherwise More...
 
virtual void SetSuccessiveDashesLeft (int newAmount)
 A method to reset the amount of successive dashes left More...
 
virtual bool DashAuthorized ()
 This method evaluates the external conditions (state, other abilities) for a dash, and returns true if a dash can be performed, false otherwise More...
 
override void UpdateAnimator ()
 At the end of the cycle, we update our animator's Dashing 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

DamageOnTouch TargetDamageOnTouch
 the DamageOnTouch object to activate when dashing (usually placed under the Character's model, will require a Collider2D of some form, set to trigger More...
 
- Public Attributes inherited from MoreMountains.CorgiEngine.CharacterDash
float DashDistance = 3f
 the distance this dash should cover More...
 
float DashForce = 40f
 the force of the dash More...
 
bool ResetForcesOnExit = false
 if this is true, forces will be reset on dash exit (killing inertia) More...
 
bool ForceExactDistance = false
 if this is true, position will be forced on exit to match an exact distance More...
 
bool DetachFromMovingPlatformsOnDash = false
 if this is true, the character's controller will detach from moving platforms when dash starts More...
 
MMAim Aim
 the dash's aim properties More...
 
float MinimumInputThreshold = 0.1f
 the minimum amount of input required to apply a direction to the dash More...
 
bool FlipCharacterIfNeeded = true
 if this is true, the character will flip when dashing and facing the dash's opposite direction More...
 
bool AutoCorrectTrajectory = true
 if this is true, will prevent the character from dashing into the ground when already grounded More...
 
float DashDirectionMinThreshold = 0.1f
 the direction threshold over which to compare direction when authorizing the dash. You'll likely want to keep it fairly close to zero More...
 
float DashCooldown = 1f
 the duration of the cooldown between 2 dashes (in seconds) More...
 
bool LimitedDashes = false
 whether or not dashes can be performed infinitely More...
 
int SuccessiveDashAmount = 1
 the amount of successive dashes a character can perform, only if dashes are not infinite More...
 
int SuccessiveDashesLeft = 1
 the amount of dashes left (runtime value only), only if dashes are not infinite More...
 
SuccessiveDashResetMethods SuccessiveDashResetMethod = SuccessiveDashResetMethods.Grounded
 the method used to reset the number of dashes left, only if dashes are not infinite More...
 
float SuccessiveDashResetDuration = 2f
 when in time reset mode, the duration, in seconds, after which the amount of dashes left gets reset, only if dashes are not infinite More...
 
bool InvincibleWhileDashing = false
 if this is true, this character won't receive any damage while a dash is in progress 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 initialization, we disable our damage on touch object More...
 
- Protected Member Functions inherited from MoreMountains.CorgiEngine.CharacterDash
override void Initialization ()
 Initializes our aim instance More...
 
override void HandleInput ()
 At the start of each cycle, we check if we're pressing the dash button. If we More...
 
virtual void HandleAmountOfDashesLeft ()
 Checks if conditions are met to reset the amount of dashes left More...
 
virtual void ComputeDashDirection ()
 Computes the dash direction based on the selected options More...
 
virtual void CheckAutoCorrectTrajectory ()
 Prevents the character from dashing into the ground when already grounded and if AutoCorrectTrajectory is checked More...
 
virtual void CheckFlipCharacter ()
 Checks whether or not a character flip is required, and flips the character if needed More...
 
virtual IEnumerator Dash ()
 Coroutine used to move the player in a direction over time More...
 
virtual bool TestForLevelBounds ()
 If the character is hitting level bounds, we check if they're "in front" of us or "behind" us, and whether it should prevent the dash or not More...
 
virtual bool TestForExactDistance ()
 Checks (if needed) if we've exceeded our distance, and positions the character at the exact final position 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...
 

Additional Inherited Members

- Public Types inherited from MoreMountains.CorgiEngine.CharacterDash
enum  SuccessiveDashResetMethods { SuccessiveDashResetMethods.Grounded, SuccessiveDashResetMethods.Time }
 
- Protected Attributes inherited from MoreMountains.CorgiEngine.CharacterDash
float _cooldownTimeStamp = 0
 
float _startTime
 
Vector2 _initialPosition
 
Vector2 _dashDirection
 
float _distanceTraveled = 0f
 
bool _shouldKeepDashing = true
 
float _slopeAngleSave = 0f
 
bool _dashEndedNaturally = true
 
IEnumerator _dashCoroutine
 
CharacterDive _characterDive
 
float _lastDashAt = 0f
 
float _averageDistancePerFrame
 
int _startFrame
 
Bounds _bounds
 
int _dashingAnimationParameter
 
- 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 inherited from MoreMountains.CorgiEngine.CharacterDash
const string _dashingAnimationParameterName = "Dashing"
 
- Properties inherited from MoreMountains.CorgiEngine.CharacterAbility
virtual bool AbilityAuthorized [get]
 
virtual bool AbilityInitialized [get]
 true if the ability has already been initialized More...
 

Detailed Description

Add this class on a character and it'll be able to dash just like the regular dash, and apply damage to everything its DamageOnTouch zone touches

Member Function Documentation

◆ Initialization()

override void MoreMountains.CorgiEngine.CharacterDamageDash.Initialization ( )
protectedvirtual

On initialization, we disable our damage on touch object

Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.

◆ InitiateDash()

override void MoreMountains.CorgiEngine.CharacterDamageDash.InitiateDash ( )
virtual

When we start to dash, we activate our damage object

Reimplemented from MoreMountains.CorgiEngine.CharacterDash.

◆ StopDash()

override void MoreMountains.CorgiEngine.CharacterDamageDash.StopDash ( )
virtual

When we stop dashing, we disable our damage object

Reimplemented from MoreMountains.CorgiEngine.CharacterDash.

Member Data Documentation

◆ TargetDamageOnTouch

DamageOnTouch MoreMountains.CorgiEngine.CharacterDamageDash.TargetDamageOnTouch

the DamageOnTouch object to activate when dashing (usually placed under the Character's model, will require a Collider2D of some form, set to trigger


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