Skip to content

Commit

Permalink
update docs. [skip CI]
Browse files Browse the repository at this point in the history
  • Loading branch information
pigpigyyy committed Dec 10, 2023
1 parent d785042 commit 69782b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Site/docs/tutorial/setup-scene.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ Here's an example of how to create a new Node instance in script code:
<TabItem value="yue" label="Yuescript">

```yue
-- Create a new Node instance, and it will be automatically
-- mounted to the root node of the game scene
node = Node!
-- Mount the newly created Node instance to the root node of the game scene
Director.entry\addChild node
-- Or you can mount it to the root node of the game scene manually
-- Director.entry\addChild node
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ import TabItem from '@theme/TabItem';
<TabItem value="yue" label="Yuescript">

```yue
-- 创建一个新的节点实例,它将自动挂载到游戏场景的根节点
node = Node!
-- 将新创建的Node实例挂载在游戏场景根节点生效
Director.entry\addChild node
-- 或者您可以手动将其挂载到游戏场景的根节点上
-- Director.entry\addChild node
```

</TabItem>
Expand Down

0 comments on commit 69782b0

Please sign in to comment.