AreaTrigger
class AreaTrigger
AreaTrigger is a type of physics that can be used to check if an object is in a certain area. This physics prevents the object from colliding with any other object.
public class AreaTrigger
extends PhysicsEntity
— Constructors (1) —
Constructor | Description |
---|---|
AreaTrigger() | Creates a new AreaTrigger |
— Methods (6) —
Name | Description |
---|---|
boolean triggerWithName(String objectName) | Checks if the object with the same name as the text defined to be "objectName" is in the real area of the object. |
boolean isTriggering() | Return if any object is in the actual object area. |
ArrayList getTriggerList() | Return a ArrayList\<Collision> containing all "collisions" informations with the actual object. |
Collision getTrigger(int id) | Return a Collision class with all informations about the "collision" information with index == idx in getTriggerList method return value. |
[PhysicsLayer] getPhysicsLayer() | Return the PhysicsLayer of the AreaTrigger component. |
void setPhysicsLayer([PhysicsLayer] layer) | Define the PhysicsLayer of the AreaTrigger component to be "layer" argument. |
— Inherited Methods (7) —
Name | Description |
---|---|
SpatialObject getObject() | Returns the current SpatialObject component. |
String getTittle() | Returns the current name of the component. |
boolean colliderWithName(String objectName) | Checks if the current object is colliding with the object whose name is defined to be "name" argument. |
boolean isColliding() | Returns if the actual object is colliding with any object. |
List\<Collision> getCollisionList() | Returns a List\<Collision> with all collisions informations that are ocurring with the actual object. |
Collision getCollisionAt(int idx) | Returns a Collision class with all informations about the collision information with index == idx in getCollisionList method return value. |
int getCollisionsCount() | Returns the number of collisions. |