public class MoverModel extends Object implements Mover
Constructor and Description |
---|
MoverModel()
Create a mover model.
|
Modifier and Type | Method and Description |
---|---|
double |
getOldX()
Get the old horizontal location.
|
double |
getOldY()
Get the old vertical location.
|
double |
getX() |
double |
getY() |
void |
moveLocation(double extrp,
Direction direction,
Direction... directions)
Move location using different directions.
|
void |
moveLocation(double extrp,
double vx,
double vy)
Move location using a simple force.
|
void |
setLocation(double x,
double y)
Set new location.
|
void |
setLocationX(double x)
Set new x location.
|
void |
setLocationY(double y)
Set new y location.
|
void |
teleport(double x,
double y)
Teleport to a new location.
|
void |
teleportX(double x)
Teleport to a new horizontal location.
|
void |
teleportY(double y)
Teleport to a new vertical location.
|
public void moveLocation(double extrp, Direction direction, Direction... directions)
Mover
moveLocation
in interface Mover
extrp
- The extrapolation value.direction
- The primary direction.directions
- The other directions.public void moveLocation(double extrp, double vx, double vy)
Mover
moveLocation
in interface Mover
extrp
- The extrapolation value.vx
- The horizontal force.vy
- The vertical force.public void teleport(double x, double y)
Mover
public void teleportX(double x)
Mover
public void teleportY(double y)
Mover
public void setLocation(double x, double y)
Mover
setLocation
in interface Mover
x
- The new horizontal location.y
- The new vertical location.public void setLocationX(double x)
Mover
setLocationX
in interface Mover
x
- The new horizontal location.public void setLocationY(double y)
Mover
setLocationY
in interface Mover
y
- The new vertical location.public double getX()
getX
in interface Localizable
public double getY()
getY
in interface Localizable
public double getOldX()
Mover
Copyright © 2016 Byron 3D Games Studio. All rights reserved.