platformer
Public Member Functions | Public Attributes | List of all members
UnityPlatformer.JumpVariableHeight Class Reference

Variable Jump. Use to create a Min/Max jump depending on how much time the key is pressed More...

Inheritance diagram for UnityPlatformer.JumpVariableHeight:
UnityPlatformer.Jump

Public Member Functions

 JumpVariableHeight (Character _character, float timeToJumpApex, float minJumpHeight, float maxJumpHeight, float hangTime)
 Constructor More...
 
 JumpVariableHeight (Character _character, JumpVariableHeightProperties jp)
 Constructor More...
 
void Init (float timeToJumpApex, float minJumpHeight, float maxJumpHeight, float hangTime)
 Constructor More...
 
override void StartJump (ref Vector3 velocity)
 Set initial velocity More...
 
override void EndJump (ref Vector3 velocity)
 Set final velocity More...
 
override bool IsBeforeApex ()
 Did apex reached? More...
 
override bool IsHanging ()
 Did apex reached? More...
 
override bool Jumping (ref Vector3 velocity, float delta)
 Set velocity while jumping More...
 
- Public Member Functions inherited from UnityPlatformer.Jump
virtual void Reset ()
 Reset jump data for next jump More...
 

Public Attributes

float maxJumpVelocity
 Max jump velocity More...
 
float minJumpVelocity
 Min jump velocity More...
 
int hangFrames
 Frame count hanging More...
 
int apexFrames
 Frame count until apex More...
 
- Public Attributes inherited from UnityPlatformer.Jump
Character character
 Target Character More...
 
int ticks
 Ticks since jump start More...
 

Detailed Description

Variable Jump. Use to create a Min/Max jump depending on how much time the key is pressed

Constructor & Destructor Documentation

◆ JumpVariableHeight() [1/2]

UnityPlatformer.JumpVariableHeight.JumpVariableHeight ( Character  _character,
float  timeToJumpApex,
float  minJumpHeight,
float  maxJumpHeight,
float  hangTime 
)
inline

Constructor

◆ JumpVariableHeight() [2/2]

UnityPlatformer.JumpVariableHeight.JumpVariableHeight ( Character  _character,
JumpVariableHeightProperties  jp 
)
inline

Constructor

Member Function Documentation

◆ EndJump()

override void UnityPlatformer.JumpVariableHeight.EndJump ( ref Vector3  velocity)
inlinevirtual

Set final velocity

Implements UnityPlatformer.Jump.

◆ Init()

void UnityPlatformer.JumpVariableHeight.Init ( float  timeToJumpApex,
float  minJumpHeight,
float  maxJumpHeight,
float  hangTime 
)
inline

Constructor

◆ IsBeforeApex()

override bool UnityPlatformer.JumpVariableHeight.IsBeforeApex ( )
inlinevirtual

Did apex reached?

Implements UnityPlatformer.Jump.

◆ IsHanging()

override bool UnityPlatformer.JumpVariableHeight.IsHanging ( )
inlinevirtual

Did apex reached?

Implements UnityPlatformer.Jump.

◆ Jumping()

override bool UnityPlatformer.JumpVariableHeight.Jumping ( ref Vector3  velocity,
float  delta 
)
inlinevirtual

Set velocity while jumping

Reimplemented from UnityPlatformer.Jump.

◆ StartJump()

override void UnityPlatformer.JumpVariableHeight.StartJump ( ref Vector3  velocity)
inlinevirtual

Set initial velocity

Implements UnityPlatformer.Jump.

Member Data Documentation

◆ apexFrames

int UnityPlatformer.JumpVariableHeight.apexFrames

Frame count until apex

◆ hangFrames

int UnityPlatformer.JumpVariableHeight.hangFrames

Frame count hanging

◆ maxJumpVelocity

float UnityPlatformer.JumpVariableHeight.maxJumpVelocity

Max jump velocity

◆ minJumpVelocity

float UnityPlatformer.JumpVariableHeight.minJumpVelocity

Min jump velocity


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