|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcage.graphics.Clickable
cage.graphics.Sprite
public class Sprite
TODO: Sprite needs a way to set the Image!.
Field Summary | |
---|---|
protected boolean |
animated
Is the sprite animated. |
protected java.util.LinkedList<HotSpot> |
hotSpots
The hot spots. |
protected VisualItem |
image
The image. |
protected boolean |
visible
Is the sprite visible. |
Fields inherited from class cage.graphics.Clickable |
---|
actionName, botRight, height, name, topLeft, width |
Constructor Summary | |
---|---|
Sprite(java.lang.String imageName,
java.lang.String inName,
Point location)
Instantiates a new Sprite. |
Method Summary | |
---|---|
void |
addHotSpot(HotSpot s)
Adds the hot spot. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getActionName()
Gets the action name. |
boolean |
getAnimated()
Checks if is animated. |
org.minueto.image.MinuetoImage |
getFrame()
Gets the frame in the animation. |
HotSpot |
getHotSpot(java.lang.String name)
Gets the hot spot. |
java.util.LinkedList<HotSpot> |
getHotSpots()
Gets the hot spots. |
org.minueto.image.MinuetoImage |
getImage()
Gets the image. |
boolean |
getLoop()
Gets loop. |
boolean |
getPlay()
Gets play. |
boolean |
getVisible()
Checks if the Sprite is visible. |
VisualItem |
getVisualItem()
Gets the visual item. |
void |
scale(double xScale,
double yScale)
Scale the Sprite location and image by the given X and Y scales, as ratios. |
void |
setActionName(java.lang.String actionName)
Sets the action name. |
void |
setLocation(int x,
int y)
Set the location of this sprite to the specified point. |
void |
setLocation(Point coord)
Set the location of this sprite to the specified point. |
void |
setLoop(boolean loop)
Sets loop. |
void |
setPlay(boolean play)
Sets play. |
void |
setVisible(boolean b)
Sets if the Sprite is visible. |
java.lang.String |
toString()
|
java.lang.String |
toXML()
Creates an XML String representing this Sprite |
Methods inherited from class cage.graphics.Clickable |
---|
getLocation, getName, getX, getY, inputCollision, performAction |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected VisualItem image
protected boolean visible
protected java.util.LinkedList<HotSpot> hotSpots
protected boolean animated
Constructor Detail |
---|
public Sprite(java.lang.String imageName, java.lang.String inName, Point location)
imageName
- the image nameinName
- the in namelocation
- the X,Y location of the upper left of the Sprite.Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean getAnimated()
public boolean getLoop()
public void setLoop(boolean loop)
loop
- new loop valuepublic boolean getPlay()
public void setPlay(boolean play)
play
- new playpublic org.minueto.image.MinuetoImage getFrame()
public VisualItem getVisualItem()
public org.minueto.image.MinuetoImage getImage()
public void setLocation(Point coord)
setLocation
in class Clickable
coord
- the X,Y location of the spritepublic void setLocation(int x, int y)
setLocation
in class Clickable
x
- the x coordy
- the y coordpublic java.lang.String getActionName()
public void setActionName(java.lang.String actionName)
actionName
- the new action namepublic void scale(double xScale, double yScale)
xScale
- the x scaleyScale
- the y scalepublic void setVisible(boolean b)
b
- the new visible valuepublic boolean getVisible()
public java.util.LinkedList<HotSpot> getHotSpots()
public void addHotSpot(HotSpot s)
s
- the HotSpot to add.public java.lang.String toXML()
public HotSpot getHotSpot(java.lang.String name)
name
- the name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |