public class CursorStrategy extends Cursor
Constructor and Description |
---|
CursorStrategy(com.b3dgs.lionengine.Mouse mouse,
CameraStrategy camera,
com.b3dgs.lionengine.Resolution source,
int tileWidth,
int tileHeight,
com.b3dgs.lionengine.core.Media... cursor)
Constructor.
|
CursorStrategy(com.b3dgs.lionengine.Mouse mouse,
CameraStrategy camera,
com.b3dgs.lionengine.Resolution source,
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(Tiled tiled,
CameraStrategy camera)
Check if the cursor can be over the entity, depending of the camera view.
|
void |
update(double extrp) |
getClick, getSensibilityHorizontal, getSensibilityVertical, getSurfaceId, isSynchronized, render, setArea, setLocation, setLockMouse, setRenderingOffset, setSensibility, setSurfaceId, setSyncMode
public CursorStrategy(com.b3dgs.lionengine.Mouse mouse, CameraStrategy camera, com.b3dgs.lionengine.Resolution source, 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 CursorStrategy(com.b3dgs.lionengine.Mouse mouse, CameraStrategy 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(Tiled tiled, CameraStrategy camera)
tiled
- The tiled reference.camera
- The camera reference.true
if can click over, false
else.public int getLocationX()
getLocationX
in class Cursor
public int getLocationY()
getLocationY
in class Cursor
Copyright © 2014 Byron 3D Games Studio. All rights reserved.