官术网_书友最值得收藏!

Node setup

Create a new scene and add a CanvasLayer node named HUD. A CanvasLayer node allows you to draw your UI elements on a layer above the rest of the game, so that the information it displays doesn't get covered up by any game elements like the player or the coins.

Godot provides a wide variety of UI elements that may be used to create anything from indicators such as health bars to complex interfaces such as inventories. In fact, the Godot editor that you are using to make this game is built in Godot using these elements. The basic nodes for UI elements are extended from Control, and appear with green icons in the node list. To create your UI, you'll use various Control nodes to position, format, and display information. Here is what the HUD will look like when complete:

主站蜘蛛池模板: 肃南| 灵台县| 嫩江县| 沾化县| 溧水县| 射洪县| 屯留县| 霍林郭勒市| 金山区| 富阳市| 桦川县| 贵溪市| 鄢陵县| 翁源县| 中西区| 通江县| 宿迁市| 平远县| 卓尼县| 红桥区| 承德县| 嘉定区| 鄢陵县| 宿迁市| 保亭| 称多县| 离岛区| 余庆县| 红原县| 衡阳县| 罗田县| 河源市| 闽侯县| 阿巴嘎旗| 盖州市| 东阳市| 遵化市| 泗阳县| 水城县| 渝北区| 隆尧县|