Package com.badlogic.gdx.files

Examples of com.badlogic.gdx.files.FileHandle.readString()


   * Lee y genera el nivel desde un fichero de nivel
   */
  public void readCurrentLevelFile() {
   
    FileHandle file = Gdx.files.internal("levels/level" + currentLevel + ".txt");
    String levelInfo = file.readString();
   
    steps = levelInfo.split("\n");
  }
 
  /**
 
View Full Code Here


   * Carga el nivel actual leyendo el fichero 'level' + currentLevel + '.txt'
   */
  public void loadCurrentLevel() {
   
    FileHandle file = Gdx.files.internal("levels/level" + currentLevel + ".txt");
    String levelInfo = file.readString();
   
    int x = 0, y = Constants.SCREEN_HEIGHT - Constants.BRICK_HEIGHT;
    String[] rows = levelInfo.split("\n");
    Brick brick = null;
    for (String row : rows) {
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.