public class CameraPlatform extends CameraGame
height, intervalHorizontal, intervalVertical, location, offset, width, x, y
Constructor and Description |
---|
CameraPlatform(int screenWidth,
int screenHeight)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
follow(EntityPlatform entity)
Follow automatically the specified entity.
|
int |
getLimitMapDown()
Get map down border.
|
int |
getLimitMapLeft()
Get map left border.
|
int |
getLimitMapRight()
Get map right border.
|
int |
getLimitMapUp()
Get map up border.
|
void |
moveLocation(double extrp,
double vx,
double vy) |
void |
setLimits(MapTile<?,?> map)
Define the map borders.
|
void |
setLocation(double x,
double y) |
void |
setLocationX(double x) |
void |
setLocationY(double y) |
void |
setScreenSize(int screenWidth,
int screenHeight)
Set the screen size.
|
follow, getHeight, getLocationIntX, getLocationIntY, getLocationOldX, getLocationOldY, getLocationRealX, getLocationRealY, getLocationX, getLocationY, getMovementHorizontal, getMovementVertical, getViewHeight, getViewpointX, getViewpointY, getViewWidth, getViewX, getViewY, getWidth, isVisible, isVisible, moveLocation, resetInterval, setIntervals, setSize, setView, teleport, teleportX, teleportY
public CameraPlatform(int screenWidth, int screenHeight)
screenWidth
- The screen width.screenHeight
- The screen height.public void follow(EntityPlatform entity)
entity
- The entity to follow.public void setScreenSize(int screenWidth, int screenHeight)
setLimits(MapTile)
to know the border top-right of the map from the screen,
and by follow(EntityPlatform)
to know the screen center.screenWidth
- The screen width.screenHeight
- The screen height.public void setLimits(MapTile<?,?> map)
Note: Must be called after map loading (usually in WorldGame.loading(FileReading)
).
map
- The map reference.public int getLimitMapLeft()
public int getLimitMapRight()
public int getLimitMapUp()
public int getLimitMapDown()
public void moveLocation(double extrp, double vx, double vy)
moveLocation
in interface Localizable
moveLocation
in class CameraGame
public void setLocation(double x, double y)
setLocation
in interface Localizable
setLocation
in class CameraGame
public void setLocationX(double x)
setLocationX
in interface Localizable
setLocationX
in class CameraGame
public void setLocationY(double y)
setLocationY
in interface Localizable
setLocationY
in class CameraGame
Copyright © 2014 Byron 3D Games Studio. All rights reserved.