|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapes.ImageObject
apes.CollidableImageObject
public class CollidableImageObject
An ImageObject
extended by the methods specified in ICollidableObject
.
Field Summary |
---|
Fields inherited from class apes.ImageObject |
---|
image, name, position |
Constructor Summary | |
---|---|
CollidableImageObject(java.lang.String name,
org.newdawn.slick.Image image,
org.newdawn.slick.geom.Vector2f position,
org.newdawn.slick.geom.Shape collisionShape)
creates a new collidable image object. |
Method Summary | |
---|---|
org.newdawn.slick.geom.Shape |
getCollisionShape()
returns the collision shape of this object moved to its actual position. |
org.newdawn.slick.geom.Shape |
getNormalCollisionShape()
returns the general collision shape of this object. |
boolean |
isCollidingWith(ICollidableObject collidable)
returns true if the collision shape of this object intersects with the collision shape of the given 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. |
Methods inherited from class apes.ImageObject |
---|
getName, getPosition, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollidableImageObject(java.lang.String name, org.newdawn.slick.Image image, org.newdawn.slick.geom.Vector2f position, org.newdawn.slick.geom.Shape collisionShape)
name
- image
- position
- collisionShape
- Method Detail |
---|
public void setPosition(org.newdawn.slick.geom.Vector2f position)
setPosition
in interface ILevelObject
setPosition
in class ImageObject
position
- public org.newdawn.slick.geom.Shape getNormalCollisionShape()
getNormalCollisionShape
in interface ICollidableObject
public org.newdawn.slick.geom.Shape getCollisionShape()
getCollisionShape
in interface ICollidableObject
public void render(org.newdawn.slick.Graphics graphics)
image
on the screen with its top left corner
at the given x/y coordinates.
If debug is enabled it will also draw its collision shape.
render
in interface ILevelObject
render
in class ImageObject
graphics
- public boolean isCollidingWith(ICollidableObject collidable)
getCollisionShape
method.
isCollidingWith
in interface ICollidableObject
collidable
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |