/** * Updates this player. This means the current time gets increased by {@link #speed} and is * applied to the current animation. */ public void update() { for (PlayerListener listener : listeners) listener.preProcess(this); if (dirty) this.updateRoot(); this.animation.update(time, root); this.currentKey = this.animation.currentKey; if (prevKey != currentKey) { for (PlayerListener listener : listeners) listener.mainlineKeyChanged(prevKey, currentKey); prevKey = currentKey; } if (copyObjects) { tweenedKeys = tempTweenedKeys; unmappedTweenedKeys = tempUnmappedTweenedKeys; this.copyObjects(); } else { tweenedKeys = animation.tweenedKeys; unmappedTweenedKeys = animation.unmappedTweenedKeys; } for (Attachment attach : attachments) attach.update(); for (PlayerListener listener : listeners) listener.postProcess(this); this.increaseTime(); }