Package org.gbcpainter.loaders.level.parsers

Examples of org.gbcpainter.loaders.level.parsers.FileLevelParser.parseData()


    ByteBuffer buffer = ByteBuffer.wrap( Files.readAllBytes( path ) );

    setStatus( PARSE_DATA );
    FileLevelParser parser = new AssertValidGraphParser();

    parser.parseData( buffer );
    SimpleGraph<Point, Segment> levelMap = parser.getLevelMap();
    Map<Integer, Set<Segment>> rawFacesMap = parser.getFacesMap();
    Point initialPlayerPosition = parser.getPlayerPosition();
    Map<String, java.util.List<Point>> monstersPositions = parser.getMonstersPosition();
View Full Code Here


    Path path = Paths.get( levelFile.getAbsolutePath() );

    ByteBuffer buffer = ByteBuffer.wrap( Files.readAllBytes( path ) );

    parser.parseData( buffer );

    this.levelMap = parser.getLevelMap();
    this.rawFacesMap = parser.getFacesMap();
    this.playerPosition = parser.getPlayerPosition();
    this.monstersPositions = parser.getMonstersPosition();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.