fix: script reference description#89
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the WebGAL script reference documentation across several markdown files, correcting typos, clarifying behavior (such as scene transitions, label definitions, and parameter overrides), and refactoring some shared argument descriptions. The review feedback points out a logical contradiction in the label.md changes regarding whether a label can be defined multiple times, suggesting a rewrite to clarify that avoiding duplicate labels is a best practice rather than a strict syntax limitation.
Comment on lines
+14
to
+16
| 每个标签在一个场景文件中只能 **定义一次** ,但不同场景文件可以使用相同的标签名称。 | ||
|
|
||
| 如果在同一场景文件中定义了多个同名标签,像 `choose` 和 `jumpLabel` 这样的命令会从场景文件的开头,从上往下搜索,跳转到第一个符合条件的标签位置。 |
Contributor
There was a problem hiding this comment.
这两段描述在逻辑上存在轻微的矛盾。第一段提到“只能定义一次”,而第二段又解释了“如果定义了多个同名标签”时的引擎行为。为了避免给读者带来困惑,建议将“只能定义一次”修改为“建议只定义一次”或“应该只定义一次”,以表明这是一种最佳实践而非硬性语法限制。
Suggested change
| 每个标签在一个场景文件中只能 **定义一次** ,但不同场景文件可以使用相同的标签名称。 | |
| 如果在同一场景文件中定义了多个同名标签,像 `choose` 和 `jumpLabel` 这样的命令会从场景文件的开头,从上往下搜索,跳转到第一个符合条件的标签位置。 | |
| 虽然技术上允许,但建议每个标签在一个场景文件中只定义一次。不同场景文件可以使用相同的标签名称。 | |
| 如果在同一场景文件中定义了多个同名标签,像 choose 和 jumpLabel 这样的命令会从场景文件的开头,从上往下搜索,跳转到第一个符合条件的标签位置。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
介绍
修改了诸多小地方
keep参数的示例unlockCgunlockBgm关于name参数的描述ease的部分复用参数描述transform参数会被enter参数覆盖的描述choosechangeScene跳转场景后,后续语句不会被执行的描述label命令的描述-whensetVar的代码示例