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, setSelected
public Route(GameEntity ge1, GameEntity ge2)
ge1
- : Herni objekt (prvni), ktery spojujeme.ge2
- : Herni objekt (druhy), ktery spojujeme.public final int getCenterX()
getCenterX
in class GameEntity
public final int getCenterY()
getCenterY
in class GameEntity
public final GameEntity getFirstRoom()
getFirstRoom
in class GameEntity
public final Object getGraphicsObject()
getGraphicsObject
in class GameEntity
public final GameEntity getSecondRoom()
getSecondRoom
in class GameEntity
public final void showGraphicsObject(Graphics2D g2)
showGraphicsObject
in class GameEntity
g2
- Graphics2D : Graficky kontext, do ktereho se bude kreslit.Copyright © 2008–2014. All rights reserved.