Air movement digital.
More...
◆ DoJump()
override void PlatformerPro.AirMovement_Digital.DoJump |
( |
| ) |
|
|
virtual |
◆ DoMove()
override void PlatformerPro.AirMovement_Digital.DoMove |
( |
| ) |
|
◆ DoOverridenJump()
override void PlatformerPro.AirMovement_Digital.DoOverridenJump |
( |
float |
newHeight, |
|
|
int |
newJumpCount, |
|
|
bool |
skipPowerUps = false |
|
) |
| |
|
virtual |
◆ ForceMaintainControl()
override bool PlatformerPro.AirMovement_Digital.ForceMaintainControl |
( |
| ) |
|
If the jump just started force control.
◆ HandleGravityFlipped()
override void PlatformerPro.AirMovement_Digital.HandleGravityFlipped |
( |
object |
sender, |
|
|
System.EventArgs |
e |
|
) |
| |
|
protectedvirtual |
◆ Init()
Initialise the movement with the given movement data.
- Parameters
-
◆ LosingControl()
override void PlatformerPro.AirMovement_Digital.LosingControl |
( |
| ) |
|
Called when the movement loses control. Reset the jump count.
◆ MoveInX()
override void PlatformerPro.AirMovement_Digital.MoveInX |
( |
float |
horizontalAxis, |
|
|
int |
horizontalAxisDigital, |
|
|
ButtonState |
runButton |
|
) |
| |
|
protectedvirtual |
◆ MoveInY()
override void PlatformerPro.AirMovement_Digital.MoveInY |
( |
| ) |
|
|
protectedvirtual |
◆ WantsAirControl()
override bool PlatformerPro.AirMovement_Digital.WantsAirControl |
( |
| ) |
|
|
virtual |
Gets a value indicating whether this movement wants to control the movement in the air. Default is false with movement falling back to default air. Override if you want control.
true
false
- Returns
true
, if air control was wantsed, false
otherwise.
Reimplemented from PlatformerPro.AirMovement.
◆ WantsJump()
override bool PlatformerPro.AirMovement_Digital.WantsJump |
( |
| ) |
|
|
virtual |
Gets a value indicating whether this movement wants to intiate the jump.
true
if this instance should jump; otherwise, false
.
Reimplemented from PlatformerPro.AirMovement.
◆ airSpeed
float PlatformerPro.AirMovement_Digital.airSpeed |
The (horizontal) speed the character moves at in the air.
◆ AirSpeedIndex
const int PlatformerPro.AirMovement_Digital.AirSpeedIndex = 0 |
|
staticprotected |
The index for the air speed value in the movement data.
◆ canDoubleJump
bool PlatformerPro.AirMovement_Digital.canDoubleJump |
Can the character double jump.
◆ CanDoubleJumpIndex
const int PlatformerPro.AirMovement_Digital.CanDoubleJumpIndex = 6 |
|
staticprotected |
The index for can double jump in the movement data.
◆ DefaultAirSpeed
const float PlatformerPro.AirMovement_Digital.DefaultAirSpeed = 5.0f |
|
staticprotected |
◆ DefaultCanDoubleJump
const bool PlatformerPro.AirMovement_Digital.DefaultCanDoubleJump = false |
|
staticprotected |
The default can double jump value.
◆ DefaultDoubleJumpHeight
const float PlatformerPro.AirMovement_Digital.DefaultDoubleJumpHeight = 2.0f |
|
staticprotected |
The default height of the double jump.
◆ DefaultGroundedLeeway
const float PlatformerPro.AirMovement_Digital.DefaultGroundedLeeway = 0.1f |
|
staticprotected |
The default grounded leeway.
◆ DefaultJumpHeight
const float PlatformerPro.AirMovement_Digital.DefaultJumpHeight = 2.0f |
|
staticprotected |
The default height of the jump.
◆ DefaultRelativeJumpGravity
const float PlatformerPro.AirMovement_Digital.DefaultRelativeJumpGravity = 1.0f |
|
staticprotected |
The default relative jump gravity.
◆ doubleJumpHeight
float PlatformerPro.AirMovement_Digital.doubleJumpHeight |
How high the character jumps on a double jump.
◆ DoubleJumpHeightIndex
const int PlatformerPro.AirMovement_Digital.DoubleJumpHeightIndex = 7 |
|
staticprotected |
The index for the double jump height in the movement data.
◆ doubleJumpInitialVelocity
float PlatformerPro.AirMovement_Digital.doubleJumpInitialVelocity |
|
protected |
Derived initial velocity based on doubleJumpHeight and time.
◆ expectedJumpPeak
float PlatformerPro.AirMovement_Digital.expectedJumpPeak |
|
protected |
Where we expect the jump to peak.
◆ groundedLeeway
float PlatformerPro.AirMovement_Digital.groundedLeeway |
After the user leaves the ground how much additional time do we give the user to press jump and still consider them grounded.
◆ GroundedLeewayIndex
const int PlatformerPro.AirMovement_Digital.GroundedLeewayIndex = 5 |
|
staticprotected |
The index for the ground leeway in the movement data.
◆ initialVelocity
float PlatformerPro.AirMovement_Digital.initialVelocity |
|
protected |
Derived initial velocity based on jumpHeight and relativeGravity.
◆ jumpButtonReleased
bool PlatformerPro.AirMovement_Digital.jumpButtonReleased |
|
protected |
For double track if the jump button has been released. We don't double jump if the user just holds jump.
◆ jumpCount
int PlatformerPro.AirMovement_Digital.jumpCount |
|
protected |
Jump count, set to 0 while not jumping, 1 while jumping, 2 while double
◆ JumpCurveIndex
const int PlatformerPro.AirMovement_Digital.JumpCurveIndex = 2 |
|
staticprotected |
The index for the jump curve value in the movement data.
◆ jumpHeight
float PlatformerPro.AirMovement_Digital.jumpHeight |
How high the character jumps.
◆ JumpHeightIndex
const int PlatformerPro.AirMovement_Digital.JumpHeightIndex = 1 |
|
staticprotected |
The index for the air speed value in the movement data.
◆ JumpRelativeGravityIndex
const int PlatformerPro.AirMovement_Digital.JumpRelativeGravityIndex = 4 |
|
staticprotected |
The index for the relative jump gravity in the movement data.
◆ jumpStart
bool PlatformerPro.AirMovement_Digital.jumpStart |
|
protected |
True before the jump leaves the ground.
◆ jumpWhenButtonHeld
bool PlatformerPro.AirMovement_Digital.jumpWhenButtonHeld |
|
protected |
Automatically jump when the character holds the jump button down.
◆ JumpWhenButtonHeldIndex
const int PlatformerPro.AirMovement_Digital.JumpWhenButtonHeldIndex = 8 |
|
staticprotected |
The index for the Jump When Button Held in the movement data.
◆ maxDoubleJumpCount
int PlatformerPro.AirMovement_Digital.maxDoubleJumpCount |
How many times the character can double jump. -1 means infinite.
◆ MaxDoubleJumpCountIndex
const int PlatformerPro.AirMovement_Digital.MaxDoubleJumpCountIndex = 9 |
|
staticprotected |
The index for the Max Double Jump Count in the movement data.
◆ MovementVariableCount
const int PlatformerPro.AirMovement_Digital.MovementVariableCount = 10 |
|
staticprotected |
The size of the movement variable array.
◆ readyToJumpTimer
float PlatformerPro.AirMovement_Digital.readyToJumpTimer |
|
protected |
Character can only jump if this timer is less than zero.
◆ relativeJumpGravity
float PlatformerPro.AirMovement_Digital.relativeJumpGravity |
The gravity applied during jump (relative to the characters Gravity component).
◆ ShowJumpDetailsIndex
const int PlatformerPro.AirMovement_Digital.ShowJumpDetailsIndex = 3 |
|
staticprotected |
The index for the value of show jumped details. Only used by editor.
◆ showJumpStartedAnimation
bool PlatformerPro.AirMovement_Digital.showJumpStartedAnimation |
|
protected |
Ensure we play the jump start animation.
◆ AnimationPriority
override int PlatformerPro.AirMovement_Digital.AnimationPriority |
|
get |
Gets the priority for the animation state.
◆ AnimationState
override AnimationState PlatformerPro.AirMovement_Digital.AnimationState |
|
get |
Gets the animation state that this movement wants to set.
◆ CurrentGravity
override float PlatformerPro.AirMovement_Digital.CurrentGravity |
|
get |
Gets a value indicating the current gravity, only used if this movement doesn't apply the default gravity.
- See also
- ShouldApplyGravity()
◆ FacingDirection
override int PlatformerPro.AirMovement_Digital.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.AirMovement_Digital.Info |
|
staticget |
Static movement info used by the editor.
◆ ShouldApplyGravity
override bool PlatformerPro.AirMovement_Digital.ShouldApplyGravity |
|
get |
This class will handle gravity internally.
The documentation for this class was generated from the following file: