3D Demo Player

3D Demo Player

public static void play(ModsJumps modsJumps, int frame) throws Exception {

final int[] jump = modsJumps.jump;

final IModule[] mod = modsJumps.mod;

final IModulator[][] modulator = modsJumps.modulator;

int pos = 0;

do {

int res = 0;

if (jump[pos] > 0) {

for (int i = 0; i < modulator[pos].length; i++) {

modulator[pos][i].updateModule(frame);

}

res = mod[pos].pre();

} else {

res = mod[pos].post();

}

if (res >= 0) {

pos++;

} else {

pos += jump[pos];

}

} while (jump[pos] != 0);

}