Class ManualUpdate<T extends Time>

java.lang.Object
dev.engine.core.module.ManualUpdate<T>
Type Parameters:
T - the update context type passed to modules
All Implemented Interfaces:
UpdateStrategy<T>

public class ManualUpdate<T extends Time> extends Object implements UpdateStrategy<T>
No-op UpdateStrategy for modules whose updates are driven externally.

When this strategy is active, advance(double, Consumer) does nothing. Updates are expected to be triggered by the caller directly via ModuleManager.update(T) rather than through the timed advance mechanism.

  • Constructor Details

    • ManualUpdate

      public ManualUpdate()
  • Method Details

    • advance

      public void advance(double elapsedSeconds, Consumer<T> onUpdate)
      Description copied from interface: UpdateStrategy
      Advances time by the given elapsed seconds and invokes onUpdate for each computed update step.
      Specified by:
      advance in interface UpdateStrategy<T extends Time>
      Parameters:
      elapsedSeconds - real wall-clock time elapsed since last advance
      onUpdate - callback invoked with the context for each update step