public class Route extends GameEntity
Tato trida definuje vlastnosti spojů (cest) mezi jednotlivymi mistnosti ve vytvorenem svete.
| Constructor and Description |
|---|
Route(GameEntity ge1,
GameEntity ge2)
Konstruktor vytvarejici spoj (cestu) mezi dvema objekty (mistnostmi).
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCenterX()
Vraci stred objektu v ose X.
|
int |
getCenterY()
Vraci stred objektu v ose Y.
|
GameEntity |
getFirstRoom()
Vrati prvni mistnost, ktera je spojena s druhou mistnosti.
|
Object |
getGraphicsObject()
Vraci grafickou reprezentaci spoje (cesty) v editoru.
|
GameEntity |
getSecondRoom()
Vrati druhou mistnost, ktera je spojena s prvni mistnosti.
|
void |
showGraphicsObject(Graphics2D g2)
Zobrazi dany spoj (cestu) v editoru.
|
downID, getId, getLocationX, getLocationY, getType, isSeleted, resetCounter, setLocationX, setLocationY, setSelectedpublic Route(GameEntity ge1, GameEntity ge2)
ge1 - : Herni objekt (prvni), ktery spojujeme.ge2 - : Herni objekt (druhy), ktery spojujeme.public final int getCenterX()
getCenterX in class GameEntitypublic final int getCenterY()
getCenterY in class GameEntitypublic final GameEntity getFirstRoom()
getFirstRoom in class GameEntitypublic final Object getGraphicsObject()
getGraphicsObject in class GameEntitypublic final GameEntity getSecondRoom()
getSecondRoom in class GameEntitypublic final void showGraphicsObject(Graphics2D g2)
showGraphicsObject in class GameEntityg2 - Graphics2D : Graficky kontext, do ktereho se bude kreslit.Copyright © 2008–2014. All rights reserved.