コード例 #1
0
 /**
  * Sets an empty animation for every track, discarding any queued animations, and mixes to it over
  * the specified mix duration.
  */
 public void setEmptyAnimations(float mixDuration) {
   boolean oldDrainDisabled = queue.drainDisabled;
   queue.drainDisabled = true;
   for (int i = 0, n = tracks.size; i < n; i++) {
     TrackEntry current = tracks.get(i);
     if (current != null) setEmptyAnimation(current.trackIndex, mixDuration);
   }
   queue.drainDisabled = oldDrainDisabled;
   queue.drain();
 }
コード例 #2
0
 void setAnimation() {
   if (ui.animationList.getSelected() == null) return;
   int track = ui.trackButtons.getCheckedIndex();
   TrackEntry current = state.getCurrent(track);
   TrackEntry entry;
   if (current == null) {
     state.setEmptyAnimation(track, 0);
     entry =
         state.addAnimation(track, ui.animationList.getSelected(), ui.loopCheckbox.isChecked(), 0);
     entry.setMixDuration(ui.mixSlider.getValue());
   } else {
     entry =
         state.setAnimation(track, ui.animationList.getSelected(), ui.loopCheckbox.isChecked());
   }
   entry.setAlpha(ui.alphaSlider.getValue());
 }