|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.farafin.snEADy.world.C_GameObject
de.farafin.snEADy.world.C_Goody
public abstract class C_Goody
| Field Summary |
|---|
| Fields inherited from class de.farafin.snEADy.world.C_GameObject |
|---|
faceDirection, headPosition, nextUpdateTime, objPositions, ownChar, parameter, waitCycles |
| Fields inherited from interface de.farafin.snEADy.communication.I_PlayFieldConstants |
|---|
EXIT, FIELD_B, FIELD_C, FIELD_D, FIELD_E, FIELD_F, FIELD_G, FIELD_H, FIELD_I, FIELD_J, FIELD_K, FIELD_L, FIELD_M, FIELD_N, FIELD_O, FIELD_P, FIELD_Q, FIELD_R, FIELD_S, FIELD_T, FIELD_U, FIELD_V, FIELD_W, FIELD_X, FIELD_Y, FIELD_Z, FREE, GOODY_f, GOODY_g, GOODY_h, GOODY_i, GOODY_j, GOODY_k, GOODY_l, GOODY_m, GOODY_n, GOODY_o, GOODY_p, GOODY_q, GOODY_r, GOODY_s, GOODY_t, GOODY_u, GOODY_v, GOODY_w, GOODY_x, GOODY_y, GOODY_z, LENGTH, PLAYER_0, PLAYER_1, PLAYER_2, PLAYER_3, PLAYER_4, PLAYER_5, PLAYER_6, PLAYER_7, PLAYER_8, PLAYER_9, POINTS, SHORT, SLOW, SPEED, WALL |
| Constructor Summary | |
|---|---|
protected |
C_Goody()
default constructor |
protected |
C_Goody(D_Vec2D headPosition,
int faceDirection,
char ownChar,
long waitCycles,
GameParameter parameter)
|
protected |
C_Goody(D_Vec2D headPosition,
int faceDirection,
RingVector objPositions,
char ownChar,
long waitCycles,
GameParameter parameter)
|
protected |
C_Goody(GameParameter parameter)
constructor |
| Method Summary | |
|---|---|
protected abstract java.lang.Object |
clone()
|
protected D_Vec2D[] |
getAllPosSorted(int sort)
|
protected void |
jumpTo(D_Vec2D pos,
C_Arena arena)
moves the object with all its positions to the specific position. |
abstract java.lang.String |
toString()
|
protected abstract void |
update(C_Arena arena)
the update call meens that the object should do what ever it does usually |
protected void |
wasEaten(C_Snake snake,
C_Arena arena)
this method is called when the goody was eaten by a snake. |
protected abstract void |
wasEatenBy(C_Snake snake)
this method describes what happends to the snake if the goody was eaten. |
| Methods inherited from class de.farafin.snEADy.world.C_GameObject |
|---|
getAllPosArray, getAllPosList, getFaceDirection, getHeadPosition, getNextPosInFaceDirection, getNextUpdateTime, getOwnChar, jumpHeadPos, setFaceDirection, setHeadPosition |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected C_Goody()
protected C_Goody(GameParameter parameter)
parameter -
protected C_Goody(D_Vec2D headPosition,
int faceDirection,
char ownChar,
long waitCycles,
GameParameter parameter)
headPosition - faceDirection - ownChar - waitCycles - parameter -
protected C_Goody(D_Vec2D headPosition,
int faceDirection,
RingVector objPositions,
char ownChar,
long waitCycles,
GameParameter parameter)
headPosition - faceDirection - objPositions - ownChar - waitCycles - parameter - | Method Detail |
|---|
protected void jumpTo(D_Vec2D pos,
C_Arena arena)
C_GameObject
jumpTo in class C_GameObjectpos - the desteny position of the head.protected D_Vec2D[] getAllPosSorted(int sort)
getAllPosSorted in class C_GameObjectsort - maybe there are more than one way to sort the object positions, this
parameter specifies the kind of sort.
protected abstract void update(C_Arena arena)
C_GameObject
update in class C_GameObjectarena - the arena the object is living inprotected abstract void wasEatenBy(C_Snake snake)
snake - the snake that ate the goody
protected void wasEaten(C_Snake snake,
C_Arena arena)
snake - the snae that ate the goodyarena - the arena the goody was eaten inpublic abstract java.lang.String toString()
toString in class C_GameObjectprotected abstract java.lang.Object clone()
clone in class C_GameObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||