From 1fbc0cc406a1497af788eba0cf465dc25da47ebb Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Fri, 3 Aug 2012 21:06:07 +0000 Subject: [PATCH] Audio and Effect tracks added a couple of accessors git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9609 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../core/com/jme3/animation/AudioTrack.java | 32 +++++++++++++++++ .../core/com/jme3/animation/EffectTrack.java | 36 +++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/engine/src/core/com/jme3/animation/AudioTrack.java b/engine/src/core/com/jme3/animation/AudioTrack.java index b77b3abf4..5d59ac9e2 100644 --- a/engine/src/core/com/jme3/animation/AudioTrack.java +++ b/engine/src/core/com/jme3/animation/AudioTrack.java @@ -141,6 +141,38 @@ public class AudioTrack implements Track { return new AudioTrack(audio, length, startOffset); } + /** + * + * @return the audio node used by this track + */ + public AudioNode getAudio() { + return audio; + } + + /** + * sets the audio node to be used for this track + * @param audio + */ + public void setAudio(AudioNode audio) { + this.audio = audio; + } + + /** + * + * @return the start offset of the track + */ + public float getStartOffset() { + return startOffset; + } + + /** + * set the start offset of the track + * @param startOffset + */ + public void setStartOffset(float startOffset) { + this.startOffset = startOffset; + } + /** * Internal use only serialization * @param ex exporter diff --git a/engine/src/core/com/jme3/animation/EffectTrack.java b/engine/src/core/com/jme3/animation/EffectTrack.java index f58805e53..044eded93 100644 --- a/engine/src/core/com/jme3/animation/EffectTrack.java +++ b/engine/src/core/com/jme3/animation/EffectTrack.java @@ -158,6 +158,38 @@ public class EffectTrack implements Track { return new EffectTrack(emitter, length, startOffset); } + + /** + * + * @return the emitter used by this track + */ + public ParticleEmitter getEmitter() { + return emitter; + } + + /** + * Sets the Emitter to use in this track + * @param emitter + */ + public void setEmitter(ParticleEmitter emitter) { + this.emitter = emitter; + } + + /** + * + * @return the start offset of the track + */ + public float getStartOffset() { + return startOffset; + } + + /** + * set the start offset of the track + * @param startOffset + */ + public void setStartOffset(float startOffset) { + this.startOffset = startOffset; + } /** * Internal use only serialization @@ -185,4 +217,8 @@ public class EffectTrack implements Track { length = in.readFloat("length", length); startOffset = in.readFloat("startOffset", 0); } + + + + }