Package me.nabdev.pathfinding.modifiers
Class ObstacleModifier
java.lang.Object
me.nabdev.pathfinding.modifiers.ObstacleModifier
- Direct Known Subclasses:
ActiveAutoModifier
,ActiveEndgameModifier
,ActiveMyAllianceModifier
,ActiveOtherAllianceModifier
,ActiveTeleModifier
,AlwaysActiveModifier
,BlueAllianceModifier
,RedAllianceModifier
,ZoneModifier
Represents a modifier that changes when obstacles are active
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enum to represent which phase of the match we are currently in.static enum
All available obstacle modifiers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObstacleModifier.MatchPhase
Get the current phase of the matchstatic ObstacleModifier
getModifier
(ObstacleModifier.ObstacleModifierTypes type, ModifierCollection collection) Get a modifier instance associated with the given typegetType()
Get the modifier type of this modifierabstract boolean
isActive()
Whether or not the obstacle is active at this time.abstract boolean
Whether or not this modifier MUST be active to have the obstacle active.
-
Constructor Details
-
ObstacleModifier
public ObstacleModifier()
-
-
Method Details
-
getModifier
public static ObstacleModifier getModifier(ObstacleModifier.ObstacleModifierTypes type, ModifierCollection collection) Get a modifier instance associated with the given type- Parameters:
type
- The type of modifier to getcollection
- The collection of modifiers to associate with the modifier- Returns:
- The modifier associated with the given type
-
getType
Get the modifier type of this modifier- Returns:
- the modifier type of this modifier
-
isActive
public abstract boolean isActive()Whether or not the obstacle is active at this time.- Returns:
- true if the obstacle is currently active, false if not
-
requiredForActive
public abstract boolean requiredForActive()Whether or not this modifier MUST be active to have the obstacle active. If true, will use the AND operator with other modifiers, if false, uses OR.- Returns:
- True if required to keep the obstacle active, false if not required.
-
getCurrentPhase
Get the current phase of the match- Returns:
- The current phase of the match
-