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

A special movement which plays the given animation until completion. More...

Inheritance diagram for PlatformerPro.SpecialMovement_PlayAnimation:
PlatformerPro.SpecialMovement PlatformerPro.BaseMovement< SpecialMovement >

Public Member Functions

override Movement Init (Character character, MovementVariable[] movementData)
 Initialise the mvoement with the given movement data. More...
 
override bool WantsSpecialMove ()
 Gets a value indicating whether this movement wants to do a special move. More...
 
override void DoMove ()
 Moves the character. More...
 
override bool ForceMaintainControl ()
 If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't. More...
 
virtual void Play (AnimationState state)
 Start movement with the specified state. More...
 
virtual void StopAnimation ()
 Stops the movement. More...
 
override void GainControl ()
 Called when the movement gets control. Typically used to do initialisation of velocity and the like. More...
 
override void LosingControl ()
 Called when the movement loses control. Override to do any reset type actions. More...
 
- Public Member Functions inherited from PlatformerPro.SpecialMovement
virtual void DoSpecialMove ()
 Start the special mvoe More...
 
- Public Member Functions inherited from PlatformerPro.BaseMovement< SpecialMovement >
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...
 

Protected Attributes

bool loopUntilInterrupted
 Should we keep looping forever. More...
 
bool shouldApplyGravity
 Should we apply gravity. More...
 
AnimationState fallAnimationState
 When used with fall enabled, what state shouldw e set when falling? More...
 
AnimationState animationState
 Animation currently being played. More...
 
bool moveStarted
 Have we started the movement. More...
 
Animator myAnimator
 Cached reference to the animator. More...
 
- Protected Attributes inherited from PlatformerPro.BaseMovement< SpecialMovement >
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 LoopUntilInterruptedIndex = 0
 The index of the loop until interrupted in the movement data. More...
 
const int ShouldApplyGravityIndex = 1
 The index of the should apply gravity in the movement data.. More...
 
const int FallAnimationStateIndex = 2
 The index of the fall movement in the movement data.. More...
 
const int MovementVariableCount = 3
 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 bool ShouldApplyGravity [get]
 Shoulds the apply gravity. More...
 
override RaycastType ShouldDoBaseCollisions [get]
 Gets the should do base collisions. More...
 
- Properties inherited from PlatformerPro.SpecialMovement
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
- Properties inherited from PlatformerPro.BaseMovement< SpecialMovement >
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 special movement which plays the given animation until completion.

Member Function Documentation

◆ DoMove()

override void PlatformerPro.SpecialMovement_PlayAnimation.DoMove ( )

Moves the character.

◆ ForceMaintainControl()

override bool PlatformerPro.SpecialMovement_PlayAnimation.ForceMaintainControl ( )

If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't.

Returns
true if control is wanted, false otherwise.

◆ GainControl()

override void PlatformerPro.SpecialMovement_PlayAnimation.GainControl ( )

Called when the movement gets control. Typically used to do initialisation of velocity and the like.

◆ Init()

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

Initialise the mvoement with the given movement data.

Parameters
characterCharacter.
movementDataMovement data.

◆ LosingControl()

override void PlatformerPro.SpecialMovement_PlayAnimation.LosingControl ( )

Called when the movement loses control. Override to do any reset type actions.

◆ Play()

virtual void PlatformerPro.SpecialMovement_PlayAnimation.Play ( AnimationState  state)
virtual

Start movement with the specified state.

Parameters
stateAnimation state.

◆ StopAnimation()

virtual void PlatformerPro.SpecialMovement_PlayAnimation.StopAnimation ( )
virtual

Stops the movement.

◆ WantsSpecialMove()

override bool PlatformerPro.SpecialMovement_PlayAnimation.WantsSpecialMove ( )
virtual

Gets a value indicating whether this movement wants to do a special move.

true if this instance wants control; otherwise, false.

Reimplemented from PlatformerPro.SpecialMovement.

Member Data Documentation

◆ animationState

AnimationState PlatformerPro.SpecialMovement_PlayAnimation.animationState
protected

Animation currently being played.

◆ fallAnimationState

AnimationState PlatformerPro.SpecialMovement_PlayAnimation.fallAnimationState
protected

When used with fall enabled, what state shouldw e set when falling?

◆ FallAnimationStateIndex

const int PlatformerPro.SpecialMovement_PlayAnimation.FallAnimationStateIndex = 2
staticprotected

The index of the fall movement in the movement data..

◆ loopUntilInterrupted

bool PlatformerPro.SpecialMovement_PlayAnimation.loopUntilInterrupted
protected

Should we keep looping forever.

◆ LoopUntilInterruptedIndex

const int PlatformerPro.SpecialMovement_PlayAnimation.LoopUntilInterruptedIndex = 0
staticprotected

The index of the loop until interrupted in the movement data.

◆ MovementVariableCount

const int PlatformerPro.SpecialMovement_PlayAnimation.MovementVariableCount = 3
staticprotected

The size of the movement variable array.

◆ moveStarted

bool PlatformerPro.SpecialMovement_PlayAnimation.moveStarted
protected

Have we started the movement.

◆ myAnimator

Animator PlatformerPro.SpecialMovement_PlayAnimation.myAnimator
protected

Cached reference to the animator.

◆ shouldApplyGravity

bool PlatformerPro.SpecialMovement_PlayAnimation.shouldApplyGravity
protected

Should we apply gravity.

◆ ShouldApplyGravityIndex

const int PlatformerPro.SpecialMovement_PlayAnimation.ShouldApplyGravityIndex = 1
staticprotected

The index of the should apply gravity in the movement data..

Property Documentation

◆ AnimationState

override AnimationState PlatformerPro.SpecialMovement_PlayAnimation.AnimationState
get

Gets the animation state that this movement wants to set.

◆ Info

new static MovementInfo PlatformerPro.SpecialMovement_PlayAnimation.Info
staticget

Static movement info used by the editor.

◆ ShouldApplyGravity

override bool PlatformerPro.SpecialMovement_PlayAnimation.ShouldApplyGravity
get

Shoulds the apply gravity.

Returns
true, if apply gravity was shoulded, false otherwise.

◆ ShouldDoBaseCollisions

override RaycastType PlatformerPro.SpecialMovement_PlayAnimation.ShouldDoBaseCollisions
get

Gets the should do base collisions.

The should do base collisions.


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