Class EcsSystem

java.lang.Object
technology.sola.ecs.EcsSystem

@NullMarked public abstract class EcsSystem extends Object
Acts on a group of Entity that contain a set of Component.
  • Constructor Details

    • EcsSystem

      public EcsSystem()
  • Method Details

    • update

      public abstract void update(World world, float deltaTime)
      Called to update the state of Components attached to an Entity.

      Implementations will usually create a view via World.createView() to get Entity instances that have a particular Component set to work on.

      Parameters:
      world - the World
      deltaTime - the delta time between the last frame and the current frame
    • getOrder

      public int getOrder()
      Gets the order of this System. A higher value means it will be run later in the queue.
      Returns:
      the order of this system
    • isActive

      public boolean isActive()
      Returns true if this EcsSystem is active.
      Returns:
      the active state of this system
    • setActive

      public void setActive(boolean isActive)
      Sets the active state of this EcsSystem.
      Parameters:
      isActive - the new active state