Package megamek.client.bot.princess
Class UnitBehavior
java.lang.Object
megamek.client.bot.princess.UnitBehavior
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addEntityWaypoint
(Entity entity, List<Coords> waypoints, Princess owner) boolean
addEntityWaypoint
(Entity entity, Coords destination, Princess owner) void
clear()
Clears the entity behavior cache, should be done at the start of each movement phasevoid
boolean
clearWaypoints
(Entity entity) getBehaviorType
(Entity entity, Princess owner) Gets (and calculates, if necessary), the behavior type for the given entity.getWaypointForEntity
(Entity entity) boolean
isDestinationValidForEntity
(Entity entity, Coords destination, Princess owner) void
overrideBehaviorType
(Entity entity, UnitBehavior.BehaviorType behaviorType) removeHeadWaypoint
(Entity entity) Removes the head waypoint from the entity's waypoint queue If waypoints were added (1,1) then (2,2), then (3,3), this would remove (1,1)removeTailWaypoint
(Entity entity) Removes the tail waypoint from the entity's waypoint queue If waypoints were added (1,1) then (2,2) then (3,3), this would remove (3,3), good for an "undo" behavior.boolean
setEntityWaypoints
(Entity entity, List<Coords> waypoints, Princess owner) Sets the entity's waypoints to the given destination
-
Constructor Details
-
UnitBehavior
public UnitBehavior()
-
-
Method Details
-
getBehaviorType
Gets (and calculates, if necessary), the behavior type for the given entity. -
overrideBehaviorType
-
getWaypointForEntity
-
isDestinationValidForEntity
-
addEntityWaypoint
-
addEntityWaypoint
-
removeHeadWaypoint
Removes the head waypoint from the entity's waypoint queue If waypoints were added (1,1) then (2,2), then (3,3), this would remove (1,1)- Parameters:
entity
- the entity to remove the waypoint from
-
removeTailWaypoint
Removes the tail waypoint from the entity's waypoint queue If waypoints were added (1,1) then (2,2) then (3,3), this would remove (3,3), good for an "undo" behavior.- Parameters:
entity
- the entity to remove the waypoint from
-
setEntityWaypoints
Sets the entity's waypoints to the given destination- Parameters:
entity
-waypoints
-owner
-- Returns:
-
clearWaypoints
-
clearWaypoints
public void clearWaypoints() -
clear
public void clear()Clears the entity behavior cache, should be done at the start of each movement phase
-