use of com.talosvfx.talos.editor.addons.scene.logic.components.AComponent in project talos by rockbite.
the class GameObject method read.
@Override
public void read(Json json, JsonValue jsonData) {
name = jsonData.getString("name");
JsonValue componentsJson = jsonData.get("components");
for (JsonValue componentJson : componentsJson) {
AComponent component = json.readValue(AComponent.class, componentJson);
addComponent(component);
}
JsonValue childrenJson = jsonData.get("children");
if (childrenJson != null) {
for (JsonValue childJson : childrenJson) {
GameObject childObject = json.readValue(GameObject.class, childJson);
addGameObject(childObject);
}
}
}
Aggregations