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

A special movement which takes control while character is lokced on a rail platform. More...

Inheritance diagram for PlatformerPro.SpecialMovement_Rail:
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...
 
virtual bool ShouldBeAttachedToRail (RailPlatform rail)
 Start the rail 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

Animator myAnimator
 Cached reference to the animator. More...
 
RailPlatform rail
 Current rail. 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...
 

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]
 Gets the facing direction. 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 takes control while character is lokced on a rail platform.

Member Function Documentation

◆ DoMove()

override void PlatformerPro.SpecialMovement_Rail.DoMove ( )

Moves the character.

◆ GainControl()

override void PlatformerPro.SpecialMovement_Rail.GainControl ( )

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

◆ Init()

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

Initialise the mvoement with the given movement data.

Parameters
characterCharacter.
movementDataMovement data.

◆ LosingControl()

override void PlatformerPro.SpecialMovement_Rail.LosingControl ( )

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

◆ ShouldBeAttachedToRail()

virtual bool PlatformerPro.SpecialMovement_Rail.ShouldBeAttachedToRail ( RailPlatform  rail)
virtual

Start the rail movement

Parameters
railThe rail platform.

◆ WantsSpecialMove()

override bool PlatformerPro.SpecialMovement_Rail.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

◆ myAnimator

Animator PlatformerPro.SpecialMovement_Rail.myAnimator
protected

Cached reference to the animator.

◆ rail

RailPlatform PlatformerPro.SpecialMovement_Rail.rail
protected

Current rail.

Property Documentation

◆ AnimationState

override AnimationState PlatformerPro.SpecialMovement_Rail.AnimationState
get

Gets the animation state that this movement wants to set.

◆ FacingDirection

override int PlatformerPro.SpecialMovement_Rail.FacingDirection
get

Gets the facing direction.

The facing direction.

◆ Info

new static MovementInfo PlatformerPro.SpecialMovement_Rail.Info
staticget

Static movement info used by the editor.

◆ ShouldApplyGravity

override bool PlatformerPro.SpecialMovement_Rail.ShouldApplyGravity
get

Shoulds the apply gravity.

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

◆ ShouldDoBaseCollisions

override RaycastType PlatformerPro.SpecialMovement_Rail.ShouldDoBaseCollisions
get

Gets the should do base collisions.

The should do base collisions.


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