package coffee.liz.ecs.model; import java.time.Duration; import java.util.Collection; /** * Updates the {@link World} state. * * @param * is the state of the stuff outside the {@link World}. */ public interface System extends AutoCloseable { /** * {@link System} clazzes that must run before this system. * * @return {@link Collection} of dependencies. */ Collection>> getDependencies(); /** * @param world * Is the {@link World}. * @param state * Is the {@link T} state outside the {@param world}. * @param dt * Is the timestep. */ void update(final World world, final T state, final Duration dt); @Override default void close() { } }