public final class CharacterMovement
extends javafx.animation.AnimationTimer
Constructor and Description |
---|
CharacterMovement(Character c,
javafx.scene.Scene s) |
CharacterMovement(Character c,
javafx.scene.Scene s,
int BORDER_LOW,
int BORDER_HIGH) |
CharacterMovement(Character c,
javafx.scene.Scene s,
javafx.scene.input.KeyCode up,
javafx.scene.input.KeyCode down,
javafx.scene.input.KeyCode left,
javafx.scene.input.KeyCode right,
int BORDER_LOW,
int BORDER_HIGH) |
Modifier and Type | Method and Description |
---|---|
int |
getBORDER_HIGH() |
int |
getBORDER_LOW() |
Character |
getCHARACTER() |
javafx.scene.input.KeyCode |
getDown() |
javafx.scene.Scene |
getGAMESCENE() |
javafx.scene.input.KeyCode |
getLeft() |
javafx.scene.input.KeyCode |
getRight() |
javafx.scene.input.KeyCode |
getUp() |
void |
handle(long now) |
boolean |
isB_down() |
boolean |
isB_left() |
boolean |
isB_right() |
boolean |
isB_up() |
void |
setb_down(boolean b_down) |
void |
setb_left(boolean b_left) |
void |
setb_right(boolean b_right) |
void |
setb_up(boolean b_up) |
void |
setdown(javafx.scene.input.KeyCode down) |
void |
setLeft(javafx.scene.input.KeyCode left) |
void |
setRight(javafx.scene.input.KeyCode right) |
void |
setup(javafx.scene.input.KeyCode up) |
public CharacterMovement(Character c, javafx.scene.Scene s)
c
- the Character for the movements
- the current Scenepublic CharacterMovement(Character c, javafx.scene.Scene s, int BORDER_LOW, int BORDER_HIGH)
c
- s
- BORDER_LOW
- BORDER_HIGH
- public CharacterMovement(Character c, javafx.scene.Scene s, javafx.scene.input.KeyCode up, javafx.scene.input.KeyCode down, javafx.scene.input.KeyCode left, javafx.scene.input.KeyCode right, int BORDER_LOW, int BORDER_HIGH)
c
- the Character for the movements
- the current Sceneup
- the up Keydown
- the down Keyleft
- the left Keyright
- the right KeyBORDER_LOW
- BORDER_HIGH
- public void handle(long now)
handle
in class javafx.animation.AnimationTimer
public javafx.scene.input.KeyCode getUp()
public javafx.scene.input.KeyCode getDown()
public javafx.scene.input.KeyCode getLeft()
public javafx.scene.input.KeyCode getRight()
public boolean isB_up()
public boolean isB_down()
public boolean isB_left()
public boolean isB_right()
public Character getCHARACTER()
public javafx.scene.Scene getGAMESCENE()
public void setup(javafx.scene.input.KeyCode up)
up
- set the KeyCode of uppublic void setdown(javafx.scene.input.KeyCode down)
down
- set the KeyCode of downpublic void setLeft(javafx.scene.input.KeyCode left)
left
- set the KeyCode of leftpublic void setRight(javafx.scene.input.KeyCode right)
right
- set the KeyCode of rightpublic void setb_up(boolean b_up)
b_up
- set the boolean of uppublic void setb_down(boolean b_down)
b_down
- set the boolean of downpublic void setb_left(boolean b_left)
b_left
- set the boolean of leftpublic void setb_right(boolean b_right)
b_right
- set the boolean of rightpublic int getBORDER_LOW()
public int getBORDER_HIGH()