@Override public void forceStop() { if (channel != null) { channel.setTime(time); channel.reset(false); } super.forceStop(); }
@Override public void onPlay() { channel.getControl().setEnabled(true); if (playState == PlayState.Stopped) { channel.setAnim(animationName, blendTime); channel.setSpeed(speed); channel.setLoopMode(loopMode); channel.setTime(0); } }
public void reset(boolean rewind){ if(rewind){ setTime(0); if(control.getSkeleton()!=null){ control.getSkeleton().resetAndUpdate(); }else{ TempVars vars = TempVars.get(); update(0, vars); vars.release(); } } animation = null; notified = false; }
@Override public void forceStop() { if (channel != null) { channel.setTime(time); channel.reset(false); } super.forceStop(); }
@Override public void onPlay() { channel.getControl().setEnabled(true); if (playState == PlayState.Stopped) { channel.setAnim(animationName, blendTime); channel.setSpeed(speed); channel.setLoopMode(loopMode); channel.setTime(0); } }
public void reset(boolean rewind){ if(rewind){ setTime(0); if(control.getSkeleton()!=null){ control.getSkeleton().resetAndUpdate(); }else{ TempVars vars = TempVars.get(); update(0, vars); vars.release(); } } animation = null; notified = false; }
public void reset(boolean rewind){ if(rewind){ setTime(0); if(control.getSkeleton()!=null){ control.getSkeleton().resetAndUpdate(); }else{ TempVars vars = TempVars.get(); update(0, vars); vars.release(); } } animation = null; // System.out.println("Setting notified false"); notified = false; }
@Override public void visit(Spatial spatial) { AnimControl animControl = spatial.getControl(AnimControl.class); if (animControl != null) { AnimChannel channel = animControl.createChannel(); channel.setAnim("anim"); channel.setLoopMode(LoopMode.Loop); if (randomizeAnimation) { channel.setSpeed(FastMath.nextRandomInt(6, 10) / 10f); channel.setTime(FastMath.nextRandomFloat() * channel.getAnimMaxTime()); } // Don't batch animated objects, seems not to work object.setBatchHint(Spatial.BatchHint.Never); } } });
channel.setTime(Integer.MAX_VALUE);