cs.pancava.caltha.worlds
Class Route

java.lang.Object
  extended by cs.pancava.caltha.worlds.GameEntity
      extended by cs.pancava.caltha.worlds.Route

public class Route
extends GameEntity

Tato trida definuje vlastnosti spojų (cest) mezi jednotlivymi mistnosti ve vytvorenem svete.

Version:
$Revision: 22 $
$LastChangedBy: mihlon $
Author:
Milan Vaclavik

Constructor Summary
Route(GameEntity ge1, GameEntity ge2)
          Konstruktor vytvarejici spoj (cestu) mezi dvema objekty (mistnostmi).
 
Method Summary
 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.
 java.lang.Object getGraphicsObject()
          Vraci grafickou reprezentaci spoje (cesty) v editoru.
 GameEntity getSecondRoom()
          Vrati druhou mistnost, ktera je spojena s prvni mistnosti.
 void showGraphicsObject(java.awt.Graphics2D g2)
          Zobrazi dany spoj (cestu) v editoru.
 
Methods inherited from class cs.pancava.caltha.worlds.GameEntity
downID, getId, getLocationX, getLocationY, getType, isSeleted, resetCounter, setLocationX, setLocationY, setSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Route

public Route(GameEntity ge1,
             GameEntity ge2)
Konstruktor vytvarejici spoj (cestu) mezi dvema objekty (mistnostmi).

Parameters:
ge1 - : Herni objekt (prvni), ktery spojujeme.
ge2 - : Herni objekt (druhy), ktery spojujeme.
Method Detail

getCenterX

public final int getCenterX()
Vraci stred objektu v ose X.

Specified by:
getCenterX in class GameEntity
Returns:
int : Stred objektu v ose X.

getCenterY

public final int getCenterY()
Vraci stred objektu v ose Y.

Specified by:
getCenterY in class GameEntity
Returns:
int : Stred objektu v ose Y.

getFirstRoom

public final GameEntity getFirstRoom()
Vrati prvni mistnost, ktera je spojena s druhou mistnosti.

Specified by:
getFirstRoom in class GameEntity
Returns:
gameEntity : Prvni mistnost, ktera je spojena s druhou mistnosti.

getGraphicsObject

public final java.lang.Object getGraphicsObject()
Vraci grafickou reprezentaci spoje (cesty) v editoru.

Specified by:
getGraphicsObject in class GameEntity
Returns:
Line2D : Graficka reprezentace spoje (cesty) v editoru.

getSecondRoom

public final GameEntity getSecondRoom()
Vrati druhou mistnost, ktera je spojena s prvni mistnosti.

Specified by:
getSecondRoom in class GameEntity
Returns:
gameEntity : Druha mistnost, ktera je spojena s prvni mistnosti.

showGraphicsObject

public final void showGraphicsObject(java.awt.Graphics2D g2)
Zobrazi dany spoj (cestu) v editoru.

Specified by:
showGraphicsObject in class GameEntity
Parameters:
g2 - Graphics2D : Graficky kontext, do ktereho se bude kreslit.


Copyright © 2008-2009. All Rights Reserved.