Search in sources :

Example 1 with Environment

use of pl.themolka.arcade.environment.Environment in project Arcade2 by ShootGame.

the class ArcadePlugin method loadEnvironment.

private void loadEnvironment() throws DOMException {
    Node node = this.getSettings().getData().child("environment");
    Parser<Environment> parser;
    try {
        parser = this.parsers.forType(Environment.class);
    } catch (ParserNotSupportedException ex) {
        throw new RuntimeException("No " + Environment.class.getSimpleName() + " parser installed");
    }
    this.environment = parser.parse(node).orFail();
    this.environment.initialize(this);
}
Also used : Node(pl.themolka.arcade.dom.Node) Environment(pl.themolka.arcade.environment.Environment) ParserNotSupportedException(pl.themolka.arcade.parser.ParserNotSupportedException)

Aggregations

Node (pl.themolka.arcade.dom.Node)1 Environment (pl.themolka.arcade.environment.Environment)1 ParserNotSupportedException (pl.themolka.arcade.parser.ParserNotSupportedException)1