Search in sources :

Example 1 with ActionNode

use of org.terasology.engine.logic.behavior.core.ActionNode in project Terasology by MovingBlocks.

the class BehaviorEditorScreen method onNodeSelected.

private void onNodeSelected(RenderableNode value, PropertyProvider provider) {
    selectedNode = value;
    properties.clear();
    if (value != null) {
        BehaviorNode underlyingNode = value.getNode();
        if (underlyingNode instanceof ActionNode) {
            this.properties.addProperties("Behavior Node", provider.createProperties(((ActionNode) underlyingNode).getAction()));
        }
        properties.addProperties("Behavior Node", provider.createProperties(value.getNode()));
    }
}
Also used : ActionNode(org.terasology.engine.logic.behavior.core.ActionNode) BehaviorNode(org.terasology.engine.logic.behavior.core.BehaviorNode)

Aggregations

ActionNode (org.terasology.engine.logic.behavior.core.ActionNode)1 BehaviorNode (org.terasology.engine.logic.behavior.core.BehaviorNode)1