|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object apoIcejump.ai.ApoIcejumpAIEntity
public class ApoIcejumpAIEntity
repräsentiert eine Entity (also davon erben, Spieler, Gegner, Eisblöcke) im Spiel
class for all entities
Constructor Summary | |
---|---|
ApoIcejumpAIEntity(org.apogames.entity.ApoEntity entity)
|
Method Summary | |
---|---|
float |
getHeight()
gibt die Höhe der Entity zurück returns the height of the entity |
float |
getVecX()
gibt die Geschwindigkeit in X-Richtung zurück Um auszurechnen, wo eine Entity beim nächsten Aufruf ist rechnet einfach getVecX() * ApoicejumpAIConstants.WAIT_TIME_THINK Beispiel eine Geschwindigkeit von 0.16 bedeutet bei 10 Millisekunden bis zum nächsten Aufruf das die Entity beim nächsten Aufruf 1.6 Pixel weiter rechts ist. |
float |
getVecY()
gibt die Geschwindigkeit in Y-Richtung zurück (siehe getVecX() zum Verständnis) returns the speed in y-direction of the entity per ms (see getVecX() to know how to calculate the next step) |
float |
getWidth()
gibt die Breite der Entity zurück returns the width of the entity |
float |
getX()
gibt die X-Position der Entity zurück 0 = ganz links, ApoIcejumpAIConstants.GAME_WIDTH - getWidth() = ganz rechts returns the x-Position of the entity 0 = left, ApoIcejumpAIConstants.GAME_WIDTH - getWidth() = right |
float |
getY()
gibt die X-Position der Entity zurück 0 oben im Frame returns the x-Position of the entity 0 above |
boolean |
intersects(ApoIcejumpAIEntity entity)
gibt zurück, ob diese Entity sich mit der übergebenen Entity schneidet returns whether the entity intersects another entity |
boolean |
intersects(float x,
float y,
float width,
float height)
gibt zurück, ob sich diese Entity mit dem übergebenen Rechteck schneidet returns whether the entity intersects with a rectangle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApoIcejumpAIEntity(org.apogames.entity.ApoEntity entity)
Method Detail |
---|
public float getX()
public float getY()
public float getWidth()
public float getHeight()
public float getVecX()
public float getVecY()
public boolean intersects(ApoIcejumpAIEntity entity)
entity
- : zu überprüfende Entity / other entitypublic boolean intersects(float x, float y, float width, float height)
x
- : X-Wert des Rechtecks (oben links) / x value from the rec (left above)y
- : Y-Wert des Rechtecks (oben links) / y value from the rec (left above)width
- : Breite des Rechtecks / width of the recheight
- : Höhe des Rechtecks / height of the rec
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |