31 lines
622 B
Java
31 lines
622 B
Java
package shootergame.util.gl.texture;
|
|
|
|
import mainloop.task.IMainloopTask;
|
|
import mainloop.task.MainloopTask;
|
|
import shootergame.init.Textures;
|
|
|
|
public class AnimationEventHandler implements IMainloopTask
|
|
{
|
|
public static final AnimationEventHandler ANIMATION_EVENT_HANDLER = new AnimationEventHandler();
|
|
|
|
@Override
|
|
public boolean MainLoopDelay(long millis) {
|
|
return millis > 10;
|
|
}
|
|
|
|
@Override
|
|
public boolean MainLoopRepeat() {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public void MainLoopUpdate()
|
|
{
|
|
// Loop over the animations and update them all
|
|
for(AnimationReference r : Textures.animations) {
|
|
r.tick();
|
|
}
|
|
}
|
|
|
|
}
|