Class JetpackAbility
java.lang.Object
com.codename1.gaming.platformer.Ability
com.codename1.gaming.platformer.JetpackAbility
A jetpack: holding
Input#ALT in the air thrusts upward while fuel lasts; fuel
refills on the ground.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetFuel()Fuel left, for the HUD.longhashState(long h) Mixes the ability's own state into a hash, so two runs that diverge inside an ability are caught.voidprocess(Actor c, PlatformWorld world) Sets velocity and claims aMovementState.voidreset()Forgets what the ability was in the middle of, when its actor respawns: a dash, a buffered jump or a grip does not outlive a death.Methods inherited from class Ability
earlyProcess, isEnabled, lateProcess, mix, setEnabled
-
Field Details
-
thrust
public int thrustUpward acceleration while thrusting, fixed point per tick squared. -
maxRise
public int maxRiseFastest rise, fixed point per tick. -
fuelTicks
public int fuelTicksTicks of thrust on a full tank. -
refill
public int refillFuel regained per tick on the ground.
-
-
Constructor Details
-
JetpackAbility
public JetpackAbility()
-
-
Method Details