public class Box extends InteractiveObject implements com.badlogic.gdx.utils.Pool.Poolable
InteractiveObject.InteractiveState| Modifier and Type | Field and Description |
|---|---|
static float |
COLLIDER_HEIGHT
Stores the width and height of a box's rectangle collider in world units.
|
static float |
COLLIDER_WIDTH
Stores the width and height of a box's rectangle collider in world units.
|
| Constructor and Description |
|---|
Box()
Creates a box whose bottom-center is at position (0, 0).
|
Box(float x,
float y)
Creates a box whose bottom-center is at position (x, y).
|
| Modifier and Type | Method and Description |
|---|---|
void |
scavenged()
Called when the box has been opened by the player.
|
void |
update(float deltaTime)
Updates the box every frame.
|
canTarget, getInteractiveState, getItemProbabilityMap, reset, setInteractiveState, setItemProbabilityMap, targetted, untargettedgetAcceleration, getCollider, getObjectId, getPosition, getPreviousPosition, getSkeleton, getStateTime, getTerrainCell, getVelocity, getX, getY, isAbove, moveTo, setAcceleration, setCollider, setObjectId, setPosition, setSkeleton, setStateTime, setTerrainCell, setVelocity, setVelocityX, setVelocityY, setX, setY, updateCollider, updatePositionpublic static final float COLLIDER_WIDTH
public static final float COLLIDER_HEIGHT
public Box()
public Box(float x, float y)
public void update(float deltaTime)
update in class InteractiveObjectpublic void scavenged()
scavenged in class InteractiveObject