public Poses(List<? extends PoseMod> mods) { this.mods = mods.toArray(new PoseMod[0]); stat = true; for (PoseMod mod : this.mods) { if (!mod.stat()) { stat = false; break; } } }
public void tick(float dt) { rsmod = Utils.clip(rsmod + (srnd.nextFloat() * 0.005f) - 0.0025f, 0.90f, 1.10f); dt *= rsmod; boolean build = false; if (limit >= 0) { if ((limit -= dt) < 0) ldone = true; } boolean done = ldone; for (PoseMod m : mods) { m.tick(dt); if (!m.done()) done = false; } if (!stat) build = true; if (ipold > 0.0f) { if ((ipold -= (dt / ipol)) < 0.0f) { ipold = 0.0f; old = null; } build = true; } if (build) rebuild(); if (done) done(); }
private void rebuild() { pose.reset(); for (PoseMod m : mods) m.apply(pose); if (ipold > 0.0f) pose.blend(old, ipold); pose.gbuild(); }