Finding and changing screen elements
Find the score display and board by their names in JSON.
Use layout.requireNode(id, Text) to search the whole layout: it immediately checks the node exists and has the expected class. Import concrete Text and Container classes from @gamedevland/engine/renderers/pixi.
In this example, board is inside gameplay, while score is directly under the root. From the root node’s component, find both elements, update the score text, and show the board.
const board = this.node.getChildContainer('gameplay.board');
const label = this.node.getChildText('score');
label.setText('120');
board.setVisible(true);
rootStart the lookup here
gameplay.boardShow the board
scoreUpdate the score text