public class PlatformCamera extends AbstractCamera
horizontalInterval, verticalInterval, x, xOff, xOffOld, xOld, y, yOff, yOffOld, yOld
Constructor and Description |
---|
PlatformCamera(AbstractWorld world,
int horizontalInterval,
int verticalInterval) |
Modifier and Type | Method and Description |
---|---|
void |
follow(AbstractPlatformPlayer<?> player) |
int |
getMapDownLimit()
Get down map border.
|
int |
getMapLeftLimit()
Get left map border.
|
int |
getMapRightLimit()
Get right map border.
|
int |
getMapUpLimit()
Get up map border.
|
void |
move(float vx,
float vy) |
void |
place(float x,
float y) |
void |
render(java.awt.Graphics2D g,
AbstractPlatformPlayer<?> player) |
void |
setX(float x)
Set location x (offsets is automatic).
|
void |
setY(float y)
Set location y (offsets is automatic).
|
void |
updateLimits(int top,
int left,
int right,
int bottom)
Define the map borders.
|
backupLocation, follow, getDiffX, getDiffY, getX, getXOld, getY, getYOld
public PlatformCamera(AbstractWorld world, int horizontalInterval, int verticalInterval)
public void render(java.awt.Graphics2D g, AbstractPlatformPlayer<?> player)
public void follow(AbstractPlatformPlayer<?> player)
public void move(float vx, float vy)
move
in class AbstractCamera
public void place(float x, float y)
place
in class AbstractCamera
public void setX(float x)
x
- location x.public void setY(float y)
y
- location y.public final void updateLimits(int top, int left, int right, int bottom)
top
- left
- right
- bottom
- public int getMapLeftLimit()
public int getMapRightLimit()
public int getMapUpLimit()
public int getMapDownLimit()