Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.DamageMovement_ExplosiveForce Class Reference

A damage movement which knocks back the character. More...

Inheritance diagram for PlatformerPro.DamageMovement_ExplosiveForce:
PlatformerPro.DamageMovement PlatformerPro.BaseMovement< DamageMovement >

Public Member Functions

override void DoMove ()
 Moves the character. More...
 
override Movement Init (Character character, MovementVariable[] movementData)
 Initialise the mvoement with the given movement data. More...
 
override bool ForceMaintainControl ()
 If the timer is non-zero keep control. More...
 
override void Damage (DamageInfo info, bool isDeath)
 Start the damage movement. More...
 
- Public Member Functions inherited from PlatformerPro.BaseMovement< DamageMovement >
sealed override Movement Init (Character character)
 Initialise this movement. More...
 
bool IsMovementDataDifferent (MovementVariable[] originalMovementData)
 Determines whether this instances movement data is different from the supplied originalMovementData. More...
 

Public Attributes

Vector2 forceMultiplier
 How much force to apply. More...
 
bool useAirMovement
 If true, we let the air movement do the movement, else we do it here. More...
 
float explosionTime
 How long do we keep control for? More...
 
float drag
 Drag to apply in X if we aren't using air movement. More...
 
bool fixedForce
 If true just apply force in direction of x, ignoring extent of x damage direction, and ignoring y direction completely. More...
 
bool cancelOnGrounded
 If true lose contorl when hitting the ground. More...
 

Protected Attributes

float explosionTimer
 Timer for the explosion More...
 
Vector2 explosionForce
 The explosion force. More...
 
- Protected Attributes inherited from PlatformerPro.DamageMovement
DamageInfo damageInfo
 Information about the damage sustained. More...
 
bool isDeath
 Is this being used as a death movement. More...
 
- Protected Attributes inherited from PlatformerPro.BaseMovement< DamageMovement >
Movement implementation
 The class that will do the movement. More...
 
string movementType
 The type of movement as a string. More...
 
MovementVariable[] movementData
 Data that should be applied to the movement type on init. More...
 

Static Protected Attributes

const int ForceMultiplierIndex = 0
 The index for the force multiplier in the movement data. More...
 
const int UseAirMovementIndex = 1
 The index for use air movement in the movement data. More...
 
const int ExplosionTimeIndex = 2
 The index for the explosion time in the movement data. More...
 
const int DragIndex = 3
 The index of the drag in the movement data. More...
 
const int FixedForceIndex = 4
 The index of the fixed force value in the movement data. More...
 
const int CancelOnGroundedIndex = 5
 The index of the cancel on grounded index value in the movement data. More...
 
const int MovementVariableCount = 6
 The size of the movement variable array. More...
 
const float DefaultExplosionTime = 1.0f
 Default explosion time More...
 
static Vector2 DefaultExplosionForce = new Vector2(5.0f, 10.0f)
 Default explosion force More...
 
const float DefaultDrag = 5.0f
 The default drag. More...
 

Properties

new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
override bool? ShouldApplyGravity [get]
 For damage the default is to not apply gravity. More...
 
override AnimationState AnimationState [get]
 Gets the animation state that this movement wants to set. More...
 
- Properties inherited from PlatformerPro.DamageMovement
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
override bool ShouldApplyGravity [get]
 For damage the default is to not apply gravity. More...
 
override int AnimationPriority [get]
 Gets the priority of the animation state that this movement wants to set. Death and damage need higher defaults. More...
 
- Properties inherited from PlatformerPro.BaseMovement< DamageMovement >
virtual string MovementType [get, set]
 The type of movement as a string. More...
 
virtual MovementVariable[] MovementData [get, set]
 Data that should be applied to the movement type on init. More...
 
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
override bool Enabled [get, set]
 A custom enable which base movements can use to pass on enable values. More...
 
override Movement Implementation [get]
 Gets the underlying implementation. More...
 

Detailed Description

A damage movement which knocks back the character.

Member Function Documentation

◆ Damage()

override void PlatformerPro.DamageMovement_ExplosiveForce.Damage ( DamageInfo  info,
bool  isDeath 
)
virtual

Start the damage movement.

Parameters
infoInfo.

Reimplemented from PlatformerPro.DamageMovement.

◆ DoMove()

override void PlatformerPro.DamageMovement_ExplosiveForce.DoMove ( )

Moves the character.

◆ ForceMaintainControl()

override bool PlatformerPro.DamageMovement_ExplosiveForce.ForceMaintainControl ( )

If the timer is non-zero keep control.

◆ Init()

override Movement PlatformerPro.DamageMovement_ExplosiveForce.Init ( Character  character,
MovementVariable[]  movementData 
)

Initialise the mvoement with the given movement data.

Parameters
characterCharacter.
movementDataMovement data.

Member Data Documentation

◆ cancelOnGrounded

bool PlatformerPro.DamageMovement_ExplosiveForce.cancelOnGrounded

If true lose contorl when hitting the ground.

◆ CancelOnGroundedIndex

const int PlatformerPro.DamageMovement_ExplosiveForce.CancelOnGroundedIndex = 5
staticprotected

The index of the cancel on grounded index value in the movement data.

◆ DefaultDrag

const float PlatformerPro.DamageMovement_ExplosiveForce.DefaultDrag = 5.0f
staticprotected

The default drag.

◆ DefaultExplosionForce

Vector2 PlatformerPro.DamageMovement_ExplosiveForce.DefaultExplosionForce = new Vector2(5.0f, 10.0f)
staticprotected

Default explosion force

◆ DefaultExplosionTime

const float PlatformerPro.DamageMovement_ExplosiveForce.DefaultExplosionTime = 1.0f
staticprotected

Default explosion time

◆ drag

float PlatformerPro.DamageMovement_ExplosiveForce.drag

Drag to apply in X if we aren't using air movement.

◆ DragIndex

const int PlatformerPro.DamageMovement_ExplosiveForce.DragIndex = 3
staticprotected

The index of the drag in the movement data.

◆ explosionForce

Vector2 PlatformerPro.DamageMovement_ExplosiveForce.explosionForce
protected

The explosion force.

◆ explosionTime

float PlatformerPro.DamageMovement_ExplosiveForce.explosionTime

How long do we keep control for?

◆ ExplosionTimeIndex

const int PlatformerPro.DamageMovement_ExplosiveForce.ExplosionTimeIndex = 2
staticprotected

The index for the explosion time in the movement data.

◆ explosionTimer

float PlatformerPro.DamageMovement_ExplosiveForce.explosionTimer
protected

Timer for the explosion

◆ fixedForce

bool PlatformerPro.DamageMovement_ExplosiveForce.fixedForce

If true just apply force in direction of x, ignoring extent of x damage direction, and ignoring y direction completely.

◆ FixedForceIndex

const int PlatformerPro.DamageMovement_ExplosiveForce.FixedForceIndex = 4
staticprotected

The index of the fixed force value in the movement data.

◆ forceMultiplier

Vector2 PlatformerPro.DamageMovement_ExplosiveForce.forceMultiplier

How much force to apply.

◆ ForceMultiplierIndex

const int PlatformerPro.DamageMovement_ExplosiveForce.ForceMultiplierIndex = 0
staticprotected

The index for the force multiplier in the movement data.

◆ MovementVariableCount

const int PlatformerPro.DamageMovement_ExplosiveForce.MovementVariableCount = 6
staticprotected

The size of the movement variable array.

◆ useAirMovement

bool PlatformerPro.DamageMovement_ExplosiveForce.useAirMovement

If true, we let the air movement do the movement, else we do it here.

◆ UseAirMovementIndex

const int PlatformerPro.DamageMovement_ExplosiveForce.UseAirMovementIndex = 1
staticprotected

The index for use air movement in the movement data.

Property Documentation

◆ AnimationState

override AnimationState PlatformerPro.DamageMovement_ExplosiveForce.AnimationState
get

Gets the animation state that this movement wants to set.

◆ Info

new static MovementInfo PlatformerPro.DamageMovement_ExplosiveForce.Info
staticget

Static movement info used by the editor.

◆ ShouldApplyGravity

override bool? PlatformerPro.DamageMovement_ExplosiveForce.ShouldApplyGravity
get

For damage the default is to not apply gravity.


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