java.lang.Object
technology.sola.engine.graphics.components.LayerComponent
All Implemented Interfaces:
technology.sola.ecs.Component

@NullMarked public class LayerComponent extends Object implements technology.sola.ecs.Component
LayerComponent is a Component that contains data for a 2d rendering layers for an Entity.
  • Constructor Details

    • LayerComponent

      public LayerComponent(String layer)
      Creates a LayerComponent for the desired layer with default ordering.
      Parameters:
      layer - the identifier string for the layer
    • LayerComponent

      public LayerComponent(String layer, int order)
      Creates a LayerComponent for the desired layer with default ordering.
      Parameters:
      layer - the identifier string for the layer
      order - the order for which this will be rendered in the layer (lower numbers are rendered earlier)
  • Method Details

    • getLayer

      public String getLayer()
      Returns:
      the layer string identifier
    • getOrder

      public int getOrder()
      Returns:
      the order in the layer
    • setLayer

      public void setLayer(String layer)
      Updates the layer.
      Parameters:
      layer - the new layer string identifier
    • setOrder

      public void setOrder(int order)
      Updates the order in the layer.
      Parameters:
      order - the new order