![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
A wrapper class for handling movement that proxies the movement function to the desired implementation. More...
Public Member Functions | |
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... | |
![]() | |
virtual Movement | Init (Character character, MovementVariable[] movementData) |
Initialise the movement with the given movement data. More... | |
virtual string | PostInitValidation () |
Called after initialisation to check if this movement is configured correctly. Typically used to stop wrapper movements being the default and ending up in infinite loops. More... | |
virtual void | DoMove () |
Moves the character. More... | |
virtual void | PostCollisionDoMove () |
Does any movement that MUST be done after collissions are calculated. More... | |
virtual 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 bool | CheckAdditionalConditions () |
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 | ConditionsActivated () |
Call activated on each condition. More... | |
virtual void | GainControl () |
Called when the movement gets control. Typically used to do initialisation of velocity and the like. More... | |
virtual void | LosingControl () |
Called when the movement loses control. Override to do any reset type actions. More... | |
virtual bool | IsGrounded () |
Determines whether this character is grounded. Only applied if ShouldDoBaseCollisions returned false this frame. Else the IsGrounded() method from the base collisions will be used. More... | |
Protected Attributes | |
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... | |
![]() | |
Character | character |
Cached reference to the character. More... | |
AdditionalCondition[] | conditions |
Cached list of all additional conditions. More... | |
Properties | |
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... | |
![]() | |
virtual Character | Character [get] |
Sets the character for this movement. More... | |
virtual bool | Enabled [get, set] |
A custom enable which base movements can use to pass on enable values. More... | |
virtual Movement | Implementation [get] |
Gets the underlying implementation (if not overridden return itself). More... | |
virtual bool | ShouldApplyGravity [get] |
Gets a value indicating whether this PlatformerPro.Movement expects gravity to be applied after its movement finishes. More... | |
virtual float | CurrentGravity [get] |
Gets a value indicating the current gravity, only used if this movement doesn't apply the default gravity.
| |
virtual RaycastType | ShouldDoBaseCollisions [get] |
Gets a value indicating whether this PlatformerPro.Movement expects the base collisions to be executed after its movement finishes. More... | |
virtual bool | ShouldDoRotations [get] |
Gets a value indicating whether this PlatformerPro.Movement expects the rotations to be calculated and applied by the character. More... | |
virtual AnimationState | AnimationState [get] |
Gets the animation state that this movement wants to set. More... | |
virtual string | OverrideState [get] |
Gets the animation override state that this movement wants to set. More... | |
virtual int | AnimationPriority [get] |
Gets the priority of the animation state that this movement wants to set. More... | |
virtual int | FacingDirection [get] |
Returns the direction the character is facing. 0 for none, 1 for right, -1 for left. More... | |
virtual bool | PreventXVelocityReset [get] |
If true then don't allow base collisions to reset velocity in X. More... | |
static MovementInfo | Info [get] |
Static movement info used by the editor. More... | |
virtual VelocityType | VelocityType [get] |
How does this movement use Velocity. More... | |
Additional Inherited Members | |
![]() | |
static bool | CheckSideCollisions (Character character, int requiredHits, RaycastType types) |
Utility method which checks for side collissions. More... | |
![]() | |
bool | skipEquipmentMultipliers |
If true don't apply equipment multipliers to this movement. More... | |
bool | skipUpgradeMultipliers |
If true don't apply upgrade multipliers to this movement. More... | |
bool | skipPowerUpMultipliers |
If true don't apply power-up multipliers to this movement. More... | |
![]() | |
void | AssignReferences (Character character) |
Initialise this movement and return a reference to the ready to use movement. More... | |
A wrapper class for handling movement that proxies the movement function to the desired implementation.
T | : | Movement |
|
virtual |
Initialise this movement.
Reimplemented from PlatformerPro.Movement.
bool PlatformerPro.BaseMovement< T >.IsMovementDataDifferent | ( | MovementVariable[] | originalMovementData | ) |
Determines whether this instances movement data is different from the supplied originalMovementData.
true
if this instances movement data different the specified originalMovementData; otherwise, false
.originalMovementData | Original movement data. |
|
protected |
The class that will do the movement.
|
protected |
Data that should be applied to the movement type on init.
|
protected |
The type of movement as a string.
|
getset |
A custom enable which base movements can use to pass on enable values.
The enabled.
|
get |
Gets the underlying implementation.
The implementation.
|
staticget |
Static movement info used by the editor.
|
getset |
Data that should be applied to the movement type on init.
|
getset |
The type of movement as a string.