Class Pipeline

java.lang.Object
rosequartz.ecb.Pipeline
Direct Known Subclasses:
GraphicsPipeline, LogFpsPipeline

public class Pipeline extends Object
An ECB Pipeline. All pipelines are executed - one after the other - every game frame. Pipelines hold behaviors. When a pipeline is executed, all it's behaviors are executed AT THE SAME TIME.
See Also:
Behavior
  • Field Details

    • behaviors

      protected final ArrayList<Behavior> behaviors
    • enabled

      protected boolean enabled
    • mutable

      protected boolean mutable
  • Constructor Details

    • Pipeline

      public Pipeline()
      Creates a new Pipeline.
    • Pipeline

      public Pipeline(Behavior behavior)
      Creates a new Pipeline.
      Parameters:
      behavior - behavior to add to the pipeline
    • Pipeline

      public Pipeline(String name)
      Creates a new Pipeline.
      Parameters:
      name - name of the pipeline
    • Pipeline

      public Pipeline(String name, Behavior behavior)
      Creates a new Pipeline.
      Parameters:
      name - name of the pipeline
      behavior - behavior to add to the pipeline
  • Method Details

    • add

      public Pipeline add(Behavior... behaviors)
      Adds Behavior(s) to the pipeline.
      Parameters:
      behaviors - the Behaviors to add
      Returns:
      this
    • enable

      public Pipeline enable(boolean enabled)
      Sets the pipeline to be enabled or not (enabled by default). A disabled pipeline is not executed.
      Parameters:
      enabled - pipeline enabled
      Returns:
      this
    • isEnabled

      public boolean isEnabled()
      Gets if the pipeline is enabled.
      Returns:
      pipeline enabled
    • freeze

      public Pipeline freeze()
    • run

      protected void run()
      Executes the pipeline.