public class Selection extends AbstractEntity
GAME_DIAGLENGTH, GAME_DIAGLENGTH2, GAME_EDGELENGTH, GAME_EDGELENGTH2, OBJECTTYPESNUM, VALUESNUM, VIEW_DEPTH, VIEW_DEPTH2, VIEW_DEPTH4, VIEW_HEIGHT, VIEW_HEIGHT2, VIEW_HEIGHT4, VIEW_WIDTH, VIEW_WIDTH2, VIEW_WIDTH4, ZAXISSHORTENING
Constructor and Description |
---|
Selection() |
Modifier and Type | Method and Description |
---|---|
Coordinate |
getCoordInNormalDirection() |
SimpleEntity |
getNormal() |
Side |
getNormalSide() |
void |
setNormal(Side side) |
void |
setPosition(AbstractPosition pos)
Set the coordinates without safety check.
|
AbstractEntity |
spawn(Point point)
add this entity to the map-> let it spawn
|
void |
update(float delta)
Updates the logic of the object.
|
void |
update(GameView view,
int screenX,
int screenY)
Updates thhe selection using the screen position of the cursor.
|
disableShadow, dispose, disposeFromMap, enableShadow, getAnimation, getCategory, getDimensionZ, getName, getPosition, getRegisteredEntities, isGettingSaved, isInMemoryArea, isObstacle, isOnGround, isTransparent, registerEngineEntities, registerEntity, setAnimation, setDimensionZ, setHeight, setName, setObstacle, setSaveToDisk, setTransparent, shouldBeDisposed, shouldBeDisposedFromMap, spawned
getAtlasRegion, getColor, getCoreData, getDepth, getDrawCalls, getHealth, getId, getLightlevel, getPixmap, getRotation, getScaling, getSprite, getSpriteId, getSprites, getSpritesheet, getSpritesheetPath, getTextureDiffuse, getTextureNormal, getValue, increaseDrawCalls, isHidden, loadSheet, render, render, render, render, resetDrawCalls, setColor, setCustomSpritesheet, setGraphicsId, setHealth, setHidden, setLightlevel, setRotation, setScaling, setValue, staticDispose
public AbstractEntity spawn(Point point)
AbstractEntity
spawn
in class AbstractEntity
point
- the point in the game world where the object ispublic void update(float delta)
AbstractEntity
update
in class AbstractEntity
delta
- time since last updatepublic void setPosition(AbstractPosition pos)
AbstractGameObject
setPosition
in class AbstractEntity
pos
- the coordinates you want to setpublic void setNormal(Side side)
side
- public Side getNormalSide()
public Coordinate getCoordInNormalDirection()
public SimpleEntity getNormal()
public void update(GameView view, int screenX, int screenY)
view
- screenX
- cursor position from leftscreenY
- cursor position from top