public class CursorRts
extends com.b3dgs.lionengine.game.Cursor
Constructor and Description |
---|
CursorRts(com.b3dgs.lionengine.Mouse mouse,
CameraRts camera,
com.b3dgs.lionengine.Resolution source,
int tileWidth,
int tileHeight,
com.b3dgs.lionengine.core.Media... cursor)
Constructor.
|
CursorRts(com.b3dgs.lionengine.Mouse mouse,
CameraRts camera,
com.b3dgs.lionengine.Resolution source,
com.b3dgs.lionengine.game.map.MapTile<?,?> map,
com.b3dgs.lionengine.core.Media... cursor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
com.b3dgs.lionengine.Rectangle |
getGrid(int size)
Get a rectangle describing a grid (placed on the cursor, depending of map tile size).
|
int |
getGridHeight()
Get the grid height.
|
int |
getGridWidth()
Get the grid width.
|
int |
getLocationInTileX()
Get the horizontal tile pointed by the cursor.
|
int |
getLocationInTileY()
Get the vertical tile pointed by the cursor.
|
int |
getLocationX()
Get cursor location x on map (sync to camera).
|
int |
getLocationY()
Get cursor location y on map (sync to camera).
|
int |
getMoveX()
Get cursor horizontal move.
|
int |
getMoveY()
Get cursor vertical move.
|
int |
getScreenX()
Get cursor location x on screen (not sync to any camera).
|
int |
getScreenY()
Get cursor location y on screen (not sync to any camera).
|
boolean |
isOver(com.b3dgs.lionengine.game.Tiled tiled,
CameraRts camera)
Check if the cursor can be over the entity, depending of the camera view.
|
void |
update(double extrp) |
public CursorRts(com.b3dgs.lionengine.Mouse mouse, CameraRts camera, com.b3dgs.lionengine.Resolution source, com.b3dgs.lionengine.game.map.MapTile<?,?> map, com.b3dgs.lionengine.core.Media... cursor)
mouse
- The mouse reference (must not be null
).camera
- The camera reference (must not be null
).source
- The source display.cursor
- The cursor images media.map
- The map reference.public CursorRts(com.b3dgs.lionengine.Mouse mouse, CameraRts camera, com.b3dgs.lionengine.Resolution source, int tileWidth, int tileHeight, com.b3dgs.lionengine.core.Media... cursor)
mouse
- The mouse reference (must not be null
).camera
- The camera reference (must not be null
).source
- The source display.cursor
- The cursor images media.tileWidth
- The tile width.tileHeight
- The tile height.public com.b3dgs.lionengine.Rectangle getGrid(int size)
size
- The size (in tile square).public int getScreenX()
public int getScreenY()
public int getLocationInTileX()
public int getLocationInTileY()
public int getMoveX()
public int getMoveY()
public int getGridWidth()
public int getGridHeight()
public boolean isOver(com.b3dgs.lionengine.game.Tiled tiled, CameraRts camera)
tiled
- The tiled reference.camera
- The camera reference.true
if can click over, false
else.public void update(double extrp)
update
in class com.b3dgs.lionengine.game.Cursor
public int getLocationX()
getLocationX
in class com.b3dgs.lionengine.game.Cursor
public int getLocationY()
getLocationY
in class com.b3dgs.lionengine.game.Cursor