Class Composite

All Implemented Interfaces:
Goal, Behavior
Direct Known Subclasses:
Selector, Sequence

public abstract class Composite extends BehaviorGoalAdapter
The base class for composite Behaviors, which handle the transition between multiple sub-behaviors.
  • Constructor Details

  • Method Details

    • addBehavior

      public void addBehavior(Behavior behavior)
    • getBehaviors

      public List<Behavior> getBehaviors()
    • removeBehavior

      public void removeBehavior(Behavior behavior)
    • reset

      public void reset()
      Description copied from interface: Goal
      Resets the goal and any resources or state it is holding.
    • shouldExecute

      public boolean shouldExecute()
      Description copied from interface: Behavior
      Returns whether the behavior is ready to run. Note this is called once when deciding whether to start execution of a leaf node. The actual execution status is determined by the return value of which is repeatedly called by the executing node.
    • stopExecution

      protected void stopExecution(Behavior behavior)
    • tickParallel

      protected void tickParallel()