use of com.ilargia.games.entitas.PongGame in project Entitas-Java by Rubentxu.
the class DelaySystem method execute.
@Override
public void execute(float deltatime) {
for (CoreEntity e : _group.getEntities()) {
Delay delay = e.getDelay();
delay.time += deltatime;
if (delay.time > delay.duration) {
PongGame.ebus.post((ChangeStateCommand<PongGame>) (nameState, game) -> game.changeState(game.getPongState(), game.getSlideTransition()));
delay.time = 0;
}
}
}
Aggregations