Search in sources :

Example 1 with InventoryCell

use of org.terasology.rendering.nui.layers.ingame.inventory.InventoryCell in project Terasology by MovingBlocks.

the class InventoryHud method initialise.

@Override
public void initialise() {
    for (InventoryCell cell : findAll(InventoryCell.class)) {
        cell.bindSelected(new SlotSelectedBinding(cell.getTargetSlot(), localPlayer));
        cell.bindTargetInventory(new ReadOnlyBinding<EntityRef>() {

            @Override
            public EntityRef get() {
                return localPlayer.getCharacterEntity();
            }
        });
    }
    crosshair = find("crosshair", UICrosshair.class);
}
Also used : InventoryCell(org.terasology.rendering.nui.layers.ingame.inventory.InventoryCell) EntityRef(org.terasology.entitySystem.entity.EntityRef)

Aggregations

EntityRef (org.terasology.entitySystem.entity.EntityRef)1 InventoryCell (org.terasology.rendering.nui.layers.ingame.inventory.InventoryCell)1