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

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:

主站蜘蛛池模板: 西丰县| 根河市| 开原市| 基隆市| 专栏| 广河县| 景德镇市| 上饶县| 乌海市| 包头市| 乐至县| 泰宁县| 舟曲县| 星子县| 若羌县| 韶山市| 安溪县| 石河子市| 闽侯县| 青海省| 望奎县| 富锦市| 博罗县| 建平县| 永嘉县| 贞丰县| 稷山县| 舞阳县| 三穗县| 高雄市| 平山县| 二连浩特市| 平遥县| 济宁市| 西华县| 浠水县| 明水县| 许昌县| 望都县| 靖西县| 阿尔山市|