public class ItemElementCollisionEvent extends Event
World3DModel
, or more precisely, when the
item collides with the collision shape of the element. This means the event only
works for elements which have a collision shape.isColliding()
returns false in this case).World3DModel.setListenForCollisions(boolean)
is
set to true.PlayerElementCollisionEvent
Constructor and Description |
---|
ItemElementCollisionEvent(WorldItem item,
WorldElement worldElement,
boolean colliding,
float appliedImpulse) |
Modifier and Type | Method and Description |
---|---|
WorldItem |
getItem() |
WorldElement |
getWorldElement()
Gets the world element.
|
boolean |
isColliding()
Gets whether or not the item is currently "touching" (colliding with) the
element.
|
public ItemElementCollisionEvent(WorldItem item, WorldElement worldElement, boolean colliding, float appliedImpulse)
public WorldItem getItem()
public WorldElement getWorldElement()
public boolean isColliding()