|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.b3dgs.lionengine.game.Gravity
public class Gravity
Gravity handler, for smoothed jump effect.
Constructor Summary | |
---|---|
Gravity(Entity player)
Create a new gravity. |
Method Summary | |
---|---|
boolean |
canJump()
Check if player is able to jump. |
void |
fall()
Call to make object fall. |
float |
getMaxGainedY()
Get the maxGainedY. |
float |
getSpeed()
Get gravity speed. |
boolean |
isFalling()
Get falling state. |
boolean |
isJumping()
Get jumping state. |
boolean |
isUpping()
Check if player is upping (differential y). |
void |
jump()
Call to make object jump. |
void |
jump(float force)
Call to make object jump with specified force. |
void |
setForces(float jumpForce,
float fallForce)
Set gravity forces. |
void |
setMaxGainedY(float maxGainedY)
Set the maximum gainable height (maximum jump height). |
void |
setMinGainedY(float minGainedY)
Set the minimum gainable height (minimum jump height). |
void |
stop()
Call to stop process (ground reached). |
void |
update(float extrp)
Update object gravity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Gravity(Entity player)
Method Detail |
---|
public void update(float extrp)
extrp
- extrapolation value.public void jump()
public void jump(float force)
force
- specified force.public void fall()
public void stop()
public boolean canJump()
public float getSpeed()
public boolean isJumping()
public boolean isUpping()
public boolean isFalling()
public void setForces(float jumpForce, float fallForce)
jumpForce
- jump force.fallForce
- fall force.public void setMinGainedY(float minGainedY)
minGainedY
- minimum jump height.public void setMaxGainedY(float maxGainedY)
maxGainedY
- minimum jump height.public float getMaxGainedY()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |