|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcage.graphics.Animation
public class Animation
An animation is an Image with several frames. The first frame of the animation will be used as the master frame, defining the size, etc. Individual frames can be accessed by the getFrame method. Sprites support Animations through the VisualItem interface.
Constructor Summary | |
---|---|
Animation(java.lang.String name,
java.lang.String filename)
Instantiates a new animation. |
Method Summary | |
---|---|
org.minueto.image.MinuetoImage |
getFrame(int index)
Gets the frame. |
int |
getFrameCount()
Gets the frame count. |
int |
getHeight()
Gets the height. |
org.minueto.image.MinuetoImage |
getImage()
Gets the image. |
java.lang.String |
getName()
Gets the name. |
int |
getWidth()
Gets the width. |
void |
scale(double xScale,
double yScale)
Scale. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Animation(java.lang.String name, java.lang.String filename)
name
- the namefilename
- the filenameMethod Detail |
---|
public void scale(double xScale, double yScale)
VisualItem
scale
in interface VisualItem
xScale
- the x scaleyScale
- the y scalepublic org.minueto.image.MinuetoImage getFrame(int index)
index
- the index
public int getFrameCount()
public java.lang.String getName()
VisualItem
getName
in interface VisualItem
public org.minueto.image.MinuetoImage getImage()
VisualItem
getImage
in interface VisualItem
public int getWidth()
VisualItem
getWidth
in interface VisualItem
public int getHeight()
VisualItem
getHeight
in interface VisualItem
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |