aboutsummaryrefslogtreecommitdiffstats
path: root/trunk/ardor3d-animation
diff options
context:
space:
mode:
authorricardolpd <[email protected]>2012-12-03 11:07:39 +0000
committerricardolpd <[email protected]>2012-12-03 11:07:39 +0000
commit49b723bab080552a013cc3b785eb9ba9eeca2bbd (patch)
tree0aa7cdbf17d77fdfa61dea18ca7362260823b351 /trunk/ardor3d-animation
parent0ee7564335609c407fc5a564c567a3e3bee561e2 (diff)
- Adds an AnimationClipInstance parameter to AnimationListener.java to allow to track the ClipInstance Source.
- Made a getMethod in AnimationManager.java to access _clipInstances. - Updated Examples accordingly.
Diffstat (limited to 'trunk/ardor3d-animation')
-rw-r--r--trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationListener.java7
-rw-r--r--trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java7
-rw-r--r--trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java2
3 files changed, 14 insertions, 2 deletions
diff --git a/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationListener.java b/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationListener.java
index f662371..4259e9a 100644
--- a/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationListener.java
+++ b/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationListener.java
@@ -10,6 +10,8 @@
package com.ardor3d.extension.animation.skeletal;
+import com.ardor3d.extension.animation.skeletal.clip.AnimationClipInstance;
+
/**
* Describes a class interested in receiving notice when an animation has changed state.
*/
@@ -17,7 +19,10 @@ public interface AnimationListener {
/**
* Called when an animation reaches the end of its complete play time (maxTime * loops)
+ *
+ * @param source
+ * The animation clip instance that finished.
*/
- void animationFinished();
+ void animationFinished(AnimationClipInstance source);
}
diff --git a/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java b/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java
index 30e2e9b..cc523b5 100644
--- a/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java
+++ b/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java
@@ -590,4 +590,11 @@ public class AnimationManager {
public LoggingMap<String, Double> getValuesStore() {
return _valuesStore;
}
+
+ /**
+ * @return the Map containing the AnimationClips and their respective AnimationClipInstances.
+ */
+ public Map<AnimationClip, AnimationClipInstance> getClipInstancesStore() {
+ return _clipInstances;
+ }
}
diff --git a/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java b/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java
index 4d7d542..14f8816 100644
--- a/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java
+++ b/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java
@@ -141,7 +141,7 @@ public class AnimationClipInstance {
}
for (final AnimationListener animationListener : animationListeners) {
- animationListener.animationFinished();
+ animationListener.animationFinished(this);
}
}
}