espresso3d.engine.lowlevel.texture
Class E3DAnimatedTexture
java.lang.Object
espresso3d.engine.base.E3DEngineItem
espresso3d.engine.lowlevel.texture.E3DTexture
espresso3d.engine.lowlevel.texture.E3DAnimatedTexture
- public class E3DAnimatedTexture
- extends E3DTexture
- Author:
- Curt
Class that supports texture animation and used by certain objects that support texture animation
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
frameChanged
public boolean frameChanged
E3DAnimatedTexture
public E3DAnimatedTexture(E3DEngine engine,
java.lang.String[] textureNames,
double[] frameLife,
int loops)
- Instantiate an animated texture using an array of texture names and array of framelife's.
- Parameters:
engine - textureNames - Array of names of the texture for each frameframeLife - Life of each frame of texture. -1 is forever. This array must be the same length as the textureNames arrayloops - How many times to loop the animation. -1 is forever. Otherwise, when it will stay on the last image of the loop
E3DAnimatedTexture
public E3DAnimatedTexture(E3DEngine engine,
E3DAnimatedTextureFrame[] animatedTextureFrames,
int loops)
addFrame
public void addFrame(java.lang.String textureName,
double frameLife)
addFrame
public void addFrame(E3DAnimatedTextureFrame frame)
getAnimatedTextureFrames
public java.util.ArrayList getAnimatedTextureFrames()
setAnimatedTextureFrames
public void setAnimatedTextureFrames(java.util.ArrayList animatedTextureFrames)
getLoops
public int getLoops()
setLoops
public void setLoops(int loops)
getCurFrameNum
public int getCurFrameNum()
setCurFrameNum
public void setCurFrameNum(int curFrameNum)
isFrameChangeNeeded
public boolean isFrameChangeNeeded(double lastFrameTimeSeconds)
update
public boolean update(double lastFrameTimeSeconds)
- Returns true if the texture changes
- Parameters:
lastFrameTimeSeconds -
- Returns:
isFrameChanged
public boolean isFrameChanged()
- This will be set to true if the frame was changed after the last call to update.
- Returns:
getCurFrame
public E3DAnimatedTextureFrame getCurFrame()