public abstract class AbstractPosition
extends java.lang.Object
Constructor and Description |
---|
AbstractPosition()
With the currently loaded top left chunk.
|
AbstractPosition(int topleftX,
int topleftY)
With custom reference
|
Modifier and Type | Method and Description |
---|---|
abstract AbstractPosition |
addVector(float[] vector) |
abstract AbstractPosition |
addVector(float x,
float y,
float z) |
abstract AbstractPosition |
addVector(com.badlogic.gdx.math.Vector3 vector) |
abstract AbstractPosition |
cpy() |
abstract Block |
getBlock() |
abstract Block |
getBlockSafe()
Get the block at the position.
|
abstract Coordinate |
getCoord() |
float |
getHeight()
Geht the height (z-value) of the coordinate (game dimension).
|
abstract Point |
getPoint() |
abstract int |
getProjectedPosX() |
abstract int |
getProjectedPosY() |
protected int |
getReferenceX() |
protected int |
getReferenceY() |
abstract boolean |
onLoadedMap()
Checks if the position is on the chunks currently in memory.
|
void |
setHeight(float height) |
public AbstractPosition(int topleftX, int topleftY)
topleftX
- the chunk's X coordinate of the chunk at the top lefttopleftY
- the chunk's Y coordinate of the chunk at the top leftpublic AbstractPosition()
public float getHeight()
public void setHeight(float height)
height
- protected int getReferenceX()
protected int getReferenceY()
public abstract int getProjectedPosX()
public abstract int getProjectedPosY()
public abstract Point getPoint()
public abstract Coordinate getCoord()
public abstract Block getBlock()
getBlockSafe()
public abstract Block getBlockSafe()
getBlock()
public abstract AbstractPosition cpy()
public abstract boolean onLoadedMap()
public abstract AbstractPosition addVector(float[] vector)
vector
- public abstract AbstractPosition addVector(com.badlogic.gdx.math.Vector3 vector)
vector
- public abstract AbstractPosition addVector(float x, float y, float z)
x
- y
- z
-