|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Animation
Title: Animating
Description: Interface for AnimationStrips. This interface supplies all the needed methods to connected it to either an Actor or Decor object.
Implementing this interface will allow you to create your own imaging sequence for a character.
Copyright: Copyright (c) 2005
Method Summary | |
---|---|
void |
addFrame(java.awt.Image image,
long duration)
This method is for adding an AnimationFrame to the animation strip. |
void |
addImageEffect(ImageEffect imageEffect)
This method is for adding an ImageSFX (special effect) to the animation. |
Animation |
copy()
Copies the animation. |
void |
draw(java.awt.Graphics2D graphics,
int x,
int y)
Draws the current frame or shape of the animation at the set x and y location. |
java.awt.Image |
getFrame(int i)
This method returns an Image at a given frame location. |
int |
getHeight()
This returns the height of the animation strip. |
java.awt.Image |
getImage()
This method returns the current frame of the animation. |
Sound |
getSound()
Returns the sound for this animation. |
long |
getTotalDuration()
|
int |
getWidth()
This returns the width of the 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. |
boolean |
isAnimating()
True if this animation needs to be updated regularly. |
void |
reset()
This resets the animation strip back to its default (or initial start) frame. |
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. |
void |
update(long elapseTime)
This method takes the elapse time, and calculates the new current frame of the animation. |
Methods inherited from interface org.deken.game.Updateable |
---|
getName |
Method Detail |
---|
void addFrame(java.awt.Image image, long duration)
image
- Imageduration
- longvoid addImageEffect(ImageEffect imageEffect)
imageEffect
- void draw(java.awt.Graphics2D graphics, int x, int y)
graphics
- x
- y
- void reset()
void update(long elapseTime)
update
in interface Updateable
elapseTime
- longjava.awt.Image getFrame(int i)
i
- int
int getHeight()
java.awt.Image getImage()
Sound getSound()
long getTotalDuration()
int getWidth()
int getXOffset()
int getYOffset()
boolean isAnimating()
void setName(java.lang.String name)
name
- Stringvoid setSound(TimeListeningSound sound)
sound
- void setOffsets(int x, int y)
x
- y
- Animation copy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |