Search in sources :

Example 1 with ActionNode

use of org.terasology.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.logic.behavior.core.ActionNode) BehaviorNode(org.terasology.logic.behavior.core.BehaviorNode)

Aggregations

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