|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.b3dgs.lionengine.game.Camera
com.b3dgs.lionengine.game.platform.PlatformCamera
public class PlatformCamera
More specific camera, platform game oriented. It supports map borders limitation (can't see outside map).
Field Summary |
---|
Fields inherited from class com.b3dgs.lionengine.game.Camera |
---|
horizontalInterval, verticalInterval, x, xOff, xOffOld, xOld, y, yOff, yOffOld, yOld |
Constructor Summary | |
---|---|
PlatformCamera(int width,
int height,
int horizontalInterval,
int verticalInterval)
Create a new platform camera. |
Method Summary | |
---|---|
void |
follow(AbstractPlatformEntity<?> entity)
Follow specified entity. |
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)
Move the camera using specific vector. |
void |
place(float x,
float y)
Place camera at a specific location. |
void |
setX(float x)
Set location x (offsets are automatic). |
void |
setY(float y)
Set location y (offsets are automatic). |
void |
updateLimits(int top,
int left,
int right,
int bottom)
Define the map borders. |
Methods inherited from class com.b3dgs.lionengine.game.Camera |
---|
backupLocation, follow, getDiffX, getDiffY, getX, getXOld, getXReal, getY, getYOld, getYReal, setIntervals |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlatformCamera(int width, int height, int horizontalInterval, int verticalInterval)
width
- screen width.height
- screen height.horizontalInterval
- horizontal floating margin.verticalInterval
- vertical floating margin.Method Detail |
---|
public void follow(AbstractPlatformEntity<?> entity)
entity
- entity to follow.public void move(float vx, float vy)
Camera
move
in class Camera
vx
- horizontal vector.vy
- vertical vector.public void place(float x, float y)
Camera
place
in class Camera
x
- horizontal location.y
- vertical location.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
- map top.left
- map left.right
- map right.bottom
- map bottom.public int getMapLeftLimit()
public int getMapRightLimit()
public int getMapUpLimit()
public int getMapDownLimit()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |