infinitewisdom.view
Class ViewConfig
java.lang.Object
infinitewisdom.view.ViewConfig
- Direct Known Subclasses:
- ViewConfigDom1
public abstract class ViewConfig
- extends java.lang.Object
This is where you register your units in your game. Used when creating new units e.g. mapeditor,
maploading.
There's only one instance of a ViewConfig is in use
in a game.
On usage example see the source code of ViewConfigDom1
.
Trivia:
The mapeditor panel UnitPalette
gets the unit classes from here.
Field Summary |
protected java.util.HashMap<java.lang.Class<? extends UnitIF>,java.lang.Class<? extends UnitView>> |
modelViewMap
key: unit;
value: unitView |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
modelViewMap
protected java.util.HashMap<java.lang.Class<? extends UnitIF>,java.lang.Class<? extends UnitView>> modelViewMap
- key: unit;
value: unitView
ViewConfig
public ViewConfig()
createViewForNewUnits
public void createViewForNewUnits(GameWorldView gwv,
java.util.List<PlayerView> playerviews,
java.util.List<UnitView> unitviews)
getModelViewMap
public java.util.HashMap<java.lang.Class<? extends UnitIF>,java.lang.Class<? extends UnitView>> getModelViewMap()