|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapes.Block
public class Block
This class is a simple block (rectangle) implementation of
ICollidableObject
.
Field Summary | |
---|---|
org.newdawn.slick.geom.Polygon |
poly
|
Constructor Summary | |
---|---|
Block(int x,
int y,
int width,
int higth)
constructs a new block. |
Method Summary | |
---|---|
void |
draw(org.newdawn.slick.Graphics g)
calls the draw method of Graphics with the polygon
residing in this class. |
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)
checks weather or not this object is colliding with the provided object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public org.newdawn.slick.geom.Polygon poly
Constructor Detail |
---|
public Block(int x, int y, int width, int higth)
x
- y
- width
- higth
- Method Detail |
---|
public org.newdawn.slick.geom.Shape getCollisionShape()
ICollidableObject
getCollisionShape
in interface ICollidableObject
public org.newdawn.slick.geom.Shape getNormalCollisionShape()
ICollidableObject
getNormalCollisionShape
in interface ICollidableObject
public boolean isCollidingWith(ICollidableObject collidable)
ICollidableObject
isCollidingWith
in interface ICollidableObject
public void draw(org.newdawn.slick.Graphics g)
Graphics
with the polygon
residing in this class.
g
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |