Class EntityDestination
- java.lang.Object
-
- org.dreambot.api.input.mouse.destination.AbstractMouseDestination<Entity>
-
- org.dreambot.api.input.mouse.destination.impl.EntityDestination
-
public class EntityDestination extends AbstractMouseDestination<Entity>
Created with IntelliJ IDEA.- Since:
- : 2/9/2015 Time : 6:14 PM
-
-
Field Summary
-
Fields inherited from class org.dreambot.api.input.mouse.destination.AbstractMouseDestination
AREA_DESTINATION, ENTITY_DESTINATION, MINIMAP_DESTINATION, NULL, POINT_DESTINATION, POLYGON_DESTINATION, RECTANGLE_DESTINATION, SHAPE_DESTINATION, TILE_DESTINATION
-
-
Constructor Summary
Constructors Constructor Description EntityDestination(Entity destination)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canInteract(java.lang.String action)
boolean
contains(java.awt.Point point)
Determines if point is contained inside of destination shape.boolean
containsMouse()
Determines if the destination shape contains the mouse.java.awt.Shape
getDestinationShape()
Gets the abstract destination shape.java.awt.Point
getSuitablePoint()
Gets a gaussian distributed offset point within the bounding box of this mouse destination.boolean
handleCamera()
Handles camera portion of event interaction.boolean
handleCamera(boolean withZoom, Condition interrupt)
Handles camera portion of event interaction.boolean
handleWalk()
Handles walking portion of event interactions.boolean
isVisible()
Determines whether this destination is visible.int
type()
Mouse destination type id.boolean
verifyPostInteract()
Verification/callback after your interaction has been completedEntityDestination
would implement this to check for crosshair color, for example.-
Methods inherited from class org.dreambot.api.input.mouse.destination.AbstractMouseDestination
canInteract, contains, getArea, getBoundingBox, getCenterPoint, getContainmentBounds, getInterrupt, getTarget, setContainmentBounds, setInterrupt, toString, valid
-
-
-
-
Constructor Detail
-
EntityDestination
public EntityDestination(Entity destination)
-
-
Method Detail
-
getDestinationShape
public java.awt.Shape getDestinationShape()
Gets the abstract destination shape.- Specified by:
getDestinationShape
in classAbstractMouseDestination<Entity>
- Returns:
- The destination shape.
-
getSuitablePoint
public java.awt.Point getSuitablePoint()
Description copied from class:AbstractMouseDestination
Gets a gaussian distributed offset point within the bounding box of this mouse destination.- Overrides:
getSuitablePoint
in classAbstractMouseDestination<Entity>
- Returns:
- point within the bounding box of this mouse destination .
-
canInteract
public boolean canInteract(java.lang.String action)
- Overrides:
canInteract
in classAbstractMouseDestination<Entity>
-
isVisible
public boolean isVisible()
Determines whether this destination is visible.- Specified by:
isVisible
in classAbstractMouseDestination<Entity>
- Returns:
- Whether this destination is visible.
-
type
public int type()
Mouse destination type id.- Overrides:
type
in classAbstractMouseDestination<Entity>
- Returns:
- the mouse destination type id.
-
containsMouse
public boolean containsMouse()
Description copied from class:AbstractMouseDestination
Determines if the destination shape contains the mouse.- Overrides:
containsMouse
in classAbstractMouseDestination<Entity>
- Returns:
- true if destination shape contains mouse, otherwise false.
-
handleWalk
public boolean handleWalk()
Handles walking portion of event interactions. This is used internally by interact() Default implementation is to just return true, required to override this in any implementations.- Overrides:
handleWalk
in classAbstractMouseDestination<Entity>
- Returns:
- True if the event succeeded or is not needed in the destination implementation.
-
handleCamera
public boolean handleCamera()
Handles camera portion of event interaction. This is used internally by interact().- Overrides:
handleCamera
in classAbstractMouseDestination<Entity>
- Returns:
- True if the event succeeded.
-
handleCamera
public boolean handleCamera(boolean withZoom, Condition interrupt)
Handles camera portion of event interaction. This is used internally by interact().- Overrides:
handleCamera
in classAbstractMouseDestination<Entity>
- Returns:
- True if the event succeeded.
-
verifyPostInteract
public boolean verifyPostInteract()
Description copied from class:AbstractMouseDestination
Verification/callback after your interaction has been completedEntityDestination
would implement this to check for crosshair color, for example.- Overrides:
verifyPostInteract
in classAbstractMouseDestination<Entity>
- Returns:
- default of True if not implemented, else return of implementation
-
contains
public boolean contains(java.awt.Point point)
Description copied from class:AbstractMouseDestination
Determines if point is contained inside of destination shape.- Overrides:
contains
in classAbstractMouseDestination<Entity>
- Parameters:
point
- the point which to check.- Returns:
- true if point is contained inside of shape, otherwise false.
-
-