blob: ac99818de340ec65d861aa8f568041f5f8118ad6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package coffee.liz.ecs.model;
import java.time.Duration;
import java.util.Collection;
/**
* Updates the {@link World} state.
*
* @param <T>
* is the state of the stuff outside the {@link World}.
*/
public interface System<T> extends AutoCloseable {
/**
* {@link System} clazzes that must run before this system.
*
* @return {@link Collection} of dependencies.
*/
Collection<Class<? extends System<T>>> 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<T> world, final T state, final Duration dt);
@Override
default void close() {
}
}
|