Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnimComposer: return AnimLayer on the makeLayer and removeLayer methods. #2231

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions jme3-core/src/main/java/com/jme3/anim/AnimComposer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2022 jMonkeyEngine
* Copyright (c) 2009-2024 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -310,21 +310,24 @@ public Action removeAction(String name) {
/**
* Add a layer to this composer.
*
* @param name the desired name for the new layer
* @param mask the desired mask for the new layer (alias created)
* @param name The desired name for the new layer
* @param mask The desired mask for the new layer (alias created)
* @return a new layer
*/
public void makeLayer(String name, AnimationMask mask) {
public AnimLayer makeLayer(String name, AnimationMask mask) {
AnimLayer l = new AnimLayer(this, name, mask);
layers.put(name, l);
return l;
}

/**
* Remove specified layer. This will stop the current action on this layer.
*
* @param name The name of the layer to remove.
* @return The removed layer.
*/
public void removeLayer(String name) {
layers.remove(name);
public AnimLayer removeLayer(String name) {
return layers.remove(name);
}

/**
Expand Down
Loading