vooga.engine.factory
Class LevelParser
java.lang.Object
vooga.engine.factory.LevelParser
- All Implemented Interfaces:
- LevelFactory
- Direct Known Subclasses:
- CyberionLevelParser, LevelParserExample, ModularLevelParser
public class LevelParser
- extends java.lang.Object
- implements LevelFactory
The LevelParser class can be used to process a LevelXML file and turn it into a PlayField.
The LevelParser handles SpriteGroups, CollisionGroups, Backgrounds,
Music, Maps, and Events.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FIRST_IMAGE
public static final int FIRST_IMAGE
- See Also:
- Constant Field Values
LevelParser
public LevelParser()
getPlayfield
public PlayField getPlayfield(java.lang.String filepath,
Game game)
- Specified by:
getPlayfield
in interface LevelFactory
- Returns:
- Playfield for the current level
processSprite
public void processSprite(org.w3c.dom.NodeList spritesList,
SpriteGroup group)
- Processes the Sprites within a SpriteGroup.
processVisual
public void processVisual(org.w3c.dom.NodeList visualsList,
BetterSprite newSprite)
- Processes Visuals within a Sprite.
processBackgrounds
public void processBackgrounds(org.w3c.dom.NodeList backgrounds)
- Processes the background
isElement
public static boolean isElement(org.w3c.dom.Node node)
getGame
public Game getGame()
getOverlayTracker
public OverlayTracker getOverlayTracker()
getIncompletePlayfield
public PlayField getIncompletePlayfield()