Example usage for com.badlogic.gdx.utils ObjectMap putAll

List of usage examples for com.badlogic.gdx.utils ObjectMap putAll

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils ObjectMap putAll.

Prototype

public void putAll(ObjectMap<K, V> map) 

Source Link

Usage

From source file:com.dongbat.invasion.registry.BulletRegistry.java

private static BulletType createBulletType(BulletInfo bulletInfo, ObjectMap<String, String> mod) {
    ObjectMap<String, String> data = new ObjectMap<String, String>(bulletInfo.getData());
    data.putAll(mod);
    return (BulletType) ReflectionUtil.createObject(bulletInfo.getClassName(), data);
}

From source file:com.vlaaad.dice.loaders.ThesaurusLoader.java

License:Open Source License

@Override
public void loadAsync(AssetManager manager, String fileName, FileHandle file,
        ThesaurusLoader.ThesaurusParameter parameter) {
    Constructor constructor = new Constructor(ThesaurusData.class);
    Yaml yaml = new Yaml(constructor);
    ObjectMap<String, ThesaurusData> data = new ObjectMap<String, ThesaurusData>();
    for (Object o : yaml.loadAll(resolve(fileName).read())) {
        ThesaurusData description = (ThesaurusData) o;
        data.put(description.key, description);
    }//from www .  j a  v a 2s.  com
    if (parameter != null && parameter.other.length > 0) {
        for (String depName : parameter.other) {
            Thesaurus dep = manager.get(depName);
            data.putAll(dep.data);
        }
    }
    thesaurus = new Thesaurus(data);
}

From source file:me.scarlet.undertailor.gfx.text.parse.TextParser.java

License:Open Source License

public static Array<TextPiece> parse(String input) {
    Array<TextPiece> pieces = new Array<>(true, 16);

    ObjectMap<TextParam, String> current = new ObjectMap<>();
    for (String piece : separate(input)) {
        if (CATCH_PATTERN.matcher(piece).matches()) {
            current.putAll(parseMatches(piece));
        } else {/*w w  w  . ja  va 2s.co m*/
            pieces.add(TextPiece.of(new ObjectMap<>(current), piece));
        }
    }

    return pieces;
}