Search in sources :

Example 6 with AComponent

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);
        }
    }
}
Also used : AComponent(com.talosvfx.talos.editor.addons.scene.logic.components.AComponent)

Aggregations

AComponent (com.talosvfx.talos.editor.addons.scene.logic.components.AComponent)6 Gizmo (com.talosvfx.talos.editor.addons.scene.widgets.gizmos.Gizmo)1 TransformGizmo (com.talosvfx.talos.editor.addons.scene.widgets.gizmos.TransformGizmo)1 EventHandler (com.talosvfx.talos.editor.notifications.EventHandler)1 IOException (java.io.IOException)1