Create a New Scene with a CanvasLayer as the Root
A CanvasLayer allows us to overlay objects on top of other objects
it is also locked in place and doesn't move with other objects in the scene.
Add a MarginContainer as a child.
This is a container object which allows us to control the size of margin spacing.
Select the MarginContainer
Click on the Anchor and Offset Presets button
Adjust the left and right margin spacing to 32
Now add two Label nodes as children of the MarginContainer.
Name them PlayerPoints and EnemyPoints.
Set the Text Property of both Labels to 0
Set the Horizontal Alignment to Left
Set the Vertical Alignment to Top
Instance (Add) your UI scene in the Board scene.
Right-click on the Labels and select
This places a special % marker in the Node name and allows you to reference the node without including the full path.
Add a New Script to the UI node.
Set the initial text of the
Create a function to update the enemy's score
Inside the function set the text value to the number of points.
Create a function to update the player's score
Inside the function set the text value to the number of points.