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 enumEnum to represent which phase of the match we are currently in.static enumAll available obstacle modifiers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObstacleModifier.MatchPhaseGet the current phase of the matchstatic ObstacleModifiergetModifier(ObstacleModifier.ObstacleModifierTypes type, ModifierCollection collection) Get a modifier instance associated with the given typegetType()Get the modifier type of this modifierabstract booleanisActive()Whether or not the obstacle is active at this time.abstract booleanWhether 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
-