|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrails.game.TileManager
public class TileManager
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
log
|
protected java.util.List<java.lang.Integer> |
tileIds
|
protected java.util.Map<java.lang.Integer,TileI> |
tileMap
|
Constructor Summary | |
---|---|
TileManager()
No-args constructor. |
Method Summary | |
---|---|
void |
configureFromXML(Tag tileSetTop)
Instructs the component to configure itself from the provided XML element. |
void |
finishConfiguration(GameManagerI gameManager)
This method is intended to be called for each configurable component, to perforn any initialisation activities that require any other components to be initialised first. |
java.util.List<TileI> |
getAllUpgrades(TileI tile,
MapHex hex)
returns the set of all possible upgrade tiles |
TileI |
getTile(int id)
|
java.util.List<java.lang.Integer> |
getTileIds()
Get the tile IDs in the XML definition sequence |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.Integer,TileI> tileMap
protected java.util.List<java.lang.Integer> tileIds
protected static org.apache.log4j.Logger log
Constructor Detail |
---|
public TileManager()
Method Detail |
---|
public void configureFromXML(Tag tileSetTop) throws ConfigurationException
ConfigurableComponentI
configureFromXML
in interface ConfigurableComponentI
ConfigurationException
rails.game.ConfigurableComponentI#configureFromXML(org.w3c.dom.Element)
public void finishConfiguration(GameManagerI gameManager) throws ConfigurationException
ConfigurableComponentI
This method should be called where necessary after all XML file parsing has completed, so that all objects that need to be related to do exist.
finishConfiguration
in interface ConfigurableComponentI
gameManager
- The 'parent' configurable component is passed to allow
the 'child' to access any other object without the need to resort to
static calls where possible.
ConfigurationException
public TileI getTile(int id)
public java.util.List<java.lang.Integer> getTileIds()
public java.util.List<TileI> getAllUpgrades(TileI tile, MapHex hex)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |