public final class CharacterJumpMovement
extends javafx.animation.AnimationTimer
Constructor and Description |
---|
CharacterJumpMovement(JumpCharacter c,
javafx.scene.Scene s) |
CharacterJumpMovement(JumpCharacter c,
javafx.scene.Scene s,
int PLATFORM) |
CharacterJumpMovement(JumpCharacter c,
javafx.scene.Scene s,
javafx.scene.input.KeyCode left,
javafx.scene.input.KeyCode right,
javafx.scene.input.KeyCode jump,
int PLATFORM) |
Modifier and Type | Method and Description |
---|---|
javafx.scene.Scene |
getGAMESCENE() |
javafx.scene.input.KeyCode |
getJump() |
javafx.scene.input.KeyCode |
getLeft() |
int |
getPLATFORM() |
javafx.scene.input.KeyCode |
getRight() |
void |
handle(long now) |
boolean |
isB_left() |
boolean |
isB_right() |
boolean |
isJump_finished() |
void |
resetJumpAnimation()
resets the jump animation
|
void |
setB_jump(boolean b_jump) |
void |
setB_left(boolean b_left) |
void |
setB_right(boolean b_right) |
void |
setJump_finished(boolean jump_finished) |
void |
setJump(javafx.scene.input.KeyCode jump) |
void |
setLeft(javafx.scene.input.KeyCode left) |
void |
setRight(javafx.scene.input.KeyCode right) |
public final double A
public double v
public CharacterJumpMovement(JumpCharacter c, javafx.scene.Scene s)
c
- the Character for the movements
- the current Scenepublic CharacterJumpMovement(JumpCharacter c, javafx.scene.Scene s, int PLATFORM)
c
- the Character for the movements
- the current ScenePLATFORM
- the groundpublic CharacterJumpMovement(JumpCharacter c, javafx.scene.Scene s, javafx.scene.input.KeyCode left, javafx.scene.input.KeyCode right, javafx.scene.input.KeyCode jump, int PLATFORM)
c
- the Character for the movements
- the current Sceneleft
- the left Keyright
- the right Keyjump
- the jump KeyPLATFORM
- the groundpublic void handle(long now)
handle
in class javafx.animation.AnimationTimer
public void resetJumpAnimation()
public javafx.scene.input.KeyCode getLeft()
public javafx.scene.input.KeyCode getRight()
public boolean isB_left()
public boolean isB_right()
public javafx.scene.Scene getGAMESCENE()
public void setLeft(javafx.scene.input.KeyCode left)
left
- set the KeyCode of the left keypublic void setRight(javafx.scene.input.KeyCode right)
right
- set the KeyCode of the right keypublic void setB_left(boolean b_left)
b_left
- set the KeyCode of the left keypublic void setB_right(boolean b_right)
b_right
- set the boolean of rightpublic int getPLATFORM()
public javafx.scene.input.KeyCode getJump()
public void setB_jump(boolean b_jump)
b_jump
- set the boolean of the jumppublic void setJump(javafx.scene.input.KeyCode jump)
jump
- set the KeyCode of the jump keypublic void setJump_finished(boolean jump_finished)
jump_finished
- set the boolean if jump is finishedpublic boolean isJump_finished()