Package org.terasology.logic.behavior

Examples of org.terasology.logic.behavior.BehaviorNodeComponent


                        paletteItems.add(pos - 1, createCategory(value.category, false));
                        break;
                    case PALETTE_ITEM_CLOSE:
                        pos = paletteItems.indexOf(value);
                        paletteItems.remove(pos);
                        BehaviorNodeComponent categoryItem = createCategory(value.category, true);
                        paletteItems.add(pos, categoryItem);
                        paletteItems.addAll(pos + 1, nodeFactory.getNodesComponents(value.category));
                        break;
                    default:
                        behaviorEditor.createNode(value);
View Full Code Here


    }

    private List<BehaviorNodeComponent> findPaletteItems() {
        List<BehaviorNodeComponent> items = Lists.newArrayList();
        for (String category : nodeFactory.getCategories()) {
            BehaviorNodeComponent categoryItem = createCategory(category, true);
            items.add(categoryItem);
            items.addAll(nodeFactory.getNodesComponents(category));
        }
        return items;
    }
View Full Code Here

        return items;
    }

    private BehaviorNodeComponent createCategory(String category, boolean open) {
        String prefix = open ? PALETTE_ITEM_OPEN : PALETTE_ITEM_CLOSE;
        BehaviorNodeComponent categoryItem = new BehaviorNodeComponent();
        categoryItem.category = category;
        categoryItem.name = prefix + category.toUpperCase() + prefix;
        return categoryItem;
    }
View Full Code Here

    public void setRenderableRoot(RenderableNode renderableRoot) {
        this.renderableRoot = renderableRoot;
    }

    public RenderableNode createNode(Node node) {
        BehaviorNodeComponent nodeComponent = CoreRegistry.get(BehaviorNodeFactory.class).getNodeComponent(node);
        RenderableNode self = new RenderableNode(nodeComponent);
        self.setNode(node);
        renderableNodes.put(node, self);
        return self;
    }
View Full Code Here

TOP

Related Classes of org.terasology.logic.behavior.BehaviorNodeComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.