![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
This is the basic behaviour from which all movement behaviours are derived. To create your own movement extend this class. More...
Public Member Functions | |
virtual Movement | Init (Character character) |
Initialise this movement and retyrn a reference to the ready to use movement. 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... | |
Static Public Member Functions | |
static bool | CheckSideCollisions (Character character, int requiredHits, RaycastType types) |
Utility method which checks for side collissions. More... | |
Public Attributes | |
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... | |
Protected Member Functions | |
void | AssignReferences (Character character) |
Initialise this movement and return a reference to the ready to use movement. More... | |
Protected Attributes | |
Character | character |
Cached reference to the character. More... | |
AdditionalCondition[] | conditions |
Cached list of all additional conditions. More... | |
Properties | |
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... | |
This is the basic behaviour from which all movement behaviours are derived. To create your own movement extend this class.
|
protected |
Initialise this movement and return a reference to the ready to use movement.
|
virtual |
If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't.
true
if control is wanted, false
otherwise.
|
static |
Utility method which checks for side collissions.
true
, if sides hit something, false
otherwise.character | Character to check. |
requiredHits | Required number of side hits. |
types | Side types to check. |
|
virtual |
Call activated on each condition.
|
virtual |
Moves the character.
Reimplemented in PlatformerPro.PowerBombAttack, and PlatformerPro.DashAttack.
|
virtual |
If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't.
true
if control is wanted, false
otherwise.Reimplemented in PlatformerPro.BasicAttacks.
|
virtual |
Called when the movement gets control. Typically used to do initialisation of velocity and the like.
Initialise this movement and retyrn a reference to the ready to use movement.
Reimplemented in PlatformerPro.BaseMovement< T >, and PlatformerPro.BasicAttacks.
|
virtual |
|
virtual |
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.
true
if this character is grounded; otherwise, false
.
|
virtual |
Called when the movement loses control. Override to do any reset type actions.
|
virtual |
Does any movement that MUST be done after collissions are calculated.
|
virtual |
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.
|
protected |
Cached reference to the character.
|
protected |
Cached list of all additional conditions.
bool PlatformerPro.Movement.skipEquipmentMultipliers |
If true don't apply equipment multipliers to this movement.
bool PlatformerPro.Movement.skipPowerUpMultipliers |
If true don't apply power-up multipliers to this movement.
bool PlatformerPro.Movement.skipUpgradeMultipliers |
If true don't apply upgrade multipliers to this movement.
|
get |
Gets the priority of the animation state that this movement wants to set.
|
get |
Gets the animation state that this movement wants to set.
|
get |
Sets the character for this movement.
|
get |
Gets a value indicating the current gravity, only used if this movement doesn't apply the default gravity.
|
getset |
A custom enable which base movements can use to pass on enable values.
The enabled.
|
get |
Returns the direction the character is facing. 0 for none, 1 for right, -1 for left.
|
get |
Gets the underlying implementation (if not overridden return itself).
The implementation.
|
staticget |
Static movement info used by the editor.
|
get |
Gets the animation override state that this movement wants to set.
|
get |
If true then don't allow base collisions to reset velocity in X.
|
get |
Gets a value indicating whether this PlatformerPro.Movement expects gravity to be applied after its movement finishes.
|
get |
Gets a value indicating whether this PlatformerPro.Movement expects the base collisions to be executed after its movement finishes.
|
get |
Gets a value indicating whether this PlatformerPro.Movement expects the rotations to be calculated and applied by the character.
|
get |
How does this movement use Velocity.