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

Creating the scene

Start by clicking the Add/Create a New Node button and selecting an Area2D. Then, click on its name and change it to Player. Click Scene | Save Scene to save the scene. This is the scene's root or top-level node. You'll add more functionality to the Player by adding children to this node:

Before adding any children, it's a good idea to make sure you don't accidentally move or resize them by clicking on them. Select the Player node and click the icon next to the lock: 

The tooltip will say Make sure the object's children are not selectable, as shown in the preceding screenshot.

It's a good idea to always do this when creating a new scene. If a body's collision shape or sprite becomes offset or scaled, it can cause unexpected errors and be difficult to fix. With this option, the node and all of its children will always move together.

主站蜘蛛池模板: 田东县| 东丰县| 中阳县| 绥阳县| 广德县| 甘孜县| 张北县| 闸北区| 海阳市| 云南省| 张家口市| 涟水县| 惠安县| 建宁县| 屯留县| 玛沁县| 阿拉尔市| 金华市| 天峻县| 哈密市| 沧州市| 隆林| 克拉玛依市| 平武县| 万安县| 肥乡县| 南雄市| 玉山县| 三江| 泸西县| 横峰县| 玛多县| 当涂县| 鄄城县| 紫阳县| 东乡县| 拉萨市| 靖江市| 马关县| 乌兰察布市| 堆龙德庆县|