|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.animation.BaseAnimation
org.deken.game.animation.BounceOnceAnimation
public class BounceOnceAnimation
Title: BounceOnceAnimationStrip Description: The animation strip runs through the sequence of frames, and upon reaching the end it bounces back, going back to the first frame. At the first frame it stops. Copyright: Copyright (c) 2005
Field Summary |
---|
Fields inherited from class org.deken.game.animation.BaseAnimation |
---|
height, imageEffect, name, sequenceTime, sound, totalDuration, totalFrames, width, xOffset, yOffset |
Constructor Summary | |
---|---|
protected |
BounceOnceAnimation()
Used by copy(). |
|
BounceOnceAnimation(java.awt.Image image,
long duration)
|
Method Summary | |
---|---|
void |
addFrame(java.awt.Image image,
long duration)
This adds an image to the animation strip, with a duration in milliseconds. |
BounceOnceAnimation |
copy()
Copy Animation |
void |
draw(java.awt.Graphics2D graphics,
int x,
int y)
Draws the current frame index to the GameGFX, including any animation offsets. |
boolean |
equals(java.lang.Object obj)
Determines if two animation strips are the same, based on size of image and number of frames. |
java.awt.Image |
getFrame(int i)
This retrieves the specified frame. |
java.awt.Image |
getImage()
This returns the current frame of the animated strip. |
boolean |
isAnimating()
This animation strip will bounce once. |
void |
notify(BaseSound.SEQUENCE sequence)
|
void |
reset()
This reset the animation strip, setting it to begin a new. |
void |
setSound(TimeListeningSound sound)
Sound element associated with this animation. |
void |
update(long elapseTime)
This takes the elapse time, since the last update, and adds it to the total sequence time. |
Methods inherited from class org.deken.game.animation.BaseAnimation |
---|
addImageEffect, baseUpdate, copyParent, getHeight, getName, getSound, getTotalDuration, getWidth, getXOffset, getYOffset, setName, setOffsets |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BounceOnceAnimation(java.awt.Image image, long duration)
image
- Imageduration
- longprotected BounceOnceAnimation()
Method Detail |
---|
public void addFrame(java.awt.Image image, long duration)
addFrame
in interface Animation
image
- Imageduration
- longpublic void draw(java.awt.Graphics2D graphics, int x, int y)
draw
in interface Animation
graphics
- x
- y
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object
public void notify(BaseSound.SEQUENCE sequence)
notify
in interface SoundListener
public void reset()
reset
in interface Animation
public void update(long elapseTime)
update
in interface Animation
update
in interface Updateable
elapseTime
- longpublic java.awt.Image getFrame(int i)
getFrame
in interface Animation
i
- int
public java.awt.Image getImage()
getImage
in interface Animation
public boolean isAnimating()
isAnimating
in interface Animation
public void setSound(TimeListeningSound sound)
Animation
setSound
in interface Animation
setSound
in class BaseAnimation
sound
- public BounceOnceAnimation copy()
copy
in interface Animation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |