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

A damage movement which plays an animation and bobbles the character in to the air. More...

Inheritance diagram for PlatformerPro.DamageMovement_AnimationWithBobble:
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 jump just started force 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

float bobbleHeight
 How high should the character bobble. More...
 

Protected Member Functions

virtual void DoBobble ()
 

Protected Attributes

float originalHeight
 The characters starting position (pre-bobble). More...
 
float initialVelocity
 Derived initial velocity based on jumpHeight and time. More...
 
int facingDirection
 Direction character was facing when the bobble started. More...
 
bool hasAppliedVelocity
 Have we started a bobble. More...
 
bool hasLeftPlatform
 If character was parented to a platform ensure they have left it before handing back control. More...
 
bool hasReachedPeak
 True if character has reached peak of bobble. 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 MovementVariableCount = 1
 The size of the movement variable array. More...
 

Properties

new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
override AnimationState AnimationState [get]
 Gets the animation state that this movement wants to set. More...
 
override int FacingDirection [get]
 Returns the direction the character is facing. 0 for none, 1 for right, -1 for left. This overriden version always returns the input direction. More...
 
override RaycastType ShouldDoBaseCollisions [get]
 Ignore base collissions, we will be returning to starting position anyway. 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 plays an animation and bobbles the character in to the air.

Member Function Documentation

◆ Damage()

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

Start the damage movement.

Parameters
infoInfo.

Reimplemented from PlatformerPro.DamageMovement.

◆ DoBobble()

virtual void PlatformerPro.DamageMovement_AnimationWithBobble.DoBobble ( )
protectedvirtual

◆ DoMove()

override void PlatformerPro.DamageMovement_AnimationWithBobble.DoMove ( )

Moves the character.

◆ ForceMaintainControl()

override bool PlatformerPro.DamageMovement_AnimationWithBobble.ForceMaintainControl ( )

If the jump just started force control.

◆ Init()

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

Initialise the mvoement with the given movement data.

Parameters
characterCharacter.
movementDataMovement data.

Member Data Documentation

◆ bobbleHeight

float PlatformerPro.DamageMovement_AnimationWithBobble.bobbleHeight

How high should the character bobble.

◆ facingDirection

int PlatformerPro.DamageMovement_AnimationWithBobble.facingDirection
protected

Direction character was facing when the bobble started.

◆ hasAppliedVelocity

bool PlatformerPro.DamageMovement_AnimationWithBobble.hasAppliedVelocity
protected

Have we started a bobble.

◆ hasLeftPlatform

bool PlatformerPro.DamageMovement_AnimationWithBobble.hasLeftPlatform
protected

If character was parented to a platform ensure they have left it before handing back control.

◆ hasReachedPeak

bool PlatformerPro.DamageMovement_AnimationWithBobble.hasReachedPeak
protected

True if character has reached peak of bobble.

◆ initialVelocity

float PlatformerPro.DamageMovement_AnimationWithBobble.initialVelocity
protected

Derived initial velocity based on jumpHeight and time.

◆ MovementVariableCount

const int PlatformerPro.DamageMovement_AnimationWithBobble.MovementVariableCount = 1
staticprotected

The size of the movement variable array.

◆ originalHeight

float PlatformerPro.DamageMovement_AnimationWithBobble.originalHeight
protected

The characters starting position (pre-bobble).

Property Documentation

◆ AnimationState

override AnimationState PlatformerPro.DamageMovement_AnimationWithBobble.AnimationState
get

Gets the animation state that this movement wants to set.

◆ FacingDirection

override int PlatformerPro.DamageMovement_AnimationWithBobble.FacingDirection
get

Returns the direction the character is facing. 0 for none, 1 for right, -1 for left. This overriden version always returns the input direction.

◆ Info

new static MovementInfo PlatformerPro.DamageMovement_AnimationWithBobble.Info
staticget

Static movement info used by the editor.

◆ ShouldDoBaseCollisions

override RaycastType PlatformerPro.DamageMovement_AnimationWithBobble.ShouldDoBaseCollisions
get

Ignore base collissions, we will be returning to starting position anyway.


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