Interface ComponentUpdater

All Known Implementing Classes:
AppComponentUpdater, AppViewPortComponentUpdater

public interface ComponentUpdater
An interface to update components in the component manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canUpdate(ComponentManager componentManager, Component component)
    Check if the component can be updated by this updater.
    void
    render(ComponentManager componentManager, Component component)
    Call the render method for the component in the given component manager.
    void
    update(ComponentManager componentManager, Component component, float tpf)
    Update the component in the given component manager.
  • Method Details

    • canUpdate

      boolean canUpdate(ComponentManager componentManager, Component component)
      Check if the component can be updated by this updater. This is used to determine if the component is compatible with this updater and can be updated without issues. If the component is not compatible, it will not be updated and the component manager will call the next available updater in the chain.
      Parameters:
      componentManager - the component manager
      component - the component to check
      Returns:
      true if the component can be updated, false otherwise
    • update

      void update(ComponentManager componentManager, Component component, float tpf)
      Update the component in the given component manager. This method is called every frame to update the component's state.
      Parameters:
      componentManager - the component manager
      component - the component to update
      tpf - time per frame, used for time-based updates
    • render

      void render(ComponentManager componentManager, Component component)
      Call the render method for the component in the given component manager. This method is called during the render phase to perform low-level rendering logic for the component.
      Parameters:
      componentManager - the component manager
      component - the component to render