public class Room extends GameEntity
Tato trida definuje vlastnosti mistnosti ve vytvorenem svete.
Constructor and Description |
---|
Room(int x,
int y,
int r)
Konstruktor - nastavuje souradnice umisteni dane mistnosti v editoru.
|
Modifier and Type | Method and Description |
---|---|
int |
getCenterX()
Vraci stred objektu v ose X.
|
int |
getCenterY()
Vraci stred objektu v ose Y.
|
GameEntity |
getFirstRoom()
V teto tride nepotrebuji tuto vlastnost, proto vratime null.
|
Object |
getGraphicsObject()
Vraci grafickou reprezentaci mistnosti v editoru.
|
GameEntity |
getSecondRoom()
V teto tride nepotrebuji tuto vlastnost, proto vratime null.
|
void |
showGraphicsObject(Graphics2D g2)
Zobrazi danou mistnost v editoru.
|
downID, getId, getLocationX, getLocationY, getType, isSeleted, resetCounter, setLocationX, setLocationY, setSelected
public Room(int x, int y, int r)
x
- int : X-ova souradnice mistnosti.y
- int : Y-ova souradnice mistnosti.r
- int : Polomer kruznice - urcuje velikost mistnosti.public final int getCenterX()
getCenterX
in class GameEntity
public final int getCenterY()
getCenterY
in class GameEntity
public final Object getGraphicsObject()
getGraphicsObject
in class GameEntity
public final void showGraphicsObject(Graphics2D g2)
showGraphicsObject
in class GameEntity
g2
- Graphics2D : Graficky kontext, do ktereho se bude kreslit.public final GameEntity getFirstRoom()
getFirstRoom
in class GameEntity
public final GameEntity getSecondRoom()
getSecondRoom
in class GameEntity
Copyright © 2008–2014. All rights reserved.