|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.animation.BaseAnimation
public abstract class BaseAnimation
Title: BaseAnimation
Description: The BaseAnimation implements the basic features of the animation. Describing its size, off sets, sound integration and image effect. The ImageEffect is defaulted to NoImageEffect. The sounds is a TimeListeningSound, that will be updated in the baseUpdate() method, which all animations should call.
Copyright: Copyright (c) Sep 4, 2011
Field Summary | |
---|---|
protected int |
height
|
protected ImageEffect |
imageEffect
|
protected java.lang.String |
name
|
protected long |
sequenceTime
|
protected TimeListeningSound |
sound
|
protected long |
totalDuration
|
protected int |
totalFrames
|
protected int |
width
|
protected int |
xOffset
|
protected int |
yOffset
|
Constructor Summary | |
---|---|
BaseAnimation()
|
Method Summary | |
---|---|
void |
addImageEffect(ImageEffect imageEffect)
This method is for adding an ImageSFX (special effect) to the animation. |
protected void |
baseUpdate(long elapseTime)
|
protected BaseAnimation |
copyParent(BaseAnimation newStrip)
|
int |
getHeight()
Returns the height of this animation strip. |
java.lang.String |
getName()
|
Sound |
getSound()
Returns the sound for this animation. |
long |
getTotalDuration()
|
int |
getWidth()
Returns the width of this animation strip. |
int |
getXOffset()
returns the Offset of the image in the X direction. |
int |
getYOffset()
returns the Offset of the image in the Y direction. |
void |
setName(java.lang.String name)
Name is used for debugging. |
void |
setOffsets(int x,
int y)
Sets the offset of the image, so that it displays ideally on the screen. |
void |
setSound(TimeListeningSound sound)
Sound element associated with this animation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.deken.game.animation.Animation |
---|
addFrame, copy, draw, getFrame, getImage, isAnimating, reset, update |
Field Detail |
---|
protected int height
protected ImageEffect imageEffect
protected java.lang.String name
protected int width
protected int xOffset
protected int yOffset
protected long sequenceTime
protected TimeListeningSound sound
protected int totalFrames
protected long totalDuration
Constructor Detail |
---|
public BaseAnimation()
Method Detail |
---|
public void addImageEffect(ImageEffect imageEffect)
Animation
addImageEffect
in interface Animation
imageEffect
- public int getHeight()
getHeight
in interface Animation
public java.lang.String getName()
getName
in interface Updateable
public Sound getSound()
getSound
in interface Animation
public long getTotalDuration()
getTotalDuration
in interface Animation
public int getWidth()
getWidth
in interface Animation
public int getXOffset()
Animation
getXOffset
in interface Animation
public int getYOffset()
Animation
getYOffset
in interface Animation
public void setName(java.lang.String name)
setName
in interface Animation
name
- Stringpublic void setSound(TimeListeningSound sound)
Animation
setSound
in interface Animation
sound
- public void setOffsets(int x, int y)
Animation
setOffsets
in interface Animation
x
- y
- protected BaseAnimation copyParent(BaseAnimation newStrip)
newStrip
-
protected void baseUpdate(long elapseTime)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |