Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
neph1 committed Aug 26, 2024
1 parent 420994a commit 8c31b05
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions jme3-core/src/main/java/com/jme3/anim/AnimLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ public class AnimLayer implements JmeCloneable, Savable {

private boolean loop = true;

/**
* For serialization only. Do not use.
*/
protected AnimLayer() {

}
Expand All @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 8c31b05

Please sign in to comment.