Package event
Class OutOfBoundsEvent
java.lang.Object
event.GameEvent
event.OutOfBoundsEvent
Represents an event where an entity crosses a screen edge.
- Author:
- Krish Pillai
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOutOfBoundsEvent(OutOfBoundsEvent event) Copy constructor for the eventOutOfBoundsEvent(EntityModel entity, ScreenBoundary boundary) OutOfBoundsEvent(EntityModel entity, ScreenBoundary boundary, String description) Constructor for Out-of-Bounds event containing the entity and the edge it crossed. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGetter for the boundary crossedgetEdge()Getter for the edge that has been crossedGetter for the entity stepping out of boundsMethods inherited from class event.GameEvent
getDescription, toString
-
Constructor Details
-
OutOfBoundsEvent
-
OutOfBoundsEvent
Constructor for Out-of-Bounds event containing the entity and the edge it crossed.- Parameters:
entity- The entity firing the eventboundary- The screen edge that was crosseddescription- a description of the event or the empty string- See Also:
-
OutOfBoundsEvent
Copy constructor for the event- Parameters:
event- The event being duplicated
-
-
Method Details
-
equals
-
getEntity
Getter for the entity stepping out of bounds- Returns:
- a the out-of-bounds entity
-
getBoundary
Getter for the boundary crossed- Returns:
- a the screen boundary
- See Also:
-
getEdge
Getter for the edge that has been crossed- Returns:
- the edge of the screen boundary
- See Also:
-