|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.map.GameLocation
public class GameLocation
Title: GameLocation
Description: This holds the X and Y location of a Sprite, and it layer (or depth). The layer is used to set which game pieces are draw first, image below others, and which is drawn last, image on top, for a given map location.
Copyright: Copyright (c) 2005
Field Summary | |
---|---|
int |
layer
|
double |
x
|
int |
xOffset
|
double |
y
|
int |
yOffset
|
Constructor Summary | |
---|---|
GameLocation()
GameLocation |
|
GameLocation(double x,
double y)
|
|
GameLocation(double x,
double y,
int layer)
|
Method Summary | |
---|---|
void |
adjust(double adjX,
double adjY,
int adjLayer)
|
void |
adjustLayer(int adjLayer)
Change the Layer by adjLayer amount. |
void |
adjustX(double adjX)
Change the X by adjX amount |
void |
adjustY(double adjY)
Change the Y by adjY amount |
GameLocation |
copy()
|
boolean |
equals(java.lang.Object obj)
|
int |
getLayer()
getLayer |
double |
getX()
|
int |
getXOffset()
|
double |
getY()
getY |
int |
getYOffset()
|
int |
hashCode()
|
void |
setLayer(int layer)
setLayer |
void |
setLocation(double x,
double y,
int layer)
Sets all three locations. |
void |
setX(double x)
setX |
void |
setXOffset(int xOffset)
|
void |
setY(double y)
setY |
void |
setYOffset(int yOffset)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int layer
public double x
public double y
public int xOffset
public int yOffset
Constructor Detail |
---|
public GameLocation()
public GameLocation(double x, double y)
x
- doubley
- doublepublic GameLocation(double x, double y, int layer)
x
- doubley
- doublelayer
- intMethod Detail |
---|
public void adjust(double adjX, double adjY, int adjLayer)
public void adjustLayer(int adjLayer)
adjLayer
- public void adjustX(double adjX)
adjX
- public void adjustY(double adjY)
adjY
- public GameLocation copy()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public double getX()
public double getY()
public int getLayer()
public int getXOffset()
public int getYOffset()
public void setX(double x)
x
- doublepublic void setY(double y)
y
- doublepublic void setLayer(int layer)
layer
- intpublic void setLocation(double x, double y, int layer)
x
- y
- layer
- public void setXOffset(int xOffset)
public void setYOffset(int yOffset)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |