public class CameraAI extends java.lang.Object implements InputComponent
Constructor and Description |
---|
CameraAI(int movementWindow,
GameObject focus,
float viewFrustum,
float minSpeed,
float maxSpeed,
int rightBorder)
initialises a new camera object
|
Modifier and Type | Method and Description |
---|---|
void |
handleInput(GameObject object)
updates the cameras position
|
public CameraAI(int movementWindow, GameObject focus, float viewFrustum, float minSpeed, float maxSpeed, int rightBorder)
movementWindow
- the players movement window for which the camera should not change its positionfocus
- the object to follow, probably the player in most casesviewFrustum
- used to lock the camera at the end/beginning of the levelminSpeed
- the minimum acceleration of the cameramaxSpeed
- the max speed, should optimally equal the players speedrightBorder
- the right border of the levelpublic void handleInput(GameObject object)
handleInput
in interface InputComponent
object
- the camera to update