apes
Class ImageObject

java.lang.Object
  extended by apes.ImageObject
All Implemented Interfaces:
ILevelObject
Direct Known Subclasses:
CollidableImageObject

public class ImageObject
extends java.lang.Object
implements ILevelObject

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

name

protected java.lang.String name
the name of this object.


image

protected org.newdawn.slick.Image image
the image this object holds.


position

protected org.newdawn.slick.geom.Vector2f position
the position of this object.

Constructor Detail

ImageObject

public ImageObject(java.lang.String name,
                   org.newdawn.slick.Image image,
                   org.newdawn.slick.geom.Vector2f position)
constructs a new object.

Parameters:
name -
image -
position -
Method Detail

getName

public java.lang.String getName()
returns the name of this object.

Specified by:
getName in interface ILevelObject
Returns:

getPosition

public org.newdawn.slick.geom.Vector2f getPosition()
returns the position of this object.

Specified by:
getPosition in interface ILevelObject
Returns:

setPosition

public void setPosition(org.newdawn.slick.geom.Vector2f position)
sets the position of this object.

Specified by:
setPosition in interface ILevelObject
Parameters:
position -

render

public void render(org.newdawn.slick.Graphics graphics)
draws the image on the screen with its top left corner at the given x/y coordinates.

Specified by:
render in interface ILevelObject
Parameters:
graphics -

update

public void update(org.newdawn.slick.GameContainer gc,
                   org.newdawn.slick.state.StateBasedGame sbg,
                   int delta)
does nothing at the moment.

Specified by:
update in interface ILevelObject
Parameters:
gc -
sbg -
delta -