|
6.
|
|
|
The first form of the say statement consists of a string by itself. This form is used for narration, with the narration being the contents of the string.
|
|
|
|
第一种格式只包含字串本身,这种形式用于记叙文,字串就是继续要描写的内容。
|
|
Translated and reviewed by
Huang Junjie
|
|
|
|
Located in
../../source/dialogue.rst:38
|
|
7.
|
|
|
The second form consists of two strings. The first string is the name of the character who is speaking, and the second is the dialogue being spoken.
|
|
|
|
第二种形式包含两个字串,第一个字串是角色的名字,第二个字串是角色的台词。
|
|
Translated and reviewed by
Huang Junjie
|
|
|
|
Located in
../../source/dialogue.rst:42
|
|
8.
|
|
|
The third form consists of a simple expression followed by a string. The simple expression should evaluate to either a string giving a character name, or a Character object. In the latter case, the character object is used to control how the dialogue is shown.
|
|
|
|
第三种形式由一个简单表达式和一个字串组成。表达式可以是表示角色的名字的字串,也可以是角色对象。当表达式为角色对象时,Character命令将被用来控制台词的显示风格。
|
|
Translated and reviewed by
Huang Junjie
|
|
|
|
Located in
../../source/dialogue.rst:46
|
|
9.
|
|
|
The final form consists of a string and a with clause which has a transition. In this case, the string is shown and a screen is shaken at the same time.
|
|
|
|
最后一种形式由字串和包含了转场特效的子句组成。在这种情况下,字串的显示和屏幕抖动特效会同时进行。
|
|
Translated and reviewed by
Huang Junjie
|
|
|
|
Located in
../../source/dialogue.rst:51
|
|
10.
|
|
|
Although the precise details of what a say statement does is controlled by the character object used, the usual effect of a say statement is to display dialogue on the screen until the user clicks to dismiss it, then to remove that dialogue on the screen.
|
|
|
|
虽然say语句的具体效果由Character命令控制,常见的say语句效果主要是显示对话并等待玩家点击,然后让该句对话从屏幕上移除。
|
|
Translated and reviewed by
Huang Junjie
|
|
|
|
Located in
../../source/dialogue.rst:56
|
|
11.
|
|
|
Certain characters have special meaning to Ren'Py, and so can't be used in dialogue strings. The ``{`` character begins a text tag, and the ``[`` character begins a substitution. To use them in dialogue, double them. It may also be necessary to precede a quote with a backslash to prevent it from closing the string. For example::
|
|
|
|
某些特定的字符对Ren'Py有特殊的意义,所以不能用在对话的文本中。比如"{"作为文本标签(text tag)的起始字符;"["提示后面的字串是一个变量名,实际显示时会显示变量的值。如果要在对话中使用这些特殊的字符的话,需要输入两次。在使用引号时前面需要加上反斜线来防止其被作为字符串的终止符。比如:
|
|
Translated and reviewed by
Huang Junjie
|
|
|
|
Located in
../../source/dialogue.rst:61
|
|
12.
|
|
|
Defining Character Objects
|
|
|
|
自定义Character对象命令
|
|
Translated and reviewed by
Huang Junjie
|
|
|
|
Located in
../../source/dialogue.rst:72
|
|
13.
|
|
|
By creating a Character object and using it in a say statement, you can customize the look (and to some extent, the behavior) of dialogue. Characters are created by using the define statement to assign a Character to a variable. For example::
|
|
|
|
通过在say语句中使用自定义Character,可以定制对话的显示风格(还可以在一定程度上定义其行为)。可以用define语句将一个角色赋予一个变量,比如:
|
|
Translated and reviewed by
Huang Junjie
|
|
|
|
Located in
../../source/dialogue.rst:74
|
|
14.
|
|
|
Once this is done, the character can be used in a say statement::
|
|
|
|
这样就可以在say语句中使用该角色了:
|
|
Translated and reviewed by
Huang Junjie
|
|
|
|
Located in
../../source/dialogue.rst:83
|
|
15.
|
|
|
Character is a python function, that takes a large number of keyword arguments. These keyword arguments control the behavior of the character.
|
|
|
|
Character是一个python函数,它可以带入很多参数,这些参数能够控制角色的行为。
|
|
Translated and reviewed by
Hanming Wu
|
|
|
|
Located in
../../source/dialogue.rst:88
|