|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapes.ImageObject
public class ImageObject
This class is responsible for holding image objects. They have a position, a name and an image. They may be printed to the screen and user input may be applied.
Field Summary | |
---|---|
protected org.newdawn.slick.Image |
image
the image this object holds. |
protected java.lang.String |
name
the name of this object. |
protected org.newdawn.slick.geom.Vector2f |
position
the position of this object. |
Constructor Summary | |
---|---|
ImageObject(java.lang.String name,
org.newdawn.slick.Image image,
org.newdawn.slick.geom.Vector2f position)
constructs a new object. |
Method Summary | |
---|---|
java.lang.String |
getName()
returns the name of this object. |
org.newdawn.slick.geom.Vector2f |
getPosition()
returns the position of this object. |
void |
render(org.newdawn.slick.Graphics graphics)
draws the image on the screen with its top left corner
at the given x/y coordinates. |
void |
setPosition(org.newdawn.slick.geom.Vector2f position)
sets the position of this object. |
void |
update(org.newdawn.slick.GameContainer gc,
org.newdawn.slick.state.StateBasedGame sbg,
int delta)
does nothing at the moment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected org.newdawn.slick.Image image
protected org.newdawn.slick.geom.Vector2f position
Constructor Detail |
---|
public ImageObject(java.lang.String name, org.newdawn.slick.Image image, org.newdawn.slick.geom.Vector2f position)
name
- image
- position
- Method Detail |
---|
public java.lang.String getName()
getName
in interface ILevelObject
public org.newdawn.slick.geom.Vector2f getPosition()
getPosition
in interface ILevelObject
public void setPosition(org.newdawn.slick.geom.Vector2f position)
setPosition
in interface ILevelObject
position
- public void render(org.newdawn.slick.Graphics graphics)
image
on the screen with its top left corner
at the given x/y coordinates.
render
in interface ILevelObject
graphics
- public void update(org.newdawn.slick.GameContainer gc, org.newdawn.slick.state.StateBasedGame sbg, int delta)
update
in interface ILevelObject
gc
- sbg
- delta
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |