Class ObstacleModifier

java.lang.Object
me.nabdev.pathfinding.modifiers.ObstacleModifier
Direct Known Subclasses:
ActiveAutoModifier, ActiveEndgameModifier, ActiveMyAllianceModifier, ActiveOtherAllianceModifier, ActiveTeleModifier, AlwaysActiveModifier, BlueAllianceModifier, RedAllianceModifier, ZoneModifier

public abstract class ObstacleModifier extends Object
Represents a modifier that changes when obstacles are 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 get
      collection - The collection of modifiers to associate with the modifier
      Returns:
      The modifier associated with the given type
    • getType

      public abstract ObstacleModifier.ObstacleModifierTypes 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

      protected ObstacleModifier.MatchPhase getCurrentPhase()
      Get the current phase of the match
      Returns:
      The current phase of the match