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 booleancanInteract(java.lang.String action)booleancontains(java.awt.Point point)Determines if point is contained inside of destination shape.booleancontainsMouse()Determines if the destination shape contains the mouse.java.awt.ShapegetDestinationShape()Gets the abstract destination shape.java.awt.PointgetSuitablePoint()Gets a gaussian distributed offset point within the bounding box of this mouse destination.booleanhandleCamera()Handles camera portion of event interaction.booleanhandleCamera(boolean withZoom, Condition interrupt)Handles camera portion of event interaction.booleanhandleWalk()Handles walking portion of event interactions.booleanisVisible()Determines whether this destination is visible.inttype()Mouse destination type id.booleanverifyPostInteract()Verification/callback after your interaction has been completedEntityDestinationwould 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:
getDestinationShapein classAbstractMouseDestination<Entity>- Returns:
- The destination shape.
-
getSuitablePoint
public java.awt.Point getSuitablePoint()
Description copied from class:AbstractMouseDestinationGets a gaussian distributed offset point within the bounding box of this mouse destination.- Overrides:
getSuitablePointin classAbstractMouseDestination<Entity>- Returns:
- point within the bounding box of this mouse destination .
-
canInteract
public boolean canInteract(java.lang.String action)
- Overrides:
canInteractin classAbstractMouseDestination<Entity>
-
isVisible
public boolean isVisible()
Determines whether this destination is visible.- Specified by:
isVisiblein classAbstractMouseDestination<Entity>- Returns:
- Whether this destination is visible.
-
type
public int type()
Mouse destination type id.- Overrides:
typein classAbstractMouseDestination<Entity>- Returns:
- the mouse destination type id.
-
containsMouse
public boolean containsMouse()
Description copied from class:AbstractMouseDestinationDetermines if the destination shape contains the mouse.- Overrides:
containsMousein 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:
handleWalkin 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:
handleCamerain 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:
handleCamerain classAbstractMouseDestination<Entity>- Returns:
- True if the event succeeded.
-
verifyPostInteract
public boolean verifyPostInteract()
Description copied from class:AbstractMouseDestinationVerification/callback after your interaction has been completedEntityDestinationwould implement this to check for crosshair color, for example.- Overrides:
verifyPostInteractin 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:AbstractMouseDestinationDetermines if point is contained inside of destination shape.- Overrides:
containsin classAbstractMouseDestination<Entity>- Parameters:
point- the point which to check.- Returns:
- true if point is contained inside of shape, otherwise false.
-
-