From 8c31b05127d30f4687971e0d33b236d9ed52ea3c Mon Sep 17 00:00:00 2001 From: rickard Date: Mon, 26 Aug 2024 15:35:26 +0200 Subject: [PATCH] review fixes --- jme3-core/src/main/java/com/jme3/anim/AnimLayer.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/AnimLayer.java b/jme3-core/src/main/java/com/jme3/anim/AnimLayer.java index 2baad50c47..6cd79e731d 100644 --- a/jme3-core/src/main/java/com/jme3/anim/AnimLayer.java +++ b/jme3-core/src/main/java/com/jme3/anim/AnimLayer.java @@ -85,6 +85,9 @@ public class AnimLayer implements JmeCloneable, Savable { private boolean loop = true; + /** + * For serialization only. Do not use. + */ protected AnimLayer() { } @@ -93,7 +96,6 @@ protected AnimLayer() { * Instantiates a layer without a manager or a current Action, owned by the * specified composer. * - * @param composer the owner (not null, alias created) * @param name the layer name (not null) * @param mask the AnimationMask (alias created) or null to allow this layer * to animate the entire model @@ -251,14 +253,15 @@ public void setLooping(boolean loop) { * * @param appDeltaTimeInSeconds the amount application time to advance the * current Action, in seconds + * @param globalSpeed the global speed applied to all layers. */ - void update(float appDeltaTimeInSeconds, float speed) { + void update(float appDeltaTimeInSeconds, float globalSpeed) { Action action = currentAction; if (action == null) { return; } - double speedup = action.getSpeed() * speed; + double speedup = action.getSpeed() * globalSpeed; double scaledDeltaTime = speedup * appDeltaTimeInSeconds; time += scaledDeltaTime; @@ -313,7 +316,7 @@ public Object jmeClone() { public void write(JmeExporter ex) throws IOException { OutputCapsule oc = ex.getCapsule(this); oc.write(name, "name", null); - if(mask instanceof Savable) { + if (mask instanceof Savable) { oc.write((Savable) mask, "mask", null); } }