Example usage for com.google.gwt.maeglin89273.game.mengine.asset JsonFile getJsonValue

List of usage examples for com.google.gwt.maeglin89273.game.mengine.asset JsonFile getJsonValue

Introduction

In this page you can find the example usage for com.google.gwt.maeglin89273.game.mengine.asset JsonFile getJsonValue.

Prototype

public JSONValue getJsonValue() 

Source Link

Usage

From source file:com.google.gwt.maeglin89273.game.ashinyballonthecross.client.tutorial.TutorialManager.java

private void parseSteps(JsonFile jsonConfigs, TaskHandler[] handlers) {
    JSONArray stepConfigs = jsonConfigs.getJsonValue().isObject().get("tutorial_steps").isArray();
    this.steps = new Step[stepConfigs.size()];
    JSONObject jsonStep;/*from  w  w  w  .  ja  v a  2 s.  co m*/
    for (int i = 0; i < steps.length; i++) {
        jsonStep = stepConfigs.get(i).isObject();
        this.steps[i] = new Step(jsonStep.get(Step.TITLE_KEY).isString().stringValue(),
                (int) jsonStep.get(Step.CORNER_X_KEY).isNumber().doubleValue(),
                (int) jsonStep.get(Step.CORNER_Y_KEY).isNumber().doubleValue(), parseTasks(jsonStep),
                handlers[i]);
    }
}