# Chinese (Simplified Han script) translation of the Godot Engine class reference. # Copyright (c) 2014-present Godot Engine contributors. # Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. # This file is distributed under the same license as the Godot source code. # # Haoyu Qiu , 2020, 2021, 2022, 2023, 2024, 2025. # fangxvan <2661712415@qq.com>, 2020. # yzt <834950797@qq.com>, 2020. # 懵逼Kitty , 2020, 2021. # MintSoda , 2020. # Gardner Belgrade , 2020. # WangYi13 , 2020, 2021. # UnluckyNinja , 2020. # idleman <1524328475@qq.com>, 2020, 2021. # Oberon Zheng <360119124@qq.com>, 2020, 2021. # li yong , 2020. # Pierre Stempin , 2020. # BinotaLIU , 2020. # Zhirong Qin (fengjiongmax) , 2020, 2021. # zzjbook , 2020. # Gary Wang , 2020. # cyj , 2020. # twoBornottwoB <305766341@qq.com>, 2021. # zzh , 2021. # longhjues , 2021, 2023. # 800Coins , 2021. # qjyqjyqjyqjy , 2021, 2023. # mzzhao <13030224963@163.com>, 2021. # Baiyuan Qiu <1061688677@qq.com>, 2021. # CZM <605557370@qq.com>, 2021. # Zephyr , 2021. # 扬 , 2021. # luoji <564144019@qq.com>, 2021. # Merlin Bao , 2021. # Felix Xing , 2021. # Wang Chenhao , 2021. # Juer Genie Whang <2695996944@qq.com>, 2021. # SimonChang , 2021. # zeng haochen , 2021. # suplife <2634557184@qq.com>, 2021, 2023, 2024. # Magian , 2021, 2022. # ji233 <27987772@qq.com>, 2021. # 沈士超 , 2021. # MisakaRua <1150235785@qq.com>, 2021. # KodLenss , 2021. # Wang Tseryui <2251439097@qq.com>, 2021. # knight100 , 2021. # jixun , 2021. # Hapenia Lans , 2021. # 枫叶 <928584916@qq.com>, 2021. # B TO THE R <1470997723@qq.com>, 2021. # 有趣极了 <2944595791@qq.com>, 2021. # 刘亚西 , 2021. # 诗鸷Temsys , 2021. # Sam Sun , 2021, 2023, 2024. # sudo-behappy <3216539984@qq.com>, 2021, 2023. # Cc <2590090025@qq.com>, 2021. # 苏轼 , 2021. # ErrorDreemurr , 2021. # 烧风 , 2022. # Yan Chen , 2022. # Caten , 2022. # 风青山 , 2023, 2024, 2025. # zehuai wu , 2023. # matrixant , 2023. # Pencil Core , 2023. # skyatgit <1218980814@qq.com>, 2023. # Hamster , 2023. # GarliCat , 2023. # RIKA! <2293840045@qq.com>, 2023. # ZHANG JIANFEI <3468144728@qq.com>, 2023. # tjw123hh , 2023. # miaoqvmiao , 2023. # Wisdom Salee , 2023. # mengyu <1093697597@qq.com>, 2023. # long li <2361520824@qq.com>, 2023. # yisui , 2023. # penghao123456 , 2023. # Zae Chao , 2023, 2024. # SamBillon , 2023. # ZhuQiLi <552084128@qq.com>, 2023. # HIM049 , 2023. # 墨尘 <180598130@qq.com>, 2023. # dinshin0129 <396321810@qq.com>, 2023. # CrimsonNinja , 2024. # 邵孟欧 , 2024. # Zhen Liang <131206041lz@gmail.com>, 2024. # lixiufeng , 2024. # 张昊 , 2024. # Rmtdi , 2024. # Mill Xu <2733679597@qq.com>, 2024, 2025. # HoshuChiu , 2024. # QAQ-HYSJ <441717627@qq.com>, 2024. # Helical <731266210@qq.com>, 2024. # 鞲臢螽 , 2024. # J_aphasiac , 2025. # SouthWolf , 2025. # BuddhaGrape <3248882725@qq.com>, 2025. # XJQXJQ , 2025. # bocai-bca , 2025. # Tinkres <13872976520@163.com>, 2025. # CrYStaL <18150279658@qq.com>, 2025. # nian tang , 2025. # 顾霖轩 <2495802072@qq.com>, 2025. # 李晓杰 , 2025. # 憨憨羊の宇航鸽鸽 , 2025. # MoLuo , 2025. # KGS様 , 2025. # 烟汐忆梦_YM <193446537@qq.com>, 2025. # 源来是小白 , 2025. # Rui , 2025. # GoroJack <1937047112@qq.com>, 2025. # lan123 <1283118891@qq.com>, 2025. # exhaust-pipe , 2025. # Peng Kuang , 2025. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2025-12-08 20:00+0000\n" "Last-Translator: Peng Kuang \n" "Language-Team: Chinese (Simplified Han script) \n" "Language: zh_Hans\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Weblate 5.15-dev\n" #: doc/tools/make_rst.py msgid "All classes" msgstr "所有类" #: doc/tools/make_rst.py msgid "Globals" msgstr "全局" #: doc/tools/make_rst.py msgid "Nodes" msgstr "节点" #: doc/tools/make_rst.py msgid "Resources" msgstr "资源" #: doc/tools/make_rst.py msgid "Editor-only" msgstr "编辑器专用" #: doc/tools/make_rst.py msgid "Other objects" msgstr "其他对象" #: doc/tools/make_rst.py msgid "Variant types" msgstr "变体类型" #: doc/tools/make_rst.py msgid "Description" msgstr "描述" #: doc/tools/make_rst.py msgid "Tutorials" msgstr "教程" #: doc/tools/make_rst.py msgid "Properties" msgstr "属性" #: doc/tools/make_rst.py msgid "Constructors" msgstr "构造函数" #: doc/tools/make_rst.py msgid "Methods" msgstr "方法" #: doc/tools/make_rst.py msgid "Operators" msgstr "运算符" #: doc/tools/make_rst.py msgid "Theme Properties" msgstr "主题属性" #: doc/tools/make_rst.py msgid "Signals" msgstr "信号" #: doc/tools/make_rst.py msgid "Enumerations" msgstr "枚举" #: doc/tools/make_rst.py msgid "Constants" msgstr "常量" #: doc/tools/make_rst.py msgid "Annotations" msgstr "注解" #: doc/tools/make_rst.py msgid "Property Descriptions" msgstr "属性说明" #: doc/tools/make_rst.py msgid "Constructor Descriptions" msgstr "构造函数说明" #: doc/tools/make_rst.py msgid "Method Descriptions" msgstr "方法说明" #: doc/tools/make_rst.py msgid "Operator Descriptions" msgstr "运算符说明" #: doc/tools/make_rst.py msgid "Theme Property Descriptions" msgstr "主题属性说明" #: doc/tools/make_rst.py msgid "Inherits:" msgstr "继承:" #: doc/tools/make_rst.py msgid "Inherited By:" msgstr "派生:" #: doc/tools/make_rst.py msgid "(overrides %s)" msgstr "(覆盖 %s)" #: doc/tools/make_rst.py msgid "Default" msgstr "默认" #: doc/tools/make_rst.py msgid "Setter" msgstr "设值函数" #: doc/tools/make_rst.py msgid "value" msgstr "值" #: doc/tools/make_rst.py msgid "Getter" msgstr "取值函数" #: doc/tools/make_rst.py msgid "" "This method should typically be overridden by the user to have any effect." msgstr "本方法通常需要用户覆盖才能生效。" #: doc/tools/make_rst.py msgid "" "This method has no side effects. It doesn't modify any of the instance's " "member variables." msgstr "本方法无副作用,不会修改该实例的任何成员变量。" #: doc/tools/make_rst.py msgid "" "This method accepts any number of arguments after the ones described here." msgstr "本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。" #: doc/tools/make_rst.py msgid "This method is used to construct a type." msgstr "本方法用于构造某个类型。" #: doc/tools/make_rst.py msgid "" "This method doesn't need an instance to be called, so it can be called " "directly using the class name." msgstr "调用本方法无需实例,可直接使用类名进行调用。" #: doc/tools/make_rst.py msgid "" "This method describes a valid operator to use with this type as left-hand " "operand." msgstr "本方法描述的是使用本类型作为左操作数的有效运算符。" #: doc/tools/make_rst.py msgid "This value is an integer composed as a bitmask of the following flags." msgstr "这个值是由下列位标志构成位掩码的整数。" #: doc/tools/make_rst.py msgid "No return value." msgstr "无返回值。" #: doc/tools/make_rst.py msgid "" "There is currently no description for this class. Please help us " "by :ref:`contributing one `!" msgstr "" "该类目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧!" #: doc/tools/make_rst.py msgid "" "There is currently no description for this signal. Please help us " "by :ref:`contributing one `!" msgstr "" "该信号目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧 !" #: doc/tools/make_rst.py msgid "" "There is currently no description for this enum. Please help us " "by :ref:`contributing one `!" msgstr "" "该枚举目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧!" #: doc/tools/make_rst.py msgid "" "There is currently no description for this constant. Please help us " "by :ref:`contributing one `!" msgstr "" "该常量目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧!" #: doc/tools/make_rst.py msgid "" "There is currently no description for this annotation. Please help us " "by :ref:`contributing one `!" msgstr "" "该注解目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧!" #: doc/tools/make_rst.py msgid "" "There is currently no description for this property. Please help us " "by :ref:`contributing one `!" msgstr "" "该属性目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧!" #: doc/tools/make_rst.py msgid "" "There is currently no description for this constructor. Please help us " "by :ref:`contributing one `!" msgstr "" "该构造函数目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧!" #: doc/tools/make_rst.py msgid "" "There is currently no description for this method. Please help us " "by :ref:`contributing one `!" msgstr "" "该方法目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧!" #: doc/tools/make_rst.py msgid "" "There is currently no description for this operator. Please help us " "by :ref:`contributing one `!" msgstr "" "该运算符目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧!" #: doc/tools/make_rst.py msgid "" "There is currently no description for this theme property. Please help us " "by :ref:`contributing one `!" msgstr "" "该主题属性目前没有描述,请帮我们\\ :ref:`贡献一个 " "`\\ 吧!" #: doc/tools/make_rst.py msgid "" "There are notable differences when using this API with C#. " "See :ref:`doc_c_sharp_differences` for more information." msgstr "" "通过 C# 使用该 API 时会有显著不同,详见 :ref:`doc_c_sharp_differences`\\ 。" #: doc/tools/make_rst.py msgid "Deprecated:" msgstr "已弃用:" #: doc/tools/make_rst.py msgid "Experimental:" msgstr "实验性:" #: doc/tools/make_rst.py msgid "This signal may be changed or removed in future versions." msgstr "未来版本中可能会修改或移除该信号。" #: doc/tools/make_rst.py msgid "This constant may be changed or removed in future versions." msgstr "未来版本中可能会修改或移除该常量。" #: doc/tools/make_rst.py msgid "This property may be changed or removed in future versions." msgstr "未来版本中可能会修改或移除该属性。" #: doc/tools/make_rst.py msgid "This constructor may be changed or removed in future versions." msgstr "未来版本中可能会修改或移除该构造函数。" #: doc/tools/make_rst.py msgid "This method may be changed or removed in future versions." msgstr "未来版本中可能会修改或移除该方法。" #: doc/tools/make_rst.py msgid "This operator may be changed or removed in future versions." msgstr "未来版本中可能会修改或移除该运算符。" #: doc/tools/make_rst.py msgid "This theme property may be changed or removed in future versions." msgstr "未来版本中可能会修改或移除该主题属性。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "Built-in GDScript constants, functions, and annotations." msgstr "内置 GDScript 常量、函数、注解。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "A list of utility functions and annotations accessible from any script " "written in GDScript.\n" "For the list of global functions and constants that can be accessed in any " "scripting language, see [@GlobalScope]." msgstr "" "所有使用 GDScript 编写的脚本中都能够访问的实用函数和注解的列表。\n" "所有脚本语言都能够访问的全局函数和常量的列表见 [@GlobalScope]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "GDScript exports" msgstr "GDScript 的导出" #: modules/gdscript/doc_classes/@GDScript.xml msgid "Use [method Color.from_rgba8] instead." msgstr "请改用 [method Color.from_rgba8]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns a [Color] constructed from red ([param r8]), green ([param g8]), " "blue ([param b8]), and optionally alpha ([param a8]) integer channels, each " "divided by [code]255.0[/code] for their final value. Using [method Color8] " "instead of the standard [Color] constructor is useful when you need to match " "exact color values in an [Image].\n" "[codeblock]\n" "var red = Color8(255, 0, 0) # Same as Color(1, 0, 0).\n" "var dark_blue = Color8(0, 0, 51) # Same as Color(0, 0, 0.2).\n" "var my_color = Color8(306, 255, 0, 102) # Same as Color(1.2, 1, 0, 0.4).\n" "[/codeblock]\n" "[b]Note:[/b] Due to the lower precision of [method Color8] compared to the " "standard [Color] constructor, a color created with [method Color8] will " "generally not be equal to the same color created with the standard [Color] " "constructor. Use [method Color.is_equal_approx] for comparisons to avoid " "issues with floating-point precision error." msgstr "" "返回一个由整数红通道([param r8])、整数绿通道([param g8])、整数蓝通道" "([param b8])和可选的整数 Alpha 通道([param a8])构造的 [Color],每个通道的" "最终值都会除以 [code]255.0[/code]。如果你需要精确匹配 [Image] 中的颜色值," "[method Color8] 比标准的 [Color] 构造函数更有用。\n" "[codeblock]\n" "var red = Color8(255, 0, 0) # 与 Color(1, 0, 0) 相同\n" "var dark_blue = Color8(0, 0, 51) # 与 Color(0, 0, 0.2) 相同。\n" "var my_color = Color8(306, 255, 0, 102) # 与 Color(1.2, 1, 0, 0.4) 相同。\n" "[/codeblock]\n" "[b]注意:[/b]由于 [method Color8] 比标准 [Color] 构造函数精度更低,故使用 " "[method Color8] 创建的颜色通常与使用标准 [Color] 构造函数创建的相同颜色不相" "等。请使用 [method Color.is_equal_approx] 进行比较,避免浮点数精度误差。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Asserts that the [param condition] is [code]true[/code]. If the [param " "condition] is [code]false[/code], an error is generated. When running from " "the editor, the running project will also be paused until you resume it. " "This can be used as a stronger form of [method @GlobalScope.push_error] for " "reporting errors to project developers or add-on users.\n" "An optional [param message] can be shown in addition to the generic " "\"Assertion failed\" message. You can use this to provide additional details " "about why the assertion failed.\n" "[b]Warning:[/b] For performance reasons, the code inside [method assert] is " "only executed in debug builds or when running the project from the editor. " "Don't include code that has side effects in an [method assert] call. " "Otherwise, the project will behave differently when exported in release " "mode.\n" "[codeblock]\n" "# Imagine we always want speed to be between 0 and 20.\n" "var speed = -10\n" "assert(speed < 20) # True, the program will continue.\n" "assert(speed >= 0) # False, the program will stop.\n" "assert(speed >= 0 and speed < 20) # You can also combine the two conditional " "statements in one check.\n" "assert(speed < 20, \"the speed limit is 20\") # Show a message.\n" "[/codeblock]\n" "[b]Note:[/b] [method assert] is a keyword, not a function. So you cannot " "access it as a [Callable] or use it inside expressions." msgstr "" "断言条件 [param condition] 为 [code]true[/code]。如果条件 [param condition] " "为 [code]false[/code] ,则会生成错误。如果是从编辑器运行的断言,正在运行的项" "目还会被暂停,需要手动恢复。该函数可以作为 [method @GlobalScope.push_error] " "的加强版使用,用于向项目开发者和插件用户报错。\n" "如果给出了可选的 [param message] 参数,该信息会和通用的“Assertion failed”消息" "一起显示。你可以使用它来提供关于断言失败原因等详细信息。\n" "[b]警告:[/b]出于对性能的考虑,[method assert] 中的代码只会在调试版本或者从编" "辑器运行项目时执行。请勿在 [method assert] 调用中加入具有副作用的代码。否则," "项目在以发布模式导出后将会出现行为不一致的现象。\n" "[codeblock]\n" "# 比如说我们希望 speed 始终在 0 和 20 之间。\n" "speed = -10\n" "assert(speed < 20) # True,程序会继续执行\n" "assert(speed >= 0) # False,程序会停止\n" "assert(speed >= 0 and speed < 20) # 你还可以在单次检查中合并两个条件语句\n" "assert(speed < 20, \"限速为 20\") # 显示消息。\n" "[/codeblock]\n" "[b]注意:[/b][method assert] 是关键字而非函数,无法作为 [Callable] 访问,也无" "法在表达式中使用。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns a single character (as a [String] of length 1) of the given Unicode " "code point [param code].\n" "[codeblock]\n" "print(char(65)) # Prints \"A\"\n" "print(char(129302)) # Prints \"🤖\" (robot face emoji)\n" "[/codeblock]\n" "This is the inverse of [method ord]. See also [method String.chr] and " "[method String.unicode_at]." msgstr "" "返回给定 Unicode 码位 [param code] 的单个字符(作为长度为 1 的 [String])。\n" "[codeblock]\n" "print(char(65)) # 打印 \"A\"\n" "print(char(129302)) # 打印 \"🤖\" (机器人脸的emoji)\n" "[/codeblock]\n" "这是 [method ord] 的逆运算。参见 [method String.chr] 和 [method " "String.unicode_at]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "Use [method @GlobalScope.type_convert] instead." msgstr "请改用 [method @GlobalScope.type_convert]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Converts [param what] to [param type] in the best way possible. The [param " "type] uses the [enum Variant.Type] values.\n" "[codeblock]\n" "var a = [4, 2.5, 1.2]\n" "print(a is Array) # Prints true\n" "\n" "var b = convert(a, TYPE_PACKED_BYTE_ARRAY)\n" "print(b) # Prints [4, 2, 1]\n" "print(b is Array) # Prints false\n" "[/codeblock]" msgstr "" "在可能的情况下将 [param what] 转换为 [param type] 类型的值, [param type] 使" "用 [enum Variant.Type] 值。\n" "[codeblock]\n" "var a = [4, 2.5, 1.2]\n" "print(a is Array) # 输出 true\n" "\n" "var b = convert(a, TYPE_PACKED_BYTE_ARRAY)\n" "print(b) # 输出 [4, 2, 1]\n" "print(b is Array) # 输出 false\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Consider using [method JSON.to_native] or [method Object.get_property_list] " "instead." msgstr "考虑使用JSON.to_native方法或者Object.get_property_list方法作为替代。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Converts a [param dictionary] (created with [method inst_to_dict]) back to " "an Object instance. Can be useful for deserializing." msgstr "" "将一个 [param dictionary] (用 [method inst_to_dict] 创建的)转换回为一个 " "Object 实例。在反序列化时可能会很有用。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns an array of dictionaries representing the current call stack.\n" "[codeblock]\n" "func _ready():\n" "\tfoo()\n" "\n" "func foo():\n" "\tbar()\n" "\n" "func bar():\n" "\tprint(get_stack())\n" "[/codeblock]\n" "Starting from [code]_ready()[/code], [code]bar()[/code] would print:\n" "[codeblock lang=text]\n" "[{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, " "source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}]\n" "[/codeblock]\n" "See also [method print_debug], [method print_stack], and [method " "Engine.capture_script_backtraces].\n" "[b]Note:[/b] By default, backtraces are only available in editor builds and " "debug builds. To enable them for release builds as well, you need to enable " "[member ProjectSettings.debug/settings/gdscript/always_track_call_stacks]." msgstr "" "返回一个表示当前调用堆栈的字典数组,另见 [method print_stack]。\n" "[codeblock]\n" "func _ready():\n" "\tfoo()\n" "\n" "func foo():\n" "\tbar()\n" "\n" "func bar():\n" "\tprint(get_stack())\n" "[/codeblock]\n" "从 [code]_ready()[/code] 开始,[code]bar()[/code] 将打印:\n" "[codeblock lang=text]\n" "[{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, " "source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}]\n" "[/codeblock]\n" "参见 [method print_debug],[method print_stack] 和 [method " "Engine.capture_script_backtraces]。\n" "[b]注意:[/b] 默认情况下,调用堆栈跟踪仅在编辑器构建和调试构建中可用。若要为" "发布构建启用该功能,您需要启用 [member ProjectSettings.debug/settings/" "gdscript/always_track_call_stacks]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Consider using [method JSON.from_native] or [method " "Object.get_property_list] instead." msgstr "考虑使用JSON.from_native方法或者Object.get_property_list方法作为替代。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns the passed [param instance] converted to a [Dictionary]. Can be " "useful for serializing.\n" "[codeblock]\n" "var foo = \"bar\"\n" "func _ready():\n" "\tvar d = inst_to_dict(self)\n" "\tprint(d.keys())\n" "\tprint(d.values())\n" "[/codeblock]\n" "Prints out:\n" "[codeblock lang=text]\n" "[@subpath, @path, foo]\n" "[, res://test.gd, bar]\n" "[/codeblock]\n" "[b]Note:[/b] This function can only be used to serialize objects with an " "attached [GDScript] stored in a separate file. Objects without an attached " "script, with a script written in another language, or with a built-in script " "are not supported.\n" "[b]Note:[/b] This function is not recursive, which means that nested objects " "will not be represented as dictionaries. Also, properties passed by " "reference ([Object], [Dictionary], [Array], and packed arrays) are copied by " "reference, not duplicated." msgstr "" "将传入的实例 [param instance] 转换为 [Dictionary] 并返回。适用于序列化。\n" "[codeblock]\n" "var foo = \"bar\"\n" "func _ready():\n" "\tvar d = inst_to_dict(self)\n" "\tprint(d.keys())\n" "\tprint(d.values())\n" "[/codeblock]\n" "输出打印:\n" "[codeblock lang=text]\n" "[@subpath, @path, foo]\n" "[, res://test.gd, bar]\n" "[/codeblock]\n" "[b]注意:[/b]只有附加了存储在单独文件中的 [GDScript] 的对象才能够被这个函数序" "列化。不支持未附加脚本的对象、使用其他语言脚本的对象、使用内置脚本的对象。\n" "[b]注意:[/b]这个函数不会进行递归操作,嵌套的对象不会以字典形式表示。另外,按" "引用传递的属性([Object]、[Dictionary]、[Array]、紧缩数组等)会按引用进行复" "制,不会制作副本。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns [code]true[/code] if [param value] is an instance of [param type]. " "The [param type] value must be one of the following:\n" "- A constant from the [enum Variant.Type] enumeration, for example [constant " "TYPE_INT].\n" "- An [Object]-derived class which exists in [ClassDB], for example [Node].\n" "- A [Script] (you can use any class, including inner one).\n" "Unlike the right operand of the [code]is[/code] operator, [param type] can " "be a non-constant value. The [code]is[/code] operator supports more features " "(such as typed arrays). Use the operator instead of this method if you do " "not need to check the type dynamically.\n" "[b]Examples:[/b]\n" "[codeblock]\n" "print(is_instance_of(a, TYPE_INT))\n" "print(is_instance_of(a, Node))\n" "print(is_instance_of(a, MyClass))\n" "print(is_instance_of(a, MyClass.InnerClass))\n" "[/codeblock]\n" "[b]Note:[/b] If [param value] and/or [param type] are freed objects (see " "[method @GlobalScope.is_instance_valid]), or [param type] is not one of the " "above options, this method will raise a runtime error.\n" "See also [method @GlobalScope.typeof], [method type_exists], [method " "Array.is_same_typed] (and other [Array] methods)." msgstr "" "如果 [param value] 为 [param type] 类型的实例,则返回 [code]true[/code]。" "[param type] 的值必须为下列值之一:\n" "- [enum Variant.Type] 枚举常量,如 [constant TYPE_INT]。\n" "- [ClassDB] 中存在的派生自 [Object] 的类,如 [Node]。\n" "- [Script](可以用任何类,包括内部类)。\n" "[param type] 可以不是常量,这一点与 [code]is[/code] 的右操作数不同," "[code]is[/code] 运算符支持的功能更多(例如类型化数组)。如果你不需要动态地检" "查类型,请使用该运算符,不要使用此方法。\n" "[b]示例:[/b]\n" "[codeblock]\n" "print(is_instance_of(a, TYPE_INT))\n" "print(is_instance_of(a, Node))\n" "print(is_instance_of(a, MyClass))\n" "print(is_instance_of(a, MyClass.InnerClass))\n" "[/codeblock]\n" "[b]注意:[/b]如果 [param value] 和/或 [param type] 为已释放的对象(见 " "[method @GlobalScope.is_instance_valid]),或者 [param type] 不为以上选项中的" "任何一项,则此方法会报运行时错误。\n" "另见 [method @GlobalScope.typeof]、[method type_exists]、[method " "Array.is_same_typed](以及其他 [Array] 方法)。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns the length of the given Variant [param var]. The length can be the " "character count of a [String] or [StringName], the element count of any " "array type, or the size of a [Dictionary]. For every other Variant type, a " "run-time error is generated and execution is stopped.\n" "[codeblock]\n" "var a = [1, 2, 3, 4]\n" "len(a) # Returns 4\n" "\n" "var b = \"Hello!\"\n" "len(b) # Returns 6\n" "[/codeblock]" msgstr "" "返回给定 Variant [param var] 的长度,该长度可以是 [String] 或 [StringName] 的" "字符数,也可以是任意数组类型的元素数或 [Dictionary] 的大小等。对于所有其他 " "Variant 类型,都会生成运行时错误并停止执行。\n" "[codeblock]\n" "var a = [1, 2, 3, 4]\n" "len(a) # 返回 4\n" "\n" "var b = \"Hello!\"\n" "len(b) # 返回 6\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns a [Resource] from the filesystem located at the absolute [param " "path]. Unless it's already referenced elsewhere (such as in another script " "or in the scene), the resource is loaded from disk on function call, which " "might cause a slight delay, especially when loading large scenes. To avoid " "unnecessary delays when loading something multiple times, either store the " "resource in a variable or use [method preload]. This method is equivalent of " "using [method ResourceLoader.load] with [constant " "ResourceLoader.CACHE_MODE_REUSE].\n" "[b]Note:[/b] Resource paths can be obtained by right-clicking on a resource " "in the FileSystem dock and choosing \"Copy Path\", or by dragging the file " "from the FileSystem dock into the current script.\n" "[codeblock]\n" "# Load a scene called \"main\" located in the root of the project directory " "and cache it in a variable.\n" "var main = load(\"res://main.tscn\") # main will contain a PackedScene " "resource.\n" "[/codeblock]\n" "[b]Important:[/b] Relative paths are [i]not[/i] relative to the script " "calling this method, instead it is prefixed with [code]\"res://\"[/code]. " "Loading from relative paths might not work as expected.\n" "This function is a simplified version of [method ResourceLoader.load], which " "can be used for more advanced scenarios.\n" "[b]Note:[/b] Files have to be imported into the engine first to load them " "using this function. If you want to load [Image]s at run-time, you may use " "[method Image.load]. If you want to import audio files, you can use the " "snippet described in [member AudioStreamMP3.data].\n" "[b]Note:[/b] If [member ProjectSettings.editor/export/" "convert_text_resources_to_binary] is [code]true[/code], [method " "@GDScript.load] will not be able to read converted files in an exported " "project. If you rely on run-time loading of files present within the PCK, " "set [member ProjectSettings.editor/export/convert_text_resources_to_binary] " "to [code]false[/code]." msgstr "" "返回一个位于文件系统绝对路径 [param path] 下的 [Resource]。该资源除非已在其他" "地方引用(例如在另一个脚本或场景中),否则将在函数调用时从磁盘加载,可能会导" "致轻微的延迟,尤其是在加载大型场景时。为避免在多次加载某些内容时出现不必要的" "延迟,可以将资源存储在变量中,也可使用预加载 [method preload] 方法加载,该方" "法相当于使用 [constant ResourceLoader.CACHE_MODE_REUSE] 模式调用 [method " "ResourceLoader.load]。\n" "[b]注意:[/b]资源路径可以通过右键单击文件系统停靠面板中的资源并选择“复制路" "径”,或将文件从文件系统停靠面板拖到脚本中获得。\n" "[codeblock]\n" "# 加载位于项目根目录的一个名为“main”的场景,并将其缓存在一个变量中。\n" "var main = load(\"res://main.tscn\") # main 将包含一个 PackedScene 资源。\n" "[/codeblock]\n" "[b]重要:[/b]相对路径相对的[i]不是[/i]调用该方法的脚本,而是会使用 [code]" "\"res://\"[/code] 前缀。加载时使用相对路径可能与预期行为不符。\n" "这个方法是 [method ResourceLoader.load] 的简化版,原方法可以用于更高级的场" "景。\n" "[b]注意:[/b]必须先将文件导入引擎才能使用此函数加载它们。如果你想在运行时加" "载 [Image],你可以使用 [method Image.load]。如果要导入音频文件,可以使用 " "[member AudioStreamMP3.data] 中描述的代码片段。\n" "[b]注意:[/b]如果 [member ProjectSettings.editor/export/" "convert_text_resources_to_binary] 为 [code]true[/code],则 [method " "@GDScript.load] 无法在导出后的项目中读取已转换的文件。如果你需要在运行时加载" "存在于 PCK 中的文件,请将 [member ProjectSettings.editor/export/" "convert_text_resources_to_binary] 设置为 [code]false[/code]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns an integer representing the Unicode code point of the given " "character [param char], which should be a string of length 1.\n" "[codeblock]\n" "print(ord(\"A\")) # Prints 65\n" "print(ord(\"🤖\")) # Prints 129302\n" "[/codeblock]\n" "This is the inverse of [method char]. See also [method String.chr] and " "[method String.unicode_at]." msgstr "" "返回一个整数,表示给定字符 [param char] 的 Unicode 码位,该字符应为长度为 1 " "的字符串。\n" "[codeblock]\n" "print(ord(“A”)) # 输出 65\n" "print(ord(“🤖”)) # 输出 129302\n" "[/codeblock]\n" "这是 [method char] 的逆运算。参见 [method String.chr] 和 [method " "String.unicode_at]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns a [Resource] from the filesystem located at [param path]. During run-" "time, the resource is loaded when the script is being parsed. This function " "effectively acts as a reference to that resource. Note that this function " "requires [param path] to be a constant [String]. If you want to load a " "resource from a dynamic/variable path, use [method load].\n" "[b]Note:[/b] Resource paths can be obtained by right-clicking on a resource " "in the Assets Panel and choosing \"Copy Path\", or by dragging the file from " "the FileSystem dock into the current script.\n" "[codeblock]\n" "# Create instance of a scene.\n" "var diamond = preload(\"res://diamond.tscn\").instantiate()\n" "[/codeblock]\n" "[b]Note:[/b] [method preload] is a keyword, not a function. So you cannot " "access it as a [Callable]." msgstr "" "返回一个位于文件系统绝对路径 [param path] 的 [Resource]。运行时,该资源将在解" "析脚本时加载,实际上可以将这个函数视作对该资源的引用。请注意:此函数要求 " "[param path] 为 [String] 常量。如果要动态/可变的路径加载资源,请使用 [method " "load]。\n" "[b]注意:[/b]资源路径可以通过右键单击资产面板中的资源并选择“复制路径”,或通过" "将文件从文件系统停靠面板拖到脚本中来获得。\n" "[codeblock]\n" "# 创建场景的实例。\n" "var diamond = preload(\"res://diamond.tscn\").instantiate()\n" "[/codeblock]\n" "[b]注意:[/b][method preload] 是关键字而非函数,无法作为 [Callable] 访问。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Like [method @GlobalScope.print], but includes the current stack frame when " "running with the debugger turned on.\n" "The output in the console may look like the following:\n" "[codeblock lang=text]\n" "Test print\n" "At: res://test.gd:15:_process()\n" "[/codeblock]\n" "See also [method print_stack], [method get_stack], and [method " "Engine.capture_script_backtraces].\n" "[b]Note:[/b] By default, backtraces are only available in editor builds and " "debug builds. To enable them for release builds as well, you need to enable " "[member ProjectSettings.debug/settings/gdscript/always_track_call_stacks]." msgstr "" "与 [method @GlobalScope.print] 类似,但在打开调试器运行时还会包含当前栈帧。\n" "控制台中的输出应该是类似这样的:\n" "[codeblock lang=text]\n" "Test print\n" "At: res://test.gd:15:_process()\n" "[/codeblock]\n" "参见 [method print_stack],[method get_stack] 和 [method " "Engine.capture_script_backtraces]。\n" "[b]注意:[/b] 默认情况下,调用堆栈仅在编辑器构建和调试构建中可用。若要使其在" "发布构建中也可用,您需要启用 [member ProjectSettings.debug/settings/gdscript/" "always_track_call_stacks]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Prints a stack trace at the current code location.\n" "The output in the console may look like the following:\n" "[codeblock lang=text]\n" "Frame 0 - res://test.gd:16 in function '_process'\n" "[/codeblock]\n" "See also [method print_debug], [method get_stack], and [method " "Engine.capture_script_backtraces].\n" "[b]Note:[/b] By default, backtraces are only available in editor builds and " "debug builds. To enable them for release builds as well, you need to enable " "[member ProjectSettings.debug/settings/gdscript/always_track_call_stacks]." msgstr "" "在当前代码位置打印堆栈跟踪。\n" "控制台输出可能类似于以下内容:\n" "[codeblock lang=text]\n" "Frame 0 - res://test.gd:16 in function '_process'\n" "[/codeblock]\n" "参见 [method print_debug],[method get_stack] 和 [method " "Engine.capture_script_backtraces]。\n" "[b]注意:[/b] 默认情况下,堆栈跟踪仅在编辑器构建和调试构建中可用。若要使其在" "发布构建中也可用,需启用 [member ProjectSettings.debug/settings/gdscript/" "always_track_call_stacks]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns an array with the given range. [method range] can be called in three " "ways:\n" "[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " "stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " "[b]exclusive[/b].\n" "[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " "steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" "code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " "respectively.\n" "[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " "increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " "[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " "[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" "code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " "[code]0[/code], an error message is printed.\n" "[method range] converts all arguments to [int] before processing.\n" "[b]Note:[/b] Returns an empty array if no value meets the value constraint " "(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" "[b]Examples:[/b]\n" "[codeblock]\n" "print(range(4)) # Prints [0, 1, 2, 3]\n" "print(range(2, 5)) # Prints [2, 3, 4]\n" "print(range(0, 6, 2)) # Prints [0, 2, 4]\n" "print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" "for i in range(array.size() - 1, -1, -1):\n" "\tprint(array[i])\n" "[/codeblock]\n" "Output:\n" "[codeblock lang=text]\n" "9\n" "6\n" "3\n" "[/codeblock]\n" "To iterate over [float], convert them in the loop.\n" "[codeblock]\n" "for i in range (3, 0, -1):\n" "\tprint(i / 10.0)\n" "[/codeblock]\n" "Output:\n" "[codeblock lang=text]\n" "0.3\n" "0.2\n" "0.1\n" "[/codeblock]" msgstr "" "返回具有给定范围的数组。[method range] 可以通过三种方式调用:\n" "[code]range(n: int)[/code]:从 0 开始,每次加 1,在到达 [code]n[/code] [i]之" "前[/i]停止。[b]不包含[/b]参数 [code]n[/code]。\n" "[code]range(b: int, n: int)[/code]:从 [code]b[/code] 开始,每次加 1,在到达 " "[code]n[/code] [i]之前[/i]停止。[b]包含[/b]参数 [code]b[/code],[b]不包含[/b]" "参数 [code]n[/code]。\n" "[code]range(b: int, n: int, s: int)[/code]:从 [code]b[/code] 开始,以 " "[code]s[/code] 为步长递增/递减,在到达 [code]n[/code] [i]之前[/i]停止。[b]包" "含[/b]参数 [code]b[/code],[b]不包含[/b]参数 [code]n[/code]。参数 [code]s[/" "code] [b]可以[/b]为负数,但不能为 [code]0[/code]。如果 [code]s[/code] 为 " "[code]0[/code],则会输出一条错误消息。\n" "[method range] 会先将所有参数转换为 [int] 再进行处理。\n" "[b]注意:[/b]如果没有满足条件的值,则返回空数组(例如 [code]range(2, 5, -1)[/" "code] 和 [code]range(5, 5, 1)[/code])。\n" "[b]示例:[/b]\n" "[codeblock]\n" "print(range(4)) # 输出 [0, 1, 2, 3]\n" "print(range(2, 5)) # 输出 [2, 3, 4]\n" "print(range(0, 6, 2)) # 输出 [0, 2, 4]\n" "print(range(4, 1, -1)) # 输出 [4, 3, 2]\n" "[/codeblock]\n" "要反向遍历 [Array],请使用:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" "for i in range(array.size() - 1, -1, -1):\n" "\tprint(array[i])\n" "[/codeblock]\n" "输出:\n" "[codeblock lang=text]\n" "9\n" "6\n" "3\n" "[/codeblock]\n" "要遍历 [float],请在循环中进行转换。\n" "[codeblock]\n" "for i in range (3, 0, -1):\n" "\tprint(i / 10.0)\n" "[/codeblock]\n" "输出:\n" "[codeblock lang=text]\n" "0.3\n" "0.2\n" "0.1\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Returns [code]true[/code] if the given [Object]-derived class exists in " "[ClassDB]. Note that [Variant] data types are not registered in [ClassDB].\n" "[codeblock]\n" "type_exists(\"Sprite2D\") # Returns true\n" "type_exists(\"NonExistentClass\") # Returns false\n" "[/codeblock]" msgstr "" "如果 [ClassDB] 中存在给定的 [Object] 派生类,则返回 [code]true[/code]。请注" "意,[Variant] 数据类型未在 [ClassDB] 中注册。\n" "[codeblock]\n" "type_exists(\"Sprite2D\") # 返回 true\n" "type_exists(\"NonExistentClass\") # 返回 false\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Constant that represents how many times the diameter of a circle fits around " "its perimeter. This is equivalent to [code]TAU / 2[/code], or 180 degrees in " "rotations." msgstr "" "常量,表示圆的周长是直径的多少倍。相当于 [code]TAU / 2[/code],即 180 度旋" "转。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "The circle constant, the circumference of the unit circle in radians. This " "is equivalent to [code]PI * 2[/code], or 360 degrees in rotations." msgstr "" "圆常量,单位圆的周长,单位为弧度。相当于 [code]PI * 2[/code],即 360 度旋转。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Positive floating-point infinity. This is the result of floating-point " "division when the divisor is [code]0.0[/code]. For negative infinity, use " "[code]-INF[/code]. Dividing by [code]-0.0[/code] will result in negative " "infinity if the numerator is positive, so dividing by [code]0.0[/code] is " "not the same as dividing by [code]-0.0[/code] (despite [code]0.0 == -0.0[/" "code] returning [code]true[/code]).\n" "[b]Warning:[/b] Numeric infinity is only a concept with floating-point " "numbers, and has no equivalent for integers. Dividing an integer number by " "[code]0[/code] will not result in [constant INF] and will result in a run-" "time error instead." msgstr "" "正浮点无穷大。这是除数为 [code]0.0[/code] 时浮点除法的结果。对于负无穷大,使" "用 [code]-INF[/code]。如果分子为正,除以 [code]-0.0[/code] 将导致负无穷大,因" "此除以 [code]0.0[/code] 与除以 [code]-0.0[/code] 不同(尽管 [code]0.0 == " "-0.0[/code] 返回 [code]true[/code])。\n" "[b]警告:[/b]数值无穷大只是浮点数的一个概念,对于整数来说没有对应的概念。将整" "数除以 [code]0[/code] 不会产生 [constant INF],而是会产生一个运行时错误。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "\"Not a Number\", an invalid floating-point value. It is returned by some " "invalid operations, such as dividing floating-point [code]0.0[/code] by " "[code]0.0[/code].\n" "[constant NAN] has special properties, including that [code]!=[/code] always " "returns [code]true[/code], while other comparison operators always return " "[code]false[/code]. This is true even when comparing with itself ([code]NAN " "== NAN[/code] returns [code]false[/code] and [code]NAN != NAN[/code] returns " "[code]true[/code]). Due to this, you must use [method @GlobalScope.is_nan] " "to check whether a number is equal to [constant NAN].\n" "[b]Warning:[/b] \"Not a Number\" is only a concept with floating-point " "numbers, and has no equivalent for integers. Dividing an integer [code]0[/" "code] by [code]0[/code] will not result in [constant NAN] and will result in " "a run-time error instead." msgstr "" "“Not a Number”(非数)是一个无效的浮点数值。部分无效运算会返回这个值,例如将" "浮点数 [code]0.0[/code] 除以 [code]0.0[/code]。\n" "[constant NAN] 有许多特殊的性质,包括 [code]!=[/code] 始终返回 [code]true[/" "code],而其他比较运算符都始终返回 [code]false[/code]。即便是和自己比较也是如" "此([code]NAN == NAN[/code] 返回 [code]false[/code],而 [code]NAN != NAN[/" "code] 返回 [code]true[/code])。因此,你必须使用 [method " "@GlobalScope.is_nan] 来判断数值是否等于 [constant NAN]。\n" "[b]警告:[/b]“非数”只是浮点数的概念,整数中没有对应的概念。将整数 [code]0[/" "code] 除以 [code]0[/code] 不会得到 [constant NAN],而是会产生运行时错误。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Marks a class or a method as abstract.\n" "An abstract class is a class that cannot be instantiated directly. Instead, " "it is meant to be inherited by other classes. Attempting to instantiate an " "abstract class will result in an error.\n" "An abstract method is a method that has no implementation. Therefore, a " "newline or a semicolon is expected after the function header. This defines a " "contract that inheriting classes must conform to, because the method " "signature must be compatible when overriding.\n" "Inheriting classes must either provide implementations for all abstract " "methods, or the inheriting class must be marked as abstract. If a class has " "at least one abstract method (either its own or an unimplemented inherited " "one), then it must also be marked as abstract. However, the reverse is not " "true: an abstract class is allowed to have no abstract methods.\n" "[codeblock]\n" "@abstract class Shape:\n" "\t@abstract func draw()\n" "\n" "class Circle extends Shape:\n" "\tfunc draw():\n" "\t\tprint(\"Drawing a circle.\")\n" "\n" "class Square extends Shape:\n" "\tfunc draw():\n" "\t\tprint(\"Drawing a square.\")\n" "[/codeblock]" msgstr "" "将类或方法标记为抽象。\n" "抽象类是一种无法直接实例化的类,主要功能是被其他类继承。尝试实例化抽象类会报" "错。\n" "抽象方法是一种没有实现的方法,因此函数头之后应当为换行或分号。抽象方法定义的" "是派生类所必须遵守的契约,覆盖方法时签名必须兼容。派生类必须为所有抽象方法都" "提供实现,否则就必须将它标记为抽象类。如果类中至少存在一个抽象方法(可以是自" "己定义的,也可以是继承但没实现的),那么也必须标记为抽象类。\n" "反之则不然:抽象类可以不包含抽象方法。\n" "[codeblock]\n" "@abstract class Shape:\n" "\t@abstract func draw()\n" "\n" "class Circle extends Shape:\n" "\tfunc draw():\n" "\t\tprint(\"画个圆形。\")\n" "\n" "class Square extends Shape:\n" "\tfunc draw():\n" "\t\tprint(\"画个方形。\")\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Mark the following property as exported (editable in the Inspector dock and " "saved to disk). To control the type of the exported property, use the type " "hint notation.\n" "[codeblock]\n" "extends Node\n" "\n" "enum Direction {LEFT, RIGHT, UP, DOWN}\n" "\n" "# Built-in types.\n" "@export var string = \"\"\n" "@export var int_number = 5\n" "@export var float_number: float = 5\n" "\n" "# Enums.\n" "@export var type: Variant.Type\n" "@export var format: Image.Format\n" "@export var direction: Direction\n" "\n" "# Resources.\n" "@export var image: Image\n" "@export var custom_resource: CustomResource\n" "\n" "# Nodes.\n" "@export var node: Node\n" "@export var custom_node: CustomNode\n" "\n" "# Typed arrays.\n" "@export var int_array: Array[int]\n" "@export var direction_array: Array[Direction]\n" "@export var image_array: Array[Image]\n" "@export var node_array: Array[Node]\n" "[/codeblock]\n" "[b]Note:[/b] Custom resources and nodes should be registered as global " "classes using [code]class_name[/code], since the Inspector currently only " "supports global classes. Otherwise, a less specific type will be exported " "instead.\n" "[b]Note:[/b] Node export is only supported in [Node]-derived classes and has " "a number of other limitations." msgstr "" "将后续的属性标记为导出属性(可以在检查器面板中编辑并保存至磁盘)。要控制导出" "属性的类型,请使用类型提示标记。\n" "[codeblock]\n" "extends Node\n" "\n" "enum Direction {LEFT, RIGHT, UP, DOWN}\n" "\n" "# 内置类型。\n" "@export var string = \"\"\n" "@export var int_number = 5\n" "@export var float_number: float = 5\n" "\n" "# 枚举。\n" "@export var type: Variant.Type\n" "@export var format: Image.Format\n" "@export var direction: Direction\n" "\n" "# 资源。\n" "@export var image: Image\n" "@export var custom_resource: CustomResource\n" "\n" "# 节点。\n" "@export var node: Node\n" "@export var custom_node: CustomNode\n" "\n" "# 类型数组。\n" "@export var int_array: Array[int]\n" "@export var direction_array: Array[Direction]\n" "@export var image_array: Array[Image]\n" "@export var node_array: Array[Node]\n" "[/codeblock]\n" "[b]注意:[/b]自定义资源和自定义节点应该使用 [code]class_name[/code] 注册为全" "局类,因为属性检查器目前仅支持全局类。否则,将导出不太具体的类型。\n" "[b]注意:[/b]节点的导出只有派生自 [Node] 的类才支持,并且还有一些其他限制。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Define a new category for the following exported properties. This helps to " "organize properties in the Inspector dock.\n" "See also [constant PROPERTY_USAGE_CATEGORY].\n" "[codeblock]\n" "@export_category(\"Statistics\")\n" "@export var hp = 30\n" "@export var speed = 1.25\n" "[/codeblock]\n" "[b]Note:[/b] Categories in the Inspector dock's list usually divide " "properties coming from different classes (Node, Node2D, Sprite, etc.). For " "better clarity, it's recommended to use [annotation @export_group] and " "[annotation @export_subgroup], instead." msgstr "" "为后续导出属性定义一个新类别,方便在检查器面板中组织属性。\n" "另见 [constant PROPERTY_USAGE_CATEGORY]。\n" "[codeblock]\n" "@export_category(\"Statistics\")\n" "@export var hp = 30\n" "@export var speed = 1.25\n" "[/codeblock]\n" "[b]注意:[/b]检查器面板中的列表通常会按类别将来自不同类(如 Node、Node2D、" "Sprite 等)的属性分隔开来。为了让属性组织更明确,推荐改用 [annotation " "@export_group] 和 [annotation @export_subgroup]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a [Color], [Array][lb][Color][rb], or [PackedColorArray] property " "without allowing its transparency ([member Color.a]) to be edited.\n" "See also [constant PROPERTY_HINT_COLOR_NO_ALPHA].\n" "[codeblock]\n" "@export_color_no_alpha var dye_color: Color\n" "@export_color_no_alpha var dye_colors: Array[Color]\n" "[/codeblock]" msgstr "" "导出 [Color]、[Array][lb][Color][rb] 或 [PackedColorArray] 属性,不允许编辑透" "明度([member Color.a])。\n" "另见 [constant PROPERTY_HINT_COLOR_NO_ALPHA]。\n" "[codeblock]\n" "@export_color_no_alpha var dye_color: Color\n" "@export_color_no_alpha var dye_colors: Array[Color]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Allows you to set a custom hint, hint string, and usage flags for the " "exported property. Note that there's no validation done in GDScript, it will " "just pass the parameters to the editor.\n" "[codeblock]\n" "@export_custom(PROPERTY_HINT_NONE, \"suffix:m\") var suffix: Vector3\n" "[/codeblock]\n" "[b]Note:[/b] Regardless of the [param usage] value, the [constant " "PROPERTY_USAGE_SCRIPT_VARIABLE] flag is always added, as with any explicitly " "declared script variable." msgstr "" "允许为导出的属性设置自定义提示、提示字符串、和使用标志。请注意,GDScript 中没" "有进行任何验证,它只是将参数传递给编辑器。\n" "[codeblock]\n" "@export_custom(PROPERTY_HINT_NONE, \"suffix:m\") var suffix: Vector3\n" "[/codeblock]\n" "[b]注意:[/b]无论 [param usage] 值如何,总会添加 [constant " "PROPERTY_USAGE_SCRIPT_VARIABLE] 标志,就像和任何显式声明的脚本变量一样。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a [String], [Array][lb][String][rb], or [PackedStringArray] property " "as a path to a directory. The path will be limited to the project folder and " "its subfolders. See [annotation @export_global_dir] to allow picking from " "the entire filesystem.\n" "See also [constant PROPERTY_HINT_DIR].\n" "[codeblock]\n" "@export_dir var sprite_folder_path: String\n" "@export_dir var sprite_folder_paths: Array[String]\n" "[/codeblock]" msgstr "" "导出 [String]、[Array][lb][String][rb] 或 [PackedStringArray] 属性,用作指向" "目录的路径。该路径会被限制在项目文件夹及其子文件夹中,要允许在整个文件系统中" "选取,见 [annotation @export_global_dir]。\n" "另见 [constant PROPERTY_HINT_DIR]。\n" "[codeblock]\n" "@export_dir var sprite_folder_path: String\n" "@export_dir var sprite_folder_paths: Array[String]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export an [int], [String], [Array][lb][int][rb], [Array][lb][String][rb], " "[PackedByteArray], [PackedInt32Array], [PackedInt64Array], or " "[PackedStringArray] property as an enumerated list of options (or an array " "of options). If the property is an [int], then the index of the value is " "stored, in the same order the values are provided. You can add explicit " "values using a colon. If the property is a [String], then the value is " "stored.\n" "See also [constant PROPERTY_HINT_ENUM].\n" "[codeblock]\n" "@export_enum(\"Warrior\", \"Magician\", \"Thief\") var character_class: int\n" "@export_enum(\"Slow:30\", \"Average:60\", \"Very Fast:200\") var " "character_speed: int\n" "@export_enum(\"Rebecca\", \"Mary\", \"Leah\") var character_name: String\n" "\n" "@export_enum(\"Sword\", \"Spear\", \"Mace\") var character_items: " "Array[int]\n" "@export_enum(\"double_jump\", \"climb\", \"dash\") var character_skills: " "Array[String]\n" "[/codeblock]\n" "If you want to set an initial value, you must specify it explicitly:\n" "[codeblock]\n" "@export_enum(\"Rebecca\", \"Mary\", \"Leah\") var character_name: String = " "\"Rebecca\"\n" "[/codeblock]\n" "If you want to use named GDScript enums, then use [annotation @export] " "instead:\n" "[codeblock]\n" "enum CharacterName {REBECCA, MARY, LEAH}\n" "@export var character_name: CharacterName\n" "\n" "enum CharacterItem {SWORD, SPEAR, MACE}\n" "@export var character_items: Array[CharacterItem]\n" "[/codeblock]" msgstr "" "导出 [int]、[String]、[Array][lb][int][rb]、[Array][lb][String][rb]、" "[PackedByteArray]、[PackedInt32Array]、[PackedInt64Array] 或 " "[PackedStringArray] 属性,用作枚举选项列表(或选项的数组)。如果属性为 " "[int],则存储的是值的索引,与值的顺序相同。你可以使用冒号来显式添加枚举项的取" "值。如果属性为 [String],则存储的是值。\n" "另见 [constant PROPERTY_HINT_ENUM]。\n" "[codeblock]\n" "@export_enum(\"Warrior\", \"Magician\", \"Thief\") var character_class: int\n" "@export_enum(\"Slow:30\", \"Average:60\", \"Very Fast:200\") var " "character_speed: int\n" "@export_enum(\"Rebecca\", \"Mary\", \"Leah\") var character_name: String\n" "\n" "@export_enum(\"Sword\", \"Spear\", \"Mace\") var character_items: " "Array[int]\n" "@export_enum(\"double_jump\", \"climb\", \"dash\") var character_skills: " "Array[String]\n" "[/codeblock]\n" "如果需要设置初始值,则必须显式指定:\n" "[codeblock]\n" "@export_enum(\"Rebecca\", \"Mary\", \"Leah\") var character_name: String = " "\"Rebecca\"\n" "[/codeblock]\n" "如果需要使用具名 GDScript 枚举,请改用 [annotation @export]:\n" "[codeblock]\n" "enum CharacterName {REBECCA, MARY, LEAH}\n" "@export var character_name: CharacterName\n" "\n" "enum CharacterItem {SWORD, SPEAR, MACE}\n" "@export var character_items: Array[CharacterItem]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a floating-point property with an easing editor widget. Additional " "hints can be provided to adjust the behavior of the widget. [code]" "\"attenuation\"[/code] flips the curve, which makes it more intuitive for " "editing attenuation properties. [code]\"positive_only\"[/code] limits values " "to only be greater than or equal to zero.\n" "See also [constant PROPERTY_HINT_EXP_EASING].\n" "[codeblock]\n" "@export_exp_easing var transition_speed\n" "@export_exp_easing(\"attenuation\") var fading_attenuation\n" "@export_exp_easing(\"positive_only\") var effect_power\n" "@export_exp_easing var speeds: Array[float]\n" "[/codeblock]" msgstr "" "使用缓动编辑器小部件导出浮点属性。可以提供额外的提示来调整小部件的行为。通过" "使用[code]\"attenuation\"[/code] 提示来翻转曲线,使编辑衰减属性更加直观;通过" "使用[code]\"positive_only\"[/code] 提示来将取值范围限制为仅大于等于零。\n" "另见 [constant PROPERTY_HINT_EXP_EASING]。\n" "[codeblock]\n" "@export_exp_easing var transition_speed\n" "@export_exp_easing(\"attenuation\") var fading_attenuation\n" "@export_exp_easing(\"positive_only\") var effect_power\n" "@export_exp_easing var speeds: Array[float]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a [String], [Array][lb][String][rb], or [PackedStringArray] property " "as a path to a file. The path will be limited to the project folder and its " "subfolders. See [annotation @export_global_file] to allow picking from the " "entire filesystem.\n" "If [param filter] is provided, only matching files will be available for " "picking.\n" "See also [constant PROPERTY_HINT_FILE].\n" "[codeblock]\n" "@export_file var sound_effect_path: String\n" "@export_file(\"*.txt\") var notes_path: String\n" "@export_file var level_paths: Array[String]\n" "[/codeblock]\n" "[b]Note:[/b] The file will be stored and referenced as UID, if available. " "This ensures that the reference is valid even when the file is moved. You " "can use [ResourceUID] methods to convert it to path." msgstr "" "导出 [String]、[Array][lb][String][rb] 或 [PackedStringArray] 属性,用作指向" "文件的路径。该路径会被限制在项目文件夹及其子文件夹中。要允许在整个文件系统中" "选取,见 [annotation @export_global_file]。\n" "如果提供了 [param filter],则只有匹配的文件可供选取。\n" "另见 [constant PROPERTY_HINT_FILE]。\n" "[codeblock]\n" "@export_file var sound_effect_path: String\n" "@export_file(\"*.txt\") var notes_path: String\n" "@export_file var level_paths: Array[String]\n" "[/codeblock]\n" "[b]注意:[/b]如果文件的 UID 可用,则会以 UID 形式进行存储和引用。这样可以保证" "即便文件发生移动,引用也仍然有效。可以使用 [ResourceUID] 中的方法将 UID 转换" "为路径。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Same as [annotation @export_file], except the file will be stored as a raw " "path. This means that it may become invalid when the file is moved. If you " "are exporting a [Resource] path, consider using [annotation @export_file] " "instead." msgstr "" "与 [annotation @export_file] 相同,但是文件以原始路径的形式存储。这意味着移动" "文件后可能失效。导出 [Resource] 路径时,请考虑改用 [annotation " "@export_file]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export an integer property as a bit flag field. This allows to store several " "\"checked\" or [code]true[/code] values with one property, and comfortably " "select them from the Inspector dock.\n" "See also [constant PROPERTY_HINT_FLAGS].\n" "[codeblock]\n" "@export_flags(\"Fire\", \"Water\", \"Earth\", \"Wind\") var spell_elements = " "0\n" "[/codeblock]\n" "You can add explicit values using a colon:\n" "[codeblock]\n" "@export_flags(\"Self:4\", \"Allies:8\", \"Foes:16\") var spell_targets = 0\n" "[/codeblock]\n" "You can also combine several flags:\n" "[codeblock]\n" "@export_flags(\"Self:4\", \"Allies:8\", \"Self and Allies:12\", " "\"Foes:16\")\n" "var spell_targets = 0\n" "[/codeblock]\n" "[b]Note:[/b] A flag value must be at least [code]1[/code] and at most " "[code]2 ** 32 - 1[/code].\n" "[b]Note:[/b] Unlike [annotation @export_enum], the previous explicit value " "is not taken into account. In the following example, A is 16, B is 2, C is " "4.\n" "[codeblock]\n" "@export_flags(\"A:16\", \"B\", \"C\") var x\n" "[/codeblock]\n" "You can also use the annotation on [Array][lb][int][rb], [PackedByteArray], " "[PackedInt32Array], and [PackedInt64Array]\n" "[codeblock]\n" "@export_flags(\"Fire\", \"Water\", \"Earth\", \"Wind\") var phase_elements: " "Array[int]\n" "[/codeblock]" msgstr "" "将整数属性导出为位标志字段,能够在单个属性中保存多个“勾选项”(即 [code]true[/" "code] 值),可以很方便地在检查器面板中进行选择。\n" "另见 [constant PROPERTY_HINT_FLAGS]。\n" "[codeblock]\n" "@export_flags(\"Fire\", \"Water\", \"Earth\", \"Wind\") var spell_elements = " "0\n" "[/codeblock]\n" "可以通过冒号来显式添加取值:\n" "[codeblock]\n" "@export_flags(\"Self:4\", \"Allies:8\", \"Foes:16\") var spell_targets = 0\n" "[/codeblock]\n" "还可以对标志进行组合:\n" "[codeblock]\n" "@export_flags(\"Self:4\", \"Allies:8\", \"Self and Allies:12\", " "\"Foes:16\")\n" "var spell_targets = 0\n" "[/codeblock]\n" "[b]注意:[/b]标志值的最小值为 [code]1[/code],最大值为 [code]2 ** 32 - 1[/" "code]。\n" "[b]注意:[/b]与 [annotation @export_enum] 不同,位标志不会考虑其前一个位标志" "的显式值。下面的例子中,A 为 16、B 为 2、C 为 4。\n" "[codeblock]\n" "@export_flags(\"A:16\", \"B\", \"C\") var x\n" "[/codeblock]\n" "还可以对 [Array][lb][int][rb]、[PackedByteArray]、[PackedInt32Array] 和 " "[PackedInt64Array] 使用该注解。\n" "[codeblock]\n" "@export_flags(\"Fire\", \"Water\", \"Earth\", \"Wind\") var phase_elements: " "Array[int]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export an integer property as a bit flag field for 2D navigation layers. The " "widget in the Inspector dock will use the layer names defined in [member " "ProjectSettings.layer_names/2d_navigation/layer_1].\n" "See also [constant PROPERTY_HINT_LAYERS_2D_NAVIGATION].\n" "[codeblock]\n" "@export_flags_2d_navigation var navigation_layers: int\n" "@export_flags_2d_navigation var navigation_layers_array: Array[int]\n" "[/codeblock]" msgstr "" "将整数属性导出为 2D 导航层的位标志字段。检查器面板中对应的部件会使用在 " "[member ProjectSettings.layer_names/2d_navigation/layer_1] 中定义的层名称。\n" "另见 [constant PROPERTY_HINT_LAYERS_2D_NAVIGATION]。\n" "[codeblock]\n" "@export_flags_2d_navigation var navigation_layers: int\n" "@export_flags_2d_navigation var navigation_layers_array: Array[int]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export an integer property as a bit flag field for 2D physics layers. The " "widget in the Inspector dock will use the layer names defined in [member " "ProjectSettings.layer_names/2d_physics/layer_1].\n" "See also [constant PROPERTY_HINT_LAYERS_2D_PHYSICS].\n" "[codeblock]\n" "@export_flags_2d_physics var physics_layers: int\n" "@export_flags_2d_physics var physics_layers_array: Array[int]\n" "[/codeblock]" msgstr "" "将整数属性导出为 2D 物理层的位标志字段。检查器面板中对应的部件会使用在 " "[member ProjectSettings.layer_names/2d_physics/layer_1] 中定义的层名称。\n" "另见 [constant PROPERTY_HINT_LAYERS_2D_PHYSICS]。\n" "[codeblock]\n" "@export_flags_2d_physics var physics_layers: int\n" "@export_flags_2d_physics var physics_layers_array: Array[int]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export an integer property as a bit flag field for 2D render layers. The " "widget in the Inspector dock will use the layer names defined in [member " "ProjectSettings.layer_names/2d_render/layer_1].\n" "See also [constant PROPERTY_HINT_LAYERS_2D_RENDER].\n" "[codeblock]\n" "@export_flags_2d_render var render_layers: int\n" "@export_flags_2d_render var render_layers_array: Array[int]\n" "[/codeblock]" msgstr "" "将整数属性导出为 2D 渲染层的位标志字段。检查器面板中对应的部件会使用在 " "[member ProjectSettings.layer_names/2d_render/layer_1] 中定义的层名称。\n" "另见 [constant PROPERTY_HINT_LAYERS_2D_RENDER]。\n" "[codeblock]\n" "@export_flags_2d_render var render_layers: int\n" "@export_flags_2d_render var render_layers_array: Array[int]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export an integer property as a bit flag field for 3D navigation layers. The " "widget in the Inspector dock will use the layer names defined in [member " "ProjectSettings.layer_names/3d_navigation/layer_1].\n" "See also [constant PROPERTY_HINT_LAYERS_3D_NAVIGATION].\n" "[codeblock]\n" "@export_flags_3d_navigation var navigation_layers: int\n" "@export_flags_3d_navigation var navigation_layers_array: Array[int]\n" "[/codeblock]" msgstr "" "将整数属性导出为 3D 导航层的位标志字段。检查器面板中对应的部件会使用在 " "[member ProjectSettings.layer_names/3d_navigation/layer_1] 中定义的层名称。\n" "另见 [constant PROPERTY_HINT_LAYERS_3D_NAVIGATION]。\n" "[codeblock]\n" "@export_flags_3d_navigation var navigation_layers: int\n" "@export_flags_3d_navigation var navigation_layers_array: Array[int]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export an integer property as a bit flag field for 3D physics layers. The " "widget in the Inspector dock will use the layer names defined in [member " "ProjectSettings.layer_names/3d_physics/layer_1].\n" "See also [constant PROPERTY_HINT_LAYERS_3D_PHYSICS].\n" "[codeblock]\n" "@export_flags_3d_physics var physics_layers: int\n" "@export_flags_3d_physics var physics_layers_array: Array[int]\n" "[/codeblock]" msgstr "" "将整数属性导出为 3D 物理层的位标志字段。检查器面板中对应的部件会使用在 " "[member ProjectSettings.layer_names/3d_physics/layer_1] 中定义的层名称。\n" "另见 [constant PROPERTY_HINT_LAYERS_3D_PHYSICS]。\n" "[codeblock]\n" "@export_flags_3d_physics var physics_layers: int\n" "@export_flags_3d_physics var physics_layers_array: Array[int]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export an integer property as a bit flag field for 3D render layers. The " "widget in the Inspector dock will use the layer names defined in [member " "ProjectSettings.layer_names/3d_render/layer_1].\n" "See also [constant PROPERTY_HINT_LAYERS_3D_RENDER].\n" "[codeblock]\n" "@export_flags_3d_render var render_layers: int\n" "@export_flags_3d_render var render_layers_array: Array[int]\n" "[/codeblock]" msgstr "" "将整数属性导出为 3D 渲染层的位标志字段。检查器面板中对应的部件会使用在 " "[member ProjectSettings.layer_names/3d_render/layer_1] 中定义的层名称。\n" "另见 [constant PROPERTY_HINT_LAYERS_3D_RENDER]。\n" "[codeblock]\n" "@export_flags_3d_render var render_layers: int\n" "@export_flags_3d_render var render_layers_array: Array[int]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export an integer property as a bit flag field for navigation avoidance " "layers. The widget in the Inspector dock will use the layer names defined in " "[member ProjectSettings.layer_names/avoidance/layer_1].\n" "See also [constant PROPERTY_HINT_LAYERS_AVOIDANCE].\n" "[codeblock]\n" "@export_flags_avoidance var avoidance_layers: int\n" "@export_flags_avoidance var avoidance_layers_array: Array[int]\n" "[/codeblock]" msgstr "" "将整数属性导出为导航避障层的位标志字段。检查器面板中对应的部件会使用在 " "[member ProjectSettings.layer_names/avoidance/layer_1] 中定义的层名称。\n" "另见 [constant PROPERTY_HINT_LAYERS_AVOIDANCE]。\n" "[codeblock]\n" "@export_flags_avoidance var avoidance_layers: int\n" "@export_flags_avoidance var avoidance_layers_array: Array[int]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a [String], [Array][lb][String][rb], or [PackedStringArray] property " "as an absolute path to a directory. The path can be picked from the entire " "filesystem. See [annotation @export_dir] to limit it to the project folder " "and its subfolders.\n" "See also [constant PROPERTY_HINT_GLOBAL_DIR].\n" "[codeblock]\n" "@export_global_dir var sprite_folder_path: String\n" "@export_global_dir var sprite_folder_paths: Array[String]\n" "[/codeblock]" msgstr "" "导出 [String]、[Array][lb][String][rb] 或 [PackedStringArray] 属性,用作指向" "目录的绝对路径,该路径可以从整个文件系统中选取。要限制为项目文件夹及其子文件" "夹,见 [annotation @export_dir]。\n" "另见 [constant PROPERTY_HINT_GLOBAL_DIR]。\n" "[codeblock]\n" "@export_global_dir var sprite_folder_path: String\n" "@export_global_dir var sprite_folder_paths: Array[String]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a [String], [Array][lb][String][rb], or [PackedStringArray] property " "as an absolute path to a file. The path can be picked from the entire " "filesystem. See [annotation @export_file] to limit it to the project folder " "and its subfolders.\n" "If [param filter] is provided, only matching files will be available for " "picking.\n" "See also [constant PROPERTY_HINT_GLOBAL_FILE].\n" "[codeblock]\n" "@export_global_file var sound_effect_path: String\n" "@export_global_file(\"*.txt\") var notes_path: String\n" "@export_global_file var multiple_paths: Array[String]\n" "[/codeblock]" msgstr "" "导出 [String]、[Array][lb][String][rb] 或 [PackedStringArray] 属性,用作指向" "文件的绝对路径,该路径可以从整个文件系统中选取。要限制为项目文件夹及其子文件" "夹,见 [annotation @export_file]。\n" "如果提供了 [param filter],则只有匹配的文件可供选取。\n" "另见 [constant PROPERTY_HINT_GLOBAL_FILE]。\n" "[codeblock]\n" "@export_global_file var sound_effect_path: String\n" "@export_global_file(\"*.txt\") var notes_path: String\n" "@export_global_file var multiple_paths: Array[String]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Define a new group for the following exported properties. This helps to " "organize properties in the Inspector dock. Groups can be added with an " "optional [param prefix], which would make group to only consider properties " "that have this prefix. The grouping will break on the first property that " "doesn't have a prefix. The prefix is also removed from the property's name " "in the Inspector dock.\n" "If no [param prefix] is provided, then every following property will be " "added to the group. The group ends when then next group or category is " "defined. You can also force end a group by using this annotation with empty " "strings for parameters, [code]@export_group(\"\", \"\")[/code].\n" "Groups cannot be nested, use [annotation @export_subgroup] to add subgroups " "within groups.\n" "See also [constant PROPERTY_USAGE_GROUP].\n" "[codeblock]\n" "@export_group(\"Racer Properties\")\n" "@export var nickname = \"Nick\"\n" "@export var age = 26\n" "\n" "@export_group(\"Car Properties\", \"car_\")\n" "@export var car_label = \"Speedy\"\n" "@export var car_number = 3\n" "\n" "@export_group(\"\", \"\")\n" "@export var ungrouped_number = 3\n" "[/codeblock]" msgstr "" "为以下导出的属性定义一个新分组,分组有助于在检查器面板中组织属性。添加新分组" "时可以选择性地提供 [param prefix] 前缀,此时分组将仅考虑具有此前缀的属性。分" "组将在第一个没有该前缀的属性处结束,前缀也将从检查器面板中的属性名称当中移" "除。\n" "如果未提供 [param prefix],则该注解后续的每个属性都将添加到该分组中,在定义下" "一个分组或类别时,该分组结束。你还可以通过将此注解与空字符串的参数一起使用来" "强制结束分组:[code]@export_group(\"\", \"\")[/code]。\n" "分组不能嵌套使用,请使用 [annotation @export_subgroup] 在分组内添加子分组。\n" "另见 [constant PROPERTY_USAGE_GROUP]。\n" "[codeblock]\n" "@export_group(\"Racer Properties\")\n" "@export var nickname = \"Nick\"\n" "@export var age = 26\n" "\n" "@export_group(\"Car Properties\", \"car_\")\n" "@export var car_label = \"Speedy\"\n" "@export var car_number = 3\n" "\n" "@export_group(\"\", \"\")\n" "@export var ungrouped_number = 3\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml #, fuzzy msgid "" "Export a [String], [Array][lb][String][rb], [PackedStringArray], " "[Dictionary] or [Array][lb][Dictionary][rb] property with a large [TextEdit] " "widget instead of a [LineEdit]. This adds support for multiline content and " "makes it easier to edit large amount of text stored in the property.\n" "See also [constant PROPERTY_HINT_MULTILINE_TEXT].\n" "[codeblock]\n" "@export_multiline var character_biography\n" "@export_multiline var npc_dialogs: Array[String]\n" "@export_multiline(\"monospace\", \"no_wrap\") var favorite_ascii_art: " "String\n" "[/codeblock]" msgstr "" "代替普通的 [LineEdit] 组件,并使用较大的 [TextEdit] 组件来导出 [String]、" "[Array][lb][String][rb]、[PackedStringArray]、[Dictionary] 或 [Array][lb]" "[Dictionary][rb] 属性,这样就能够支持编辑多行内容,便于在编辑属性中存储大量文" "本。\n" "另见 [constant PROPERTY_HINT_MULTILINE_TEXT]。\n" "[codeblock]\n" "@export_multiline var character_biography\n" "@export_multiline var npc_dialogs: Array[String]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a [NodePath] or [Array][lb][NodePath][rb] property with a filter for " "allowed node types.\n" "See also [constant PROPERTY_HINT_NODE_PATH_VALID_TYPES].\n" "[codeblock]\n" "@export_node_path(\"Button\", \"TouchScreenButton\") var some_button\n" "@export_node_path(\"Button\", \"TouchScreenButton\") var many_buttons: " "Array[NodePath]\n" "[/codeblock]\n" "[b]Note:[/b] The type must be a native class or a globally registered script " "(using the [code]class_name[/code] keyword) that inherits [Node]." msgstr "" "导出 [NodePath] 或 [Array][lb][NodePath][rb] 属性,能够指定要过滤的节点类" "型。\n" "另见 [constant PROPERTY_HINT_NODE_PATH_VALID_TYPES]。\n" "[codeblock]\n" "@export_node_path(\"Button\", \"TouchScreenButton\") var some_button\n" "@export_node_path(\"Button\", \"TouchScreenButton\") var many_buttons: " "Array[NodePath]\n" "[/codeblock]\n" "[b]注意:[/b]类型必须是原生类型或(通过使用 [code][class_name][/code] 关键" "字)全局注册的继承自 [Node] 的脚本。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a [String], [Array][lb][String][rb], or [PackedStringArray] property " "with a placeholder text displayed in the editor widget when no value is " "present.\n" "See also [constant PROPERTY_HINT_PLACEHOLDER_TEXT].\n" "[codeblock]\n" "@export_placeholder(\"Name in lowercase\") var character_id: String\n" "@export_placeholder(\"Name in lowercase\") var friend_ids: Array[String]\n" "[/codeblock]" msgstr "" "导出 [String]、[Array][lb][String][rb] 或 [PackedStringArray] 属性,当值不存" "在时会在编辑器小部件中显示占位文本。\n" "另见 [constant PROPERTY_HINT_PLACEHOLDER_TEXT]。\n" "[codeblock]\n" "@export_placeholder(\"Name in lowercase\") var character_id: String\n" "@export_placeholder(\"Name in lowercase\") var friend_ids: Array[String]\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml #, fuzzy msgid "" "Export an [int], [float], [Array][lb][int][rb], [Array][lb][float][rb], " "[PackedByteArray], [PackedInt32Array], [PackedInt64Array], " "[PackedFloat32Array], or [PackedFloat64Array] property as a range value. The " "range must be defined by [param min] and [param max], as well as an optional " "[param step] and a variety of extra hints. The [param step] defaults to " "[code]1[/code] for integer properties. For floating-point numbers this value " "depends on your [member EditorSettings.interface/inspector/" "default_float_step] setting.\n" "If hints [code]\"or_greater\"[/code] and [code]\"or_less\"[/code] are " "provided, the editor widget will not cap the value at range boundaries. The " "[code]\"exp\"[/code] hint will make the edited values on range to change " "exponentially. The [code]\"prefer_slider\"[/code] hint will make integer " "values use the slider instead of arrows for editing, while [code]" "\"hide_control\"[/code] will hide the element controlling the value of the " "editor widget.\n" "Hints also allow to indicate the units for the edited value. Using [code]" "\"radians_as_degrees\"[/code] you can specify that the actual value is in " "radians, but should be displayed in degrees in the Inspector dock (the range " "values are also in degrees). [code]\"degrees\"[/code] allows to add a degree " "sign as a unit suffix (the value is unchanged). Finally, a custom suffix can " "be provided using [code]\"suffix:unit\"[/code], where \"unit\" can be any " "string.\n" "See also [constant PROPERTY_HINT_RANGE].\n" "[codeblock]\n" "@export_range(0, 20) var number\n" "@export_range(-10, 20) var number\n" "@export_range(-10, 20, 0.2) var number: float\n" "@export_range(0, 20) var numbers: Array[float]\n" "\n" "@export_range(0, 100, 1, \"or_greater\") var power_percent\n" "@export_range(0, 100, 1, \"or_greater\", \"or_less\") var health_delta\n" "\n" "@export_range(-180, 180, 0.001, \"radians_as_degrees\") var angle_radians\n" "@export_range(0, 360, 1, \"degrees\") var angle_degrees\n" "@export_range(-8, 8, 2, \"suffix:px\") var target_offset\n" "[/codeblock]" msgstr "" "导出 [int]、[float]、[Array][lb][int][rb]、[Array][lb][float][rb]、" "[PackedByteArray]、[PackedInt32Array]、[PackedInt64Array]、" "[PackedFloat32Array] 或 [PackedFloat64Array] 属性,能够指定取值范围。范围必须" "由最小值提示 [param min] 和最大值提示 [param max] 定义,还有一个可选的步长提" "示 [param step] 和各种额外的提示。对于整数属性,[param step] 的默认值是 " "[code]1[/code] 。对于浮点数,这个值取决于你的 [member " "EditorSettings.interface/inspector/default_float_step] 所设置的值。\n" "如果提供了 [code]\"or_greater\"[/code] 和 [code]\"or_less\"[/code] 提示,则编" "辑器部件将不会在其范围边界处对数值进行限制。[code]\"exp\"[/code] 提示将使范围" "内的编辑值以指数形式变化。[code]\"hide_slider\"[/code] 提示可将编辑器部件中的" "滑块隐藏。\n" "提示还允许指示编辑的值的单位。通过使用 [code]\"radians_as_degrees\"[/code] 提" "示,你可以指定实际值以弧度为单位,在检查器中以角度为单位显示的值(其范围值也" "使用角度)。[code]\"degrees\"[/code] 提示允许添加一个角度符号作为单位后缀。最" "后,还可以使用 [code]\"suffix:单位\"[/code] 这种提示来提供一个自定义后缀,其" "中“单位”可以是任意字符串。\n" "另见 [constant PROPERTY_HINT_RANGE]。\n" "[codeblock]\n" "@export_range(0, 20) var number\n" "@export_range(-10, 20) var number\n" "@export_range(-10, 20, 0.2) var number: float\n" "@export_range(0, 20) var numbers: Array[float]\n" "\n" "@export_range(0, 100, 1, \"or_greater\") var power_percent\n" "@export_range(0, 100, 1, \"or_greater\", \"or_less\") var health_delta\n" "\n" "@export_range(-180, 180, 0.001, \"radians_as_degrees\") var angle_radians\n" "@export_range(0, 360, 1, \"degrees\") var angle_degrees\n" "@export_range(-8, 8, 2, \"suffix:px\") var target_offset\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a property with [constant PROPERTY_USAGE_STORAGE] flag. The property " "is not displayed in the editor, but it is serialized and stored in the scene " "or resource file. This can be useful for [annotation @tool] scripts. Also " "the property value is copied when [method Resource.duplicate] or [method " "Node.duplicate] is called, unlike non-exported variables.\n" "[codeblock]\n" "var a # Not stored in the file, not displayed in the editor.\n" "@export_storage var b # Stored in the file, not displayed in the editor.\n" "@export var c: int # Stored in the file, displayed in the editor.\n" "[/codeblock]" msgstr "" "使用 [constant PROPERTY_USAGE_STORAGE] 标志导出属性,让该属性不会在编辑器中显" "示,但是会将其序列化并存储到场景或资源文件中。常用于 [annotation @tool] 脚本" "当中。调用 [method Resource.duplicate] 和 [method Node.duplicate] 时也会复制" "该属性的值,而其他非导出变量则不会。\n" "[codeblock]\n" "var a # 不保存进文件,不在编辑器中显示。\n" "@export_storage var b # 保存进文件,不在编辑器中显示。\n" "@export var c: int # 保存进文件,在编辑器中显示。\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Define a new subgroup for the following exported properties. This helps to " "organize properties in the Inspector dock. Subgroups work exactly like " "groups, except they need a parent group to exist. See [annotation " "@export_group].\n" "See also [constant PROPERTY_USAGE_SUBGROUP].\n" "[codeblock]\n" "@export_group(\"Racer Properties\")\n" "@export var nickname = \"Nick\"\n" "@export var age = 26\n" "\n" "@export_subgroup(\"Car Properties\", \"car_\")\n" "@export var car_label = \"Speedy\"\n" "@export var car_number = 3\n" "[/codeblock]\n" "[b]Note:[/b] Subgroups cannot be nested, but you can use the slash separator " "([code]/[/code]) to achieve the desired effect:\n" "[codeblock]\n" "@export_group(\"Car Properties\")\n" "@export_subgroup(\"Wheels\", \"wheel_\")\n" "@export_subgroup(\"Wheels/Front\", \"front_wheel_\")\n" "@export var front_wheel_strength = 10\n" "@export var front_wheel_mobility = 5\n" "@export_subgroup(\"Wheels/Rear\", \"rear_wheel_\")\n" "@export var rear_wheel_strength = 8\n" "@export var rear_wheel_mobility = 3\n" "@export_subgroup(\"Wheels\", \"wheel_\")\n" "@export var wheel_material: PhysicsMaterial\n" "[/codeblock]" msgstr "" "为接下来的导出属性定义一个新的子分组,有助于在检查器面板中组织属性。子分组的" "运作方式与分组类似,不过需要依赖于一个父级分组。见 [annotation " "@export_group]。\n" "另见 [constant PROPERTY_USAGE_SUBGROUP]。\n" "[codeblock]\n" "@export_group(\"Racer Properties\")\n" "@export var nickname = \"Nick\"\n" "@export var age = 26\n" "\n" "@export_subgroup(\"Car Properties\", \"car_\")\n" "@export var car_label = \"Speedy\"\n" "@export var car_number = 3\n" "[/codeblock]\n" "[b]注意:[/b]子分组不能嵌套,但是你可以使用斜杠分隔符([code]/[/code])达到所" "需效果:\n" "[codeblock]\n" "@export_group(\"Car Properties\")\n" "@export_subgroup(\"Wheels\", \"wheel_\")\n" "@export_subgroup(\"Wheels/Front\", \"front_wheel_\")\n" "@export var front_wheel_strength = 10\n" "@export var front_wheel_mobility = 5\n" "@export_subgroup(\"Wheels/Rear\", \"rear_wheel_\")\n" "@export var rear_wheel_strength = 8\n" "@export var rear_wheel_mobility = 3\n" "@export_subgroup(\"Wheels\", \"wheel_\")\n" "@export var wheel_material: PhysicsMaterial\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Export a [Callable] property as a clickable button with the label [param " "text]. When the button is pressed, the callable is called.\n" "If [param icon] is specified, it is used to fetch an icon for the button via " "[method Control.get_theme_icon], from the [code]\"EditorIcons\"[/code] theme " "type. If [param icon] is omitted, the default [code]\"Callable\"[/code] icon " "is used instead.\n" "Consider using the [EditorUndoRedoManager] to allow the action to be " "reverted safely.\n" "See also [constant PROPERTY_HINT_TOOL_BUTTON].\n" "[codeblock]\n" "@tool\n" "extends Sprite2D\n" "\n" "@export_tool_button(\"Hello\") var hello_action = hello\n" "@export_tool_button(\"Randomize the color!\", \"ColorRect\")\n" "var randomize_color_action = randomize_color\n" "\n" "func hello():\n" "\tprint(\"Hello world!\")\n" "\n" "func randomize_color():\n" "\tvar undo_redo = EditorInterface.get_editor_undo_redo()\n" "\tundo_redo.create_action(\"Randomized Sprite2D Color\")\n" "\tundo_redo.add_do_property(self, &\"self_modulate\", Color(randf(), " "randf(), randf()))\n" "\tundo_redo.add_undo_property(self, &\"self_modulate\", self_modulate)\n" "\tundo_redo.commit_action()\n" "[/codeblock]\n" "[b]Note:[/b] The property is exported without the [constant " "PROPERTY_USAGE_STORAGE] flag because a [Callable] cannot be properly " "serialized and stored in a file.\n" "[b]Note:[/b] In an exported project neither [EditorInterface] nor " "[EditorUndoRedoManager] exist, which may cause some scripts to break. To " "prevent this, you can use [method Engine.get_singleton] and omit the static " "type from the variable declaration:\n" "[codeblock]\n" "var undo_redo = " "Engine.get_singleton(&\"EditorInterface\").get_editor_undo_redo()\n" "[/codeblock]\n" "[b]Note:[/b] Avoid storing lambda callables in member variables of " "[RefCounted]-based classes (e.g. resources), as this can lead to memory " "leaks. Use only method callables and optionally [method Callable.bind] or " "[method Callable.unbind]." msgstr "" "导出 [Callable] 属性,显示为标签为 [param text] 的可点击按钮。按下按钮会调用" "该可调用体。\n" "如果指定了 [param icon],则按钮的图标会通过 [method Control.get_theme_icon] " "从 [code]\"EditorIcons\"[/code] 主题类型中获取。如果省略 [param icon],则会使" "用默认的 [code]\"Callable\"[/code] 图标。\n" "请考虑使用 [EditorUndoRedoManager],从而安全地撤销动作。\n" "另见 [constant PROPERTY_HINT_TOOL_BUTTON]。\n" "[codeblock]\n" "@tool\n" "extends Sprite2D\n" "\n" "@export_tool_button(\"你好\") var hello_action = hello\n" "@export_tool_button(\"随机颜色!\", \"ColorRect\")\n" "var randomize_color_action = randomize_color\n" "\n" "func hello():\n" "\tprint(\"你好世界!\")\n" "\n" "func randomize_color():\n" "\tvar undo_redo = EditorInterface.get_editor_undo_redo()\n" "\tundo_redo.create_action(\"随机设置 Sprite2D 的颜色\")\n" "\tundo_redo.add_do_property(self, &\"self_modulate\", Color(randf(), " "randf(), randf()))\n" "\tundo_redo.add_undo_property(self, &\"self_modulate\", self_modulate)\n" "\tundo_redo.commit_action()\n" "[/codeblock]\n" "[b]注意:[/b]该属性导出时不带 [constant PROPERTY_USAGE_STORAGE] 标识,因为 " "[Callable] 无法正确序列化存储在文件中。\n" "[b]注意:[/b]导出后的项目中,[EditorInterface] 和 [EditorUndoRedoManager] 均" "不存在,可能导致部分脚本损坏。为了防止这种情况,你可以使用 [method " "Engine.get_singleton] 并省略变量声明中的静态类型:\n" "[codeblock]\n" "var undo_redo = " "Engine.get_singleton(&\"EditorInterface\").get_editor_undo_redo()\n" "[/codeblock]\n" "[b]注意:[/b]请避免在 [RefCounted] 的派生类(例如资源类)的成员变量中存储 " "Lambda 可调用体,否则可能导致内存泄漏。只能使用方法可调用体,也可搭配 " "[method Callable.bind] 和 [method Callable.unbind]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Add a custom icon to the current script. The icon specified at [param " "icon_path] is displayed in the Scene dock for every node of that class, as " "well as in various editor dialogs.\n" "[codeblock]\n" "@icon(\"res://path/to/class/icon.svg\")\n" "[/codeblock]\n" "[b]Note:[/b] Only the script can have a custom icon. Inner classes are not " "supported.\n" "[b]Note:[/b] As annotations describe their subject, the [annotation @icon] " "annotation must be placed before the class definition and inheritance.\n" "[b]Note:[/b] Unlike most other annotations, the argument of the [annotation " "@icon] annotation must be a string literal (constant expressions are not " "supported)." msgstr "" "为当前脚本添加自定义图标。[param icon_path] 所指向的图标会在“场景”面板中该类" "的所有节点上显示,也会显示在各种编辑器对话框当中。\n" "[codeblock]\n" "@icon(\"res://path/to/class/icon.svg\")\n" "[/codeblock]\n" "[b]注意:[/b]只有脚本可以带有自定义图标,不支持内部类。\n" "[b]注意:[/b]由于注解描述的是它们的对象,因此 [annotation @icon] 注解必须放在" "类定义语句和继承语句之前。\n" "[b]注意:[/b]与其他大多数注解不同,[annotation @icon] 注解的参数必须是字符串" "字面量(不支持常量表达式)。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Mark the following property as assigned when the [Node] is ready. Values for " "these properties are not assigned immediately when the node is initialized " "([method Object._init]), and instead are computed and stored right before " "[method Node._ready].\n" "[codeblock]\n" "@onready var character_name = $Label\n" "[/codeblock]" msgstr "" "标记后续属性会在 [Node] 就绪时赋值。节点初始化([method Object._init])时不会" "立即对这些属性赋值,而是会在即将调用 [method Node._ready] 之前进行计算与储" "存。\n" "[codeblock]\n" "@onready var character_name = $Label\n" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Mark the following method for remote procedure calls. See [url=$DOCS_URL/" "tutorials/networking/high_level_multiplayer.html]High-level multiplayer[/" "url].\n" "If [param mode] is set as [code]\"any_peer\"[/code], allows any peer to call " "this RPC function. Otherwise, only the authority peer is allowed to call it " "and [param mode] should be kept as [code]\"authority\"[/code]. When " "configuring functions as RPCs with [method Node.rpc_config], each of these " "modes respectively corresponds to the [constant " "MultiplayerAPI.RPC_MODE_AUTHORITY] and [constant " "MultiplayerAPI.RPC_MODE_ANY_PEER] RPC modes. See [enum " "MultiplayerAPI.RPCMode]. If a peer that is not the authority tries to call a " "function that is only allowed for the authority, the function will not be " "executed. If the error can be detected locally (when the RPC configuration " "is consistent between the local and the remote peer), an error message will " "be displayed on the sender peer. Otherwise, the remote peer will detect the " "error and print an error there.\n" "If [param sync] is set as [code]\"call_remote\"[/code], the function will " "only be executed on the remote peer, but not locally. To run this function " "locally too, set [param sync] to [code]\"call_local\"[/code]. When " "configuring functions as RPCs with [method Node.rpc_config], this is " "equivalent to setting [code]call_local[/code] to [code]true[/code].\n" "The [param transfer_mode] accepted values are [code]\"unreliable\"[/code], " "[code]\"unreliable_ordered\"[/code], or [code]\"reliable\"[/code]. It sets " "the transfer mode of the underlying [MultiplayerPeer]. See [member " "MultiplayerPeer.transfer_mode].\n" "The [param transfer_channel] defines the channel of the underlying " "[MultiplayerPeer]. See [member MultiplayerPeer.transfer_channel].\n" "The order of [param mode], [param sync] and [param transfer_mode] does not " "matter, but values related to the same argument must not be used more than " "once. [param transfer_channel] always has to be the 4th argument (you must " "specify 3 preceding arguments).\n" "[codeblock]\n" "@rpc\n" "func fn(): pass\n" "\n" "@rpc(\"any_peer\", \"unreliable_ordered\")\n" "func fn_update_pos(): pass\n" "\n" "@rpc(\"authority\", \"call_remote\", \"unreliable\", 0) # Equivalent to " "@rpc\n" "func fn_default(): pass\n" "[/codeblock]\n" "[b]Note:[/b] Methods annotated with [annotation @rpc] cannot receive objects " "which define required parameters in [method Object._init]. See [method " "Object._init] for more details." msgstr "" "将后续方法标记为远程过程调用。见[url=$DOCS_URL/tutorials/networking/" "high_level_multiplayer.html]《高阶多人游戏》[/url]。\n" "如果将 [param mode] 提示设为 [code]\"any_peer\"[/code],则会允许所有对等体调" "用该 RPC 函数。若只允许该对等体的控制方调用,则应该让 [param mode] 提示保持" "为 [code]\"authority\"[/code]。使用 [method Node.rpc_config] 将函数配置为 " "RPC 时,这些模式分别对应的是 RPC 模式 [constant " "MultiplayerAPI.RPC_MODE_ANY_PEER] 和 [constant " "MultiplayerAPI.RPC_MODE_AUTHORITY] 。如果非控制方的对等体尝试调用仅限控制方调" "用的函数,则不会执行该函数,且如果本地能够检测到错误(本地与远程对等体的 RPC " "配置一致),则发送方对等体会显示错误消息,否则该对等体会检测到该错误并将其输" "出。\n" "如果将 [param sync] 提示设为 [code]\"call_remote\"[/code],则该函数只会在远程" "对等体上执行,不会在本地执行。要让这个函数在本地也能够执行,请将 [param " "sync] 设置为 [code]\"call_local\"[/code],使用 [method Node.rpc_config] 将函" "数配置为 RPC 时,等价于将 [code]call_local[/code] 设置为 [code]true[/" "code]。\n" "[param transfer_mode] 提示能够接受的值为 [code]\"unreliable\"[/code]、[code]" "\"unreliable_ordered\"[/code]、[code]\"reliable\"[/code],会设置底层 " "[MultiplayerPeer] 的传输模式。见 [member MultiplayerPeer.transfer_mode]。\n" "[param transfer_channel] 定义的是底层 [MultiplayerPeer] 的通道。见 [member " "MultiplayerPeer.transfer_channel]。\n" "[param mode]、[param sync] 和 [param transfer_mode] 的顺序是无关的,但是相同" "参数的取值不能出现多次。[param transfer_channel] 必须始终为第四个参数(同时前" "三个参数也必须指定)。\n" "[codeblock]\n" "@rpc\n" "func fn(): pass\n" "\n" "@rpc(\"any_peer\", \"unreliable_ordered\")\n" "func fn_update_pos(): pass\n" "\n" "@rpc(\"authority\", \"call_remote\", \"unreliable\", 0) # 等价于 @rpc\n" "func fn_default(): pass\n" "[/codeblock]\n" "[b]注意:[/b]使用 [annotation @rpc] 注解的方法无法接收在 [method " "Object._init] 中定义了必要参数的对象。更多详情,请参阅 [method " "Object._init]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Make a script with static variables to not persist after all references are " "lost. If the script is loaded again the static variables will revert to " "their default values.\n" "[b]Note:[/b] As annotations describe their subject, the [annotation " "@static_unload] annotation must be placed before the class definition and " "inheritance.\n" "[b]Warning:[/b] Currently, due to a bug, scripts are never freed, even if " "[annotation @static_unload] annotation is used." msgstr "" "使具有静态变量的脚本在所有引用丢失后不持久化。如果再次加载脚本,静态变量将恢" "复为默认值。\n" "[b]注意:[/b]因为注解需要描述对象,所以 [annotation @static_unload] 注解必须" "放在类定义和继承之前。\n" "[b]警告:[/b]目前由于一个 bug,即使使用了[annotation @static_unload] 注解,脚" "本也永远不会释放。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Mark the current script as a tool script, allowing it to be loaded and " "executed by the editor. See [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]Running code in the editor[/url].\n" "[codeblock]\n" "@tool\n" "extends Node\n" "[/codeblock]\n" "[b]Note:[/b] As annotations describe their subject, the [annotation @tool] " "annotation must be placed before the class definition and inheritance." msgstr "" "将当前脚本标记为工具脚本,允许该脚本由编辑器所加载与执行。见[url=$DOCS_URL/" "tutorials/plugins/running_code_in_the_editor.html]《在编辑器中运行代码》[/" "url]。\n" "[codeblock]\n" "@tool\n" "extends Node\n" "[/codeblock]\n" "[b]注意:[/b]因为注解描述对象的关系,必须把 [annotation @tool] 注解放在类定义" "和继承之前。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Mark the following statement to ignore the specified [param warning]. See " "[url=$DOCS_URL/tutorials/scripting/gdscript/warning_system.html]GDScript " "warning system[/url].\n" "[codeblock]\n" "func test():\n" "\tprint(\"hello\")\n" "\treturn\n" "\t@warning_ignore(\"unreachable_code\")\n" "\tprint(\"unreachable\")\n" "[/codeblock]\n" "See also [annotation @warning_ignore_start] and [annotation " "@warning_ignore_restore]." msgstr "" "将后续语句标记为忽略指定的 [param warning] 警告。见[url=$DOCS_URL/tutorials/" "scripting/gdscript/warning_system.html]《GDScript 警告系统》[/url]。\n" "[codeblock]\n" "func test():\n" "\tprint(\"你好\")\n" "\treturn\n" "\t@warning_ignore(\"unreachable_code\")\n" "\tprint(\"无法到达\")\n" "[/codeblock]\n" "另见 [annotation @warning_ignore_start] 和 [annotation " "@warning_ignore_restore]。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Stops ignoring the listed warning types after [annotation " "@warning_ignore_start]. Ignoring the specified warning types will be reset " "to Project Settings. This annotation can be omitted to ignore the warning " "types until the end of the file.\n" "[b]Note:[/b] Unlike most other annotations, arguments of the [annotation " "@warning_ignore_restore] annotation must be string literals (constant " "expressions are not supported)." msgstr "" "停止忽略列在 [annotation @warning_ignore_start] 注解后面的警告,对特定警告的" "忽略将重置为项目设置中的默认配置。该注解可省略,如此则会持续忽略指定警告类型" "直至文件末尾。\n" "[b]注意:[/b]与大多数其他注解不同,注解 [annotation @warning_ignore_restore] " "的参数必须是字符串字面量(不支持常量表达式)。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" "Starts ignoring the listed warning types until the end of the file or the " "[annotation @warning_ignore_restore] annotation with the given warning " "type.\n" "[codeblock]\n" "func test():\n" "\tvar a = 1 # Warning (if enabled in the Project Settings).\n" "\t@warning_ignore_start(\"unused_variable\")\n" "\tvar b = 2 # No warning.\n" "\tvar c = 3 # No warning.\n" "\t@warning_ignore_restore(\"unused_variable\")\n" "\tvar d = 4 # Warning (if enabled in the Project Settings).\n" "[/codeblock]\n" "[b]Note:[/b] To suppress a single warning, use [annotation @warning_ignore] " "instead.\n" "[b]Note:[/b] Unlike most other annotations, arguments of the [annotation " "@warning_ignore_start] annotation must be string literals (constant " "expressions are not supported)." msgstr "" "开始忽略列出的警告类型,直至文件末尾或带有给定警告类型的 [annotation " "@warning_ignore_restore] 注解处为止。\n" "[codeblock]\n" "func test():\n" "\tvar a = 1 # Warning (if enabled in the Project Settings).\n" "\t@warning_ignore_start(\"unused_variable\")\n" "\tvar b = 2 # No warning.\n" "\tvar c = 3 # No warning.\n" "\t@warning_ignore_restore(\"unused_variable\")\n" "\tvar d = 4 # Warning (if enabled in the Project Settings).\n" "[/codeblock]\n" "[b]注意:[/b]要抑制单个警告,请改用 [annotation @warning_ignore] 注解。\n" "[b]注意:[/b]与大多数其他注解不同,注解 [annotation @warning_ignore_start] 的" "参数必须是字符串字面量(不支持常量表达式)。" #: doc/classes/@GlobalScope.xml msgid "Global scope constants and functions." msgstr "全局范围的常量和函数。" #: doc/classes/@GlobalScope.xml msgid "" "A list of global scope enumerated constants and built-in functions. This is " "all that resides in the globals, constants regarding error codes, keycodes, " "property hints, etc.\n" "Singletons are also documented here, since they can be accessed from " "anywhere.\n" "For the entries that can only be accessed from scripts written in GDScript, " "see [@GDScript]." msgstr "" "全局范围的枚举常量和内置函数的列表。此处的内容都是全局的,包括用于错误码、键" "码、属性提示等的常量。\n" "这里还记录了单例,因为任何地方都可以访问单例。\n" "只能在 GDScript 编写的脚本中访问的条目见 [@GDScript]。" #: doc/classes/@GlobalScope.xml doc/classes/RandomNumberGenerator.xml msgid "Random number generation" msgstr "随机数生成" #: doc/classes/@GlobalScope.xml msgid "" "Returns the absolute value of a [Variant] parameter [param x] (i.e. non-" "negative value). Supported types: [int], [float], [Vector2], [Vector2i], " "[Vector3], [Vector3i], [Vector4], [Vector4i].\n" "[codeblock]\n" "var a = abs(-1)\n" "# a is 1\n" "\n" "var b = abs(-1.2)\n" "# b is 1.2\n" "\n" "var c = abs(Vector2(-3.5, -4))\n" "# c is (3.5, 4)\n" "\n" "var d = abs(Vector2i(-5, -6))\n" "# d is (5, 6)\n" "\n" "var e = abs(Vector3(-7, 8.5, -3.8))\n" "# e is (7, 8.5, 3.8)\n" "\n" "var f = abs(Vector3i(-7, -8, -9))\n" "# f is (7, 8, 9)\n" "[/codeblock]\n" "[b]Note:[/b] For better type safety, use [method absf], [method absi], " "[method Vector2.abs], [method Vector2i.abs], [method Vector3.abs], [method " "Vector3i.abs], [method Vector4.abs], or [method Vector4i.abs]." msgstr "" "返回一个 [Variant] 类型参数 [param x] 的绝对值(即非负值)。支持的类型:" "[int]、[float]、[Vector2]、[Vector2i]、[Vector3]、[Vector3i]、[Vector4]、" "[Vector4i] 。\n" "[codeblock]\n" "var a = abs(-1)\n" "# a=1\n" "\n" "var b = abs(-1.2)\n" "# b=1.2\n" "\n" "var c = abs(Vector2(-3.5, -4))\n" "# c=(3.5, 4)\n" "\n" "var d = abs(Vector2i(-5, -6))\n" "# d=(5, 6)\n" "\n" "var e = abs(Vector3(-7, 8.5, -3.8))\n" "# e=(7, 8.5, 3.8)\n" "\n" "var f = abs(Vector3i(-7, -8, -9))\n" "# f=(7, 8, 9)\n" "[/codeblock]\n" "[b]注意:[/b]为了更好的类型安全,请使用 [method absf]、[method absi]、" "[method Vector2.abs]、[method Vector2i.abs]、[method Vector3.abs]、[method " "Vector3i.abs]、[method Vector4.abs] 或 [method Vector4i.abs]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the absolute value of float parameter [param x] (i.e. positive " "value).\n" "[codeblock]\n" "# a is 1.2\n" "var a = absf(-1.2)\n" "[/codeblock]" msgstr "" "返回浮点参数 [param x] 的绝对值(即正值)。\n" "[codeblock]\n" "# a=1.2\n" "var a = absf(-1.2)\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the absolute value of int parameter [param x] (i.e. positive " "value).\n" "[codeblock]\n" "# a is 1\n" "var a = absi(-1)\n" "[/codeblock]" msgstr "" "返回整数参数 [param x] 的绝对值(即正值)。\n" "[codeblock]\n" "# a=1\n" "var a = absi(-1)\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the arc cosine of [param x] in radians. Use to get the angle of " "cosine [param x]. [param x] will be clamped between [code]-1.0[/code] and " "[code]1.0[/code] (inclusive), in order to prevent [method acos] from " "returning [constant @GDScript.NAN].\n" "[codeblock]\n" "# c is 0.523599 or 30 degrees if converted with rad_to_deg(c)\n" "var c = acos(0.866025)\n" "[/codeblock]" msgstr "" "返回 [param x] 的反余弦,单位为弧度。用来获取余弦 [param x] 的角度。[param " "x] 会被钳制在 [code]-1.0[/code] 和 [code]1.0[/code](包括)之间,因此 " "[method acos] 不会返回 [constant @GDScript.NAN]。\n" "[codeblock]\n" "# 如果用 rad_to_deg(c) 转换,c为0.523599或30度\n" "var c = acos(0.866025)\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the hyperbolic arc (also called inverse) cosine of [param x], " "returning a value in radians. Use it to get the angle from an angle's cosine " "in hyperbolic space if [param x] is larger or equal to 1. For values of " "[param x] lower than 1, it will return 0, in order to prevent [method acosh] " "from returning [constant @GDScript.NAN].\n" "[codeblock]\n" "var a = acosh(2) # Returns 1.31695789692482\n" "cosh(a) # Returns 2\n" "\n" "var b = acosh(-1) # Returns 0\n" "[/codeblock]" msgstr "" "返回 [param x] 的反双曲余弦值,返回值为弧度。使用它来获取在双曲空间中,如果 " "[param x] 大于或等于 1,角的余弦的角度。对于 [param x] 小于 1 的值,将返回 " "0,以防止 [method acosh] 返回 [constant @GDScript.NAN]。\n" "[codeblock]\n" "var a = acosh(2) # 返回 1.31695789692482\n" "cosh(a) # 返回 2\n" "\n" "var b = acosh(-1) # 返回 0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the difference between the two angles (in radians), in the range of " "[code][-PI, +PI][/code]. When [param from] and [param to] are opposite, " "returns [code]-PI[/code] if [param from] is smaller than [param to], or " "[code]PI[/code] otherwise." msgstr "" "返回两个角度之间的差(单位为弧度),范围为 [code][-PI, +PI][/code] 。当 " "[param from] 和 [param to] 相反时,如果 [param from] 小于 [param to],则返回 " "[code]-PI[/code] ,否则返回 [code]PI[/code] 。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the arc sine of [param x] in radians. Use to get the angle of sine " "[param x]. [param x] will be clamped between [code]-1.0[/code] and " "[code]1.0[/code] (inclusive), in order to prevent [method asin] from " "returning [constant @GDScript.NAN].\n" "[codeblock]\n" "# s is 0.523599 or 30 degrees if converted with rad_to_deg(s)\n" "var s = asin(0.5)\n" "[/codeblock]" msgstr "" "返回 [param x] 的反正弦值,单位为弧度。用来获取正弦 [param x] 的角度。[param " "x] 会被钳制在 [code]-1.0[/code] 和 [code]1.0[/code](包括)之间,因此 " "[method asin] 不会返回 [constant @GDScript.NAN]。\n" "[codeblock]\n" "# 如果用 rad_to_deg(s) 转换,s为0.523599或30度\n" "var s = asin(0.5)\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the hyperbolic arc (also called inverse) sine of [param x], " "returning a value in radians. Use it to get the angle from an angle's sine " "in hyperbolic space.\n" "[codeblock]\n" "var a = asinh(0.9) # Returns 0.8088669356527824\n" "sinh(a) # Returns 0.9\n" "[/codeblock]" msgstr "" "返回 [param x] 的反双曲正弦值,返回值为弧度。使用它来获取在双曲空间中,角的正" "弦角度。\n" "[codeblock]\n" "var a = asinh(0.9) # 返回 0.8088669356527824\n" "sinh(a) # 返回 0.9\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the arc tangent of [param x] in radians. Use it to get the angle " "from an angle's tangent in trigonometry.\n" "The method cannot know in which quadrant the angle should fall. See [method " "atan2] if you have both [code]y[/code] and [code skip-lint]x[/code].\n" "[codeblock]\n" "var a = atan(0.5) # a is 0.463648\n" "[/codeblock]\n" "If [param x] is between [code]-PI / 2[/code] and [code]PI / 2[/code] " "(inclusive), [code]atan(tan(x))[/code] is equal to [param x]." msgstr "" "返回 [param x] 的反正切值,单位为弧度。在三角函数中用它来得到一个角上切线的角" "度。\n" "该方法无法确定角度应该落在哪个象限。如果你同时拥有 [code]y[/code] 和 [code " "skip-lint]x[/code],请参见 [method atan2]。\n" "[codeblock]\n" "var a = atan(0.5) # a=0.463648\n" "[/codeblock]\n" "如果 [param x] 在 [code]-PI/2[/code] 和 [code]PI/2[/code](包括)之间," "[code]atan(tan(x))[/code] 等于 [param x]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle " "of tangent [code]y/x[/code]. To compute the value, the method takes into " "account the sign of both arguments in order to determine the quadrant.\n" "Important note: The Y coordinate comes first, by convention.\n" "[codeblock]\n" "var a = atan2(0, -1) # a is 3.141593\n" "[/codeblock]" msgstr "" "返回 [code]y/x[/code] 的反正切值,单位为弧度。用来获得正切值为 [code]y/x[/" "code] 的角度。为了计算该值,该方法考虑了两个参数的符号,以确定象限。\n" "重要提示:按照惯例,Y 坐标在前。\n" "[codeblock]\n" "var a = atan2(0, -1) # a = 3.141593\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the hyperbolic arc (also called inverse) tangent of [param x], " "returning a value in radians. Use it to get the angle from an angle's " "tangent in hyperbolic space if [param x] is between -1 and 1 (non-" "inclusive).\n" "In mathematics, the inverse hyperbolic tangent is only defined for -1 < " "[param x] < 1 in the real set, so values equal or lower to -1 for [param x] " "return negative [constant @GDScript.INF] and values equal or higher than 1 " "return positive [constant @GDScript.INF] in order to prevent [method atanh] " "from returning [constant @GDScript.NAN].\n" "[codeblock]\n" "var a = atanh(0.9) # Returns 1.47221948958322\n" "tanh(a) # Returns 0.9\n" "\n" "var b = atanh(-2) # Returns -inf\n" "tanh(b) # Returns -1\n" "[/codeblock]" msgstr "" "返回 [param x] 的反双曲正切值,返回值为弧度。如果 [param x] 在 -1 和 1 之间" "(不包括 -1 和 1),则使用它从双曲空间中的角度的正切值获取角度。\n" "在数学中,只有在实数集中,-1 < [param x] < 1 的情况下,双曲反正切才有意义。因" "此,为了预防 [method atanh] 返回 [constant @GDScript.NAN],对于 [param x] 等" "于或小于 -1 的值,返回负的 [constant @GDScript.NAN];对于 [param x]等于或大" "于 1 的值,返回正的 [constant @GDScript.INF]。\n" "[codeblock]\n" "var a = atanh(0.9) # 返回 1.47221948958322\n" "tanh(a) # 返回 0.9\n" "\n" "var b = atanh(-2) # 返回 -inf\n" "tanh(b) # 返回 -1\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the derivative at the given [param t] on a one-dimensional " "[url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] " "defined by the given [param control_1], [param control_2], and [param end] " "points." msgstr "" "返回由给定的 [param control_1]、[param control_2] 和 [param end] 点定义的一维" "[url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]贝塞尔曲线[/url]上 " "[param t] 处的导数。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the point at the given [param t] on a one-dimensional [url=https://" "en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by the " "given [param control_1], [param control_2], and [param end] points." msgstr "" "返回由给定的 [param control_1]、[param control_2] 和 [param end] 点定义的一维" "[url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]贝塞尔曲线[/url]上位于给" "定 [param t] 的点。" #: doc/classes/@GlobalScope.xml msgid "" "Decodes a byte array back to a [Variant] value, without decoding objects.\n" "[b]Note:[/b] If you need object deserialization, see [method " "bytes_to_var_with_objects]." msgstr "" "将字节数组解码回 [Variant] 值,无法解码对象。\n" "[b]注意:[/b]如果需要对象反序列化,请参见 [method " "bytes_to_var_with_objects]。" #: doc/classes/@GlobalScope.xml msgid "" "Decodes a byte array back to a [Variant] value. Decoding objects is " "allowed.\n" "[b]Warning:[/b] Deserialized object can contain code which gets executed. Do " "not use this option if the serialized object comes from untrusted sources to " "avoid potential security threats (remote code execution)." msgstr "" "将字节数组解码回 [Variant] 值。允许解码对象。\n" "[b]警告:[/b]反序列化的对象可能包含执行的代码。如果序列化对象的来源不受信任," "则不要使用此选项,以避免潜在的安全威胁(远程执行代码)。" #: doc/classes/@GlobalScope.xml msgid "" "Rounds [param x] upward (towards positive infinity), returning the smallest " "whole number that is not less than [param x]. Supported types: [int], " "[float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], " "[Vector4i].\n" "[codeblock]\n" "var i = ceil(1.45) # i is 2.0\n" "i = ceil(1.001) # i is 2.0\n" "[/codeblock]\n" "See also [method floor], [method round], and [method snapped].\n" "[b]Note:[/b] For better type safety, use [method ceilf], [method ceili], " "[method Vector2.ceil], [method Vector3.ceil], or [method Vector4.ceil]." msgstr "" "向上舍入 [param x](朝正无穷大方向),返回不小于 [param x] 的最小整数。支持的" "类型:[int]、[float]、[Vector2]、[Vector2i]、[Vector3]、[Vector3i]、" "[Vector4]、[Vector4i]。\n" "[codeblock]\n" "var i = ceil(1.45) # i 为 2.0\n" "i = ceil(1.001) # i 为 2.0\n" "[/codeblock]\n" "另见 [method floor]、[method round]、[method snapped]。\n" "[b]注意:[/b]为了更好的类型安全,使用 [method ceilf]、[method ceili]、" "[method Vector2.ceil]、[method Vector3.ceil] 或 [method Vector4.ceil]。" #: doc/classes/@GlobalScope.xml msgid "" "Rounds [param x] upward (towards positive infinity), returning the smallest " "whole number that is not less than [param x].\n" "A type-safe version of [method ceil], returning a [float]." msgstr "" "向上舍入 [param x](朝正无穷大),返回不小于 [param x] 的最小整数。\n" "[method ceil] 的类型安全版本,返回一个 [float]。" #: doc/classes/@GlobalScope.xml msgid "" "Rounds [param x] upward (towards positive infinity), returning the smallest " "whole number that is not less than [param x].\n" "A type-safe version of [method ceil], returning an [int]." msgstr "" "向上舍入 [param x](朝正无穷大),返回不小于 [param x] 的最小整数。\n" "[method ceil] 的类型安全版本,返回一个 [int]。" #: doc/classes/@GlobalScope.xml msgid "" "Clamps the [param value], returning a [Variant] not less than [param min] " "and not more than [param max]. Any values that can be compared with the less " "than and greater than operators will work.\n" "[codeblock]\n" "var a = clamp(-10, -1, 5)\n" "# a is -1\n" "\n" "var b = clamp(8.1, 0.9, 5.5)\n" "# b is 5.5\n" "[/codeblock]\n" "[b]Note:[/b] For better type safety, use [method clampf], [method clampi], " "[method Vector2.clamp], [method Vector2i.clamp], [method Vector3.clamp], " "[method Vector3i.clamp], [method Vector4.clamp], [method Vector4i.clamp], or " "[method Color.clamp] (not currently supported by this method).\n" "[b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-" "wise clamping, and will pick [param min] if [code]value < min[/code] or " "[param max] if [code]value > max[/code]. To perform component-wise clamping " "use the methods listed above." msgstr "" "钳制 [param value],返回不小于 [param min] 且不大于 [param max] 的 " "[Variant]。任何能够用小于和大于运算符进行比较的值都能工作。\n" "[codeblock]\n" "var a = clamp(-10, -1, 5)\n" "# a 是 -1\n" "\n" "var b = clamp(8.1, 0.9, 5.5)\n" "# b 是 5.5\n" "[/codeblock]\n" "[b]注意:[/b]为了更好的类型安全,请使用 [method clampf]、[method clampi]、" "[method Vector2.clamp]、[method Vector2i.clamp]、[method Vector3.clamp]、" "[method Vector3i.clamp ]、[method Vector4.clamp]、[method Vector4i.clamp] 或 " "[method Color.clamp](该方法当前不受支持)。\n" "[b]注意:[/b]当在向量上使用该函数时,它[i]不[/i]会执行逐分量钳制,并且如果 " "[code]value < min[/code] 则结果为 [param min],如果 [code]value > max[/code] " "则为 [param max]。要执行逐分量钳制,请使用上面列出的方法。" #: doc/classes/@GlobalScope.xml msgid "" "Clamps the [param value], returning a [float] not less than [param min] and " "not more than [param max].\n" "[codeblock]\n" "var speed = 42.1\n" "var a = clampf(speed, 1.0, 20.5) # a is 20.5\n" "\n" "speed = -10.0\n" "var b = clampf(speed, -1.0, 1.0) # b is -1.0\n" "[/codeblock]" msgstr "" "钳制 [param value],返回不小于 [param min] 且不大于 [param max] 的 " "[float]。\n" "[codeblock]\n" "var speed = 42.1\n" "var a = clampf(speed, 1.0, 20.5) # a 是 20.5\n" "\n" "speed = -10.0\n" "var b = clampf(speed, -1.0, 1.0) # b 是 -1.0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Clamps the [param value], returning an [int] not less than [param min] and " "not more than [param max].\n" "[codeblock]\n" "var speed = 42\n" "var a = clampi(speed, 1, 20) # a is 20\n" "\n" "speed = -10\n" "var b = clampi(speed, -1, 1) # b is -1\n" "[/codeblock]" msgstr "" "钳制 [param value],返回不小于 [param min] 且不大于 [param max] 的 [int]。\n" "[codeblock]\n" "var speed = 42\n" "var a = clampi(speed, 1, 20) # a 是 20\n" "\n" "speed = -10\n" "var b = clampi(speed, -1, 1) # b 是 -1\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the cosine of angle [param angle_rad] in radians.\n" "[codeblock]\n" "cos(PI * 2) # Returns 1.0\n" "cos(PI) # Returns -1.0\n" "cos(deg_to_rad(90)) # Returns 0.0\n" "[/codeblock]" msgstr "" "返回弧度角为 [param angle_rad] 的余弦值。\n" "[codeblock]\n" "cos(PI * 2) # 返回 1.0\n" "cos(PI) # 返回 -1.0\n" "cos(deg_to_rad(90)) # 返回 0.0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the hyperbolic cosine of [param x] in radians.\n" "[codeblock]\n" "print(cosh(1)) # Prints 1.543081\n" "[/codeblock]" msgstr "" "返回弧度角 [param x] 的双曲余弦值。\n" "[codeblock]\n" "print(cosh(1)) # 打印 1.543081\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Cubic interpolates between two values by the factor defined in [param " "weight] with [param pre] and [param post] values." msgstr "" "根据 [param weight] 定义的系数,以及 [param pre] 和 [param post] 值,在两个值" "之间进行三次插值。" #: doc/classes/@GlobalScope.xml msgid "" "Cubic interpolates between two rotation values with shortest path by the " "factor defined in [param weight] with [param pre] and [param post] values. " "See also [method lerp_angle]." msgstr "" "根据 [param weight] 定义的系数,以及 [param pre] 和 [param post] 值,在两个旋" "转值之间的最短路径进行三次插值 。另见 [method lerp_angle]。" #: doc/classes/@GlobalScope.xml msgid "" "Cubic interpolates between two rotation values with shortest path by the " "factor defined in [param weight] with [param pre] and [param post] values. " "See also [method lerp_angle].\n" "It can perform smoother interpolation than [method cubic_interpolate] by the " "time values." msgstr "" "根据 [param weight] 定义的系数,以及 [param pre] 和 [param post] 值,在两个旋" "转值之间的最短路径进行三次插值。另见 [method lerp_angle]。\n" "它可以根据时间值执行比 [method cubic_interpolate] 更平滑的插值。" #: doc/classes/@GlobalScope.xml msgid "" "Cubic interpolates between two values by the factor defined in [param " "weight] with [param pre] and [param post] values.\n" "It can perform smoother interpolation than [method cubic_interpolate] by the " "time values." msgstr "" "根据 [param weight] 定义的系数,以及 [param pre] 和 [param post] 值,在两个值" "之间进行三次插值。\n" "它可以根据时间值执行比 [method cubic_interpolate] 更平滑的插值。" #: doc/classes/@GlobalScope.xml msgid "Converts from decibels to linear energy (audio)." msgstr "将分贝值转换为线性能量(音频)值。" #: doc/classes/@GlobalScope.xml msgid "" "Converts an angle expressed in degrees to radians.\n" "[codeblock]\n" "var r = deg_to_rad(180) # r is 3.141593\n" "[/codeblock]" msgstr "" "将角度值转换为弧度值。\n" "[codeblock]\n" "var r = deg_to_rad(180) # r 是 3.141593\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns an \"eased\" value of [param x] based on an easing function defined " "with [param curve]. This easing function is based on an exponent. The [param " "curve] can be any floating-point number, with specific values leading to the " "following behaviors:\n" "[codeblock lang=text]\n" "- Lower than -1.0 (exclusive): Ease in-out\n" "- -1.0: Linear\n" "- Between -1.0 and 0.0 (exclusive): Ease out-in\n" "- 0.0: Constant\n" "- Between 0.0 to 1.0 (exclusive): Ease out\n" "- 1.0: Linear\n" "- Greater than 1.0 (exclusive): Ease in\n" "[/codeblock]\n" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "ease_cheatsheet.png]ease() curve values cheatsheet[/url]\n" "See also [method smoothstep]. If you need to perform more advanced " "transitions, use [method Tween.interpolate_value]." msgstr "" "基于用 [param curve] 定义的缓动函数返回 [param x] “缓动后”的值,该缓动函数是" "基于指数的缓动。[param curve] 可以是任意浮点数,具体数值会导致以下行为:\n" "[codeblock lang=text]\n" "- 低于 -1.0(开区间):缓入缓出\n" "- -1.0:线性\n" "- 在 -1.0 和 0.0 之间(开区间):缓出缓入\n" "- 0.0:恒定\n" "- 在 0.0 到 1.0 之间(开区间):缓出\n" "- 1.0:线性\n" "- 大于 1.0(开区间):缓入\n" "[/codeblock]\n" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "ease_cheatsheet.png]ease() 曲线值速查表[/url]\n" "另见 [method smoothstep]。如果你需要执行更高级的过渡,请使用 [method " "Tween.interpolate_value]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns a human-readable name for the given [enum Error] code.\n" "[codeblock]\n" "print(OK) # Prints 0\n" "print(error_string(OK)) # Prints \"OK\"\n" "print(error_string(ERR_BUSY)) # Prints \"Busy\"\n" "print(error_string(ERR_OUT_OF_MEMORY)) # Prints \"Out of memory\"\n" "[/codeblock]" msgstr "" "为给定的 [enum Error] 代码返回一个人类可读的名称。\n" "[codeblock]\n" "print(OK) # 输出 0\n" "print(error_string(OK)) # 输出“OK”\n" "print(error_string(ERR_BUSY)) # 输出“Busy”\n" "print(error_string(ERR_OUT_OF_MEMORY)) # 输出“Out of memory”\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "The natural exponential function. It raises the mathematical constant [i]e[/" "i] to the power of [param x] and returns it.\n" "[i]e[/i] has an approximate value of 2.71828, and can be obtained with " "[code]exp(1)[/code].\n" "For exponents to other bases use the method [method pow].\n" "[codeblock]\n" "var a = exp(2) # Approximately 7.39\n" "[/codeblock]" msgstr "" "自然指数函数。计算数学常数 [i]e[/i] 的 [param x] 次方并返回它。\n" "[i]e[/i] 的近似值为 2.71828,可以使用 [code]exp(1)[/code] 获得。\n" "求其他底数的指数应使用 [method pow] 方法。\n" "[codeblock]\n" "var a = exp(2) # 大约是 7.39\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Rounds [param x] downward (towards negative infinity), returning the largest " "whole number that is not more than [param x]. Supported types: [int], " "[float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], " "[Vector4i].\n" "[codeblock]\n" "var a = floor(2.99) # a is 2.0\n" "a = floor(-2.99) # a is -3.0\n" "[/codeblock]\n" "See also [method ceil], [method round], and [method snapped].\n" "[b]Note:[/b] For better type safety, use [method floorf], [method floori], " "[method Vector2.floor], [method Vector3.floor], or [method Vector4.floor]." msgstr "" "向下舍入 [param x](朝负无穷大),返回不大于 [param x] 的最大整数。支持的类" "型:[int]、[float]、[Vector2]、[Vector2i]、[Vector3]、[Vector3i]、[Vector4]、" "[Vector4i]。\n" "[codeblock]\n" "var a = floor(2.99) # a 为 2.0\n" "a = floor(-2.99) # a 为 -3.0\n" "[/codeblock]\n" "另见 [method ceil]、[method round]、[method snapped]。\n" "[b]注意:[/b]为了更好的类型安全,请使用 [method floorf]、[method floori]、" "[method Vector2.floor]、[method Vector3.floor] 或 [method Vector4.floor]。" #: doc/classes/@GlobalScope.xml msgid "" "Rounds [param x] downward (towards negative infinity), returning the largest " "whole number that is not more than [param x].\n" "A type-safe version of [method floor], returning a [float]." msgstr "" "将 [param x] 向下舍入(向负无穷大),返回不超过 [param x] 的最大整数。\n" "一个类型安全的 [method floor] 版本,返回一个 [float]。" #: doc/classes/@GlobalScope.xml msgid "" "Rounds [param x] downward (towards negative infinity), returning the largest " "whole number that is not more than [param x].\n" "A type-safe version of [method floor], returning an [int].\n" "[b]Note:[/b] This function is [i]not[/i] the same as [code]int(x)[/code], " "which rounds towards 0." msgstr "" "将 [param x] 向下舍入(向负无穷大),返回不超过 [param x] 的最大整数。\n" "是 [method floor] 的类型安全版本,返回一个 [int]。\n" "[b]注意:[/b]这个函数与 [code]int(x)[/code] [i]不[/i] 一样,后者是向 0 取整。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the floating-point remainder of [param x] divided by [param y], " "keeping the sign of [param x].\n" "[codeblock]\n" "var remainder = fmod(7, 5.5) # remainder is 1.5\n" "[/codeblock]\n" "For the integer remainder operation, use the [code]%[/code] operator." msgstr "" "返回 [param x] 除以 [param y] 的浮点型余数,符号与 [param x]一致。\n" "[codeblock]\n" "var remainder = fmod(7, 5.5) # remainder 是 1.5\n" "[/codeblock]\n" "对于整数取余运算,请使用 [code]%[/code] 运算符。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the floating-point modulus of [param x] divided by [param y], " "wrapping equally in positive and negative.\n" "[codeblock]\n" "print(\" (x) (fmod(x, 1.5)) (fposmod(x, 1.5))\")\n" "for i in 7:\n" "\tvar x = i * 0.5 - 1.5\n" "\tprint(\"%4.1f %4.1f | %4.1f\" % [x, fmod(x, 1.5), fposmod(x, " "1.5)])\n" "[/codeblock]\n" "Prints:\n" "[codeblock lang=text]\n" " (x) (fmod(x, 1.5)) (fposmod(x, 1.5))\n" "-1.5 -0.0 | 0.0\n" "-1.0 -1.0 | 0.5\n" "-0.5 -0.5 | 1.0\n" " 0.0 0.0 | 0.0\n" " 0.5 0.5 | 0.5\n" " 1.0 1.0 | 1.0\n" " 1.5 0.0 | 0.0\n" "[/codeblock]" msgstr "" "返回 [param x] 除以 [param y] 的浮点模数,对正负数进行一致的循环。\n" "[codeblock]\n" "print(\" (x) (fmod(x, 1.5)) (fposmod(x, 1.5))\")\n" "for i in 7:\n" "\tvar x = i * 0.5 - 1.5\n" "\tprint(\"%4.1f %4.1f | %4.1f\" % [x, fmod(x, 1.5), fposmod(x, " "1.5)])\n" "[/codeblock]\n" "输出:\n" "[codeblock lang=text]\n" " (x) (fmod(x, 1.5)) (fposmod(x, 1.5))\n" "-1.5 -0.0 | 0.0\n" "-1.0 -1.0 | 0.5\n" "-0.5 -0.5 | 1.0\n" " 0.0 0.0 | 0.0\n" " 0.5 0.5 | 0.5\n" " 1.0 1.0 | 1.0\n" " 1.5 0.0 | 0.0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the integer hash of the passed [param variable].\n" "[codeblocks]\n" "[gdscript]\n" "print(hash(\"a\")) # Prints 177670\n" "[/gdscript]\n" "[csharp]\n" "GD.Print(GD.Hash(\"a\")); // Prints 177670\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回传入的 [param variable] 的整数哈希值。\n" "[codeblocks]\n" "[gdscript]\n" "print(hash(\"a\")) # 输出 177670\n" "[/gdscript]\n" "[csharp]\n" "GD.Print(GD.Hash(\"a\")); // 输出 177670\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml #, fuzzy msgid "" "Returns the [Object] that corresponds to [param instance_id]. All Objects " "have a unique instance ID. See also [method Object.get_instance_id].\n" "[codeblocks]\n" "[gdscript]\n" "var drink = \"water\"\n" "\n" "func _ready():\n" "\tvar id = get_instance_id()\n" "\tvar instance = instance_from_id(id)\n" "\tprint(instance.drink) # Prints \"water\"\n" "[/gdscript]\n" "[csharp]\n" "public partial class MyNode : Node\n" "{\n" "\tpublic string Drink { get; set; } = \"water\";\n" "\n" "\tpublic override void _Ready()\n" "\t{\n" "\t\tulong id = GetInstanceId();\n" "\t\tvar instance = (MyNode)InstanceFromId(Id);\n" "\t\tGD.Print(instance.Drink); // Prints \"water\"\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回实例 ID [param instance_id] 所对应的 [Object]。所有对象都有唯一实例 ID。" "另见 [method Object.get_instance_id]。\n" "[codeblocks]\n" "[gdscript]\n" "var drink = \"water\"\n" "\n" "func _ready():\n" "\tvar id = get_instance_id()\n" "\tvar instance = instance_from_id(id)\n" "\tprint(instance.foo) # 输出“water”\n" "[/gdscript]\n" "[csharp]\n" "public partial class MyNode : Node\n" "{\n" "\tpublic string Drink { get; set; } = \"water\";\n" "\n" "\tpublic override void _Ready()\n" "\t{\n" "\t\tulong id = GetInstanceId();\n" "\t\tvar instance = (MyNode)InstanceFromId(Id);\n" "\t\tGD.Print(instance.Drink); // 输出“water”\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Returns an interpolation or extrapolation factor considering the range " "specified in [param from] and [param to], and the interpolated value " "specified in [param weight]. The returned value will be between [code]0.0[/" "code] and [code]1.0[/code] if [param weight] is between [param from] and " "[param to] (inclusive). If [param weight] is located outside this range, " "then an extrapolation factor will be returned (return value lower than " "[code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on " "the result of [method inverse_lerp] if this is not desired.\n" "[codeblock]\n" "# The interpolation ratio in the `lerp()` call below is 0.75.\n" "var middle = lerp(20, 30, 0.75)\n" "# middle is now 27.5.\n" "\n" "# Now, we pretend to have forgotten the original ratio and want to get it " "back.\n" "var ratio = inverse_lerp(20, 30, 27.5)\n" "# ratio is now 0.75.\n" "[/codeblock]\n" "See also [method lerp], which performs the reverse of this operation, and " "[method remap] to map a continuous series of values to another." msgstr "" "返回插值或外推的因子。范围用 [param from] 和 [param to]指定,插值后的值由 " "[param weight] 指定。如果 [param weight] 在 [param from] 和 [param to] 之间" "(包含),那么返回的值在 [code]0.0[/code] 和 [code]1.0[/code] 之间。如果 " "[param weight] 在该范围之外,则返回的是外推因子(返回值小于 [code]0.0[/code] " "或大于 [code]1.0[/code])。如果不希望这样,请对 [method inverse_lerp] 的结果" "使用 [method clamp]。\n" "[codeblock]\n" "# 下面的 `lerp()` 调用时的插值比例是 0.75。\n" "var middle = lerp(20, 30, 0.75)\n" "# middle 现在是 27.5。\n" "\n" "# 现在,我们假装忘记了原来的比例,想要找到是多少。\n" "var ratio = inverse_lerp(20, 30, 27.5)\n" "# ratio 现在是 0.75。\n" "[/codeblock]\n" "另见 [method lerp],它执行本操作的逆操作;以及 [method remap],将一系列连续的" "值映射到另一个值。" #: doc/classes/@GlobalScope.xml msgid "" "Returns [code]true[/code] if [param a] and [param b] are approximately equal " "to each other.\n" "Here, \"approximately equal\" means that [param a] and [param b] are within " "a small internal epsilon of each other, which scales with the magnitude of " "the numbers.\n" "Infinity values of the same sign are considered equal." msgstr "" "如果 [param a] 和 [param b] 彼此近似相等,则返回 [code]true[/code]。\n" "这里,“近似相等”意味着 [param a] 和 [param b] 在彼此的一个小的内部 epsilon " "内,该 epsilon 与数字的大小成比例。\n" "相同符号的无穷大值被认为是相等的。" #: doc/classes/@GlobalScope.xml msgid "" "Returns whether [param x] is a finite value, i.e. it is not [constant " "@GDScript.NAN], positive infinity, or negative infinity. See also [method " "is_inf] and [method is_nan]." msgstr "" "返回 [param x] 是否为有限值,即不是 [constant @GDScript.NAN]、正无穷大或负无" "穷大。另见 [method is_inf] 和 [method is_nan]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns [code]true[/code] if [param x] is either positive infinity or " "negative infinity. See also [method is_finite] and [method is_nan]." msgstr "" "如果 [param x] 是正无穷大或负无穷大,则返回 [code]true[/code] 。另见 [method " "is_finite] 和 [method is_nan]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns [code]true[/code] if the Object that corresponds to [param id] is a " "valid object (e.g. has not been deleted from memory). All Objects have a " "unique instance ID." msgstr "" "如果与 [param id] 对应的 Object 是有效的对象(例如没有从内存中删除),则返回 " "[code]true[/code] 。所有对象都有唯一的实例 ID。" #: doc/classes/@GlobalScope.xml msgid "" "Returns [code]true[/code] if [param instance] is a valid Object (e.g. has " "not been deleted from memory)." msgstr "" "如果 [param instance] 是有效的 Object(例如,没有从内存中删除),则返回 " "[code]true[/code] 。" #: doc/classes/@GlobalScope.xml msgid "" "Returns [code]true[/code] if [param x] is a NaN (\"Not a Number\" or " "invalid) value. This method is needed as [constant @GDScript.NAN] is not " "equal to itself, which means [code]x == NAN[/code] can't be used to check " "whether a value is a NaN." msgstr "" "如果 [param x] 为 NaN 值(“Not a Number”,不是数字,即无效值),则返回 " "[code]true[/code]。存在的该方法必要性在于 [constant @GDScript.NAN] 与自身不相" "等,即无法使用 [code]x == NAN[/code] 来判断是否为 NaN。" #: doc/classes/@GlobalScope.xml msgid "" "Returns [code]true[/code], for value types, if [param a] and [param b] share " "the same value. Returns [code]true[/code], for reference types, if the " "references of [param a] and [param b] are the same.\n" "[codeblock]\n" "# Vector2 is a value type\n" "var vec2_a = Vector2(0, 0)\n" "var vec2_b = Vector2(0, 0)\n" "var vec2_c = Vector2(1, 1)\n" "is_same(vec2_a, vec2_a) # true\n" "is_same(vec2_a, vec2_b) # true\n" "is_same(vec2_a, vec2_c) # false\n" "\n" "# Array is a reference type\n" "var arr_a = []\n" "var arr_b = []\n" "is_same(arr_a, arr_a) # true\n" "is_same(arr_a, arr_b) # false\n" "[/codeblock]\n" "These are [Variant] value types: [code]null[/code], [bool], [int], [float], " "[String], [StringName], [Vector2], [Vector2i], [Vector3], [Vector3i], " "[Vector4], [Vector4i], [Rect2], [Rect2i], [Transform2D], [Transform3D], " "[Plane], [Quaternion], [AABB], [Basis], [Projection], [Color], [NodePath], " "[RID], [Callable] and [Signal].\n" "These are [Variant] reference types: [Object], [Dictionary], [Array], " "[PackedByteArray], [PackedInt32Array], [PackedInt64Array], " "[PackedFloat32Array], [PackedFloat64Array], [PackedStringArray], " "[PackedVector2Array], [PackedVector3Array], [PackedVector4Array], and " "[PackedColorArray]." msgstr "" "当 [param a] 和 [param b] 为值类型时,如果他们相同,那么返回 [code]true[/" "code]。当 [param a] 和 [param b] 为引用类型时,如果它们的引用对象相同,那么返" "回 [code]true[/code]。\n" "[codeblock]\n" "# Vector2 是值类型\n" "var vec2_a = Vector2(0, 0)\n" "var vec2_b = Vector2(0, 0)\n" "var vec2_c = Vector2(1, 1)\n" "is_same(vec2_a, vec2_a) # true\n" "is_same(vec2_a, vec2_b) # true\n" "is_same(vec2_a, vec2_c) # false\n" "\n" "# Array 是引用类型\n" "var arr_a = []\n" "var arr_b = []\n" "is_same(arr_a, arr_a) # true\n" "is_same(arr_a, arr_b) # false\n" "[/codeblock]\n" "值类型的 [Variant] 有:[code]null[/code]、[bool]、[int]、[float]、[String]、" "[StringName]、[Vector2]、[Vector2i]、[Vector3]、[Vector3i]、[Vector4]、" "[Vector4i]、[Rect2]、[Rect2i]、[Transform2D]、[Transform3D]、[Plane]、" "[Quaternion]、[AABB]、[Basis]、[Projection]、[Color]、[NodePath]、[RID]、" "[Callable] 和 [Signal]。\n" "引用类型的 [Variant] 有:[Object]、[Dictionary]、[Array]、[PackedByteArray]、" "[PackedInt32Array]、[PackedInt64Array]、[PackedFloat32Array]、" "[PackedFloat64Array]、[PackedStringArray]、[PackedVector2Array]、" "[PackedVector3Array]、[PackedVector4Array] 和 [PackedColorArray]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns [code]true[/code] if [param x] is zero or almost zero. The " "comparison is done using a tolerance calculation with a small internal " "epsilon.\n" "This function is faster than using [method is_equal_approx] with one value " "as zero." msgstr "" "如果 [param x] 为零或几乎为零,则返回 [code]true[/code]。比较是使用具有小内" "部 epsilon 的公差计算的。\n" "该函数比使用一个值为零的 [method is_equal_approx] 更快。" #: doc/classes/@GlobalScope.xml msgid "" "Linearly interpolates between two values by the factor defined in [param " "weight]. To perform interpolation, [param weight] should be between " "[code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside " "this range are allowed and can be used to perform [i]extrapolation[/i]. If " "this is not desired, use [method clampf] to limit [param weight].\n" "Both [param from] and [param to] must be the same type. Supported types: " "[int], [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], " "[Basis], [Transform2D], [Transform3D].\n" "[codeblock]\n" "lerp(0, 4, 0.75) # Returns 3.0\n" "[/codeblock]\n" "See also [method inverse_lerp] which performs the reverse of this operation. " "To perform eased interpolation with [method lerp], combine it with [method " "ease] or [method smoothstep]. See also [method remap] to map a continuous " "series of values to another.\n" "[b]Note:[/b] For better type safety, use [method lerpf], [method " "Vector2.lerp], [method Vector3.lerp], [method Vector4.lerp], [method " "Color.lerp], [method Quaternion.slerp], [method Basis.slerp], [method " "Transform2D.interpolate_with], or [method Transform3D.interpolate_with]." msgstr "" "通过 [param weight] 中定义的因子在两个值之间进行线性插值。要执行插值,[param " "weight] 应介于 [code]0.0[/code] 和 [code]1.0[/code] 之间(包含)。但是,超出" "此范围的值也是允许的,并可用于执行[i]外推[/i]。如果不需要,请在使用 [method " "clampf] 限制 [param weight]。\n" "[param from] 和 [param to] 必须是同一类型。支持的类型:[int]、[float]、" "[Vector2]、[Vector3]、[Vector4]、[Color]、[Quaternion]、[Basis]、" "[Transform2D]、[Transform3D]。\n" "[codeblock]\n" "lerp(0, 4, 0.75) # 返回 3.0\n" "[/codeblock]\n" "另见执行本操作的逆操作的 [method inverse_lerp]。要使用 [method lerp] 执行缓动" "插值,请将其与 [method ease] 或 [method smoothstep] 结合使用。另见 [method " "remap],可将一系列连续的值映射到另一个值。\n" "[b]注意:[/b]为了更好的类型安全,请使用 [method lerpf]、[method " "Vector2.lerp]、[method Vector3.lerp]、[method Vector4.lerp]、[method " "Color.lerp]、[method Quaternion.slerp]、[method Basis.slerp]、[method " "Transform2D.interpolate_with] 或 [method Transform3D.interpolate_with]。" #: doc/classes/@GlobalScope.xml msgid "" "Linearly interpolates between two angles (in radians) by a [param weight] " "value between 0.0 and 1.0.\n" "Similar to [method lerp], but interpolates correctly when the angles wrap " "around [constant @GDScript.TAU]. To perform eased interpolation with [method " "lerp_angle], combine it with [method ease] or [method smoothstep].\n" "[codeblock]\n" "extends Sprite\n" "var elapsed = 0.0\n" "func _process(delta):\n" "\tvar min_angle = deg_to_rad(0.0)\n" "\tvar max_angle = deg_to_rad(90.0)\n" "\trotation = lerp_angle(min_angle, max_angle, elapsed)\n" "\telapsed += delta\n" "[/codeblock]\n" "[b]Note:[/b] This function lerps through the shortest path between [param " "from] and [param to]. However, when these two angles are approximately " "[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " "obvious which way they lerp due to floating-point precision errors. For " "example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " "while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "通过 0.0 和 1.0 之间的 [param weight] 值,在两个角度(以弧度为单位)之间进行" "线性插值。\n" "类似于 [method lerp],但当角度环绕 [constant @GDScript.TAU] 时会正确插值。要" "使用 [method lerp_angle] 执行缓动插值,请将其与 [method ease] 或 [method " "smoothstep] 结合使用。\n" "[codeblock]\n" "extends Sprite\n" "var elapsed = 0.0\n" "func _process(delta):\n" "\tvar min_angle = deg_to_rad(0.0)\n" "\tvar max_angle = deg_to_rad(90.0)\n" "\trotation = lerp_angle(min_angle, max_angle, elapsed)\n" "\telapsed += delta\n" "[/codeblock]\n" "[b]注意:[/b]该函数通过 [param from] 和 [param to] 之间的最短路径进行插值。然" "而,当这两个角度相距大致 [code]PI + k * TAU[/code] 其中 [code]k[/code] 为任意" "整数时,由于浮点数精度误差的缘故,要对插值的方向进行判断是很难的。例如," "[code]lerp_angle(0, PI, weight)[/code] 会逆时针插值,而 [code]lerp_angle(0, " "PI + 5 * TAU, weight)[/code] 则会顺时针插值。" #: doc/classes/@GlobalScope.xml msgid "" "Linearly interpolates between two values by the factor defined in [param " "weight]. To perform interpolation, [param weight] should be between " "[code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside " "this range are allowed and can be used to perform [i]extrapolation[/i]. If " "this is not desired, use [method clampf] on the result of this function.\n" "[codeblock]\n" "lerpf(0, 4, 0.75) # Returns 3.0\n" "[/codeblock]\n" "See also [method inverse_lerp] which performs the reverse of this operation. " "To perform eased interpolation with [method lerp], combine it with [method " "ease] or [method smoothstep]." msgstr "" "通过 [param weight] 中定义的因子在两个值之间进行线性插值。要执行插值,[param " "weight] 应介于 [code]0.0[/code] 和 [code]1.0[/code] 之间(包含)。但是,超出" "此范围的值是允许的,并可用于执行 [i]外推[/i]。如果不需要,请对此函数的结果使" "用 [method clampf]。\n" "[codeblock]\n" "lerpf(0, 4, 0.75) # 返回 3.0\n" "[/codeblock]\n" "另见执行本操作的逆运算的 [method inverse_lerp]。要使用 [method lerp] 执行缓动" "插值,请将其与 [method ease] 或 [method smoothstep] 结合使用。" #: doc/classes/@GlobalScope.xml msgid "" "Converts from linear energy to decibels (audio). Since volume is not " "normally linear, this can be used to implement volume sliders that behave as " "expected.\n" "[b]Example:[/b] Change the Master bus's volume through a [Slider] node, " "which ranges from [code]0.0[/code] to [code]1.0[/code]:\n" "[codeblock]\n" "AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"Master\"), " "linear_to_db($Slider.value))\n" "[/codeblock]" msgstr "" "从线性能量转换为分贝(音频)。由于音量通常不是线性的,可以用于实现符合预期的" "音量滑块。\n" "[b]示例:[/b]通过 [Slider] 节点在 [code]0.0[/code] 到 [code]1.0[/code] 的范围" "内修改 Master 总线的音量:\n" "[codeblock]\n" "AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"Master\"), " "linear_to_db($Slider.value))\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the [url=https://en.wikipedia.org/wiki/Natural_logarithm]natural " "logarithm[/url] of [param x] (base [url=https://en.wikipedia.org/wiki/" "E_(mathematical_constant)][i]e[/i][/url], with [i]e[/i] being approximately " "2.71828). This is the amount of time needed to reach a certain level of " "continuous growth.\n" "[b]Note:[/b] This is not the same as the \"log\" function on most " "calculators, which uses a base 10 logarithm. To use base 10 logarithm, use " "[code]log(x) / log(10)[/code].\n" "[codeblock]\n" "log(10) # Returns 2.302585\n" "[/codeblock]\n" "[b]Note:[/b] The logarithm of [code]0[/code] returns [code]-inf[/code], " "while negative values return [code]-nan[/code]." msgstr "" "返回 [param x] 的[url=https://zh.wikipedia.org/zh-cn/" "%E8%87%AA%E7%84%B6%E5%B0%8D%E6%95%B8]自然对数[/url](底数为 [url=https://" "zh.wikipedia.org/zh-cn/E_(%E6%95%B0%E5%AD%A6%E5%B8%B8%E6%95%B0)][i]e[/i][/" "url],[i]e[/i] 约为 2.71828)。这是持续增长到一定程度所需的时间。\n" "[b]注意:[/b]这个函数与大多数计算器上的对数“log”函数不同,他们适用的底数是 " "10。要使用底数为 10 的对数,请使用 [code]log(x) / log(10)[/code]。\n" "[codeblock]\n" "log(10) # 返回 2.302585\n" "[/codeblock]\n" "[b]注意:[/b][code]0[/code] 的对数返回 [code]-inf[/code],负值返回 [code]-" "nan[/code]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the maximum of the given numeric values. This function can take any " "number of arguments.\n" "[codeblock]\n" "max(1, 7, 3, -6, 5) # Returns 7\n" "[/codeblock]\n" "[b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-" "wise maximum, and will pick the largest value when compared using [code]x < " "y[/code]. To perform component-wise maximum, use [method Vector2.max], " "[method Vector2i.max], [method Vector3.max], [method Vector3i.max], [method " "Vector4.max], and [method Vector4i.max]." msgstr "" "返回给定数值中的最大值。该函数可以接受任意数量的参数。\n" "[codeblock]\n" "max(1, 7, 3, -6, 5) # 返回 7\n" "[/codeblock]\n" "[b]注意:[/b]对向量使用时[i]不会[/i]针对分量求最大值,选取最大值时只会使用 " "[code]x < y[/code] 进行比较。要求分量中的最大值,请使用 [method " "Vector2.min]、[method Vector2i.min]、[method Vector3.min]、[method " "Vector3i.min]、[method Vector4.min]、[method Vector4i.min]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the maximum of two [float] values.\n" "[codeblock]\n" "maxf(3.6, 24) # Returns 24.0\n" "maxf(-3.99, -4) # Returns -3.99\n" "[/codeblock]" msgstr "" "返回两个 [float] 值中的最大值。\n" "[codeblock]\n" "maxf(3.6, 24) # 返回 24.0\n" "maxf(-3.99, -4) # 返回 -3.99\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the maximum of two [int] values.\n" "[codeblock]\n" "maxi(1, 2) # Returns 2\n" "maxi(-3, -4) # Returns -3\n" "[/codeblock]" msgstr "" "返回两个 [int] 值中的最大值。\n" "[codeblock]\n" "maxi(1, 2) # 返回 2\n" "maxi(-3, -4) # 返回 -3\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the minimum of the given numeric values. This function can take any " "number of arguments.\n" "[codeblock]\n" "min(1, 7, 3, -6, 5) # Returns -6\n" "[/codeblock]\n" "[b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-" "wise minimum, and will pick the smallest value when compared using [code]x < " "y[/code]. To perform component-wise minimum, use [method Vector2.min], " "[method Vector2i.min], [method Vector3.min], [method Vector3i.min], [method " "Vector4.min], and [method Vector4i.min]." msgstr "" "返回给定数值中的最小值。该函数可以接受任意数量的参数。\n" "[codeblock]\n" "min(1, 7, 3, -6, 5) # 返回 -6\n" "[/codeblock]\n" "[b]注意:[/b]对向量使用时[i]不会[/i]针对分量求最小值,选取最小值时只会使用 " "[code]x < y[/code] 进行比较。要求分量中的最小值,请使用 [method " "Vector2.min]、[method Vector2i.min]、[method Vector3.min]、[method " "Vector3i.min]、[method Vector4.min]、[method Vector4i.min]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the minimum of two [float] values.\n" "[codeblock]\n" "minf(3.6, 24) # Returns 3.6\n" "minf(-3.99, -4) # Returns -4.0\n" "[/codeblock]" msgstr "" "返回两个 [float] 值中的最小值。\n" "[codeblock]\n" "minf(3.6, 24) # 返回 3.6\n" "minf(-3.99, -4) # 返回 -4.0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the minimum of two [int] values.\n" "[codeblock]\n" "mini(1, 2) # Returns 1\n" "mini(-3, -4) # Returns -4\n" "[/codeblock]" msgstr "" "返回两个 [int] 值中的最小值。\n" "[codeblock]\n" "mini(1, 2) # 返回 1\n" "mini(-3, -4) # 返回 -4\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Moves [param from] toward [param to] by the [param delta] amount. Will not " "go past [param to].\n" "Use a negative [param delta] value to move away.\n" "[codeblock]\n" "move_toward(5, 10, 4) # Returns 9\n" "move_toward(10, 5, 4) # Returns 6\n" "move_toward(5, 10, 9) # Returns 10\n" "move_toward(10, 5, -1.5) # Returns 11.5\n" "[/codeblock]" msgstr "" "将 [param from] 向 [param to] 移动,移动的长度是 [param delta]。不会超过 " "[param to]。\n" "使用负的 [param delta] 值则向远离的方向移动。\n" "[codeblock]\n" "move_toward(5, 10, 4) # Returns 9\n" "move_toward(10, 5, 4) # Returns 6\n" "move_toward(5, 10, 9) # Returns 10\n" "move_toward(10, 5, -1.5) # Returns 11.5\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the smallest integer power of 2 that is greater than or equal to " "[param value].\n" "[codeblock]\n" "nearest_po2(3) # Returns 4\n" "nearest_po2(4) # Returns 4\n" "nearest_po2(5) # Returns 8\n" "\n" "nearest_po2(0) # Returns 0 (this may not be expected)\n" "nearest_po2(-1) # Returns 0 (this may not be expected)\n" "[/codeblock]\n" "[b]Warning:[/b] Due to its implementation, this method returns [code]0[/" "code] rather than [code]1[/code] for values less than or equal to [code]0[/" "code], with an exception for [param value] being the smallest negative 64-" "bit integer ([code]-9223372036854775808[/code]) in which case the [param " "value] is returned unchanged." msgstr "" "返回大于等于 [param value] 的最小的 2 的幂。\n" "[codeblock]\n" "nearest_po2(3) # 返回 4\n" "nearest_po2(4) # 返回 4\n" "nearest_po2(5) # 返回 8\n" "\n" "nearest_po2(0) # 返回 0(可能出乎意料)\n" "nearest_po2(-1) # 返回 0(可能出乎意料)\n" "[/codeblock]\n" "[b]警告:[/b]由于其实现方式,该函数会对小于等于 [code]0[/code] 的值返回 " "[code]0[/code] 而不是 [code]1[/code],例外是 [param value] 为最小的负 64 位整" "数([code]-9223372036854775808[/code])时,会将 [param value] 原样返回。" #: doc/classes/@GlobalScope.xml msgid "" "Wraps [param value] between [code]0[/code] and the [param length]. If the " "limit is reached, the next value the function returns is decreased to the " "[code]0[/code] side or increased to the [param length] side (like a triangle " "wave). If [param length] is less than zero, it becomes positive.\n" "[codeblock]\n" "pingpong(-3.0, 3.0) # Returns 3.0\n" "pingpong(-2.0, 3.0) # Returns 2.0\n" "pingpong(-1.0, 3.0) # Returns 1.0\n" "pingpong(0.0, 3.0) # Returns 0.0\n" "pingpong(1.0, 3.0) # Returns 1.0\n" "pingpong(2.0, 3.0) # Returns 2.0\n" "pingpong(3.0, 3.0) # Returns 3.0\n" "pingpong(4.0, 3.0) # Returns 2.0\n" "pingpong(5.0, 3.0) # Returns 1.0\n" "pingpong(6.0, 3.0) # Returns 0.0\n" "[/codeblock]" msgstr "" "将 [param value] 包裹在 [code]0[/code] 和 [param length] 之间。如果达到限制," "函数返回的下一个值将减少到 [code]0[/code] 侧或增加到 [param length] 侧(像三" "角波)。如果 [param length] 小于零,则变为正数。\n" "[codeblock]\n" "pingpong(-3.0, 3.0) # 返回 3.0\n" "pingpong(-2.0, 3.0) # 返回 2.0\n" "pingpong(-1.0, 3.0) # 返回 1.0\n" "pingpong(0.0, 3.0) # 返回 0.0\n" "pingpong(1.0, 3.0) # 返回 1.0\n" "pingpong(2.0, 3.0) # 返回 2.0\n" "pingpong(3.0, 3.0) # 返回 3.0\n" "pingpong(4.0, 3.0) # 返回 2.0\n" "pingpong(5.0, 3.0) # 返回 1.0\n" "pingpong(6.0, 3.0) # 返回 0.0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the integer modulus of [param x] divided by [param y] that wraps " "equally in positive and negative.\n" "[codeblock]\n" "print(\"#(i) (i % 3) (posmod(i, 3))\")\n" "for i in range(-3, 4):\n" "\tprint(\"%2d %2d | %2d\" % [i, i % 3, posmod(i, 3)])\n" "[/codeblock]\n" "Prints:\n" "[codeblock lang=text]\n" "(i) (i % 3) (posmod(i, 3))\n" "-3 0 | 0\n" "-2 -2 | 1\n" "-1 -1 | 2\n" " 0 0 | 0\n" " 1 1 | 1\n" " 2 2 | 2\n" " 3 0 | 0\n" "[/codeblock]" msgstr "" "返回 [param x] 除以 [param y] 的整数模数,对正负数进行一致的循环。\n" "[codeblock]\n" "print(\"#(i) (i % 3) (posmod(i, 3))\")\n" "for i in range(-3, 4):\n" "\tprint(\"%2d %2d | %2d\" % [i, i % 3, posmod(i, 3)])\n" "[/codeblock]\n" "结果:\n" "[codeblock lang=text]\n" "(i) (i % 3) (posmod(i, 3))\n" "-3 0 | 0\n" "-2 -2 | 1\n" "-1 -1 | 2\n" " 0 0 | 0\n" " 1 1 | 1\n" " 2 2 | 2\n" " 3 0 | 0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the result of [param base] raised to the power of [param exp].\n" "In GDScript, this is the equivalent of the [code]**[/code] operator.\n" "[codeblock]\n" "pow(2, 5) # Returns 32.0\n" "pow(4, 1.5) # Returns 8.0\n" "[/codeblock]" msgstr "" "返回 [param base] 的 [param exp] 次幂的结果。\n" "在 GDScript 中,这相当于 [code]**[/code] 运算符。\n" "[codeblock]\n" "pow(2, 5) # 返回 32.0\n" "pow(4, 1.5) # 返回 8.0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Converts one or more arguments of any type to string in the best way " "possible and prints them to the console.\n" "[codeblocks]\n" "[gdscript]\n" "var a = [1, 2, 3]\n" "print(\"a\", \"b\", a) # Prints \"ab[1, 2, 3]\"\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array a = [1, 2, 3];\n" "GD.Print(\"a\", \"b\", a); // Prints \"ab[1, 2, 3]\"\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] Consider using [method push_error] and [method push_warning] to " "print error and warning messages instead of [method print] or [method " "print_rich]. This distinguishes them from print messages used for debugging " "purposes, while also displaying a stack trace when an error or warning is " "printed. See also [member Engine.print_to_stdout] and [member " "ProjectSettings.application/run/disable_stdout]." msgstr "" "以尽可能最佳的方式将一个或多个任意类型的参数转换为字符串,并将其打印到控制" "台。\n" "[codeblocks]\n" "[gdscript]\n" "var a = [1, 2, 3]\n" "print(\"a\", \"b\", a) # 输出“ab[1, 2, 3]”\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array a = [1, 2, 3];\n" "GD.Print(\"a\", \"b\", a); // 输出“ab[1, 2, 3]”\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]请考虑使用 [method push_error] 和 [method push_warning] 来打印错" "误和警告消息,而不是 [method print] 或 [method print_rich]。这将它们与用于调" "试目的的打印消息区分开来,同时还会在打印错误或警告时显示堆栈跟踪。另见 " "[member Engine.print_to_stdout] 和 [member ProjectSettings.application/run/" "disable_stdout]。" #: doc/classes/@GlobalScope.xml msgid "" "Converts one or more arguments of any type to string in the best way " "possible and prints them to the console.\n" "The following BBCode tags are supported: [code]b[/code], [code]i[/code], " "[code]u[/code], [code]s[/code], [code]indent[/code], [code]code[/code], " "[code]url[/code], [code]center[/code], [code]right[/code], [code]color[/" "code], [code]bgcolor[/code], [code]fgcolor[/code].\n" "URL tags only support URLs wrapped by a URL tag, not URLs with a different " "title.\n" "When printing to standard output, the supported subset of BBCode is " "converted to ANSI escape codes for the terminal emulator to display. Support " "for ANSI escape codes varies across terminal emulators, especially for " "italic and strikethrough. In standard output, [code]code[/code] is " "represented with faint text but without any font change. Unsupported tags " "are left as-is in standard output.\n" "[codeblocks]\n" "[gdscript skip-lint]\n" "print_rich(\"[color=green][b]Hello world![/b][/color]\") # Prints \"Hello " "world!\", in green with a bold font.\n" "[/gdscript]\n" "[csharp skip-lint]\n" "GD.PrintRich(\"[color=green][b]Hello world![/b][/color]\"); // Prints " "\"Hello world!\", in green with a bold font.\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] Consider using [method push_error] and [method push_warning] to " "print error and warning messages instead of [method print] or [method " "print_rich]. This distinguishes them from print messages used for debugging " "purposes, while also displaying a stack trace when an error or warning is " "printed.\n" "[b]Note:[/b] Output displayed in the editor supports clickable [code skip-" "lint][url=address]text[/url][/code] tags. The [code skip-lint][url][/code] " "tag's [code]address[/code] value is handled by [method OS.shell_open] when " "clicked." msgstr "" "以尽可能最佳的方式将一个或多个任意类型的参数转换为字符串,并将其打印到控制" "台。\n" "支持以下 BBCode 标签: [code]b[/code]、[code]i[/code]、[code]u[/code]、" "[code]s[/code]、[code]indent[/code]、[code]code[/code]、[code]url[/code]、" "[code]center[/code]、[code]right[/code]、[code]color[/code]、[code]bgcolor[/" "code]、[code]fgcolor[/code]。\n" "URL 标签仅支持在 URL 标签中包含 URL,不支持使用不同标题的 URL。\n" "当打印到标准输出时,支持的 BBCode 子集被转换为 ANSI 转义码以供终端仿真器显" "示。对 ANSI 转义码的支持可能因终端仿真器而异,尤其是斜体和删除线。在标准输出" "中,[code]code[/code] 会使用较弱的文本表示,但字体不变。不支持的标签在标准输" "出中会原样保留。\n" "[codeblocks]\n" "[gdscript skip-lint]\n" "print_rich(\"[color=green][b]Hello world![/b][/color]\") # 输出“Hello " "world!”,使用绿色的粗体。\n" "[/gdscript]\n" "[csharp skip-lint]\n" "GD.PrintRich(\"[color=green][b]Hello world![/b][/color]\"); // 输出“Hello " "world!”,使用绿色的粗体。\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]请考虑使用 [method push_error] 和 [method push_warning] 来打印错" "误和警告消息,而不是 [method print] 或 [method print_rich]。这将它们与用于调" "试目的的打印消息区分开来,同时还会在打印错误或警告时显示堆栈跟踪。\n" "[b]注意:[/b]在编辑器中显示的输出支持可点击的 [code skip-lint][url=address]文" "本[/url][/code] 标签。点击时, [code skip-lint][url][/code] 标签的 " "[code]address[/code] 值由 [method OS.shell_open] 处理。" #: doc/classes/@GlobalScope.xml msgid "" "If verbose mode is enabled ([method OS.is_stdout_verbose] returning " "[code]true[/code]), converts one or more arguments of any type to string in " "the best way possible and prints them to the console." msgstr "" "如果启用了详细模式([method OS.is_stdout_verbose] 返回 [code]true[/code])," "则尽可能以最佳方式将一个或多个任意类型的参数转换为字符串,并将它们打印到控制" "台。" #: doc/classes/@GlobalScope.xml msgid "" "Prints one or more arguments to strings in the best way possible to standard " "error line.\n" "[codeblocks]\n" "[gdscript]\n" "printerr(\"prints to stderr\")\n" "[/gdscript]\n" "[csharp]\n" "GD.PrintErr(\"prints to stderr\");\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "以尽可能最佳的方式将一个或多个参数作为字符串输出到标准错误行。\n" "[codeblocks]\n" "[gdscript]\n" "printerr(\"prints to stderr\")\n" "[/gdscript]\n" "[csharp]\n" "GD.PrintErr(\"prints to stderr\");\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Prints one or more arguments to strings in the best way possible to the OS " "terminal. Unlike [method print], no newline is automatically added at the " "end.\n" "[b]Note:[/b] The OS terminal is [i]not[/i] the same as the editor's Output " "dock. The output sent to the OS terminal can be seen when running Godot from " "a terminal. On Windows, this requires using the [code]console.exe[/code] " "executable.\n" "[codeblocks]\n" "[gdscript]\n" "# Prints \"ABC\" to terminal.\n" "printraw(\"A\")\n" "printraw(\"B\")\n" "printraw(\"C\")\n" "[/gdscript]\n" "[csharp]\n" "// Prints \"ABC\" to terminal.\n" "GD.PrintRaw(\"A\");\n" "GD.PrintRaw(\"B\");\n" "GD.PrintRaw(\"C\");\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "以尽可能最佳的方式将一个或多个参数作为字符串输出到操作系统终端。与 [method " "print] 不同的是,最后不会自动添加换行符。\n" "[b]注意:[/b]操作系统终端与编辑器的“输出”面板[i]不同[/i]。从终端运行 Godot 时" "可以看到发送至操作系统终端的输出。在 Windows 上,需要用到 [code]console.exe[/" "code] 可执行文件。\n" "[codeblocks]\n" "[gdscript]\n" "# 输出“ABC”到终端\n" "printraw(\"A\")\n" "printraw(\"B\")\n" "printraw(\"C\")\n" "[/gdscript]\n" "[csharp]\n" "// 输出“ABC”到终端\n" "GD.PrintRaw(\"A\");\n" "GD.PrintRaw(\"B\");\n" "GD.PrintRaw(\"C\");\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Prints one or more arguments to the console with a space between each " "argument.\n" "[codeblocks]\n" "[gdscript]\n" "prints(\"A\", \"B\", \"C\") # Prints \"A B C\"\n" "[/gdscript]\n" "[csharp]\n" "GD.PrintS(\"A\", \"B\", \"C\"); // Prints \"A B C\"\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "将一个或多个参数打印到控制台,每个参数之间有一个空格。\n" "[codeblocks]\n" "[gdscript]\n" "prints(\"A\", \"B\", \"C\") # 输出“A B C”\n" "[/gdscript]\n" "[csharp]\n" "GD.PrintS(\"A\", \"B\", \"C\"); // 输出“A B C”\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Prints one or more arguments to the console with a tab between each " "argument.\n" "[codeblocks]\n" "[gdscript]\n" "printt(\"A\", \"B\", \"C\") # Prints \"A B C\"\n" "[/gdscript]\n" "[csharp]\n" "GD.PrintT(\"A\", \"B\", \"C\"); // Prints \"A B C\"\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "将一个或多个参数打印到控制台,每个参数之间有一个制表符。\n" "[codeblocks]\n" "[gdscript]\n" "printt(\"A\", \"B\", \"C\") # 输出“A B C”\n" "[/gdscript]\n" "[csharp]\n" "GD.PrintT(\"A\", \"B\", \"C\"); // 输出“A B C”\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Pushes an error message to Godot's built-in debugger and to the OS " "terminal.\n" "[codeblocks]\n" "[gdscript]\n" "push_error(\"test error\") # Prints \"test error\" to debugger and terminal " "as an error.\n" "[/gdscript]\n" "[csharp]\n" "GD.PushError(\"test error\"); // Prints \"test error\" to debugger and " "terminal as an error.\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] This function does not pause project execution. To print an " "error message and pause project execution in debug builds, use " "[code]assert(false, \"test error\")[/code] instead." msgstr "" "将错误消息推送到 Godot 的内置调试器和操作系统终端。\n" "[codeblocks]\n" "[gdscript]\n" "push_error(\"test error\") # 向调试器和终端打印“test error”作为错误。\n" "[/gdscript]\n" "[csharp]\n" "GD.PushError(\"test error\"); // 向调试器和终端打印“test error”作为错误。\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]该函数不会暂停项目执行。要在调试版本中打印错误消息并暂停项目执" "行,请改用 [code]assert(false, \"test error\")[/code]。" #: doc/classes/@GlobalScope.xml msgid "" "Pushes a warning message to Godot's built-in debugger and to the OS " "terminal.\n" "[codeblocks]\n" "[gdscript]\n" "push_warning(\"test warning\") # Prints \"test warning\" to debugger and " "terminal as a warning.\n" "[/gdscript]\n" "[csharp]\n" "GD.PushWarning(\"test warning\"); // Prints \"test warning\" to debugger and " "terminal as a warning.\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "将警告消息推送到 Godot 的内置调试器和操作系统终端。\n" "[codeblocks]\n" "[gdscript]\n" "push_warning(\"test warning\") # 以警告的形式向调试器和终端输出“test " "warning”。\n" "[/gdscript]\n" "[csharp]\n" "GD.PushWarning(\"test warning\"); // 以警告的形式向调试器和终端输出“test " "warning”。\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Converts an angle expressed in radians to degrees.\n" "[codeblock]\n" "rad_to_deg(0.523599) # Returns 30\n" "rad_to_deg(PI) # Returns 180\n" "rad_to_deg(PI * 2) # Returns 360\n" "[/codeblock]" msgstr "" "将以弧度表示的角度转换为度。\n" "[codeblock]\n" "rad_to_deg(0.523599) # 返回 30\n" "rad_to_deg(PI) # 返回 180\n" "rad_to_deg(PI * 2) # 返回 360\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Given a [param seed], returns a [PackedInt64Array] of size [code]2[/code], " "where its first element is the randomized [int] value, and the second " "element is the same as [param seed]. Passing the same [param seed] " "consistently returns the same array.\n" "[b]Note:[/b] \"Seed\" here refers to the internal state of the pseudo random " "number generator, currently implemented as a 64 bit integer.\n" "[codeblock]\n" "var a = rand_from_seed(4)\n" "\n" "print(a[0]) # Prints 2879024997\n" "print(a[1]) # Prints 4\n" "[/codeblock]" msgstr "" "给定一个 [param seed],返回一个大小为 [code]2[/code] 的 [PackedInt64Array]," "其中第一个元素是随机化的 [int] 值,第二个元素与 [param seed] 相同。传入相同" "的 [param seed] 会一致地返回相同的数组。\n" "[b]注意:[/b]这里的“种子”是指伪随机数发生器的内部状态,目前实现为一个 64 位整" "数。\n" "[codeblock]\n" "var a = rand_from_seed(4)\n" "\n" "print(a[0]) # 输出 2879024997\n" "print(a[1]) # 输出 4\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns a random floating-point value between [code]0.0[/code] and " "[code]1.0[/code] (inclusive).\n" "[codeblocks]\n" "[gdscript]\n" "randf() # Returns e.g. 0.375671\n" "[/gdscript]\n" "[csharp]\n" "GD.Randf(); // Returns e.g. 0.375671\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回 [code]0.0[/code] 和 [code]1.0[/code](包含)之间的随机浮点值。\n" "[codeblocks]\n" "[gdscript]\n" "randf() # 返回示例 0.375671\n" "[/gdscript]\n" "[csharp]\n" "GD.Randf(); // 返回示例 0.375671\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Returns a random floating-point value between [param from] and [param to] " "(inclusive).\n" "[codeblocks]\n" "[gdscript]\n" "randf_range(0, 20.5) # Returns e.g. 7.45315\n" "randf_range(-10, 10) # Returns e.g. -3.844535\n" "[/gdscript]\n" "[csharp]\n" "GD.RandRange(0.0, 20.5); // Returns e.g. 7.45315\n" "GD.RandRange(-10.0, 10.0); // Returns e.g. -3.844535\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回 [param from] 和 [param to](包含)之间的随机浮点值。\n" "[codeblocks]\n" "[gdscript]\n" "randf_range(0, 20.5) # 返回示例 7.45315\n" "randf_range(-10, 10) # 返回示例 -3.844535\n" "[/gdscript]\n" "[csharp]\n" "GD.RandRange(0.0, 20.5); // 返回示例 7.45315\n" "GD.RandRange(-10.0, 10.0); // 返回示例 -3.844535\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-" "distributed[/url], pseudo-random floating-point value from the specified " "[param mean] and a standard [param deviation]. This is also known as a " "Gaussian distribution.\n" "[b]Note:[/b] This method uses the [url=https://en.wikipedia.org/wiki/" "Box%E2%80%93Muller_transform]Box-Muller transform[/url] algorithm." msgstr "" "返回一个[url=https://en.wikipedia.org/wiki/Normal_distribution]正态分布[/url]" "的伪随机数,该正态分布具有指定 [param mean] 和标准 [param deviation]。这也被" "称为高斯分布。\n" "[b]注意:[/b]该方法使用 [url=https://en.wikipedia.org/wiki/" "Box%E2%80%93Muller_transform]Box-Muller 变换[/url]算法。" #: doc/classes/@GlobalScope.xml msgid "" "Returns a random unsigned 32-bit integer. Use remainder to obtain a random " "value in the interval [code][0, N - 1][/code] (where N is smaller than " "2^32).\n" "[codeblocks]\n" "[gdscript]\n" "randi() # Returns random integer between 0 and 2^32 - 1\n" "randi() % 20 # Returns random integer between 0 and 19\n" "randi() % 100 # Returns random integer between 0 and 99\n" "randi() % 100 + 1 # Returns random integer between 1 and 100\n" "[/gdscript]\n" "[csharp]\n" "GD.Randi(); // Returns random integer between 0 and 2^32 - 1\n" "GD.Randi() % 20; // Returns random integer between 0 and 19\n" "GD.Randi() % 100; // Returns random integer between 0 and 99\n" "GD.Randi() % 100 + 1; // Returns random integer between 1 and 100\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回一个随机的无符号 32 位整数。使用余数获得区间 [code][0, N - 1][/code] (其" "中 N 小于 2^32)的随机值。\n" "[codeblocks]\n" "[gdscript]\n" "randi() # 返回介于 0 到 2^32 - 1 之间的随机整数\n" "randi() % 20 # 返回介于 0 到 19之间的随机整数\n" "randi() % 100 # 返回介于 0 到 99 之间的随机整数\n" "randi() % 100 + 1 # 返回介于 1 到 100 之间的随机整数\n" "[/gdscript]\n" "[csharp]\n" "GD.Randi(); // 返回介于 0 到 2^32 - 1 之间的随机整数\n" "GD.Randi() % 20; // 返回介于 0 到 19之间的随机整数\n" "GD.Randi() % 100; // 返回介于 0 到 99 之间的随机整数\n" "GD.Randi() % 100 + 1; // 返回介于 1 到 100 之间的随机整数\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Returns a random signed 32-bit integer between [param from] and [param to] " "(inclusive). If [param to] is lesser than [param from], they are swapped.\n" "[codeblocks]\n" "[gdscript]\n" "randi_range(0, 1) # Returns either 0 or 1\n" "randi_range(-10, 1000) # Returns random integer between -10 and 1000\n" "[/gdscript]\n" "[csharp]\n" "GD.RandRange(0, 1); // Returns either 0 or 1\n" "GD.RandRange(-10, 1000); // Returns random integer between -10 and 1000\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回介于 [param from] 和 [param to](包含)之间的一个随机有符号 32 位整数。如" "果 [param to] 小于 [param from],则它们将被交换。\n" "[codeblocks]\n" "[gdscript]\n" "randi_range(0, 1) # 返回 0 或 1\n" "randi_range(-10, 1000) # 返回介于 -10 和 1000 之间的随机整数\n" "[/gdscript]\n" "[csharp]\n" "GD.RandRange(0, 1); // 返回 0 或 1\n" "GD.RandRange(-10, 1000); // 返回介于 -10 和 1000 之间的随机整数\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Randomizes the seed (or the internal state) of the random number generator. " "The current implementation uses a number based on the device's time.\n" "[b]Note:[/b] This function is called automatically when the project is run. " "If you need to fix the seed to have consistent, reproducible results, use " "[method seed] to initialize the random number generator." msgstr "" "随机化随机数发生器的种子(或内部状态)。目前的实现使用一个基于设备时间的数" "字。\n" "[b]注意:[/b]该函数在项目运行时自动被调用。如果需要修复种子以获得一致、可重现" "的结果,请使用 [method seed] 来初始化随机数生成器。" #: doc/classes/@GlobalScope.xml msgid "" "Maps a [param value] from range [code][istart, istop][/code] to [code]" "[ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If " "[param value] is outside [code][istart, istop][/code], then the resulting " "value will also be outside [code][ostart, ostop][/code]. If this is not " "desired, use [method clamp] on the result of this function.\n" "[codeblock]\n" "remap(75, 0, 100, -1, 1) # Returns 0.5\n" "[/codeblock]\n" "For complex use cases where multiple ranges are needed, consider using " "[Curve] or [Gradient] instead.\n" "[b]Note:[/b] If [code]istart == istop[/code], the return value is undefined " "(most likely NaN, INF, or -INF)." msgstr "" "将 [param value] 从范围 [code][istart, istop][/code] 映射到 [code][ostart, " "ostop][/code]。另见 [method lerp] 和 [method inverse_lerp]。如果 [param " "value] 在 [code][istart, istop][/code] 之外,那么结果值也将在 [code][ostart, " "ostop][/code] 之外。如果不希望这样,请对该函数的结果使用 [method clamp]。\n" "[codeblock]\n" "remap(75, 0, 100, -1, 1) # 返回 0.5\n" "[/codeblock]\n" "对于需要多个范围的复杂用例,请考虑改用 [Curve] 或 [Gradient]。\n" "[b]注意:[/b]如果 [code]istart == istop[/code],则返回值未定义(很可能是 " "NaN、INF 或 -INF)。" #: doc/classes/@GlobalScope.xml msgid "" "Allocates a unique ID which can be used by the implementation to construct " "an RID. This is used mainly from native extensions to implement servers." msgstr "" "分配一个唯一 ID,实现方可以用它来构造 RID。主要由原生扩展使用,用于实现服务" "器。" #: doc/classes/@GlobalScope.xml msgid "" "Creates an RID from a [param base]. This is used mainly from native " "extensions to build servers." msgstr "从 [param base] 创建一个 RID。主要由原生扩展使用,用于构建服务器。" #: doc/classes/@GlobalScope.xml msgid "" "Rotates [param from] toward [param to] by the [param delta] amount. Will not " "go past [param to].\n" "Similar to [method move_toward], but interpolates correctly when the angles " "wrap around [constant @GDScript.TAU].\n" "If [param delta] is negative, this function will rotate away from [param " "to], toward the opposite angle, and will not go past the opposite angle." msgstr "" "将 [param from] 朝 [param to] 旋转,旋转的量为 [param delta]。不会越过 " "[param to]。\n" "与 [method move_toward] 类似,但是能够让夹角正确绕过 [constant " "@GDScript.TAU]。\n" "如果 [param delta] 为负,则该函数会进行远离 [param to] 的旋转,朝向相反的角" "度,但不会越过该角度。" #: doc/classes/@GlobalScope.xml msgid "" "Rounds [param x] to the nearest whole number, with halfway cases rounded " "away from 0. Supported types: [int], [float], [Vector2], [Vector2i], " "[Vector3], [Vector3i], [Vector4], [Vector4i].\n" "[codeblock]\n" "round(2.4) # Returns 2\n" "round(2.5) # Returns 3\n" "round(2.6) # Returns 3\n" "[/codeblock]\n" "See also [method floor], [method ceil], and [method snapped].\n" "[b]Note:[/b] For better type safety, use [method roundf], [method roundi], " "[method Vector2.round], [method Vector3.round], or [method Vector4.round]." msgstr "" "将 [param x] 舍入到最接近的整数,中间情况远离 0 舍入。支持的类型:[int]、" "[float]、[Vector2]、[Vector2i]、[Vector3]、[Vector3i]、[Vector4]、" "[Vector4i]。\n" "[codeblock]\n" "round(2.4) # 返回 2\n" "round(2.5) # 返回 3\n" "round(2.6) # 返回 3\n" "[/codeblock]\n" "另见 [method floor]、[method ceil]、[method snapped]。\n" "[b]注意:[/b]为了更好的类型安全,使用 [method roundf]、[method roundi]、" "[method Vector2.round]、[method Vector3.round] 或 [method Vector4.round]。" #: doc/classes/@GlobalScope.xml msgid "" "Rounds [param x] to the nearest whole number, with halfway cases rounded " "away from 0.\n" "A type-safe version of [method round], returning a [float]." msgstr "" "将 [param x] 舍入到最接近的整数,中间情况远离 0 舍入。\n" "[method round] 的类型安全版本,返回一个 [float]。" #: doc/classes/@GlobalScope.xml msgid "" "Rounds [param x] to the nearest whole number, with halfway cases rounded " "away from 0.\n" "A type-safe version of [method round], returning an [int]." msgstr "" "将 [param x] 舍入到最接近的整数,中间情况远离 0 舍入。\n" "[method round] 的类型安全版本,返回一个 [int]。" #: doc/classes/@GlobalScope.xml msgid "" "Sets the seed for the random number generator to [param base]. Setting the " "seed manually can ensure consistent, repeatable results for most random " "functions.\n" "[codeblocks]\n" "[gdscript]\n" "var my_seed = \"Godot Rocks\".hash()\n" "seed(my_seed)\n" "var a = randf() + randi()\n" "seed(my_seed)\n" "var b = randf() + randi()\n" "# a and b are now identical\n" "[/gdscript]\n" "[csharp]\n" "ulong mySeed = (ulong)GD.Hash(\"Godot Rocks\");\n" "GD.Seed(mySeed);\n" "var a = GD.Randf() + GD.Randi();\n" "GD.Seed(mySeed);\n" "var b = GD.Randf() + GD.Randi();\n" "// a and b are now identical\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "将随机数生成器的种子设置为 [param base]。手动设置种子可以确保大多数随机函数的" "结果一致、可重复。\n" "[codeblocks]\n" "[gdscript]\n" "var my_seed = \"Godot Rocks\".hash()\n" "seed(my_seed)\n" "var a = randf() + randi()\n" "seed(my_seed)\n" "var b = randf() + randi()\n" "# a 和 b 现在是一样的\n" "[/gdscript]\n" "[csharp]\n" "ulong mySeed = (ulong)GD.Hash(\"Godot Rocks\");\n" "GD.Seed(mySeed);\n" "var a = GD.Randf() + GD.Randi();\n" "GD.Seed(mySeed);\n" "var b = GD.Randf() + GD.Randi();\n" "// a 和 b 现在是一样的\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the same type of [Variant] as [param x], with [code]-1[/code] for " "negative values, [code]1[/code] for positive values, and [code]0[/code] for " "zeros. For [code]nan[/code] values it returns 0.\n" "Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], " "[Vector3i], [Vector4], [Vector4i].\n" "[codeblock]\n" "sign(-6.0) # Returns -1\n" "sign(0.0) # Returns 0\n" "sign(6.0) # Returns 1\n" "sign(NAN) # Returns 0\n" "\n" "sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1)\n" "[/codeblock]\n" "[b]Note:[/b] For better type safety, use [method signf], [method signi], " "[method Vector2.sign], [method Vector2i.sign], [method Vector3.sign], " "[method Vector3i.sign], [method Vector4.sign], or [method Vector4i.sign]." msgstr "" "返回与 [param x] 相同类型的 [Variant],负值返回 [code]-1[/code]、正值返回 " "[code]1[/code],零则返回 [code]0[/code]。如果是 [code]nan[/code] 则返回 0。\n" "支持的类型有:[int]、[float]、[Vector2]、[Vector2i]、[Vector3]、[Vector3i]、" "[Vector4]、[Vector4i]。\n" "[codeblock]\n" "sign(-6.0) # 返回 -1\n" "sign(0.0) # 返回 0\n" "sign(6.0) # 返回 1\n" "sign(NAN) # 返回 0\n" "\n" "sign(Vector3(-6.0, 0.0, 6.0)) # 返回 (-1, 0, 1)\n" "[/codeblock]\n" "[b]注意:[/b]为了更好的类型安全,请使用 [method signf]、[method signi]、" "[method Vector2.sign]、[method Vector2i.sign]、[method Vector3.sign]、" "[method Vector3i.sign]、[method Vector4.sign] 或 [method Vector4i.sign]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns [code]-1.0[/code] if [param x] is negative, [code]1.0[/code] if " "[param x] is positive, and [code]0.0[/code] if [param x] is zero. For " "[code]nan[/code] values of [param x] it returns 0.0.\n" "[codeblock]\n" "signf(-6.5) # Returns -1.0\n" "signf(0.0) # Returns 0.0\n" "signf(6.5) # Returns 1.0\n" "signf(NAN) # Returns 0.0\n" "[/codeblock]" msgstr "" "如果 [param x] 为负,则返回 [code]-1.0[/code];如果 [param x] 为正,则返回 " "[code]1.0[/code];如果 [param x] 为零,则返回 [code]0.0[/code]。如果 [param " "x] 为 [code]nan[/code] 则返回 0.0。\n" "[codeblock]\n" "signf(-6.5) # 返回 -1.0\n" "signf(0.0) # 返回 0.0\n" "signf(6.5) # 返回 1.0\n" "signf(NAN) # 返回 0.0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns [code]-1[/code] if [param x] is negative, [code]1[/code] if [param " "x] is positive, and [code]0[/code] if [param x] is zero.\n" "[codeblock]\n" "signi(-6) # Returns -1\n" "signi(0) # Returns 0\n" "signi(6) # Returns 1\n" "[/codeblock]" msgstr "" "如果 [param x] 为负,则返回 [code]-1[/code];如果 [param x] 为正,则返回 " "[code]1[/code];如果 [param x] 为零,则返回 [code]0[/code]。\n" "[codeblock]\n" "signi(-6) # 返回 -1\n" "signi(0) # 返回 0\n" "signi(6) # 返回 1\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the sine of angle [param angle_rad] in radians.\n" "[codeblock]\n" "sin(0.523599) # Returns 0.5\n" "sin(deg_to_rad(90)) # Returns 1.0\n" "[/codeblock]" msgstr "" "返回弧度角 [param angle_rad] 的正弦值。\n" "[codeblock]\n" "sin(0.523599) # 返回 0.5\n" "sin(deg_to_rad(90)) # 返回 1.0\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the hyperbolic sine of [param x].\n" "[codeblock]\n" "var a = log(2.0) # Returns 0.693147\n" "sinh(a) # Returns 0.75\n" "[/codeblock]" msgstr "" "返回 [param x] 的双曲正弦值。\n" "[codeblock]\n" "var a = log(2.0) # 返回 0.693147\n" "sinh(a) # 返回 0.75\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns a smooth cubic Hermite interpolation between [code]0[/code] and " "[code]1[/code].\n" "For positive ranges (when [code]from <= to[/code]) the return value is " "[code]0[/code] when [code]x <= from[/code], and [code]1[/code] when [code]x " ">= to[/code]. If [param x] lies between [param from] and [param to], the " "return value follows an S-shaped curve that smoothly transitions from " "[code]0[/code] to [code]1[/code].\n" "For negative ranges (when [code]from > to[/code]) the function is mirrored " "and returns [code]1[/code] when [code]x <= to[/code] and [code]0[/code] when " "[code]x >= from[/code].\n" "This S-shaped curve is the cubic Hermite interpolator, given by [code]f(y) = " "3*y^2 - 2*y^3[/code] where [code]y = (x-from) / (to-from)[/code].\n" "[codeblock]\n" "smoothstep(0, 2, -5.0) # Returns 0.0\n" "smoothstep(0, 2, 0.5) # Returns 0.15625\n" "smoothstep(0, 2, 1.0) # Returns 0.5\n" "smoothstep(0, 2, 2.0) # Returns 1.0\n" "[/codeblock]\n" "Compared to [method ease] with a curve value of [code]-1.6521[/code], " "[method smoothstep] returns the smoothest possible curve with no sudden " "changes in the derivative. If you need to perform more advanced transitions, " "use [Tween] or [AnimationPlayer].\n" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "smoothstep_ease_comparison.png]Comparison between smoothstep() and ease(x, " "-1.6521) return values[/url]\n" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "smoothstep_range.webp]Smoothstep() return values with positive, zero, and " "negative ranges[/url]" msgstr "" "返回在 [code]0[/code] 和 [code]1[/code] 之间的平滑三次 Hermite 插值结果。\n" "对于正范围(当 [code]from <= to[/code] 时),当 [code]x <= from[/code] 时返回" "值为 [code]0[/code],当 [code]x >= to[/code] 时返回值为 [code]1[/code]。如果 " "[param x] 位于 [param from] 和 [param to] 之间,返回值遵循一条 S 形曲线,平滑" "地从 [code]0[/code] 过渡到 [code]1[/code]。\n" "对于负范围(当 [code]from > to[/code] 时),函数镜像翻转,当 [code]x <= to[/" "code] 时返回值为 [code]1[/code],当 [code]x >= from[/code] 时返回值为 " "[code]0[/code]。\n" "这条 S 形曲线是三次 Hermite 插值器,由 [code]f(y) = 3y^2 - 2y^3[/code] 给出," "其中 [code]y = (x-from) / (to-from)[/code]。\n" "[codeblock]\n" "smoothstep(0, 2, -5.0) # 返回 0.0\n" "smoothstep(0, 2, 0.5) # 返回 0.15625\n" "smoothstep(0, 2, 1.0) # 返回 0.5\n" "smoothstep(0, 2, 2.0) # 返回 1.0\n" "[/codeblock]\n" "与曲线值为 [code]-1.6521[/code] 的 [method ease] 方法相比,[method " "smoothstep] 返回的曲线是最平滑的,导数没有突变。如果你需要执行更高级的过渡效" "果,请使用 [Tween] 或 [AnimationPlayer]。\n" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "smoothstep_ease_comparison.png]smoothstep() 和 ease(x, -1.6521) 返回值的比较" "[/url]\n" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "smoothstep_range.webp]Smoothstep() 在正范围、零范围和负范围的返回值[/url]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the multiple of [param step] that is the closest to [param x]. This " "can also be used to round a floating-point number to an arbitrary number of " "decimals.\n" "The returned value is the same type of [Variant] as [param step]. Supported " "types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], " "[Vector4], [Vector4i].\n" "[codeblock]\n" "snapped(100, 32) # Returns 96\n" "snapped(3.14159, 0.01) # Returns 3.14\n" "\n" "snapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72)\n" "[/codeblock]\n" "See also [method ceil], [method floor], and [method round].\n" "[b]Note:[/b] For better type safety, use [method snappedf], [method " "snappedi], [method Vector2.snapped], [method Vector2i.snapped], [method " "Vector3.snapped], [method Vector3i.snapped], [method Vector4.snapped], or " "[method Vector4i.snapped]." msgstr "" "返回最接近 [param x] 的 [param step] 的倍数。这也可用于将一个浮点数四舍五入为" "任意小数位数。\n" "返回值是与 [param step] 相同类型的 [Variant]。支持的类型:[int]、[float]、" "[Vector2]、[Vector2i]、[Vector3]、[Vector3i]、[Vector4]、[Vector4i]。\n" "[codeblock]\n" "snapped(100, 32) # 返回 96\n" "snapped(3.14159, 0.01) # 返回 3.14\n" "\n" "snapped(Vector2(34, 70), Vector2(8, 8)) # 返回 (32, 72)\n" "[/codeblock]\n" "另见 [method ceil]、[method floor] 和 [method round]。\n" "[b]注意:[/b]为了更好的类型安全,请使用 [method snappedf]、[method " "snappedi]、[method Vector2.snapped]、[method Vector2i.snapped]、[method " "Vector3.snapped]、[method Vector3i.snapped]、[method Vector4.snapped]、" "[method Vector4i.snapped]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the multiple of [param step] that is the closest to [param x]. This " "can also be used to round a floating-point number to an arbitrary number of " "decimals.\n" "A type-safe version of [method snapped], returning a [float].\n" "[codeblock]\n" "snappedf(32.0, 2.5) # Returns 32.5\n" "snappedf(3.14159, 0.01) # Returns 3.14\n" "[/codeblock]" msgstr "" "返回最接近 [param x] 的 [param step] 的倍数。也可用于将浮点数四舍五入为任意的" "小数位数。\n" "[method snapped] 的类型安全版本,返回一个 [float]。\n" "[codeblock]\n" "snappedf(32.0, 2.5) # 返回 32.5\n" "snappedf(3.14159, 0.01) # 返回 3.14\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the multiple of [param step] that is the closest to [param x].\n" "A type-safe version of [method snapped], returning an [int].\n" "[codeblock]\n" "snappedi(53, 16) # Returns 48\n" "snappedi(4096, 100) # Returns 4100\n" "[/codeblock]" msgstr "" "返回最接近 [param x] 的 [param step] 的倍数。\n" "[method snapped] 的类型安全版本,返回一个 [int]。\n" "[codeblock]\n" "snappedi(53, 16) # 返回 48\n" "snappedi(4096, 100) # 返回 4100\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the square root of [param x], where [param x] is a non-negative " "number.\n" "[codeblock]\n" "sqrt(9) # Returns 3\n" "sqrt(10.24) # Returns 3.2\n" "sqrt(-1) # Returns NaN\n" "[/codeblock]\n" "[b]Note:[/b] Negative values of [param x] return NaN (\"Not a Number\"). In " "C#, if you need negative inputs, use [code]System.Numerics.Complex[/code]." msgstr "" "返回 [param x] 的平方根,[param x] 为非负数。\n" "[codeblock]\n" "sqrt(9) # 返回 3\n" "sqrt(10.24) # 返回 3.2\n" "sqrt(-1) # 返回 NaN\n" "[/codeblock]\n" "[b]注意:[/b]负数的 [param x] 会返回 NaN(“不是数字”)。在 C# 中,如果需要负" "输入,请使用 [code]System.Numerics.Complex[/code]。" #: doc/classes/@GlobalScope.xml msgid "" "Returns the position of the first non-zero digit, after the decimal point. " "Note that the maximum return value is 10, which is a design decision in the " "implementation.\n" "[codeblock]\n" "var n = step_decimals(5) # n is 0\n" "n = step_decimals(1.0005) # n is 4\n" "n = step_decimals(0.000000005) # n is 9\n" "[/codeblock]" msgstr "" "返回小数点后第一个非零数字的位置。注意最大返回值是 10,这是实现中的设计决" "定。\n" "[codeblock]\n" "var n = step_decimals(5) # n 为 0\n" "n = step_decimals(1.0005) # n 为 4\n" "n = step_decimals(0.000000005) # n 为 9\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Converts one or more arguments of any [Variant] type to a [String] in the " "best way possible.\n" "[codeblock]\n" "var a = [10, 20, 30]\n" "var b = str(a)\n" "print(len(a)) # Prints 3 (the number of elements in the array).\n" "print(len(b)) # Prints 12 (the length of the string \"[10, 20, 30]\").\n" "[/codeblock]" msgstr "" "尽可能以最佳方式将一个或多个任何 [Variant] 类型的参数转换为一个 [String]。\n" "[codeblock]\n" "var a = [10, 20, 30]\n" "var b = str(a)\n" "print(len(a)) # 输出 3(数组中元素的数量)。\n" "print(len(b)) # 输出 12(字符串“[10, 20, 30]”的长度)。\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Converts a formatted [param string] that was returned by [method var_to_str] " "to the original [Variant].\n" "[codeblocks]\n" "[gdscript]\n" "var data = '{ \"a\": 1, \"b\": 2 }' # data is a String\n" "var dict = str_to_var(data) # dict is a Dictionary\n" "print(dict[\"a\"]) # Prints 1\n" "[/gdscript]\n" "[csharp]\n" "string data = \"{ \\\"a\\\": 1, \\\"b\\\": 2 }\"; // data is a " "string\n" "var dict = GD.StrToVar(data).AsGodotDictionary(); // dict is a Dictionary\n" "GD.Print(dict[\"a\"]); // Prints 1\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "将 [method var_to_str] 返回的已格式化的 [param string] 转换为原始 " "[Variant]。\n" "[codeblocks]\n" "[gdscript]\n" "var data = '{ \"a\": 1, \"b\": 2 }' # data 是一个 String\n" "var dict = str_to_var(data) # dict 是一个 Dictionary\n" "print(dict[\"a\"]) # 输出 1\n" "[/gdscript]\n" "[csharp]\n" "string data = \"{ \\\"a\\\": 1, \\\"b\\\": 2 }\"; // data 是一个 " "string\n" "var dict = GD.StrToVar(data).AsGodotDictionary(); // dict 是一个 Dictionary\n" "GD.Print(dict[\"a\"]); // 输出 1\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the tangent of angle [param angle_rad] in radians.\n" "[codeblock]\n" "tan(deg_to_rad(45)) # Returns 1\n" "[/codeblock]" msgstr "" "返回弧度角 [param angle_rad] 的正切值。\n" "[codeblock]\n" "tan(deg_to_rad(45)) # 返回 1\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns the hyperbolic tangent of [param x].\n" "[codeblock]\n" "var a = log(2.0) # Returns 0.693147\n" "tanh(a) # Returns 0.6\n" "[/codeblock]" msgstr "" "返回 [param x] 的双曲正切值。\n" "[codeblock]\n" "var a = log(2.0) # 返回 0.693147\n" "tanh(a) # 返回 0.6\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Converts the given [param variant] to the given [param type], using the " "[enum Variant.Type] values. This method is generous with how it handles " "types, it can automatically convert between array types, convert numeric " "[String]s to [int], and converting most things to [String].\n" "If the type conversion cannot be done, this method will return the default " "value for that type, for example converting [Rect2] to [Vector2] will always " "return [constant Vector2.ZERO]. This method will never show error messages " "as long as [param type] is a valid Variant type.\n" "The returned value is a [Variant], but the data inside and its type will be " "the same as the requested type.\n" "[codeblock]\n" "type_convert(\"Hi!\", TYPE_INT) # Returns 0\n" "type_convert(\"123\", TYPE_INT) # Returns 123\n" "type_convert(123.4, TYPE_INT) # Returns 123\n" "type_convert(5, TYPE_VECTOR2) # Returns (0, 0)\n" "type_convert(\"Hi!\", TYPE_NIL) # Returns null\n" "[/codeblock]" msgstr "" "使用 [enum Variant.Type] 值将给定的 [param variant] 转换为给定的 [param " "type]。此方法对类型的处理十分宽松,可以在数组类型之间自动转换,将数值的 " "[String] 转换为 [int],也可以将大多数内容转换为 [String]。\n" "如果无法完成类型转换,此方法将返回该类型的默认值,例如 [Rect2] 转换为 " "[Vector2] 时将总是返回 [constant Vector2.ZERO]。只要 [param type] 是一个有效" "的 Variant 类型,此方法就永远不会显示错误消息。\n" "返回的值是一个 [Variant],但是其中的数据以及其类型将会与请求的类型相同。\n" "[codeblock]\n" "type_convert(\"Hi!\", TYPE_INT) # 返回 0\n" "type_convert(\"123\", TYPE_INT) # 返回 123\n" "type_convert(123.4, TYPE_INT) # 返回 123\n" "type_convert(5, TYPE_VECTOR2) # 返回 (0, 0)\n" "type_convert(\"Hi!\", TYPE_NIL) # 返回 null\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Returns a human-readable name of the given [param type], using the [enum " "Variant.Type] values.\n" "[codeblock]\n" "print(TYPE_INT) # Prints 2\n" "print(type_string(TYPE_INT)) # Prints \"int\"\n" "print(type_string(TYPE_STRING)) # Prints \"String\"\n" "[/codeblock]\n" "See also [method typeof]." msgstr "" "返回类型 [param type] 的人类可读名称,参数使用 [enum Variant.Type] 的值。\n" "[codeblock]\n" "print(TYPE_INT) # 输出 2\n" "print(type_string(TYPE_INT)) # 输出“int”\n" "print(type_string(TYPE_STRING)) # 输出“String”\n" "[/codeblock]\n" "另见 [method typeof]。" #: doc/classes/@GlobalScope.xml #, fuzzy msgid "" "Returns the internal type of the given [param variable], using the [enum " "Variant.Type] values.\n" "[codeblock]\n" "var json = JSON.new()\n" "json.parse('[\"a\", \"b\", \"c\"]')\n" "var result = json.get_data()\n" "if typeof(result) == TYPE_ARRAY:\n" "\tprint(result[0]) # Prints \"a\"\n" "else:\n" "\tprint(\"Unexpected result!\")\n" "[/codeblock]\n" "See also [method type_string]." msgstr "" "返回变量 [param variable] 的内部类型,使用的是 [enum Variant.Type] 中的值。\n" "[codeblock]\n" "var json = JSON.new()\n" "json.parse('[\"a\", \"b\", \"c\"]')\n" "var result = json.get_data()\n" "if typeof(result) == TYPE_ARRAY:\n" "\tprint(result[0]) # 输出“a”\n" "else:\n" "\tprint(\"预料之外的结果!\")\n" "[/codeblock]\n" "另见 [method type_string]。" #: doc/classes/@GlobalScope.xml msgid "" "Encodes a [Variant] value to a byte array, without encoding objects. " "Deserialization can be done with [method bytes_to_var].\n" "[b]Note:[/b] If you need object serialization, see [method " "var_to_bytes_with_objects].\n" "[b]Note:[/b] Encoding [Callable] is not supported and will result in an " "empty value, regardless of the data." msgstr "" "将 [Variant] 值编码为字节数组,不编码对象。反序列化可以使用 [method " "bytes_to_var] 来完成。\n" "[b]注意:[/b]如果需要对象序列化,参见 [method var_to_bytes_with_objects]。\n" "[b]注意:[/b]编码 [Callable] 不受支持,无论数据如何,都会导致空值。" #: doc/classes/@GlobalScope.xml msgid "" "Encodes a [Variant] value to a byte array. Encoding objects is allowed (and " "can potentially include executable code). Deserialization can be done with " "[method bytes_to_var_with_objects].\n" "[b]Note:[/b] Encoding [Callable] is not supported and will result in an " "empty value, regardless of the data." msgstr "" "将 [Variant] 值编码为字节数组。允许对对象进行编码(并且可能包括可执行代码)。" "反序列化可以使用 [method bytes_to_var_with_objects] 来完成。\n" "[b]注意:[/b]编码 [Callable] 不受支持,无论数据如何,都会导致空值。" #: doc/classes/@GlobalScope.xml msgid "" "Converts a [Variant] [param variable] to a formatted [String] that can then " "be parsed using [method str_to_var].\n" "[codeblocks]\n" "[gdscript]\n" "var a = { \"a\": 1, \"b\": 2 }\n" "print(var_to_str(a))\n" "[/gdscript]\n" "[csharp]\n" "var a = new Godot.Collections.Dictionary { [\"a\"] = 1, [\"b\"] = 2 };\n" "GD.Print(GD.VarToStr(a));\n" "[/csharp]\n" "[/codeblocks]\n" "Prints:\n" "[codeblock lang=text]\n" "{\n" "\t\"a\": 1,\n" "\t\"b\": 2\n" "}\n" "[/codeblock]\n" "[b]Note:[/b] Converting [Signal] or [Callable] is not supported and will " "result in an empty value for these types, regardless of their data." msgstr "" "将 [Variant] [param variable] 转换为格式化的 [String],后续可以使用 [method " "str_to_var] 对其进行解析。\n" "[codeblocks]\n" "[gdscript]\n" "var a = { \"a\": 1, \"b\": 2 }\n" "print(var_to_str(a))\n" "[/gdscript]\n" "[csharp]\n" "var a = new Godot.Collections.Dictionary { [\"a\"] = 1, [\"b\"] = 2 };\n" "GD.Print(GD.VarToStr(a));\n" "[/csharp]\n" "[/codeblocks]\n" "输出:\n" "[codeblock lang=text]\n" "{\n" "\t\"a\": 1,\n" "\t\"b\": 2\n" "}\n" "[/codeblock]\n" "[b]注意:[/b]不支持转换 [Signal] 和 [Callable],这些类型无论有什么数据,转换" "后都是空值。" #: doc/classes/@GlobalScope.xml msgid "" "Returns a [WeakRef] instance holding a weak reference to [param obj]. " "Returns an empty [WeakRef] instance if [param obj] is [code]null[/code]. " "Prints an error and returns [code]null[/code] if [param obj] is neither " "[Object]-derived nor [code]null[/code].\n" "A weak reference to an object is not enough to keep the object alive: when " "the only remaining references to a referent are weak references, garbage " "collection is free to destroy the referent and reuse its memory for " "something else. However, until the object is actually destroyed the weak " "reference may return the object even if there are no strong references to it." msgstr "" "返回一个 [WeakRef] 实例,其中包含对 [param obj] 的弱引用。如果 [param obj] " "为 [code]null[/code],则返回空的 [WeakRef] 实例。如果 [param obj] 既不是 " "[Object] 派生实例,也不是 [code]null[/code],则打印错误并返回 [code]null[/" "code]。\n" "对对象的弱引用不足以使对象保持存活:当对引用对象的剩余引用都是弱引用时,垃圾" "回收可以自由销毁该引用对象并将其内存重新用于其他用途。但是,在对象实际被销毁" "之前,弱引用可能会返回该对象,即使不存在对它的强引用也是如此。" #: doc/classes/@GlobalScope.xml msgid "" "Wraps the [Variant] [param value] between [param min] and [param max]. " "[param min] is [i]inclusive[/i] while [param max] is [i]exclusive[/i]. This " "can be used for creating loop-like behavior or infinite surfaces.\n" "Variant types [int] and [float] are supported. If any of the arguments is " "[float], this function returns a [float], otherwise it returns an [int].\n" "[codeblock]\n" "var a = wrap(4, 5, 10)\n" "# a is 9 (int)\n" "\n" "var a = wrap(7, 5, 10)\n" "# a is 7 (int)\n" "\n" "var a = wrap(10.5, 5, 10)\n" "# a is 5.5 (float)\n" "[/codeblock]" msgstr "" "在 [param min] 和 [param max] 之间包裹 [Variant] [param value]。[param min] " "[i]包含[/i]端点,[param max] 则[i]不包含[/i]。可用于创建类似循环的行为或无限" "表面。\n" "支持变体类型 [int] 和 [float]。如果任一参数是 [float],则该函数返回 [float]," "否则返回 [int]。\n" "[codeblock]\n" "var a = wrap(4, 5, 10)\n" "# a 为 9 (整数类型)\n" "\n" "var a = wrap(7, 5, 10)\n" "# a 为 7 (整数类型)\n" "\n" "var a = wrap(10.5, 5, 10)\n" "# a 为 5.5 (浮点类型)\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "" "Wraps the float [param value] between [param min] and [param max]. [param " "min] is [i]inclusive[/i] while [param max] is [i]exclusive[/i]. This can be " "used for creating loop-like behavior or infinite surfaces.\n" "[codeblock]\n" "# Infinite loop between 5.0 and 9.9\n" "value = wrapf(value + 0.1, 5.0, 10.0)\n" "[/codeblock]\n" "[codeblock]\n" "# Infinite rotation (in radians)\n" "angle = wrapf(angle + 0.1, 0.0, TAU)\n" "[/codeblock]\n" "[codeblock]\n" "# Infinite rotation (in radians)\n" "angle = wrapf(angle + 0.1, -PI, PI)\n" "[/codeblock]\n" "[b]Note:[/b] If [param min] is [code]0[/code], this is equivalent to [method " "fposmod], so prefer using that instead. [method wrapf] is more flexible than " "using the [method fposmod] approach by giving the user control over the " "minimum value." msgstr "" "在 [param min] 和 [param max] 之间将浮点数 [param value] 循环。[param min] " "[i]包含[/i]端点,[param max] 则[i]不包含[/i]。可用于创建类似循环的行为或无限" "表面。\n" "[codeblock]\n" "# 在 5.0 和 9.9 之间无限循环\n" "value = wrapf(value + 0.1, 5.0, 10.0)\n" "[/codeblock]\n" "[codeblock]\n" "# 无限旋转(弧度)\n" "angle = wrapf(angle + 0.1, 0.0, TAU)\n" "[/codeblock]\n" "[codeblock]\n" "# 无限旋转(弧度)\n" "angle = wrapf(angle + 0.1, -PI, PI)\n" "[/codeblock]\n" "[b]注意:[/b]如果 [param min] 为 [code]0[/code],则相当于 [method fposmod]," "因此请优先使用后者。通过让用户控制最小值,[method wrapf] 比使用 [method " "fposmod] 方法更灵活。" #: doc/classes/@GlobalScope.xml msgid "" "Wraps the integer [param value] between [param min] and [param max]. [param " "min] is [i]inclusive[/i] while [param max] is [i]exclusive[/i]. This can be " "used for creating loop-like behavior or infinite surfaces.\n" "[codeblock]\n" "# Infinite loop between 5 and 9\n" "frame = wrapi(frame + 1, 5, 10)\n" "[/codeblock]\n" "[codeblock]\n" "# result is -2\n" "var result = wrapi(-6, -5, -1)\n" "[/codeblock]" msgstr "" "在 [param min] 和 [param max] 之间环绕整数 [param value]。[param min] [i]包含" "[/i]端点,[param max] 则[i]不包含[/i]。可用于创建类似循环的行为或无限曲面。\n" "[codeblock]\n" "# 在 5 和 9 之间无限循环\n" "frame = wrapi(frame + 1, 5, 10)\n" "[/codeblock]\n" "[codeblock]\n" "# result 是 -2\n" "var result = wrapi(-6, -5, -1)\n" "[/codeblock]" #: doc/classes/@GlobalScope.xml msgid "The [AudioServer] singleton." msgstr "[AudioServer] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [CameraServer] singleton." msgstr "[CameraServer] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [ClassDB] singleton." msgstr "[ClassDB] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [DisplayServer] singleton." msgstr "[DisplayServer] 单例。" #: doc/classes/@GlobalScope.xml msgid "" "The [EditorInterface] singleton.\n" "[b]Note:[/b] Only available in editor builds." msgstr "" "[EditorInterface] 单例。\n" "[b]注意:[/b]仅在编辑器构建中可用。" #: doc/classes/@GlobalScope.xml msgid "The [Engine] singleton." msgstr "[Engine] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [EngineDebugger] singleton." msgstr "[EngineDebugger] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [GDExtensionManager] singleton." msgstr "[GDExtensionManager] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [Geometry2D] singleton." msgstr "[Geometry2D] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [Geometry3D] singleton." msgstr "[Geometry3D] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [IP] singleton." msgstr "[IP] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [Input] singleton." msgstr "[Input] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [InputMap] singleton." msgstr "[InputMap] 单例。" #: doc/classes/@GlobalScope.xml msgid "" "The [JavaClassWrapper] singleton.\n" "[b]Note:[/b] Only implemented on Android." msgstr "" "[JavaClassWrapper] 单例。\n" "[b]注意:[/b]仅在 Android 上实现。" #: doc/classes/@GlobalScope.xml msgid "" "The [JavaScriptBridge] singleton.\n" "[b]Note:[/b] Only implemented on the Web platform." msgstr "" "[JavaScriptBridge] 单例。\n" "[b]注意:[/b]仅在 Web 平台上实现。" #: doc/classes/@GlobalScope.xml msgid "The [Marshalls] singleton." msgstr "[Marshalls] 单例。" #: doc/classes/@GlobalScope.xml msgid "" "The [NativeMenu] singleton.\n" "[b]Note:[/b] Only implemented on macOS." msgstr "" "[NativeMenu] 单例。\n" "[b]注意:[/b]仅在 macOS 上实现。" #: doc/classes/@GlobalScope.xml msgid "The [NavigationMeshGenerator] singleton." msgstr "[NavigationMeshGenerator] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [NavigationServer2D] singleton." msgstr "[NavigationServer2D] 单例。" #: doc/classes/@GlobalScope.xml #, fuzzy msgid "The [NavigationServer2DManager] singleton." msgstr "[NavigationServer2D] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [NavigationServer3D] singleton." msgstr "[NavigationServer3D] 单例。" #: doc/classes/@GlobalScope.xml #, fuzzy msgid "The [NavigationServer3DManager] singleton." msgstr "[NavigationServer3D] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [OS] singleton." msgstr "[OS] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [Performance] singleton." msgstr "[Performance] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [PhysicsServer2D] singleton." msgstr "[PhysicsServer2D] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [PhysicsServer2DManager] singleton." msgstr "[PhysicsServer2DManager] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [PhysicsServer3D] singleton." msgstr "[PhysicsServer3D] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [PhysicsServer3DManager] singleton." msgstr "[PhysicsServer3DManager] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [ProjectSettings] singleton." msgstr "[ProjectSettings] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [RenderingServer] singleton." msgstr "[RenderingServer] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [ResourceLoader] singleton." msgstr "[ResourceLoader] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [ResourceSaver] singleton." msgstr "[ResourceSaver] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [ResourceUID] singleton." msgstr "[ResourceUID] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [TextServerManager] singleton." msgstr "[TextServerManager] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [ThemeDB] singleton." msgstr "[ThemeDB] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [Time] singleton." msgstr "[Time] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [TranslationServer] singleton." msgstr "[TranslationServer] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [WorkerThreadPool] singleton." msgstr "[WorkerThreadPool] 单例。" #: doc/classes/@GlobalScope.xml msgid "The [XRServer] singleton." msgstr "[XRServer] 单例。" #: doc/classes/@GlobalScope.xml msgid "Left side, usually used for [Control] or [StyleBox]-derived classes." msgstr "左边,常用于 [Control] 或 [StyleBox] 的派生类。" #: doc/classes/@GlobalScope.xml msgid "Top side, usually used for [Control] or [StyleBox]-derived classes." msgstr "顶边,常用于 [Control] 或 [StyleBox] 的派生类。" #: doc/classes/@GlobalScope.xml msgid "Right side, usually used for [Control] or [StyleBox]-derived classes." msgstr "右边,常用于 [Control] 或 [StyleBox] 的派生类。" #: doc/classes/@GlobalScope.xml msgid "Bottom side, usually used for [Control] or [StyleBox]-derived classes." msgstr "底边,常用于 [Control] 或 [StyleBox] 的派生类。" #: doc/classes/@GlobalScope.xml msgid "Top-left corner." msgstr "左上角。" #: doc/classes/@GlobalScope.xml msgid "Top-right corner." msgstr "右上角。" #: doc/classes/@GlobalScope.xml msgid "Bottom-right corner." msgstr "右下角。" #: doc/classes/@GlobalScope.xml msgid "Bottom-left corner." msgstr "左下角。" #: doc/classes/@GlobalScope.xml msgid "" "General vertical alignment, usually used for [Separator], [ScrollBar], " "[Slider], etc." msgstr "通用垂直对齐,常用于 [Separator]、[ScrollBar]、[Slider] 等。" #: doc/classes/@GlobalScope.xml msgid "" "General horizontal alignment, usually used for [Separator], [ScrollBar], " "[Slider], etc." msgstr "通用水平对齐,常用于 [Separator]、[ScrollBar]、[Slider] 等。" #: doc/classes/@GlobalScope.xml msgid "" "Clockwise rotation. Used by some methods (e.g. [method Image.rotate_90])." msgstr "顺时针旋转。被一些方法使用(例如 [method Image.rotate_90])。" #: doc/classes/@GlobalScope.xml msgid "" "Counter-clockwise rotation. Used by some methods (e.g. [method " "Image.rotate_90])." msgstr "逆时针旋转。被一些方法使用(例如 [method Image.rotate_90])。" #: doc/classes/@GlobalScope.xml msgid "Horizontal left alignment, usually for text-derived classes." msgstr "水平左对齐,常用于文本派生类。" #: doc/classes/@GlobalScope.xml msgid "Horizontal center alignment, usually for text-derived classes." msgstr "水平居中对齐,常用于文本派生类。" #: doc/classes/@GlobalScope.xml msgid "Horizontal right alignment, usually for text-derived classes." msgstr "水平右对齐,常用于文本派生类。" #: doc/classes/@GlobalScope.xml msgid "Expand row to fit width, usually for text-derived classes." msgstr "扩展行以适应宽度,常用于文本派生类。" #: doc/classes/@GlobalScope.xml msgid "Vertical top alignment, usually for text-derived classes." msgstr "垂直上对齐,常用于文本派生类。" #: doc/classes/@GlobalScope.xml msgid "Vertical center alignment, usually for text-derived classes." msgstr "垂直居中对齐,常用于文本派生类。" #: doc/classes/@GlobalScope.xml msgid "Vertical bottom alignment, usually for text-derived classes." msgstr "垂直下对齐,常用于文本派生类。" #: doc/classes/@GlobalScope.xml msgid "Expand rows to fit height, usually for text-derived classes." msgstr "扩展行以适应高度,通常用于文本派生类。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns the top of the inline object (e.g. image, table) to the position of " "the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant." msgstr "" "将内联对象(例如图像、表格)的顶部与 [code]INLINE_ALIGNMENT_TO_*[/code] 常量" "指定的文本位置对齐。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns the center of the inline object (e.g. image, table) to the position " "of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant." msgstr "" "将内联对象(例如图像、表格)的中心与 [code]INLINE_ALIGNMENT_TO_*[/code] 常量" "指定的文本位置对齐。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns the baseline (user defined) of the inline object (e.g. image, table) " "to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] " "constant." msgstr "" "将内联对象(如图像、表格)的基线(用户定义)与[code]INLINE_ALIGNMENT_TO_*[/" "code] 常数指定的文本位置对齐。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns the bottom of the inline object (e.g. image, table) to the position " "of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant." msgstr "" "将内联对象(例如图像、表格)的底部与 [code]INLINE_ALIGNMENT_TO_*[/code] 常量" "指定的文本位置对齐。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns the position of the inline object (e.g. image, table) specified by " "[code]INLINE_ALIGNMENT_*_TO[/code] constant to the top of the text." msgstr "" "将由 [code]INLINE_ALIGNMENT_*_TO[/code] 常量指定的内联对象(例如图像、表格)" "的位置与文本顶部对齐。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns the position of the inline object (e.g. image, table) specified by " "[code]INLINE_ALIGNMENT_*_TO[/code] constant to the center of the text." msgstr "" "将由 [code]INLINE_ALIGNMENT_*_TO[/code] 常量指定的内联对象(例如图像、表格)" "的位置与文本中心对齐。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns the position of the inline object (e.g. image, table) specified by " "[code]INLINE_ALIGNMENT_*_TO[/code] constant to the baseline of the text." msgstr "" "将由 [code]INLINE_ALIGNMENT_*_TO[/code] 常量指定的内联对象(例如图像、表格)" "的位置与文本基线对齐。" #: doc/classes/@GlobalScope.xml msgid "Aligns inline object (e.g. image, table) to the bottom of the text." msgstr "将内联对象(例如图像、表格)与文本底部对齐。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns top of the inline object (e.g. image, table) to the top of the text. " "Equivalent to [code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code]." msgstr "" "将内联对象(例如图像、表格)的顶部与文本的顶部对齐。等效于 " "[code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code]。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns center of the inline object (e.g. image, table) to the center of the " "text. Equivalent to [code]INLINE_ALIGNMENT_CENTER_TO | " "INLINE_ALIGNMENT_TO_CENTER[/code]." msgstr "" "将内联对象(例如图像、表格)的中心与文本的中心对齐。相当于 " "[code]INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER[/code]。" #: doc/classes/@GlobalScope.xml msgid "" "Aligns bottom of the inline object (e.g. image, table) to the bottom of the " "text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | " "INLINE_ALIGNMENT_TO_BOTTOM[/code]." msgstr "" "将内联对象(例如图像、表格)的底部与文本底部对齐。等效于 " "[code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code]。" #: doc/classes/@GlobalScope.xml msgid "A bit mask for [code]INLINE_ALIGNMENT_*_TO[/code] alignment constants." msgstr "用于 [code]INLINE_ALIGNMENT_*_TO[/code] 对齐常量的位掩码。" #: doc/classes/@GlobalScope.xml msgid "A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants." msgstr "用于 [code]INLINE_ALIGNMENT_TO_*[/code] 对齐常量的位掩码。" #: doc/classes/@GlobalScope.xml msgid "" "Specifies that Euler angles should be in XYZ order. When composing, the " "order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, " "and X last." msgstr "" "指定欧拉角应按 XYZ 顺序排列。组合时顺序为 X、Y、Z。分解时顺序相反,先 Z、再 " "Y、最后 X。" #: doc/classes/@GlobalScope.xml msgid "" "Specifies that Euler angles should be in XZY order. When composing, the " "order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, " "and X last." msgstr "" "指定欧拉角应按 XZY 顺序排列。组合时顺序为 X、Z、Y。分解时顺序相反,先 Y、再 " "Z、最后 X。" #: doc/classes/@GlobalScope.xml msgid "" "Specifies that Euler angles should be in YXZ order. When composing, the " "order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, " "and Y last." msgstr "" "指定欧拉角应按 YXZ 顺序排列。组合时顺序为 Y、X、Z。分解时顺序相反,先 Z、再 " "X、最后 Y。" #: doc/classes/@GlobalScope.xml msgid "" "Specifies that Euler angles should be in YZX order. When composing, the " "order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, " "and Y last." msgstr "" "指定欧拉角应按 YZX 顺序排列。组合时顺序为 Y、Z、X。分解时顺序相反,先 X、再 " "Z、最后 Y。" #: doc/classes/@GlobalScope.xml msgid "" "Specifies that Euler angles should be in ZXY order. When composing, the " "order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, " "and Z last." msgstr "" "指定欧拉角应按 ZXY 顺序排列。组合时顺序为 Z、X、Y。分解时顺序相反,先 Y、再 " "X、最后 Z。" #: doc/classes/@GlobalScope.xml msgid "" "Specifies that Euler angles should be in ZYX order. When composing, the " "order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, " "and Z last." msgstr "" "指定欧拉角应按 ZYX 顺序排列。组合时顺序为 Z、Y、X。分解时顺序相反,先 X、再 " "Y、最后 Z。" #: doc/classes/@GlobalScope.xml msgid "" "Enum value which doesn't correspond to any key. This is used to initialize " "[enum Key] properties with a generic state." msgstr "与任何键都不对应的枚举值。这用于初始化具有通用状态的 [enum Key] 属性。" #: doc/classes/@GlobalScope.xml msgid "Keycodes with this bit applied are non-printable." msgstr "应用此位的键码不可打印。" #: doc/classes/@GlobalScope.xml msgid "Escape key." msgstr "ESC 键。" #: doc/classes/@GlobalScope.xml msgid "Tab key." msgstr "Tab 键。" #: doc/classes/@GlobalScope.xml msgid "Shift + Tab key." msgstr "Shift + Tab 键。" #: doc/classes/@GlobalScope.xml msgid "Backspace key." msgstr "退格键。" #: doc/classes/@GlobalScope.xml msgid "Return key (on the main keyboard)." msgstr "回车键(位于主键盘)。" #: doc/classes/@GlobalScope.xml msgid "Enter key on the numeric keypad." msgstr "小键盘区的回车键。" #: doc/classes/@GlobalScope.xml msgid "Insert key." msgstr "Insert 键。" #: doc/classes/@GlobalScope.xml msgid "Delete key." msgstr "Delete 键。" #: doc/classes/@GlobalScope.xml msgid "Pause key." msgstr "Pause 键。" #: doc/classes/@GlobalScope.xml msgid "Print Screen key." msgstr "Print Screen 键。" #: doc/classes/@GlobalScope.xml msgid "System Request key." msgstr "System Request 键。" #: doc/classes/@GlobalScope.xml msgid "Clear key." msgstr "Clear 键。" #: doc/classes/@GlobalScope.xml msgid "Home key." msgstr "Home 键。" #: doc/classes/@GlobalScope.xml msgid "End key." msgstr "End 键。" #: doc/classes/@GlobalScope.xml msgid "Left arrow key." msgstr "左方向键。" #: doc/classes/@GlobalScope.xml msgid "Up arrow key." msgstr "上方向键。" #: doc/classes/@GlobalScope.xml msgid "Right arrow key." msgstr "右方向键。" #: doc/classes/@GlobalScope.xml msgid "Down arrow key." msgstr "下方向键。" #: doc/classes/@GlobalScope.xml msgid "Page Up key." msgstr "Page Up 键。" #: doc/classes/@GlobalScope.xml msgid "Page Down key." msgstr "Page Down 键。" #: doc/classes/@GlobalScope.xml msgid "Shift key." msgstr "Shift 键。" #: doc/classes/@GlobalScope.xml msgid "Control key." msgstr "Control 键。" #: doc/classes/@GlobalScope.xml msgid "Meta key." msgstr "Meta 键。" #: doc/classes/@GlobalScope.xml msgid "Alt key." msgstr "Alt 键。" #: doc/classes/@GlobalScope.xml msgid "Caps Lock key." msgstr "Caps Lock 键。" #: doc/classes/@GlobalScope.xml msgid "Num Lock key." msgstr "Num Lock 键。" #: doc/classes/@GlobalScope.xml msgid "Scroll Lock key." msgstr "Scroll Lock 键。" #: doc/classes/@GlobalScope.xml msgid "F1 key." msgstr "F1 键。" #: doc/classes/@GlobalScope.xml msgid "F2 key." msgstr "F2 键。" #: doc/classes/@GlobalScope.xml msgid "F3 key." msgstr "F3 键。" #: doc/classes/@GlobalScope.xml msgid "F4 key." msgstr "F4 键。" #: doc/classes/@GlobalScope.xml msgid "F5 key." msgstr "F5 键。" #: doc/classes/@GlobalScope.xml msgid "F6 key." msgstr "F6 键。" #: doc/classes/@GlobalScope.xml msgid "F7 key." msgstr "F7 键。" #: doc/classes/@GlobalScope.xml msgid "F8 key." msgstr "F8 键。" #: doc/classes/@GlobalScope.xml msgid "F9 key." msgstr "F9 键。" #: doc/classes/@GlobalScope.xml msgid "F10 key." msgstr "F10 键。" #: doc/classes/@GlobalScope.xml msgid "F11 key." msgstr "F11 键。" #: doc/classes/@GlobalScope.xml msgid "F12 key." msgstr "F12 键。" #: doc/classes/@GlobalScope.xml msgid "F13 key." msgstr "F13 键。" #: doc/classes/@GlobalScope.xml msgid "F14 key." msgstr "F14 键。" #: doc/classes/@GlobalScope.xml msgid "F15 key." msgstr "F15 键。" #: doc/classes/@GlobalScope.xml msgid "F16 key." msgstr "F16 键。" #: doc/classes/@GlobalScope.xml msgid "F17 key." msgstr "F17 键。" #: doc/classes/@GlobalScope.xml msgid "F18 key." msgstr "F18 键。" #: doc/classes/@GlobalScope.xml msgid "F19 key." msgstr "F19 键。" #: doc/classes/@GlobalScope.xml msgid "F20 key." msgstr "F20 键。" #: doc/classes/@GlobalScope.xml msgid "F21 key." msgstr "F21 键。" #: doc/classes/@GlobalScope.xml msgid "F22 key." msgstr "F22 键。" #: doc/classes/@GlobalScope.xml msgid "F23 key." msgstr "F23 键。" #: doc/classes/@GlobalScope.xml msgid "F24 key." msgstr "F24 键。" #: doc/classes/@GlobalScope.xml msgid "F25 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F25 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F26 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F26 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F27 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F27 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F28 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F28 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F29 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F29 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F30 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F30 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F31 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F31 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F32 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F32 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F33 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F33 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F34 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F34 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "F35 key. Only supported on macOS and Linux due to a Windows limitation." msgstr "F35 键。由于 Windows 限制,仅支持 macOS 和 Linux。" #: doc/classes/@GlobalScope.xml msgid "Multiply (*) key on the numeric keypad." msgstr "小键盘的星键/乘以键(*)。" #: doc/classes/@GlobalScope.xml msgid "Divide (/) key on the numeric keypad." msgstr "小键盘的除以键(/)。" #: doc/classes/@GlobalScope.xml msgid "Subtract (-) key on the numeric keypad." msgstr "小键盘的减号键(-)。" #: doc/classes/@GlobalScope.xml msgid "Period (.) key on the numeric keypad." msgstr "小键盘的点键(.)。" #: doc/classes/@GlobalScope.xml msgid "Add (+) key on the numeric keypad." msgstr "小键盘的加号键(+)。" #: doc/classes/@GlobalScope.xml msgid "Number 0 on the numeric keypad." msgstr "小键盘的数字 0。" #: doc/classes/@GlobalScope.xml msgid "Number 1 on the numeric keypad." msgstr "小键盘的数字 1。" #: doc/classes/@GlobalScope.xml msgid "Number 2 on the numeric keypad." msgstr "小键盘的数字 2。" #: doc/classes/@GlobalScope.xml msgid "Number 3 on the numeric keypad." msgstr "小键盘的数字 3。" #: doc/classes/@GlobalScope.xml msgid "Number 4 on the numeric keypad." msgstr "小键盘的数字 4。" #: doc/classes/@GlobalScope.xml msgid "Number 5 on the numeric keypad." msgstr "小键盘的数字 5。" #: doc/classes/@GlobalScope.xml msgid "Number 6 on the numeric keypad." msgstr "小键盘的数字 6。" #: doc/classes/@GlobalScope.xml msgid "Number 7 on the numeric keypad." msgstr "小键盘的数字 7。" #: doc/classes/@GlobalScope.xml msgid "Number 8 on the numeric keypad." msgstr "小键盘的数字 8。" #: doc/classes/@GlobalScope.xml msgid "Number 9 on the numeric keypad." msgstr "小键盘的数字 9。" #: doc/classes/@GlobalScope.xml msgid "Context menu key." msgstr "上下文菜单键。" #: doc/classes/@GlobalScope.xml msgid "Hyper key. (On Linux/X11 only)." msgstr "超级键。(仅在 Linux/X11 上)。" #: doc/classes/@GlobalScope.xml msgid "Help key." msgstr "Help 键。" #: doc/classes/@GlobalScope.xml msgid "Back key." msgstr "向后键。" #: doc/classes/@GlobalScope.xml msgid "Forward key." msgstr "向前键。" #: doc/classes/@GlobalScope.xml msgid "Media stop key." msgstr "媒体停止播放键。" #: doc/classes/@GlobalScope.xml msgid "Refresh key." msgstr "刷新键。" #: doc/classes/@GlobalScope.xml msgid "Volume down key." msgstr "音量降低键。" #: doc/classes/@GlobalScope.xml msgid "Mute volume key." msgstr "静音键。" #: doc/classes/@GlobalScope.xml msgid "Volume up key." msgstr "音量升高键。" #: doc/classes/@GlobalScope.xml msgid "Media play key." msgstr "媒体播放键。" #: doc/classes/@GlobalScope.xml msgid "Previous song key." msgstr "上一首歌键。" #: doc/classes/@GlobalScope.xml msgid "Next song key." msgstr "下一首歌键。" #: doc/classes/@GlobalScope.xml msgid "Media record key." msgstr "媒体录制键。" #: doc/classes/@GlobalScope.xml msgid "Home page key." msgstr "主页键。" #: doc/classes/@GlobalScope.xml msgid "Favorites key." msgstr "收藏键。" #: doc/classes/@GlobalScope.xml msgid "Search key." msgstr "搜索键。" #: doc/classes/@GlobalScope.xml msgid "Standby key." msgstr "Standby 键。" #: doc/classes/@GlobalScope.xml msgid "Open URL / Launch Browser key." msgstr "打开 URL / 启动浏览器键。" #: doc/classes/@GlobalScope.xml msgid "Launch Mail key." msgstr "启动邮箱键。" #: doc/classes/@GlobalScope.xml msgid "Launch Media key." msgstr "启动多媒体键。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 0 key." msgstr "快捷启动键 0。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 1 key." msgstr "快捷启动键 1。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 2 key." msgstr "快捷启动键 2。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 3 key." msgstr "快捷启动键 3。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 4 key." msgstr "快捷启动键 4。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 5 key." msgstr "快捷启动键 5。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 6 key." msgstr "快捷启动键 6。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 7 key." msgstr "快捷启动键 7。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 8 key." msgstr "快捷启动键 8。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut 9 key." msgstr "快捷启动键 9。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut A key." msgstr "快捷启动键 A。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut B key." msgstr "快捷启动键 B。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut C key." msgstr "快捷启动键 C。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut D key." msgstr "快捷启动键 D。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut E key." msgstr "快捷启动键 E。" #: doc/classes/@GlobalScope.xml msgid "Launch Shortcut F key." msgstr "快捷启动键 F。" #: doc/classes/@GlobalScope.xml msgid "\"Globe\" key on Mac / iPad keyboard." msgstr "Mac / iPad 键盘上的“地球”键。" #: doc/classes/@GlobalScope.xml msgid "\"On-screen keyboard\" key on iPad keyboard." msgstr "iPad 键盘上的“屏幕键盘”键。" #: doc/classes/@GlobalScope.xml msgid "英数 key on Mac keyboard." msgstr "Mac 键盘上的“英数”键。" #: doc/classes/@GlobalScope.xml msgid "かな key on Mac keyboard." msgstr "Mac 键盘上的“かな”键。" #: doc/classes/@GlobalScope.xml msgid "Unknown key." msgstr "未知键。" #: doc/classes/@GlobalScope.xml msgid "Space key." msgstr "空格键。" #: doc/classes/@GlobalScope.xml msgid "Exclamation mark ([code]![/code]) key." msgstr "感叹号([code]![/code])键。" #: doc/classes/@GlobalScope.xml msgid "Double quotation mark ([code]\"[/code]) key." msgstr "双引号([code]\"[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Number sign or [i]hash[/i] ([code]#[/code]) key." msgstr "数字符号即[i]井号[/i]([code]#[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Dollar sign ([code]$[/code]) key." msgstr "美元符号([code]$[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Percent sign ([code]%[/code]) key." msgstr "百分号([code]%[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Ampersand ([code]&[/code]) key." msgstr "与号([code]&[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Apostrophe ([code]'[/code]) key." msgstr "撇号([code]'[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Left parenthesis ([code]([/code]) key." msgstr "左括号([code]([/code])键。" #: doc/classes/@GlobalScope.xml msgid "Right parenthesis ([code])[/code]) key." msgstr "右括号([code])[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Asterisk ([code]*[/code]) key." msgstr "星号([code]*[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Plus ([code]+[/code]) key." msgstr "加号([code]+[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Comma ([code],[/code]) key." msgstr "逗号([code],[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Minus ([code]-[/code]) key." msgstr "减号([code]-[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Period ([code].[/code]) key." msgstr "句号([code].[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Slash ([code]/[/code]) key." msgstr "正斜杠([code]/[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Number 0 key." msgstr "数字 0 键。" #: doc/classes/@GlobalScope.xml msgid "Number 1 key." msgstr "数字 1 键。" #: doc/classes/@GlobalScope.xml msgid "Number 2 key." msgstr "数字 2 键。" #: doc/classes/@GlobalScope.xml msgid "Number 3 key." msgstr "数字 3 键。" #: doc/classes/@GlobalScope.xml msgid "Number 4 key." msgstr "数字 4 键。" #: doc/classes/@GlobalScope.xml msgid "Number 5 key." msgstr "数字 5 键。" #: doc/classes/@GlobalScope.xml msgid "Number 6 key." msgstr "数字 6 键。" #: doc/classes/@GlobalScope.xml msgid "Number 7 key." msgstr "数字 7 键。" #: doc/classes/@GlobalScope.xml msgid "Number 8 key." msgstr "数字 8 键。" #: doc/classes/@GlobalScope.xml msgid "Number 9 key." msgstr "数字 9 键。" #: doc/classes/@GlobalScope.xml msgid "Colon ([code]:[/code]) key." msgstr "冒号([code]:[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Semicolon ([code];[/code]) key." msgstr "分号([code];[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Less-than sign ([code]<[/code]) key." msgstr "小于号([code]<[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Equal sign ([code]=[/code]) key." msgstr "等于号([code]=[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Greater-than sign ([code]>[/code]) key." msgstr "大于号([code]>[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Question mark ([code]?[/code]) key." msgstr "问号([code]?[/code])键。" #: doc/classes/@GlobalScope.xml msgid "At sign ([code]@[/code]) key." msgstr "艾特号([code]@[/code])键。" #: doc/classes/@GlobalScope.xml msgid "A key." msgstr "A 键。" #: doc/classes/@GlobalScope.xml msgid "B key." msgstr "B 键。" #: doc/classes/@GlobalScope.xml msgid "C key." msgstr "C 键。" #: doc/classes/@GlobalScope.xml msgid "D key." msgstr "D 键。" #: doc/classes/@GlobalScope.xml msgid "E key." msgstr "E 键。" #: doc/classes/@GlobalScope.xml msgid "F key." msgstr "F 键。" #: doc/classes/@GlobalScope.xml msgid "G key." msgstr "G 键。" #: doc/classes/@GlobalScope.xml msgid "H key." msgstr "H 键。" #: doc/classes/@GlobalScope.xml msgid "I key." msgstr "I 键。" #: doc/classes/@GlobalScope.xml msgid "J key." msgstr "J 键。" #: doc/classes/@GlobalScope.xml msgid "K key." msgstr "K 键。" #: doc/classes/@GlobalScope.xml msgid "L key." msgstr "L 键。" #: doc/classes/@GlobalScope.xml msgid "M key." msgstr "M 键。" #: doc/classes/@GlobalScope.xml msgid "N key." msgstr "N 键。" #: doc/classes/@GlobalScope.xml msgid "O key." msgstr "O 键。" #: doc/classes/@GlobalScope.xml msgid "P key." msgstr "P 键。" #: doc/classes/@GlobalScope.xml msgid "Q key." msgstr "Q 键。" #: doc/classes/@GlobalScope.xml msgid "R key." msgstr "R 键。" #: doc/classes/@GlobalScope.xml msgid "S key." msgstr "S 键。" #: doc/classes/@GlobalScope.xml msgid "T key." msgstr "T 键。" #: doc/classes/@GlobalScope.xml msgid "U key." msgstr "U 键。" #: doc/classes/@GlobalScope.xml msgid "V key." msgstr "V 键。" #: doc/classes/@GlobalScope.xml msgid "W key." msgstr "W 键。" #: doc/classes/@GlobalScope.xml msgid "X key." msgstr "X 键。" #: doc/classes/@GlobalScope.xml msgid "Y key." msgstr "Y 键。" #: doc/classes/@GlobalScope.xml msgid "Z key." msgstr "Z 键。" #: doc/classes/@GlobalScope.xml msgid "Left bracket ([code][lb][/code]) key." msgstr "左中括号([code][lb][/code])键。" #: doc/classes/@GlobalScope.xml msgid "Backslash ([code]\\[/code]) key." msgstr "反斜杠([code]\\[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Right bracket ([code][rb][/code]) key." msgstr "右中括号([code][rb][/code])键。" #: doc/classes/@GlobalScope.xml msgid "Caret ([code]^[/code]) key." msgstr "脱字符([code]^[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Underscore ([code]_[/code]) key." msgstr "下划线([code]_[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Backtick ([code]`[/code]) key." msgstr "重音符([code]`[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Left brace ([code]{[/code]) key." msgstr "左大括号([code]{[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Vertical bar or [i]pipe[/i] ([code]|[/code]) key." msgstr "垂直的条或[i]竖线[/i]([code]|[/code]键)。" #: doc/classes/@GlobalScope.xml msgid "Right brace ([code]}[/code]) key." msgstr "右大括号([code]}[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Tilde ([code]~[/code]) key." msgstr "波浪线([code]~[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Yen symbol ([code]¥[/code]) key." msgstr "日元符号([code]¥[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Section sign ([code]§[/code]) key." msgstr "章节号([code]§[/code])键。" #: doc/classes/@GlobalScope.xml msgid "Key Code mask." msgstr "键码掩码。" #: doc/classes/@GlobalScope.xml msgid "Modifier key mask." msgstr "修饰键掩码。" #: doc/classes/@GlobalScope.xml msgid "" "Automatically remapped to [constant KEY_META] on macOS and [constant " "KEY_CTRL] on other platforms, this mask is never set in the actual events, " "and should be used for key mapping only." msgstr "" "自动重映射为 macOS 上的 [constant KEY_META] 和其他平台上的 [constant " "KEY_CTRL],此掩码在实际事件中从不设置,应仅用于键映射。" #: doc/classes/@GlobalScope.xml msgid "Shift key mask." msgstr "Shift 键掩码。" #: doc/classes/@GlobalScope.xml msgid "Alt or Option (on macOS) key mask." msgstr "Alt 或 Option(在 macOS 上)键掩码。" #: doc/classes/@GlobalScope.xml msgid "Command (on macOS) or Meta/Windows key mask." msgstr "命令(在 macOS 上)或 Meta/Windows 键掩码。" #: doc/classes/@GlobalScope.xml msgid "Control key mask." msgstr "Ctrl 键掩码。" #: doc/classes/@GlobalScope.xml msgid "Keypad key mask." msgstr "Keypad 键掩码。" #: doc/classes/@GlobalScope.xml msgid "Group Switch key mask." msgstr "Group Switch 键掩码。" #: doc/classes/@GlobalScope.xml msgid "" "Used for keys which only appear once, or when a comparison doesn't need to " "differentiate the [code]LEFT[/code] and [code]RIGHT[/code] versions.\n" "For example, when using [method InputEvent.is_match], an event which has " "[constant KEY_LOCATION_UNSPECIFIED] will match any [enum KeyLocation] on the " "passed event." msgstr "" "用于仅出现一次的键,或者当比较不需要区分 [code]LEFT[/code] 和 [code]RIGHT[/" "code] 版本时。\n" "例如,当使用 [method InputEvent.is_match] 时,具有 [constant " "KEY_LOCATION_UNSPECIFIED] 的事件将与传递的事件上的任意 [enum KeyLocation] 匹" "配。" #: doc/classes/@GlobalScope.xml msgid "A key which is to the left of its twin." msgstr "对键中位于左侧的键。" #: doc/classes/@GlobalScope.xml msgid "A key which is to the right of its twin." msgstr "对键中位于右侧的键。" #: doc/classes/@GlobalScope.xml msgid "" "Enum value which doesn't correspond to any mouse button. This is used to " "initialize [enum MouseButton] properties with a generic state." msgstr "" "与任何鼠标按钮都不对应的枚举值。这用于初始化具有通用状态的 [enum " "MouseButton] 属性。" #: doc/classes/@GlobalScope.xml msgid "Primary mouse button, usually assigned to the left button." msgstr "鼠标主键,通常分配给左键。" #: doc/classes/@GlobalScope.xml msgid "Secondary mouse button, usually assigned to the right button." msgstr "鼠标次键,通常分配给右键。" #: doc/classes/@GlobalScope.xml msgid "Middle mouse button." msgstr "鼠标中键。" #: doc/classes/@GlobalScope.xml msgid "Mouse wheel scrolling up." msgstr "鼠标滚轮向上滚动。" #: doc/classes/@GlobalScope.xml msgid "Mouse wheel scrolling down." msgstr "鼠标滚轮向下滚动。" #: doc/classes/@GlobalScope.xml msgid "Mouse wheel left button (only present on some mice)." msgstr "鼠标滚轮左键(仅在某些鼠标上有实现)。" #: doc/classes/@GlobalScope.xml msgid "Mouse wheel right button (only present on some mice)." msgstr "鼠标滚轮右键(仅在某些鼠标上有实现)。" #: doc/classes/@GlobalScope.xml msgid "" "Extra mouse button 1. This is sometimes present, usually to the sides of the " "mouse." msgstr "鼠标额外键 1。有时会出现,通常位于鼠标的两侧。" #: doc/classes/@GlobalScope.xml msgid "" "Extra mouse button 2. This is sometimes present, usually to the sides of the " "mouse." msgstr "鼠标额外键 2。有时会出现,通常位于鼠标的两侧。" #: doc/classes/@GlobalScope.xml msgid "Primary mouse button mask, usually for the left button." msgstr "鼠标主键掩码,通常用于左键。" #: doc/classes/@GlobalScope.xml msgid "Secondary mouse button mask, usually for the right button." msgstr "鼠标次键掩码,通常用于右键。" #: doc/classes/@GlobalScope.xml msgid "Middle mouse button mask." msgstr "鼠标中键掩码。" #: doc/classes/@GlobalScope.xml msgid "Extra mouse button 1 mask." msgstr "鼠标额外键 1 掩码。" #: doc/classes/@GlobalScope.xml msgid "Extra mouse button 2 mask." msgstr "鼠标额外键 2 掩码。" #: doc/classes/@GlobalScope.xml msgid "An invalid game controller button." msgstr "无效的游戏控制器按钮。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL button A. Corresponds to the bottom action button: Sony " "Cross, Xbox A, Nintendo B." msgstr "" "游戏控制器 SDL 按键 A。对应底部动作按钮:Sony Cross、Xbox A、Nintendo B。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL button B. Corresponds to the right action button: Sony " "Circle, Xbox B, Nintendo A." msgstr "" "游戏控制器 SDL 按钮 B。对应右侧动作按钮:Sony Circle、Xbox B、Nintendo A。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL button X. Corresponds to the left action button: Sony " "Square, Xbox X, Nintendo Y." msgstr "" "游戏控制器 SDL 按钮 X。对应左侧动作按钮:Sony Square、Xbox X、Nintendo Y。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL button Y. Corresponds to the top action button: Sony " "Triangle, Xbox Y, Nintendo X." msgstr "" "游戏控制器 SDL 按钮 Y。对应顶部动作按钮:Sony Triangle、Xbox Y、Nintendo X。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, " "Nintendo - button." msgstr "" "游戏控制器 SDL back 按钮。对应于 Sony Select、Xbox Back、Nintendo - 按钮。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home " "button." msgstr "游戏控制器 SDL guide 按钮。对应于索尼 PS、Xbox 的 Home 键。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL start button. Corresponds to the Sony Options, Xbox " "Menu, Nintendo + button." msgstr "" "游戏控制器 SDL start 按钮。对应于 Sony Options、Xbox Menu、Nintendo + 按钮。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS " "button." msgstr "游戏控制器 SDL 左摇杆按钮。对应于 Sony L3、Xbox L/LS 按钮。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/" "RS button." msgstr "游戏控制器 SDL 右摇杆按钮。对应于 Sony R3、Xbox R/RS 按钮。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox " "LB button." msgstr "游戏控制器 SDL 左肩按钮。对应于 Sony L1、Xbox LB 按钮。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox " "RB button." msgstr "游戏控制器 SDL 右肩按钮。对应于 Sony R1、Xbox RB 按钮。" #: doc/classes/@GlobalScope.xml msgid "Game controller D-pad up button." msgstr "游戏控制器方向键向上按钮。" #: doc/classes/@GlobalScope.xml msgid "Game controller D-pad down button." msgstr "游戏控制器方向键向下按钮。" #: doc/classes/@GlobalScope.xml msgid "Game controller D-pad left button." msgstr "游戏控制器方向键向左键。" #: doc/classes/@GlobalScope.xml msgid "Game controller D-pad right button." msgstr "游戏控制器方向键向右键。" #: doc/classes/@GlobalScope.xml msgid "" "Game controller SDL miscellaneous button. Corresponds to Xbox share button, " "PS5 microphone button, Nintendo Switch capture button." msgstr "" "游戏控制器 SDL 杂项按钮。对应 Xbox 分享键、PS5 麦克风键、Nintendo Switch 捕捉" "键。" #: doc/classes/@GlobalScope.xml msgid "Game controller SDL paddle 1 button." msgstr "游戏控制器 SDL 拨片 1 按钮。" #: doc/classes/@GlobalScope.xml msgid "Game controller SDL paddle 2 button." msgstr "游戏控制器 SDL 拨片 2 按钮。" #: doc/classes/@GlobalScope.xml msgid "Game controller SDL paddle 3 button." msgstr "游戏控制器 SDL 拨片 3 按钮。" #: doc/classes/@GlobalScope.xml msgid "Game controller SDL paddle 4 button." msgstr "游戏控制器 SDL 拨片 4 按钮。" #: doc/classes/@GlobalScope.xml msgid "Game controller SDL touchpad button." msgstr "游戏控制器 SDL 触摸板按钮。" #: doc/classes/@GlobalScope.xml msgid "The number of SDL game controller buttons." msgstr "SDL 游戏控制器按钮的数量。" #: doc/classes/@GlobalScope.xml msgid "" "The maximum number of game controller buttons supported by the engine. The " "actual limit may be lower on specific platforms:\n" "- [b]Android:[/b] Up to 36 buttons.\n" "- [b]Linux:[/b] Up to 80 buttons.\n" "- [b]Windows[/b] and [b]macOS:[/b] Up to 128 buttons." msgstr "" "引擎所支持的最大游戏控制器按钮数。特定平台上的实际界限可能更低:\n" "- [b]Android:[/b]最多 36 个按钮。\n" "- [b]Linux:[/b]最多 80 个按钮。\n" "- [b]Windows[/b] 和 [b]macOS:[/b]最多 128 个按钮。" #: doc/classes/@GlobalScope.xml msgid "An invalid game controller axis." msgstr "无效的游戏控制器轴。" #: doc/classes/@GlobalScope.xml msgid "Game controller left joystick x-axis." msgstr "游戏控制器左操纵杆 x 轴。" #: doc/classes/@GlobalScope.xml msgid "Game controller left joystick y-axis." msgstr "游戏控制器左操纵杆 y 轴。" #: doc/classes/@GlobalScope.xml msgid "Game controller right joystick x-axis." msgstr "游戏控制器右操纵杆 x 轴。" #: doc/classes/@GlobalScope.xml msgid "Game controller right joystick y-axis." msgstr "游戏控制器右操纵杆 y 轴。" #: doc/classes/@GlobalScope.xml msgid "Game controller left trigger axis." msgstr "游戏控制器左扳机轴。" #: doc/classes/@GlobalScope.xml msgid "Game controller right trigger axis." msgstr "游戏控制器右扳机轴。" #: doc/classes/@GlobalScope.xml msgid "The number of SDL game controller axes." msgstr "SDL 游戏控制器轴的数量。" #: doc/classes/@GlobalScope.xml msgid "" "The maximum number of game controller axes: OpenVR supports up to 5 " "Joysticks making a total of 10 axes." msgstr "最大游戏控制器轴数:OpenVR 最多支持 5 个操纵杆,总共 10 个轴。" #: doc/classes/@GlobalScope.xml msgid "" "Does not correspond to any MIDI message. This is the default value of " "[member InputEventMIDI.message]." msgstr "不对应任何 MIDI 消息。这是 [member InputEventMIDI.message] 的默认值。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent when a note is released.\n" "[b]Note:[/b] Not all MIDI devices send this message; some may send [constant " "MIDI_MESSAGE_NOTE_ON] with [member InputEventMIDI.velocity] set to [code]0[/" "code]." msgstr "" "音符被释放时发送的 MIDI 消息。\n" "[b]注意:[/b]并非所有 MIDI 设备都会发送该消息;有些可能会发送 [constant " "MIDI_MESSAGE_NOTE_ON],并将 [member InputEventMIDI.velocity] 设置为 [code]0[/" "code]。" #: doc/classes/@GlobalScope.xml msgid "MIDI message sent when a note is pressed." msgstr "音符被按下时发送的 MIDI 消息。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent to indicate a change in pressure while a note is being " "pressed down, also called aftertouch." msgstr "发送 MIDI 消息以指示音符被按下时的压力的变化,也称为触后。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent when a controller value changes. In a MIDI device, a " "controller is any input that doesn't play notes. These may include sliders " "for volume, balance, and panning, as well as switches and pedals. See the " "[url=https://en.wikipedia.org/wiki/General_MIDI#Controller_events]General " "MIDI specification[/url] for a small list." msgstr "" "控制器值发生变化时发送的 MIDI 消息。MIDI 设备中不演奏音符的输入都属于控制器。" "包括音量滑块、平衡滑块、声像滑块,以及各种开关和踏板等。简要清单见 " "[url=https://zh.wikipedia.org/zh-cn/" "General_MIDI#%E6%8E%A7%E5%88%B6%E5%99%A8%E4%BA%8B%E4%BB%B6%EF%BC%88Controller_events%EF%BC%89]General " "MIDI 规范[/url]。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent when the MIDI device changes its current instrument (also " "called [i]program[/i] or [i]preset[/i])." msgstr "MIDI 设备更改乐器(也叫[i]音色[/i]或[i]预设[/i])时发送的 MIDI 消息。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent to indicate a change in pressure for the whole channel. " "Some MIDI devices may send this instead of [constant " "MIDI_MESSAGE_AFTERTOUCH]." msgstr "" "表示整个通道的压力发生改变时发送的 MIDI 消息。部分 MIDI 设备可能用这个消息来" "代替 [constant MIDI_MESSAGE_AFTERTOUCH]。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent when the value of the pitch bender changes, usually a " "wheel on the MIDI device." msgstr "" "音高弯曲器的值发生改变时发送的 MIDI 消息,音高弯曲器通常是 MIDI 设备上的滚" "轮。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI system exclusive (SysEx) message. This type of message is not " "standardized and it's highly dependent on the MIDI device sending it.\n" "[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not " "implemented." msgstr "" "MIDI 系统独占消息(SysEx)。这类消息并未标准化,取决于发送的 MIDI 设备。\n" "[b]注意:[/b]尚未实现从 [InputEventMIDI] 获取该消息。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent every quarter frame to keep connected MIDI devices " "synchronized. Related to [constant MIDI_MESSAGE_TIMING_CLOCK].\n" "[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not " "implemented." msgstr "" "每四分之一帧发送的 MIDI 消息,用于让连接的 MIDI 设备保持同步。与 [constant " "MIDI_MESSAGE_TIMING_CLOCK] 相关。\n" "[b]注意:[/b]尚未实现从 [InputEventMIDI] 获取该消息。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent to jump onto a new position in the current sequence or " "song.\n" "[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not " "implemented." msgstr "" "跳转至当前序列或乐曲中的某个位置时发送的 MIDI 消息。\n" "[b]注意:[/b]尚未实现从 [InputEventMIDI] 获取该消息。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent to select a sequence or song to play.\n" "[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not " "implemented." msgstr "" "发送以选择要播放的序列或歌曲的 MIDI 消息。\n" "[b]注意:[/b]从 [InputEventMIDI] 获取该消息的数据尚未实现。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent to request a tuning calibration. Used on analog " "synthesizers. Most modern MIDI devices do not need this message." msgstr "" "请求调校时发送的 MIDI 消息。适用于模拟合成器。大多数现代 MIDI 设备不需要这个" "消息。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent 24 times after [constant MIDI_MESSAGE_QUARTER_FRAME], to " "keep connected MIDI devices synchronized." msgstr "" "在 [constant MIDI_MESSAGE_QUARTER_FRAME] 之后发送 24 次的 MIDI 消息,用于让连" "接的 MIDI 设备保持同步。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent to start the current sequence or song from the beginning." msgstr "发送以从头开始当前序列或歌曲的 MIDI 消息。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent to resume from the point the current sequence or song was " "paused." msgstr "发送以从当前序列或歌曲的暂停点恢复的 MIDI 消息。" #: doc/classes/@GlobalScope.xml msgid "MIDI message sent to pause the current sequence or song." msgstr "发送以暂停当前序列或歌曲的 MIDI 消息。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent repeatedly while the MIDI device is idle, to tell the " "receiver that the connection is alive. Most MIDI devices do not send this " "message." msgstr "" "MIDI 设备空闲时不断发送的 MIDI 消息,用于告知接收方连接仍然有效。大多数 MIDI " "设备不会发送这个消息。" #: doc/classes/@GlobalScope.xml msgid "" "MIDI message sent to reset a MIDI device to its default state, as if it was " "just turned on. It should not be sent when the MIDI device is being turned " "on." msgstr "" "用于将 MIDI 设备恢复至开机时的默认状态而发送的 MIDI 消息。MIDI 设备正在启动时" "不应该发送。" #: doc/classes/@GlobalScope.xml msgid "" "Methods that return [enum Error] return [constant OK] when no error " "occurred.\n" "Since [constant OK] has value [code]0[/code], and all other error constants " "are positive integers, it can also be used in boolean checks.\n" "[codeblock]\n" "var error = method_that_returns_error()\n" "if error != OK:\n" "\tprinterr(\"Failure!\")\n" "\n" "# Or, alternatively:\n" "if error:\n" "\tprinterr(\"Still failing!\")\n" "[/codeblock]\n" "[b]Note:[/b] Many functions do not return an error code, but will print " "error messages to standard output." msgstr "" "返回 [enum Error] 的方法会在没有错误发生时返回 [constant OK]。\n" "由于 [constant OK] 的值为 [code]0[/code],并且所有其他错误常数都是正整数,因" "此返回值也可以用于布尔检查。\n" "[codeblock]\n" "var error = method_that_returns_error()\n" "if error != OK:\n" "\tprinterr(\"失败!\")\n" "\n" "# 或者也可以:\n" "if error:\n" "\tprinterr(\"还是失败!\")\n" "[/codeblock]\n" "[b]注意:[/b]许多函数不返回错误代码,但会将错误信息打印到标准输出。" #: doc/classes/@GlobalScope.xml msgid "Generic error." msgstr "一般性错误。" #: doc/classes/@GlobalScope.xml msgid "Unavailable error." msgstr "不可用的错误。" #: doc/classes/@GlobalScope.xml msgid "Unconfigured error." msgstr "未配置的错误。" #: doc/classes/@GlobalScope.xml msgid "Unauthorized error." msgstr "未经授权的错误。" #: doc/classes/@GlobalScope.xml msgid "Parameter range error." msgstr "参数范围错误。" #: doc/classes/@GlobalScope.xml msgid "Out of memory (OOM) error." msgstr "内存不足(OOM)错误。" #: doc/classes/@GlobalScope.xml msgid "File: Not found error." msgstr "文件:未找到错误。" #: doc/classes/@GlobalScope.xml msgid "File: Bad drive error." msgstr "文件:坏驱动器错误。" #: doc/classes/@GlobalScope.xml msgid "File: Bad path error." msgstr "文件:错误的路径错误。" #: doc/classes/@GlobalScope.xml msgid "File: No permission error." msgstr "文件:无权限错误。" #: doc/classes/@GlobalScope.xml msgid "File: Already in use error." msgstr "文件:已在使用错误。" #: doc/classes/@GlobalScope.xml msgid "File: Can't open error." msgstr "文件:无法打开错误。" #: doc/classes/@GlobalScope.xml msgid "File: Can't write error." msgstr "文件:无法写入错误。" #: doc/classes/@GlobalScope.xml msgid "File: Can't read error." msgstr "文件:无法读取错误。" #: doc/classes/@GlobalScope.xml msgid "File: Unrecognized error." msgstr "文件:未识别的错误。" #: doc/classes/@GlobalScope.xml msgid "File: Corrupt error." msgstr "文件:损坏错误。" #: doc/classes/@GlobalScope.xml msgid "File: Missing dependencies error." msgstr "文件:缺少依赖项错误。" #: doc/classes/@GlobalScope.xml msgid "File: End of file (EOF) error." msgstr "文件:文件结束(EOF)错误。" #: doc/classes/@GlobalScope.xml msgid "Can't open error." msgstr "无法打开错误。" #: doc/classes/@GlobalScope.xml msgid "Can't create error." msgstr "无法创建错误。" #: doc/classes/@GlobalScope.xml msgid "Query failed error." msgstr "查询失败错误。" #: doc/classes/@GlobalScope.xml msgid "Already in use error." msgstr "已在使用中错误。" #: doc/classes/@GlobalScope.xml msgid "Locked error." msgstr "锁定错误。" #: doc/classes/@GlobalScope.xml msgid "Timeout error." msgstr "超时错误。" #: doc/classes/@GlobalScope.xml msgid "Can't connect error." msgstr "无法连接错误。" #: doc/classes/@GlobalScope.xml msgid "Can't resolve error." msgstr "无法解决错误。" #: doc/classes/@GlobalScope.xml msgid "Connection error." msgstr "连接错误。" #: doc/classes/@GlobalScope.xml msgid "Can't acquire resource error." msgstr "无法获取资源错误。" #: doc/classes/@GlobalScope.xml msgid "Can't fork process error." msgstr "无法分叉进程错误。" #: doc/classes/@GlobalScope.xml msgid "Invalid data error." msgstr "无效数据错误。" #: doc/classes/@GlobalScope.xml msgid "Invalid parameter error." msgstr "无效参数错误。" #: doc/classes/@GlobalScope.xml msgid "Already exists error." msgstr "已存在的错误。" #: doc/classes/@GlobalScope.xml msgid "Does not exist error." msgstr "不存在的错误。" #: doc/classes/@GlobalScope.xml msgid "Database: Read error." msgstr "数据库:读取错误。" #: doc/classes/@GlobalScope.xml msgid "Database: Write error." msgstr "数据库:写入错误。" #: doc/classes/@GlobalScope.xml msgid "Compilation failed error." msgstr "编译失败错误。" #: doc/classes/@GlobalScope.xml msgid "Method not found error." msgstr "方法未找到错误。" #: doc/classes/@GlobalScope.xml msgid "Linking failed error." msgstr "链接失败错误。" #: doc/classes/@GlobalScope.xml msgid "Script failed error." msgstr "脚本失败错误。" #: doc/classes/@GlobalScope.xml msgid "Cycling link (import cycle) error." msgstr "循环链接(导入循环)错误。" #: doc/classes/@GlobalScope.xml msgid "Invalid declaration error." msgstr "无效声明错误。" #: doc/classes/@GlobalScope.xml msgid "Duplicate symbol error." msgstr "符号重复错误。" #: doc/classes/@GlobalScope.xml msgid "Parse error." msgstr "解析错误。" #: doc/classes/@GlobalScope.xml msgid "Busy error." msgstr "忙碌错误。" #: doc/classes/@GlobalScope.xml msgid "Skip error." msgstr "跳过错误。" #: doc/classes/@GlobalScope.xml msgid "" "Help error. Used internally when passing [code]--version[/code] or [code]--" "help[/code] as executable options." msgstr "" "帮助错误。内部使用,用于将 [code]--version[/code] 或 [code]--help[/code] 作为" "选项传递给可执行文件的情况。" #: doc/classes/@GlobalScope.xml msgid "" "Bug error, caused by an implementation issue in the method.\n" "[b]Note:[/b] If a built-in method returns this code, please open an issue on " "[url=https://github.com/godotengine/godot/issues]the GitHub Issue Tracker[/" "url]." msgstr "" "Bug 错误,由方法中的实现问题引起。\n" "[b]注意:[/b]如果内置方法返回此代码,请在 [url=https://github.com/" "godotengine/godot/issues]GitHub 问题追踪器[/url] 上开一个问题。" #: doc/classes/@GlobalScope.xml msgid "" "Printer on fire error (This is an easter egg, no built-in methods return " "this error code)." msgstr "打印机起火错误(这是个彩蛋,引擎中没有内置方法会返回此错误码)。" #: doc/classes/@GlobalScope.xml msgid "The property has no hint for the editor." msgstr "该属性没有编辑器提示。" #: doc/classes/@GlobalScope.xml #, fuzzy msgid "" "Hints that an [int] or [float] property should be within a range specified " "via the hint string [code]\"min,max\"[/code] or [code]\"min,max,step\"[/" "code]. The hint string can optionally include [code]\"or_greater\"[/code] " "and/or [code]\"or_less\"[/code] to allow manual input going respectively " "above the max or below the min values.\n" "[b]Example:[/b] [code]\"-360,360,1,or_greater,or_less\"[/code].\n" "Additionally, other keywords can be included: [code]\"exp\"[/code] for " "exponential range editing, [code]\"radians_as_degrees\"[/code] for editing " "radian angles in degrees (the range values are also in degrees), [code]" "\"degrees\"[/code] to hint at an angle, [code]\"prefer_slider\"[/code] to " "show the slider for integers, [code]\"hide_control\"[/code] to hide the " "slider or up-down arrows, and [code]\"suffix:px/s\"[/code] to display a " "suffix indicating the value's unit (e.g. [code]px/s[/code] for pixels per " "second)." msgstr "" "提示 [int] 或 [float] 属性应在提示字符串 [code]\"最小值,最大值\"[/code] 或 " "[code]\"最小值,最大值,步长\"[/code] 指定的范围内。提示字符串可以选择包含 " "[code]\"or_greater\"[/code] 和/或 [code]\"or_less\"[/code],从而允许手动输入" "高于最大值或低于最小值的值。\n" "[b]示例:[/b][code]\"-360,360,1,or_greater,or_less\"[/code]。\n" "此外,还可以包含其他关键字:[code]\"exp\"[/code] 用于指数范围编辑,[code]" "\"radians_as_degrees\"[/code] 用于以度数编辑弧度角(范围的取值也使用度数)," "[code]\"degrees\"[/code] 提示角度,[code]\"hide_slider\"[/code] 则会隐藏滑" "块。" #: doc/classes/@GlobalScope.xml #, fuzzy msgid "" "Hints that an [int], [String], or [StringName] property is an enumerated " "value to pick in a list specified via a hint string.\n" "The hint string is a comma separated list of names such as [code]" "\"Hello,Something,Else\"[/code]. Whitespace is [b]not[/b] removed from " "either end of a name. For integer properties, the first name in the list has " "value 0, the next 1, and so on. Explicit values can also be specified by " "appending [code]:integer[/code] to the name, e.g. [code]" "\"Zero,One,Three:3,Four,Six:6\"[/code]." msgstr "" "提示 [int] 或 [String] 属性是枚举值,可通过提示字符串在指定的列表中选取。\n" "该提示字符串是逗号分隔的名称列表,例如 [code]\"Hello,Something,Else\"[/" "code]。 [b]不会[/b]从名称的任何一端删除空格。对于整数属性,列表中的第一个名称" "的值为 0,下一个名称的值为 1,依此类推。也可以通过将 [code]:integer[/code] 附" "加到名称来显式指定值,例如 [code]\"Zero,One,Three:3,Four,Six:6\"[/code]。" #: doc/classes/@GlobalScope.xml #, fuzzy msgid "" "Hints that a [String] or [StringName] property can be an enumerated value to " "pick in a list specified via a hint string such as [code]" "\"Hello,Something,Else\"[/code]. See [constant PROPERTY_HINT_ENUM] for " "details.\n" "Unlike [constant PROPERTY_HINT_ENUM], a property with this hint still " "accepts arbitrary values and can be empty. The list of values serves to " "suggest possible values." msgstr "" "提示 [String] 属性为枚举值,可以通过提示字符串在指定的列表中选取,例如 [code]" "\"Hello,Something,Else\"[/code]。\n" "与 [constant PROPERTY_HINT_ENUM] 不同,具有该提示的属性仍然接受任意值并且可以" "为空。值列表用于建议可能的值。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [float] property should be edited via an exponential easing " "function. The hint string can include [code]\"attenuation\"[/code] to flip " "the curve horizontally and/or [code]\"positive_only\"[/code] to exclude in/" "out easing and limit values to be greater than or equal to zero." msgstr "" "提示应通过指数缓动函数编辑 [float] 属性。提示字符串可以包括 [code]" "\"attenuation\"[/code] 以水平翻转曲线,和/或 [code]\"positive_only\"[/code] " "以排除 in/out 缓动并限制值大于或等于零。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a vector property should allow its components to be linked. For " "example, this allows [member Vector2.x] and [member Vector2.y] to be edited " "together." msgstr "" "提示向量属性应该允许分量链接。例如,这能够让 [member Vector2.x] 和 [member " "Vector2.y] 被一起编辑。" #: doc/classes/@GlobalScope.xml #, fuzzy msgid "" "Hints that an [int] property is a bitmask with named bit flags.\n" "The hint string is a comma separated list of names such as [code]" "\"Bit0,Bit1,Bit2,Bit3\"[/code]. Whitespace is [b]not[/b] removed from either " "end of a name. The first name in the list has value 1, the next 2, then 4, " "8, 16 and so on. Explicit values can also be specified by appending " "[code]:integer[/code] to the name, e.g. [code]\"A:4,B:8,C:16\"[/code]. You " "can also combine several flags ([code]\"A:4,B:8,AB:12,C:16\"[/code]).\n" "[b]Note:[/b] A flag value must be at least [code]1[/code] and at most " "[code]2 ** 32 - 1[/code].\n" "[b]Note:[/b] Unlike [constant PROPERTY_HINT_ENUM], the previous explicit " "value is not taken into account. For the hint [code]\"A:16,B,C\"[/code], A " "is 16, B is 2, C is 4." msgstr "" "提示 [int] 属性为位掩码,位标志拥有名称。\n" "提示字符串为逗号分隔的名称列表,例如 [code]\"Bit0,Bit1,Bit2,Bit3\"[/code]。名" "称两端的空白字符[b]不会[/b]被移除。列表中的第一个名称的值为 1、然后是 2、接下" "来就是 4、8、16 等值。也可以通过在名称后加上 [code]:整数[/code] 来指定显式的" "值,例如 [code]\"A:4,B:8,C:16\"[/code]。你还可以对标志进行组合([code]" "\"A:4,B:8,AB:12,C:16\"[/code])。\n" "[b]注意:[/b]标志值最多为 [code]1[/code],最多为 [code]2 ** 32 - 1[/code]。\n" "[b]注意:[/b]与 [constant PROPERTY_HINT_ENUM] 不同,不会考虑前一个显式值。如" "果提示为 [code]\"A:16,B,C\"[/code],则 A 为 16、B 为 2、C 为 4。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that an [int] property is a bitmask using the optionally named 2D " "render layers." msgstr "提示 [int] 属性为位掩码,表示可命名的 2D 渲染层。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that an [int] property is a bitmask using the optionally named 2D " "physics layers." msgstr "提示 [int] 属性为位掩码,表示可命名的 2D 物理层。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that an [int] property is a bitmask using the optionally named 2D " "navigation layers." msgstr "提示 [int] 属性为位掩码,表示可命名的 2D 导航层。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that an [int] property is a bitmask using the optionally named 3D " "render layers." msgstr "提示 [int] 属性为位掩码,表示可命名的 3D 渲染层。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that an [int] property is a bitmask using the optionally named 3D " "physics layers." msgstr "提示 [int] 属性为位掩码,表示可命名的 3D 物理层。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that an [int] property is a bitmask using the optionally named 3D " "navigation layers." msgstr "提示 [int] 属性为位掩码,表示可命名的 3D 导航层。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that an integer property is a bitmask using the optionally named " "avoidance layers." msgstr "提示整数属性为位掩码,表示可命名的避障层。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [String] property is a path to a file. Editing it will show a " "file dialog for picking the path. The hint string can be a set of filters " "with wildcards like [code]\"*.png,*.jpg\"[/code]. By default the file will " "be stored as UID whenever available. You can use [ResourceUID] methods to " "convert it back to path. For storing a raw path, use [constant " "PROPERTY_HINT_FILE_PATH]." msgstr "" "提示 [String] 属性为文件的路径。编辑时会弹出选取路径的文件对话框。提示字符串" "可以设为一组带有通配符的筛选器,例如 [code]\"*.png,*.jpg\"[/code]。默认情况" "下,如果文件的 UID 可用,则会以 UID 形式进行存储。可以使用 [ResourceUID] 中的" "方法将 UID 转换回路径。要存储原始路径,请使用 [constant " "PROPERTY_HINT_FILE_PATH]。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [String] property is a path to a directory. Editing it will " "show a file dialog for picking the path." msgstr "提示 [String] 属性为目录的路径。编辑时会弹出选取路径的文件对话框。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [String] property is an absolute path to a file outside the " "project folder. Editing it will show a file dialog for picking the path. The " "hint string can be a set of filters with wildcards, like [code]" "\"*.png,*.jpg\"[/code]." msgstr "" "提示 [String] 属性为文件的绝对路径,位于项目文件夹之外。编辑时会弹出选取路径" "的文件对话框。提示字符串可以设为一组带有通配符的筛选器,例如 [code]" "\"*.png,*.jpg\"[/code]。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [String] property is an absolute path to a directory outside " "the project folder. Editing it will show a file dialog for picking the path." msgstr "" "提示 [String] 属性为目录的绝对路径,位于项目文件夹之外。编辑时会弹出选取路径" "的文件对话框。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a property is an instance of a [Resource]-derived type, " "optionally specified via the hint string (e.g. [code]\"Texture2D\"[/code]). " "Editing it will show a popup menu of valid resource types to instantiate." msgstr "" "提示属性是 [Resource] 派生类型的实例,可通过提示字符串指定(例如 [code]" "\"Texture2D\"[/code])。 编辑该属性会显示一个有效资源类型的弹出菜单用以实例" "化。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [String] property is text with line breaks. Editing it will " "show a text input field where line breaks can be typed.\n" "The hint string can be set to [code]\"monospace\"[/code] to force the input " "field to use a monospaced font.\n" "If the hint string [code]\"no_wrap\"[/code] is set, the input field will not " "wrap lines at boundaries, instead resorting to making the area scrollable." msgstr "" #: doc/classes/@GlobalScope.xml msgid "Hints that a [String] property is an [Expression]." msgstr "提示 [String] 属性为 [Expression]。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [String] property should show a placeholder text on its input " "field, if empty. The hint string is the placeholder text to use." msgstr "" "提示 [String] 属性在为空时应当显示占位文本。提示字符串为所使用的占位文本。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [Color] property should be edited without affecting its " "transparency ([member Color.a] is not editable)." msgstr "" "提示一个 [Color] 属性在编辑时不能影响其透明度([member Color.a] 不可编辑)。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that the property's value is an object encoded as object ID, with its " "type specified in the hint string. Used by the debugger." msgstr "" "提示该属性的值是一个被编码为对象 ID 的对象,其类型在提示字符串中指定。被用于" "调试器。" #: doc/classes/@GlobalScope.xml msgid "" "If a property is [String], hints that the property represents a particular " "type (class). This allows to select a type from the create dialog. The " "property will store the selected type as a string.\n" "If a property is [Array], hints the editor how to show elements. The " "[code]hint_string[/code] must encode nested types using [code]\":\"[/code] " "and [code]\"/\"[/code].\n" "If a property is [Dictionary], hints the editor how to show elements. The " "[code]hint_string[/code] is the same as [Array], with a [code]\";\"[/code] " "separating the key and value.\n" "[codeblocks]\n" "[gdscript]\n" "# Array of elem_type.\n" "hint_string = \"%d:\" % [elem_type]\n" "hint_string = \"%d/%d:%s\" % [elem_type, elem_hint, elem_hint_string]\n" "# Two-dimensional array of elem_type (array of arrays of elem_type).\n" "hint_string = \"%d:%d:\" % [TYPE_ARRAY, elem_type]\n" "hint_string = \"%d:%d/%d:%s\" % [TYPE_ARRAY, elem_type, elem_hint, " "elem_hint_string]\n" "# Three-dimensional array of elem_type (array of arrays of arrays of " "elem_type).\n" "hint_string = \"%d:%d:%d:\" % [TYPE_ARRAY, TYPE_ARRAY, elem_type]\n" "hint_string = \"%d:%d:%d/%d:%s\" % [TYPE_ARRAY, TYPE_ARRAY, elem_type, " "elem_hint, elem_hint_string]\n" "[/gdscript]\n" "[csharp]\n" "// Array of elemType.\n" "hintString = $\"{elemType:D}:\";\n" "hintString = $\"{elemType:}/{elemHint:D}:{elemHintString}\";\n" "// Two-dimensional array of elemType (array of arrays of elemType).\n" "hintString = $\"{Variant.Type.Array:D}:{elemType:D}:\";\n" "hintString = $\"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:" "{elemHintString}\";\n" "// Three-dimensional array of elemType (array of arrays of arrays of " "elemType).\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}:" "\";\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/" "{elemHint:D}:{elemHintString}\";\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Examples:[/b]\n" "[codeblocks]\n" "[gdscript]\n" "hint_string = \"%d:\" % [TYPE_INT] # Array of integers.\n" "hint_string = \"%d/%d:1,10,1\" % [TYPE_INT, PROPERTY_HINT_RANGE] # Array of " "integers (in range from 1 to 10).\n" "hint_string = \"%d/%d:Zero,One,Two\" % [TYPE_INT, PROPERTY_HINT_ENUM] # " "Array of integers (an enum).\n" "hint_string = \"%d/%d:Zero,One,Three:3,Six:6\" % [TYPE_INT, " "PROPERTY_HINT_ENUM] # Array of integers (an enum).\n" "hint_string = \"%d/%d:*.png\" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of " "strings (file paths).\n" "hint_string = \"%d/%d:Texture2D\" % [TYPE_OBJECT, " "PROPERTY_HINT_RESOURCE_TYPE] # Array of textures.\n" "\n" "hint_string = \"%d:%d:\" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array " "of floats.\n" "hint_string = \"%d:%d/%d:\" % [TYPE_ARRAY, TYPE_STRING, " "PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings.\n" "hint_string = \"%d:%d/%d:-1,1,0.1\" % [TYPE_ARRAY, TYPE_FLOAT, " "PROPERTY_HINT_RANGE] # Two-dimensional array of floats (in range from -1 to " "1).\n" "hint_string = \"%d:%d/%d:Texture2D\" % [TYPE_ARRAY, TYPE_OBJECT, " "PROPERTY_HINT_RESOURCE_TYPE] # Two-dimensional array of textures.\n" "[/gdscript]\n" "[csharp]\n" "hintString = $\"{Variant.Type.Int:D}/{PropertyHint.Range:D}:1,10,1\"; // " "Array of integers (in range from 1 to 10).\n" "hintString = $\"{Variant.Type.Int:D}/" "{PropertyHint.Enum:D}:Zero,One,Two\"; // Array of integers (an enum).\n" "hintString = $\"{Variant.Type.Int:D}/" "{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6\"; // Array of integers (an " "enum).\n" "hintString = $\"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png\"; // " "Array of strings (file paths).\n" "hintString = $\"{Variant.Type.Object:D}/" "{PropertyHint.ResourceType:D}:Texture2D\"; // Array of textures.\n" "\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Float:D}:\"; // Two-" "dimensional array of floats.\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.String:D}/" "{PropertyHint.MultilineText:D}:\"; // Two-dimensional array of multiline " "strings.\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Float:D}/" "{PropertyHint.Range:D}:-1,1,0.1\"; // Two-dimensional array of floats (in " "range from -1 to 1).\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Object:D}/" "{PropertyHint.ResourceType:D}:Texture2D\"; // Two-dimensional array of " "textures.\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] The trailing colon is required for properly detecting built-in " "types." msgstr "" "如果属性为 [String],则提示该属性代表特定的类型(类)。这样就能使用创建对话框" "选择类型。该属性中存放的是所选类型,是一个字符串。\n" "如果属性为 [Array],则提示编辑器如何显示其中的元素。[code]hint_string[/code] " "必须使用 [code]\":\"[/code] 和 [code]\"/\"[/code] 对内嵌的类型进行编码。\n" "如果属性为 [Dictionary],则提示编辑器如何显示其中的元素。[code]hint_string[/" "code] 与 [Array] 相同,使用 [code]\";\"[/code] 分隔键和值。\n" "[codeblocks]\n" "[gdscript]\n" "# elem_type 数组。\n" "hint_string = \"%d:\" % [elem_type]\n" "hint_string = \"%d/%d:%s\" % [elem_type, elem_hint, elem_hint_string]\n" "# elem_type 二维数组(elem_type 数组的数组)。\n" "hint_string = \"%d:%d:\" % [TYPE_ARRAY, elem_type]\n" "hint_string = \"%d:%d/%d:%s\" % [TYPE_ARRAY, elem_type, elem_hint, " "elem_hint_string]\n" "# elem_type 三维数组(elem_type 数组的数组的数组)。\n" "hint_string = \"%d:%d:%d:\" % [TYPE_ARRAY, TYPE_ARRAY, elem_type]\n" "hint_string = \"%d:%d:%d/%d:%s\" % [TYPE_ARRAY, TYPE_ARRAY, elem_type, " "elem_hint, elem_hint_string]\n" "[/gdscript]\n" "[csharp]\n" "// elem_type 数组。\n" "hintString = $\"{elemType:D}:\";\n" "hintString = $\"{elemType:}/{elemHint:D}:{elemHintString}\";\n" "// elem_type 二维数组(elem_type 数组的数组)。\n" "hintString = $\"{Variant.Type.Array:D}:{elemType:D}:\";\n" "hintString = $\"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:" "{elemHintString}\";\n" "// elem_type 三维数组(elem_type 数组的数组的数组)。\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}:" "\";\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/" "{elemHint:D}:{elemHintString}\";\n" "[/csharp]\n" "[/codeblocks]\n" "[b]示例:[/b]\n" "[codeblocks]\n" "[gdscript]\n" "hint_string = \"%d:\" % [TYPE_INT] # 整数数组。\n" "hint_string = \"%d/%d:1,10,1\" % [TYPE_INT, PROPERTY_HINT_RANGE] # 整数数组" "(范围为 1 到 10)。\n" "hint_string = \"%d/%d:Zero,One,Two\" % [TYPE_INT, PROPERTY_HINT_ENUM] # 整数" "数组(枚举)。\n" "hint_string = \"%d/%d:Zero,One,Three:3,Six:6\" % [TYPE_INT, " "PROPERTY_HINT_ENUM] # 整数数组(枚举)。\n" "hint_string = \"%d/%d:*.png\" % [TYPE_STRING, PROPERTY_HINT_FILE] # 字符串数" "组(文件路径)。\n" "hint_string = \"%d/%d:Texture2D\" % [TYPE_OBJECT, " "PROPERTY_HINT_RESOURCE_TYPE] # 纹理数组。\n" "\n" "hint_string = \"%d:%d:\" % [TYPE_ARRAY, TYPE_FLOAT] # 浮点数二维数组。\n" "hint_string = \"%d:%d/%d:\" % [TYPE_ARRAY, TYPE_STRING, " "PROPERTY_HINT_MULTILINE_TEXT] # 多行字符串二维数组。\n" "hint_string = \"%d:%d/%d:-1,1,0.1\" % [TYPE_ARRAY, TYPE_FLOAT, " "PROPERTY_HINT_RANGE] # 浮点数二维数组(范围为 -1 到 1)。\n" "hint_string = \"%d:%d/%d:Texture2D\" % [TYPE_ARRAY, TYPE_OBJECT, " "PROPERTY_HINT_RESOURCE_TYPE] # 纹理二维数组。\n" "[/gdscript]\n" "[csharp]\n" "hintString = $\"{Variant.Type.Int:D}/{PropertyHint.Range:D}:1,10,1\"; // 整数" "数组(范围为 1 到 10)。\n" "hintString = $\"{Variant.Type.Int:D}/" "{PropertyHint.Enum:D}:Zero,One,Two\"; // 整数数组(枚举)。\n" "hintString = $\"{Variant.Type.Int:D}/" "{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6\"; // 整数数组(枚举)。\n" "hintString = $\"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png\"; // 字" "符串数组(文件路径)。\n" "hintString = $\"{Variant.Type.Object:D}/" "{PropertyHint.ResourceType:D}:Texture2D\"; // 纹理数组。\n" "\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Float:D}:\"; // 浮点数二" "维数组。\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.String:D}/" "{PropertyHint.MultilineText:D}:\"; // 多行字符串二维数组。\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Float:D}/" "{PropertyHint.Range:D}:-1,1,0.1\"; // 浮点数二维数组(范围为 -1 到 1)。\n" "hintString = $\"{Variant.Type.Array:D}:{Variant.Type.Object:D}/" "{PropertyHint.ResourceType:D}:Texture2D\"; // 纹理二维数组。\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]后缀冒号是必须的,否则无法正确识别内置类型。" #: doc/classes/@GlobalScope.xml msgid "This hint is not used by the engine." msgstr "该提示不会被引擎使用。" #: doc/classes/@GlobalScope.xml msgid "Hints that an object is too big to be sent via the debugger." msgstr "提示对象太大而无法通过调试器发送。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that the hint string specifies valid node types for property of type " "[NodePath]." msgstr "提示该提示字符串为类型 [NodePath] 的属性指定有效的节点类型。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [String] property is a path to a file. Editing it will show a " "file dialog for picking the path for the file to be saved at. The dialog has " "access to the project's directory. The hint string can be a set of filters " "with wildcards like [code]\"*.png,*.jpg\"[/code]. See also [member " "FileDialog.filters]." msgstr "" "提示 [String] 属性是文件的路径。编辑它将显示一个文件对话框,用于选择文件要保" "存的路径。该对话框可以访问项目的目录。该提示字符串可以是一组带有通配符的筛选" "器,例如 [code]\"*.png,*.jpg\"[/code]。另见 [member FileDialog.filters]。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [String] property is a path to a file. Editing it will show a " "file dialog for picking the path for the file to be saved at. The dialog has " "access to the entire filesystem. The hint string can be a set of filters " "with wildcards like [code]\"*.png,*.jpg\"[/code]. See also [member " "FileDialog.filters]." msgstr "" "提示 [String] 属性是文件的路径。编辑它将显示一个文件对话框,用于选择文件要保" "存的路径。该对话框可以访问整个文件系统。该提示字符串可以是一组带有通配符的筛" "选器,例如 [code]\"*.png,*.jpg\"[/code]。另见 [member FileDialog.filters]。" #: doc/classes/@GlobalScope.xml msgid "Hints that an [int] property is a pointer. Used by GDExtension." msgstr "提示 [int] 属性是一个指针。用于 GDExtension。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a property is an [Array] with the stored type specified in the " "hint string. The hint string contains the type of the array (e.g. [code]" "\"String\"[/code]).\n" "Use the hint string format from [constant PROPERTY_HINT_TYPE_STRING] for " "more control over the stored type." msgstr "" "提示属性为 [Array],其中所存储的类型在提示字符串中指定。提示字符串中包含的是" "数组的类型(例如 [code]\"String\"[/code])。\n" "对存储的类型进行更精细的控制请使用 [constant PROPERTY_HINT_TYPE_STRING] 中的" "提示字符串。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a property is a [Dictionary] with the stored types specified in " "the hint string. The hint string contains the key and value types separated " "by a semicolon (e.g. [code]\"int;String\"[/code]).\n" "Use the hint string format from [constant PROPERTY_HINT_TYPE_STRING] for " "more control over the stored types." msgstr "" "提示属性为 [Dictionary],其中所存储的类型在提示字符串中指定。提示字符串中包含" "的是键和值的类型,由英文分号分隔(例如 [code]\"int;String\"[/code])。\n" "对存储的类型进行更精细的控制请使用 [constant PROPERTY_HINT_TYPE_STRING] 中的" "提示字符串。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a string property is a locale code. Editing it will show a locale " "dialog for picking language and country." msgstr "" "提示一个字符串属性是一个区域设置代码。编辑它将显示一个用于选择语言和地区的区" "域设置对话框。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a dictionary property is string translation map. Dictionary keys " "are locale codes and, values are translated strings." msgstr "" "提示一个字典属性是字符串翻译映射。字典的键是区域设置代码,值是翻译后的字符" "串。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a property is an instance of a [Node]-derived type, optionally " "specified via the hint string (e.g. [code]\"Node2D\"[/code]). Editing it " "will show a dialog for picking a node from the scene." msgstr "" "提示属性是 [Node] 派生类型的实例,可以选择通过提示字符串指定(例如 [code]" "\"Node2D\"[/code])。编辑它将显示一个用于从场景中选取节点的对话框。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a quaternion property should disable the temporary euler editor." msgstr "提示四元数属性应当禁用临时欧拉值编辑器。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a string property is a password, and every character is replaced " "with the secret character." msgstr "提示字符串属性为密码,每一个字符都会被替换为秘密字符。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [Callable] property should be displayed as a clickable button. " "When the button is pressed, the callable is called. The hint string " "specifies the button text and optionally an icon from the [code]" "\"EditorIcons\"[/code] theme type.\n" "[codeblock lang=text]\n" "\"Click me!\" - A button with the text \"Click me!\" and the default " "\"Callable\" icon.\n" "\"Click me!,ColorRect\" - A button with the text \"Click me!\" and the " "\"ColorRect\" icon.\n" "[/codeblock]\n" "[b]Note:[/b] A [Callable] cannot be properly serialized and stored in a " "file, so it is recommended to use [constant PROPERTY_USAGE_EDITOR] instead " "of [constant PROPERTY_USAGE_DEFAULT]." msgstr "" "一个[Callable]属性应当被显示为一个可点击的按钮。当按钮被按下,该属性被调用。" "提示字符串指定了按钮的文本并可以通过[code]\"EditorIcons\"[/code]主题类型指定" "一个图标。\n" "[codeblock lang=text]\n" "\"Click me!\" - 一个按钮,文本为“Click me!”,图标是默认的“Callable”图标。\n" "\"Click me!,ColorRect\" - 一个按钮,文本为“Click me!”,图标是“ColorRect”图" "标。\n" "[/codeblock]\n" "[b]注意:[/b]一个可调用对象[Callable]无法被妥善序列化和保存到文件,所以建议使" "用[constant PROPERTY_USAGE_EDITOR]而不是[constant PROPERTY_USAGE_DEFAULT]。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a property will be changed on its own after setting, such as " "[member AudioStreamPlayer.playing] or [member GPUParticles3D.emitting]." msgstr "" "提示一个属性在设置后仍会自动被改变,例如[member AudioStreamPlayer.playing]或" "[member GPUParticles3D.emitting]。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a boolean property will enable the feature associated with the " "group that it occurs in. The property will be displayed as a checkbox on the " "group header. Only works within a group or subgroup.\n" "By default, disabling the property hides all properties in the group. Use " "the optional hint string [code]\"checkbox_only\"[/code] to disable this " "behavior." msgstr "" "提示布尔值属性会启用属性所在分组对应的功能。属性会以复选框的形式在分组标题上" "显示。仅在分组或子分组中有效。\n" "默认情况下,禁用该属性会隐藏分组中的所有属性。请使用可选的提示字符串 [code]" "\"checkbox_only\"[/code] 禁用该行为。" #: doc/classes/@GlobalScope.xml msgid "" "Hints that a [String] or [StringName] property is the name of an input " "action. This allows the selection of any action name from the Input Map in " "the Project Settings. The hint string may contain two options separated by " "commas:\n" "- If it contains [code]\"show_builtin\"[/code], built-in input actions are " "included in the selection.\n" "- If it contains [code]\"loose_mode\"[/code], loose mode is enabled. This " "allows inserting any action name even if it's not present in the input map." msgstr "" "提示 [String] 和 [StringName] 属性为输入动作的名称。允许选择项目设置“输入映" "射”中的动作名称。提示字符串可以包含两个选项,由英文逗号分隔:\n" "- 如果包含 [code]\"show_builtin\"[/code] 则选项中包含内置输入动作。\n" "- 如果包含 [code]\"loose_mode\"[/code] 则启用宽松模式,允许插入任意动作名称," "可以是输入映射中不存在的名称。" #: doc/classes/@GlobalScope.xml msgid "" "Like [constant PROPERTY_HINT_FILE], but the property is stored as a raw " "path, not UID. That means the reference will be broken if you move the file. " "Consider using [constant PROPERTY_HINT_FILE] when possible." msgstr "" "与 [constant PROPERTY_HINT_FILE] 类似,但是属性以原始路径的形式存储,不使用 " "UID。这意味着移动文件后引用可能损坏。请尽量使用 [constant " "PROPERTY_HINT_FILE]。" #: doc/classes/@GlobalScope.xml msgid "Represents the size of the [enum PropertyHint] enum." msgstr "代表 [enum PropertyHint] 枚举的大小。" #: doc/classes/@GlobalScope.xml msgid "" "The property is not stored, and does not display in the editor. This is the " "default for non-exported properties." msgstr "该属性不被存储,也不会显示在编辑器中。这是非导出属性的默认值。" #: doc/classes/@GlobalScope.xml msgid "" "The property is serialized and saved in the scene file (default for exported " "properties)." msgstr "将属性序列化并保存到场景文件中(用于导出属性的默认值)。" #: doc/classes/@GlobalScope.xml msgid "" "The property is shown in the [EditorInspector] (default for exported " "properties)." msgstr "该属性将被显示在 [EditorInspector] 中(用于导出属性的默认值)。" #: doc/classes/@GlobalScope.xml msgid "The property is excluded from the class reference." msgstr "该属性排除在类参考手册之外。" #: doc/classes/@GlobalScope.xml msgid "The property can be checked in the [EditorInspector]." msgstr "该属性可以在 [EditorInspector] 中被勾选。" #: doc/classes/@GlobalScope.xml msgid "The property is checked in the [EditorInspector]." msgstr "该属性在 [EditorInspector] 中已被勾选。" #: doc/classes/@GlobalScope.xml msgid "Used to group properties together in the editor. See [EditorInspector]." msgstr "用于在编辑器中将属性编组在一起。请参阅 [EditorInspector]。" #: doc/classes/@GlobalScope.xml msgid "Used to categorize properties together in the editor." msgstr "在编辑器中用于为属性分类。" #: doc/classes/@GlobalScope.xml msgid "" "Used to group properties together in the editor in a subgroup (under a " "group). See [EditorInspector]." msgstr "" "用于在子组(一个组下)中将编辑器中的属性编组在一起。请参阅 " "[EditorInspector]。" #: doc/classes/@GlobalScope.xml msgid "" "The property is a bitfield, i.e. it contains multiple flags represented as " "bits." msgstr "该属性是一个位字段,即它包含多个被表示为位的标志。" #: doc/classes/@GlobalScope.xml msgid "The property does not save its state in [PackedScene]." msgstr "该属性不在 [PackedScene] 中保存其状态。" #: doc/classes/@GlobalScope.xml msgid "Editing the property prompts the user for restarting the editor." msgstr "编辑属性会提示用户重新启动编辑器。" #: doc/classes/@GlobalScope.xml msgid "" "The property is a script variable. [constant PROPERTY_USAGE_SCRIPT_VARIABLE] " "can be used to distinguish between exported script variables from built-in " "variables (which don't have this usage flag). By default, [constant " "PROPERTY_USAGE_SCRIPT_VARIABLE] is [b]not[/b] applied to variables that are " "created by overriding [method Object._get_property_list] in a script." msgstr "" "本属性是一个脚本变量。[constant PROPERTY_USAGE_SCRIPT_VARIABLE]可以用来把导出" "的脚本变量与内建变量(没有这一项使用标识)区分开来。默认情况下,[constant " "PROPERTY_USAGE_SCRIPT_VARIABLE]对脚本中通过重载[method " "Object._get_property_list]创建的变量[b]不生效[/b]。" #: doc/classes/@GlobalScope.xml msgid "" "The property value of type [Object] will be stored even if its value is " "[code]null[/code]." msgstr "即使 [Object] 类型的属性值为 [code]null[/code],也会被存储。" #: doc/classes/@GlobalScope.xml msgid "If this property is modified, all inspector fields will be refreshed." msgstr "如果该属性被修改,则所有检查器字段都将被刷新。" #: doc/classes/@GlobalScope.xml msgid "This flag is not used by the engine." msgstr "该标志不会被引擎使用。" #: doc/classes/@GlobalScope.xml msgid "" "The property is a variable of enum type, i.e. it only takes named integer " "constants from its associated enumeration." msgstr "" "该属性是一个枚举类型的变量,即它仅从其关联的枚举中获取被命名的整数常量。" #: doc/classes/@GlobalScope.xml msgid "" "If property has [code]nil[/code] as default value, its type will be " "[Variant]." msgstr "如果属性将 [code]nil[/code] 作为默认值,则其类型将为 [Variant]。" #: doc/classes/@GlobalScope.xml msgid "" "The property is the element count of a property array, i.e. a list of groups " "of related properties. Properties defined with this usage also need a " "specific [code]class_name[/code] field in the form of [code]label,prefix[/" "code]. The field may also include additional comma-separated options:\n" "- [code]page_size=N[/code]: Overrides [member EditorSettings.interface/" "inspector/max_array_dictionary_items_per_page] for this array.\n" "- [code]add_button_text=text[/code]: The text displayed by the \"Add " "Element\" button.\n" "- [code]static[/code]: The elements can't be re-arranged.\n" "- [code]const[/code]: New elements can't be added.\n" "- [code]numbered[/code]: An index will appear next to each element.\n" "- [code]unfoldable[/code]: The array can't be folded.\n" "- [code]swap_method=method_name[/code]: The method that will be called when " "two elements switch places. The method should take 2 [int] parameters, which " "will be indices of the elements being swapped.\n" "Note that making a full-fledged property array requires boilerplate code " "involving [method Object._get_property_list]." msgstr "" #: doc/classes/@GlobalScope.xml msgid "" "When duplicating a resource with [method Resource.duplicate], and this flag " "is set on a property of that resource, the property should always be " "duplicated, regardless of the [code]subresources[/code] bool parameter." msgstr "" "当创建一个带有 [method Resource.duplicate] 的 Resource,并且它的标志是在一个 " "Resource 的属性上设置的副本时候,无论 [code]subresources[/code] 为多少,该属" "性永远都会被创建为副本。" #: doc/classes/@GlobalScope.xml msgid "" "When duplicating a resource with [method Resource.duplicate], and this flag " "is set on a property of that resource, the property should never be " "duplicated, regardless of the [code]subresources[/code] bool parameter." msgstr "" "使用 [method Resource.duplicate] 复制资源时,如果该资源的某个属性上设有这个标" "志,则不会对该属性进行复制,无视 [code]subresources[/code] 布尔型参数。" #: doc/classes/@GlobalScope.xml msgid "" "The property is only shown in the editor if modern renderers are supported " "(the Compatibility rendering method is excluded)." msgstr "" "仅当支持现代渲染器(不包括 Compatibility 渲染方式)时,该属性才会显示在编辑器" "中。" #: doc/classes/@GlobalScope.xml msgid "" "The [NodePath] property will always be relative to the scene's root. Mostly " "useful for local resources." msgstr "[NodePath] 属性将始终相对于场景根。对于本地资源来说最有用。" #: doc/classes/@GlobalScope.xml msgid "" "Use when a resource is created on the fly, i.e. the getter will always " "return a different instance. [ResourceSaver] needs this information to " "properly save such resources." msgstr "" "在动态创建资源时使用,即 Getter 将始终返回一个不同的实例。[ResourceSaver] 需" "要该信息来正确保存这种资源。" #: doc/classes/@GlobalScope.xml msgid "" "Inserting an animation key frame of this property will automatically " "increment the value, allowing to easily keyframe multiple values in a row." msgstr "" "插入该属性的动画关键帧将自动增加该值,从而可以轻松地为一行中的多个值设置关键" "帧。" #: doc/classes/@GlobalScope.xml msgid "" "When this property is a [Resource] and base object is a [Node], a resource " "instance will be automatically created whenever the node is created in the " "editor." msgstr "" "当该属性为 [Resource] 且基础对象为 [Node] 时,则每当该节点是在编辑器中创建" "的,都会自动创建一个资源实例。" #: doc/classes/@GlobalScope.xml msgid "" "The property is considered a basic setting and will appear even when " "advanced mode is disabled. Used for project settings." msgstr "该属性被视为基本设置,即使禁用高级模式时也会显现。用于项目设置。" #: doc/classes/@GlobalScope.xml msgid "The property is read-only in the [EditorInspector]." msgstr "该属性在 [EditorInspector] 中只读。" #: doc/classes/@GlobalScope.xml msgid "" "An export preset property with this flag contains confidential information " "and is stored separately from the rest of the export preset configuration." msgstr "" "具有该标志的导出预设属性包含机密信息,并与导出预设配置的其余部分分开存储。" #: doc/classes/@GlobalScope.xml msgid "Default usage (storage and editor)." msgstr "默认用法(存储和编辑器)。" #: doc/classes/@GlobalScope.xml msgid "Default usage but without showing the property in the editor (storage)." msgstr "默认用法,但不在编辑器中显示属性(存储)。" #: doc/classes/@GlobalScope.xml msgid "Flag for a normal method." msgstr "普通方法的标志。" #: doc/classes/@GlobalScope.xml msgid "Flag for an editor method." msgstr "编辑器方法的标志。" #: doc/classes/@GlobalScope.xml msgid "Flag for a constant method." msgstr "常量方法的标志。" #: doc/classes/@GlobalScope.xml msgid "Flag for a virtual method." msgstr "虚方法的标志。" #: doc/classes/@GlobalScope.xml msgid "Flag for a method with a variable number of arguments." msgstr "具有可变数量参数的方法的标志。" #: doc/classes/@GlobalScope.xml msgid "Flag for a static method." msgstr "静态方法的标志。" #: doc/classes/@GlobalScope.xml msgid "" "Used internally. Allows to not dump core virtual methods (such as [method " "Object._notification]) to the JSON API." msgstr "" "内部使用。允许不将核心虚拟方法(例如 [method Object._notification])转储到 " "JSON API。" #: doc/classes/@GlobalScope.xml msgid "" "Flag for a virtual method that is required. In GDScript, this flag is set " "for abstract functions." msgstr "必选虚方法的标志。GDScript 会为抽象函数设置该标志。" #: doc/classes/@GlobalScope.xml msgid "Default method flags (normal)." msgstr "默认方法标志(正常)。" #: doc/classes/@GlobalScope.xml msgid "Variable is [code]null[/code]." msgstr "变量为 [code]null[/code]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [bool]." msgstr "变量类型为 [bool]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [int]." msgstr "变量类型为 [int]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [float]." msgstr "变量的类型为 [float]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [String]." msgstr "变量类型为 [String]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Vector2]." msgstr "变量类型为 [Vector2]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Vector2i]." msgstr "变量类型为 [Vector2i]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Rect2]." msgstr "变量类型为 [Rect2]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Rect2i]." msgstr "变量类型为 [Rect2i]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Vector3]." msgstr "变量类型为 [Vector3]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Vector3i]." msgstr "变量类型为 [Vector3i]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Transform2D]." msgstr "变量类型为 [Transform2D]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Vector4]." msgstr "变量类型为 [Vector4]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Vector4i]." msgstr "变量类型为 [Vector4i]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Plane]." msgstr "变量类型为 [Plane]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Quaternion]." msgstr "变量类型为 [Quaternion]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [AABB]." msgstr "变量类型为 [AABB]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Basis]." msgstr "变量类型为 [Basis]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Transform3D]." msgstr "变量类型为 [Transform3D]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Projection]." msgstr "变量类型为 [Projection]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Color]." msgstr "变量类型为 [Color]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [StringName]." msgstr "变量类型为 [StringName]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [NodePath]." msgstr "变量类型为 [NodePath]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [RID]." msgstr "变量类型为 [RID]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Object]." msgstr "变量类型为 [Object]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Callable]." msgstr "变量类型为 [Callable]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Signal]." msgstr "变量类型为 [Signal]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Dictionary]." msgstr "变量类型为 [Dictionary]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [Array]." msgstr "变量类型为 [Array]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedByteArray]." msgstr "变量类型为 [PackedByteArray]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedInt32Array]." msgstr "变量类型为 [PackedInt32Array]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedInt64Array]." msgstr "变量类型为 [PackedInt64Array]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedFloat32Array]." msgstr "变量类型为 [PackedFloat32Array]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedFloat64Array]." msgstr "变量类型为 [PackedFloat64Array]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedStringArray]." msgstr "变量类型为 [PackedStringArray]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedVector2Array]." msgstr "变量类型为 [PackedVector2Array]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedVector3Array]." msgstr "变量类型为 [PackedVector3Array]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedColorArray]." msgstr "变量类型为 [PackedColorArray]。" #: doc/classes/@GlobalScope.xml msgid "Variable is of type [PackedVector4Array]." msgstr "变量类型为 [PackedVector4Array]。" #: doc/classes/@GlobalScope.xml msgid "Represents the size of the [enum Variant.Type] enum." msgstr "代表 [enum Variant.Type] 枚举的大小。" #: doc/classes/@GlobalScope.xml msgid "Equality operator ([code]==[/code])." msgstr "相等运算符([code]==[/code])。" #: doc/classes/@GlobalScope.xml msgid "Inequality operator ([code]!=[/code])." msgstr "不等运算符([code]!=[/code])。" #: doc/classes/@GlobalScope.xml msgid "Less than operator ([code]<[/code])." msgstr "小于运算符([code]<[/code])。" #: doc/classes/@GlobalScope.xml msgid "Less than or equal operator ([code]<=[/code])." msgstr "小于等于运算符([code]<=[/code])。" #: doc/classes/@GlobalScope.xml msgid "Greater than operator ([code]>[/code])." msgstr "大于运算符([code]>[/code])。" #: doc/classes/@GlobalScope.xml msgid "Greater than or equal operator ([code]>=[/code])." msgstr "大于等于运算符([code]>=[/code])。" #: doc/classes/@GlobalScope.xml msgid "Addition operator ([code]+[/code])." msgstr "加法运算符([code]+[/code])。" #: doc/classes/@GlobalScope.xml msgid "Subtraction operator ([code]-[/code])." msgstr "减法运算符([code]-[/code])。" #: doc/classes/@GlobalScope.xml msgid "Multiplication operator ([code]*[/code])." msgstr "乘法运算符([code]*[/code])。" #: doc/classes/@GlobalScope.xml msgid "Division operator ([code]/[/code])." msgstr "除法运算符([code]/[/code])。" #: doc/classes/@GlobalScope.xml msgid "Unary negation operator ([code]-[/code])." msgstr "一元减号运算符([code]-[/code])。" #: doc/classes/@GlobalScope.xml msgid "Unary plus operator ([code]+[/code])." msgstr "一元加号运算符([code]+[/code])。" #: doc/classes/@GlobalScope.xml msgid "Remainder/modulo operator ([code]%[/code])." msgstr "余数/取模运算符([code]%[/code])。" #: doc/classes/@GlobalScope.xml msgid "Power operator ([code]**[/code])." msgstr "幂运算符([code]**[/code])。" #: doc/classes/@GlobalScope.xml msgid "Left shift operator ([code]<<[/code])." msgstr "左移运算符([code]<<[/code])。" #: doc/classes/@GlobalScope.xml msgid "Right shift operator ([code]>>[/code])." msgstr "右移运算符([code]>>[/code])。" #: doc/classes/@GlobalScope.xml msgid "Bitwise AND operator ([code]&[/code])." msgstr "按位与运算符([code]&[/code])。" #: doc/classes/@GlobalScope.xml msgid "Bitwise OR operator ([code]|[/code])." msgstr "按位或运算符([code]|[/code])。" #: doc/classes/@GlobalScope.xml msgid "Bitwise XOR operator ([code]^[/code])." msgstr "按位异或运算符([code]^[/code])。" #: doc/classes/@GlobalScope.xml msgid "Bitwise NOT operator ([code]~[/code])." msgstr "按位非运算符([code]~[/code])。" #: doc/classes/@GlobalScope.xml msgid "Logical AND operator ([code]and[/code] or [code]&&[/code])." msgstr "逻辑与运算符([code]and[/code] 或 [code]&&[/code])。" #: doc/classes/@GlobalScope.xml msgid "Logical OR operator ([code]or[/code] or [code]||[/code])." msgstr "逻辑或运算符([code]or[/code] 或 [code]||[/code])。" #: doc/classes/@GlobalScope.xml msgid "Logical XOR operator (not implemented in GDScript)." msgstr "逻辑异或运算符(未在 GDScript 中实现)。" #: doc/classes/@GlobalScope.xml msgid "Logical NOT operator ([code]not[/code] or [code]![/code])." msgstr "逻辑非运算符([code]not[/code] 或 [code]![/code])。" #: doc/classes/@GlobalScope.xml msgid "Logical IN operator ([code]in[/code])." msgstr "逻辑 IN 运算符([code]in[/code])。" #: doc/classes/@GlobalScope.xml msgid "Represents the size of the [enum Variant.Operator] enum." msgstr "代表 [enum Variant.Operator] 枚举的大小。" #: doc/classes/AABB.xml msgid "A 3D axis-aligned bounding box." msgstr "3D 轴对齐边界框。" #: doc/classes/AABB.xml msgid "" "The [AABB] built-in [Variant] type represents an axis-aligned bounding box " "in a 3D space. It is defined by its [member position] and [member size], " "which are [Vector3]. It is frequently used for fast overlap tests (see " "[method intersects]). Although [AABB] itself is axis-aligned, it can be " "combined with [Transform3D] to represent a rotated or skewed bounding box.\n" "It uses floating-point coordinates. The 2D counterpart to [AABB] is [Rect2]. " "There is no version of [AABB] that uses integer coordinates.\n" "[b]Note:[/b] Negative values for [member size] are not supported. With " "negative size, most [AABB] methods do not work correctly. Use [method abs] " "to get an equivalent [AABB] with a non-negative size.\n" "[b]Note:[/b] In a boolean context, an [AABB] evaluates to [code]false[/code] " "if both [member position] and [member size] are zero (equal to [constant " "Vector3.ZERO]). Otherwise, it always evaluates to [code]true[/code]." msgstr "" "[AABB] 内置 [Variant] 类型表示 3D 空间中的轴对齐边界框。它由其 [member " "position] 和 [member size] 定义,皆为 [Vector3] 类型。它经常被用于快速重叠测" "试(参见 [method intersects])。虽然 [AABB] 本身是轴对齐的,但它可以与 " "[Transform3D] 组合来表示旋转或倾斜的边界框。\n" "它使用浮点坐标。[AABB] 的 2D 等效体是 [Rect2]。没有使用整数坐标的 [AABB] 版" "本。\n" "[b]注意:[/b]不支持负的 [member size]。对于负大小,大多数 [AABB] 方法都无法正" "常工作。使用 [method abs] 获取具有非负大小的等效 [AABB]。\n" "[b]注意:[/b]在布尔上下文中,如果 [member position] 和 [member size] 均为零" "(等于 [constant Vector3.ZERO]),则 [AABB] 的计算结果为 [code]false[/code]。" "否则,它的计算结果始终为 [code]true[/code]。" #: doc/classes/AABB.xml doc/classes/Basis.xml doc/classes/Plane.xml #: doc/classes/Rect2.xml doc/classes/Rect2i.xml doc/classes/Transform2D.xml #: doc/classes/Transform3D.xml doc/classes/Vector2.xml doc/classes/Vector2i.xml #: doc/classes/Vector3.xml doc/classes/Vector3i.xml msgid "Math documentation index" msgstr "数学文档索引" #: doc/classes/AABB.xml doc/classes/Rect2.xml doc/classes/Rect2i.xml #: doc/classes/Vector2.xml doc/classes/Vector2i.xml doc/classes/Vector3.xml #: doc/classes/Vector3i.xml msgid "Vector math" msgstr "向量数学" #: doc/classes/AABB.xml doc/classes/Rect2.xml doc/classes/Vector2.xml #: doc/classes/Vector3.xml msgid "Advanced vector math" msgstr "高等向量数学" #: doc/classes/AABB.xml msgid "" "Constructs an [AABB] with its [member position] and [member size] set to " "[constant Vector3.ZERO]." msgstr "" "构造 [AABB],并将 [member position] 和 [member size] 设置为 [constant " "Vector3.ZERO]。" #: doc/classes/AABB.xml msgid "Constructs an [AABB] as a copy of the given [AABB]." msgstr "构造给定 [AABB] 的副本。" #: doc/classes/AABB.xml msgid "Constructs an [AABB] by [param position] and [param size]." msgstr "使用指定的 [param position] 和 [param size] 构造 [AABB]。" #: doc/classes/AABB.xml msgid "" "Returns an [AABB] equivalent to this bounding box, with its width, height, " "and depth modified to be non-negative values.\n" "[codeblocks]\n" "[gdscript]\n" "var box = AABB(Vector3(5, 0, 5), Vector3(-20, -10, -5))\n" "var absolute = box.abs()\n" "print(absolute.position) # Prints (-15.0, -10.0, 0.0)\n" "print(absolute.size) # Prints (20.0, 10.0, 5.0)\n" "[/gdscript]\n" "[csharp]\n" "var box = new Aabb(new Vector3(5, 0, 5), new Vector3(-20, -10, -5));\n" "var absolute = box.Abs();\n" "GD.Print(absolute.Position); // Prints (-15, -10, 0)\n" "GD.Print(absolute.Size); // Prints (20, 10, 5)\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] It's recommended to use this method when [member size] is " "negative, as most other methods in Godot assume that the [member size]'s " "components are greater than [code]0[/code]." msgstr "" "返回一个与该边界框等效的 [AABB],其宽度、高度和深度被修改为非负值。\n" "[codeblocks]\n" "[gdscript]\n" "var box = AABB(Vector3(5, 0, 5), Vector3(-20, -10, -5))\n" "var absolute = box.abs()\n" "print(absolute.position) # 输出 (-15.0, -10.0, 0.0)\n" "print(absolute.size) # 输出 (20.0, 10.0, 5.0)\n" "[/gdscript]\n" "[csharp]\n" "var box = new Aabb(new Vector3(5, 0, 5), new Vector3(-20, -10, -5));\n" "var absolute = box.Abs();\n" "GD.Print(absolute.Position); // 输出 (-15, -10, 0)\n" "GD.Print(absolute.Size); // 输出 (20, 10, 5)\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]当 [member size] 为负时,建议使用该方法,因为 Godot 中的大多数其" "他方法都假设 [member size] 的分量大于 [code]0[/code]。" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if this bounding box [i]completely[/i] encloses " "the [param with] box. The edges of both boxes are included.\n" "[codeblocks]\n" "[gdscript]\n" "var a = AABB(Vector3(0, 0, 0), Vector3(4, 4, 4))\n" "var b = AABB(Vector3(1, 1, 1), Vector3(3, 3, 3))\n" "var c = AABB(Vector3(2, 2, 2), Vector3(8, 8, 8))\n" "\n" "print(a.encloses(a)) # Prints true\n" "print(a.encloses(b)) # Prints true\n" "print(a.encloses(c)) # Prints false\n" "[/gdscript]\n" "[csharp]\n" "var a = new Aabb(new Vector3(0, 0, 0), new Vector3(4, 4, 4));\n" "var b = new Aabb(new Vector3(1, 1, 1), new Vector3(3, 3, 3));\n" "var c = new Aabb(new Vector3(2, 2, 2), new Vector3(8, 8, 8));\n" "\n" "GD.Print(a.Encloses(a)); // Prints True\n" "GD.Print(a.Encloses(b)); // Prints True\n" "GD.Print(a.Encloses(c)); // Prints False\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "如果该边界框[i]完全[/i]包围 [param with] 框,则返回 [code]true[/code]。两个框" "的边都包括在内。\n" "[codeblocks]\n" "[gdscript]\n" "var a = AABB(Vector3(0, 0, 0), Vector3(4, 4, 4))\n" "var b = AABB(Vector3(1, 1, 1), Vector3(3, 3, 3))\n" "var c = AABB(Vector3(2, 2, 2), Vector3(8, 8, 8))\n" "\n" "print(a.encloses(a)) # 打印 true\n" "print(a.encloses(b)) # 打印 true\n" "print(a.encloses(c)) # 打印 false\n" "[/gdscript]\n" "[csharp]\n" "var a = new Aabb(new Vector3(0, 0, 0), new Vector3(4, 4, 4));\n" "var b = new Aabb(new Vector3(1, 1, 1), new Vector3(3, 3, 3));\n" "var c = new Aabb(new Vector3(2, 2, 2), new Vector3(8, 8, 8));\n" "\n" "GD.Print(a.Encloses(a)); // 打印 True\n" "GD.Print(a.Encloses(b)); // 打印 True\n" "GD.Print(a.Encloses(c)); // 打印 False\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AABB.xml msgid "" "Returns a copy of this bounding box expanded to align the edges with the " "given [param to_point], if necessary.\n" "[codeblocks]\n" "[gdscript]\n" "var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5))\n" "\n" "box = box.expand(Vector3(10, 0, 0))\n" "print(box.position) # Prints (0.0, 0.0, 0.0)\n" "print(box.size) # Prints (10.0, 2.0, 5.0)\n" "\n" "box = box.expand(Vector3(-5, 0, 5))\n" "print(box.position) # Prints (-5.0, 0.0, 0.0)\n" "print(box.size) # Prints (15.0, 2.0, 5.0)\n" "[/gdscript]\n" "[csharp]\n" "var box = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 5));\n" "\n" "box = box.Expand(new Vector3(10, 0, 0));\n" "GD.Print(box.Position); // Prints (0, 0, 0)\n" "GD.Print(box.Size); // Prints (10, 2, 5)\n" "\n" "box = box.Expand(new Vector3(-5, 0, 5));\n" "GD.Print(box.Position); // Prints (-5, 0, 0)\n" "GD.Print(box.Size); // Prints (15, 2, 5)\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回该边界框的副本,如有必要,该边界框被扩展为将边与给定的 [param to_point] " "对齐。\n" "[codeblocks]\n" "[gdscript]\n" "var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5))\n" "\n" "box = box.expand(Vector3(10, 0, 0))\n" "print(box.position) # 输出 (0.0, 0.0, 0.0)\n" "print(box.size) # 输出 (10.0, 2.0, 5.0)\n" "\n" "box = box.expand(Vector3(-5, 0, 5))\n" "print(box.position) # 输出 (-5.0, 0.0, 0.0)\n" "print(box.size) # 输出 (15.0, 2.0, 5.0)\n" "[/gdscript]\n" "[csharp]\n" "var box = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 5));\n" "\n" "box = box.Expand(new Vector3(10, 0, 0));\n" "GD.Print(box.Position); // 输出 (0, 0, 0)\n" "GD.Print(box.Size); // 输出 (10, 2, 5)\n" "\n" "box = box.Expand(new Vector3(-5, 0, 5));\n" "GD.Print(box.Position); // 输出 (-5, 0, 0)\n" "GD.Print(box.Size); // 输出 (15, 2, 5)\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AABB.xml msgid "" "Returns the center point of the bounding box. This is the same as " "[code]position + (size / 2.0)[/code]." msgstr "返回该边界框的中心点。这与 [code]position + (size / 2.0)[/code] 相同。" #: doc/classes/AABB.xml msgid "" "Returns the position of one of the 8 vertices that compose this bounding " "box. With an [param idx] of [code]0[/code] this is the same as [member " "position], and an [param idx] of [code]7[/code] is the same as [member end]." msgstr "" "返回组成该边界框的 8 个顶点之一的位置。当 [param idx] 为 [code]0[/code] 时," "这与 [member position] 相同;[param idx] 为 [code]7[/code] 时,与 [member " "end] 相同。" #: doc/classes/AABB.xml msgid "" "Returns the longest normalized axis of this bounding box's [member size], as " "a [Vector3] ([constant Vector3.RIGHT], [constant Vector3.UP], or [constant " "Vector3.BACK]).\n" "[codeblocks]\n" "[gdscript]\n" "var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))\n" "\n" "print(box.get_longest_axis()) # Prints (0.0, 0.0, 1.0)\n" "print(box.get_longest_axis_index()) # Prints 2\n" "print(box.get_longest_axis_size()) # Prints 8.0\n" "[/gdscript]\n" "[csharp]\n" "var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));\n" "\n" "GD.Print(box.GetLongestAxis()); // Prints (0, 0, 1)\n" "GD.Print(box.GetLongestAxisIndex()); // Prints Z\n" "GD.Print(box.GetLongestAxisSize()); // Prints 8\n" "[/csharp]\n" "[/codeblocks]\n" "See also [method get_longest_axis_index] and [method get_longest_axis_size]." msgstr "" "返回该边界框的 [member size] 的最长归一化轴,作为 [Vector3]([constant " "Vector3.RIGHT]、[constant Vector3.UP] 或 [constant Vector3.BACK])。\n" "[codeblocks]\n" "[gdscript]\n" "var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))\n" "\n" "print(box.get_longest_axis()) # 输出 (0.0, 0.0, 1.0)\n" "print(box.get_longest_axis_index()) # 输出 2\n" "print(box.get_longest_axis_size()) # 输出 8.0\n" "[/gdscript]\n" "[csharp]\n" "var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));\n" "\n" "GD.Print(box.GetLongestAxis()); // 输出 (0, 0, 1)\n" "GD.Print(box.GetLongestAxisIndex()); // 输出 Z\n" "GD.Print(box.GetLongestAxisSize()); // 输出 8\n" "[/csharp]\n" "[/codeblocks]\n" "另见 [method get_longest_axis_index] 和 [method get_longest_axis_size]。" #: doc/classes/AABB.xml msgid "" "Returns the index to the longest axis of this bounding box's [member size] " "(see [constant Vector3.AXIS_X], [constant Vector3.AXIS_Y], and [constant " "Vector3.AXIS_Z]).\n" "For an example, see [method get_longest_axis]." msgstr "" "返回该边界框的 [member size] 的最长轴的索引(见 [constant Vector3.AXIS_X]、" "[constant Vector3.AXIS_Y] 和 [constant Vector3.AXIS_Z])。\n" "示例见 [method get_longest_axis]。" #: doc/classes/AABB.xml msgid "" "Returns the longest dimension of this bounding box's [member size].\n" "For an example, see [method get_longest_axis]." msgstr "" "返回该边界框的 [member size] 的最长尺度。\n" "有关示例,请参阅 [method get_longest_axis]。" #: doc/classes/AABB.xml msgid "" "Returns the shortest normalized axis of this bounding box's [member size], " "as a [Vector3] ([constant Vector3.RIGHT], [constant Vector3.UP], or " "[constant Vector3.BACK]).\n" "[codeblocks]\n" "[gdscript]\n" "var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))\n" "\n" "print(box.get_shortest_axis()) # Prints (1.0, 0.0, 0.0)\n" "print(box.get_shortest_axis_index()) # Prints 0\n" "print(box.get_shortest_axis_size()) # Prints 2.0\n" "[/gdscript]\n" "[csharp]\n" "var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));\n" "\n" "GD.Print(box.GetShortestAxis()); // Prints (1, 0, 0)\n" "GD.Print(box.GetShortestAxisIndex()); // Prints X\n" "GD.Print(box.GetShortestAxisSize()); // Prints 2\n" "[/csharp]\n" "[/codeblocks]\n" "See also [method get_shortest_axis_index] and [method " "get_shortest_axis_size]." msgstr "" "返回该边界框的 [member size] 的最短归一化轴,作为 [Vector3]([constant " "Vector3.RIGHT]、[constant Vector3.UP] 或 [constant Vector3.BACK])。\n" "[codeblocks]\n" "[gdscript]\n" "var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))\n" "\n" "print(box.get_shortest_axis()) # 输出 (1.0, 0.0, 0.0)\n" "print(box.get_shortest_axis_index()) # 输出 0\n" "print(box.get_shortest_axis_size()) # 输出 2.0\n" "[/gdscript]\n" "[csharp]\n" "var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));\n" "\n" "GD.Print(box.GetShortestAxis()); // 输出 (1, 0, 0)\n" "GD.Print(box.GetShortestAxisIndex()); // 输出 X\n" "GD.Print(box.GetShortestAxisSize()); // 输出 2\n" "[/csharp]\n" "[/codeblocks]\n" "另见 [method get_shortest_axis_index] 和 [method get_shortest_axis_size]。" #: doc/classes/AABB.xml msgid "" "Returns the index to the shortest axis of this bounding box's [member size] " "(see [constant Vector3.AXIS_X], [constant Vector3.AXIS_Y], and [constant " "Vector3.AXIS_Z]).\n" "For an example, see [method get_shortest_axis]." msgstr "" "返回该边界框的 [member size] 的最短轴的索引(见 [constant Vector3.AXIS_X]、" "[constant Vector3.AXIS_Y] 和 [constant Vector3.AXIS_Z])。\n" "示例见 [method get_shortest_axis]。" #: doc/classes/AABB.xml msgid "" "Returns the shortest dimension of this bounding box's [member size].\n" "For an example, see [method get_shortest_axis]." msgstr "" "返回该边界框的 [member size] 的最短尺度。\n" "有关示例,请参阅 [method get_shortest_axis]。" #: doc/classes/AABB.xml msgid "" "Returns the vertex's position of this bounding box that's the farthest in " "the given direction. This point is commonly known as the support point in " "collision detection algorithms." msgstr "" "返回给定方向上最远的边界框的顶点位置。该点在碰撞检测算法中通常被称为支撑点。" #: doc/classes/AABB.xml msgid "" "Returns the bounding box's volume. This is equivalent to [code]size.x * " "size.y * size.z[/code]. See also [method has_volume]." msgstr "" "返回该边界框的体积。这相当于 [code]size.x * size.y * size.z[/code]。另见 " "[method has_volume]。" #: doc/classes/AABB.xml msgid "" "Returns a copy of this bounding box extended on all sides by the given " "amount [param by]. A negative amount shrinks the box instead.\n" "[codeblocks]\n" "[gdscript]\n" "var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4)\n" "print(a.position) # Prints (0.0, 0.0, 0.0)\n" "print(a.size) # Prints (16.0, 16.0, 16.0)\n" "\n" "var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2)\n" "print(b.position) # Prints (-2.0, -2.0, -2.0)\n" "print(b.size) # Prints (12.0, 8.0, 6.0)\n" "[/gdscript]\n" "[csharp]\n" "var a = new Aabb(new Vector3(4, 4, 4), new Vector3(8, 8, 8)).Grow(4);\n" "GD.Print(a.Position); // Prints (0, 0, 0)\n" "GD.Print(a.Size); // Prints (16, 16, 16)\n" "\n" "var b = new Aabb(new Vector3(0, 0, 0), new Vector3(8, 4, 2)).Grow(2);\n" "GD.Print(b.Position); // Prints (-2, -2, -2)\n" "GD.Print(b.Size); // Prints (12, 8, 6)\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回该边界框的副本,该边界框在所有边上扩展给定量 [param by]。负数会缩小该" "框。\n" "[codeblocks]\n" "[gdscript]\n" "var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4)\n" "print(a.position) # 输出 (0.0, 0.0, 0.0)\n" "print(a.size) # 输出 (16.0, 16.0, 16.0)\n" "\n" "var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2)\n" "print(b.position) # 输出 (-2.0, -2.0, -2.0)\n" "print(b.size) # 输出 (12.0, 8.0, 6.0)\n" "[/gdscript]\n" "[csharp]\n" "var a = new Aabb(new Vector3(4, 4, 4), new Vector3(8, 8, 8)).Grow(4);\n" "GD.Print(a.Position); // 输出 (0, 0, 0)\n" "GD.Print(a.Size); // 输出 (16, 16, 16)\n" "\n" "var b = new Aabb(new Vector3(0, 0, 0), new Vector3(8, 4, 2)).Grow(2);\n" "GD.Print(b.Position); // 输出 (-2, -2, -2)\n" "GD.Print(b.Size); // 输出 (12, 8, 6)\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if the bounding box contains the given [param " "point]. By convention, points exactly on the right, top, and front sides are " "[b]not[/b] included.\n" "[b]Note:[/b] This method is not reliable for [AABB] with a [i]negative[/i] " "[member size]. Use [method abs] first to get a valid bounding box." msgstr "" "如果该边界框包含给定的 [param point],则返回 [code]true[/code]。依照惯例,[b]" "不[/b]包括正好位于右侧、顶部和前侧的点。\n" "[b]注意:[/b]对于具有[i]负[/i] [member size] 的 [AABB],该方法并不可靠。请首" "先使用 [method abs] 获取一个有效的边界框。" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if this bounding box has a surface or a length, " "that is, at least one component of [member size] is greater than [code]0[/" "code]. Otherwise, returns [code]false[/code]." msgstr "" "如果该边界框具有表面或长度,即 [member size] 的至少一个分量大于 [code]0[/" "code],则返回 [code]true[/code]。否则,返回 [code]false[/code]。" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if this bounding box's width, height, and depth " "are all positive. See also [method get_volume]." msgstr "" "如果该边界框的宽度、高度和深度均为正值,则返回 [code]true[/code]。另见 " "[method get_volume]。" #: doc/classes/AABB.xml msgid "" "Returns the intersection between this bounding box and [param with]. If the " "boxes do not intersect, returns an empty [AABB]. If the boxes intersect at " "the edge, returns a flat [AABB] with no volume (see [method has_surface] and " "[method has_volume]).\n" "[codeblocks]\n" "[gdscript]\n" "var box1 = AABB(Vector3(0, 0, 0), Vector3(5, 2, 8))\n" "var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4))\n" "\n" "var intersection = box1.intersection(box2)\n" "print(intersection.position) # Prints (2.0, 0.0, 2.0)\n" "print(intersection.size) # Prints (3.0, 2.0, 4.0)\n" "[/gdscript]\n" "[csharp]\n" "var box1 = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 8));\n" "var box2 = new Aabb(new Vector3(2, 0, 2), new Vector3(8, 4, 4));\n" "\n" "var intersection = box1.Intersection(box2);\n" "GD.Print(intersection.Position); // Prints (2, 0, 2)\n" "GD.Print(intersection.Size); // Prints (3, 2, 4)\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] If you only need to know whether two bounding boxes are " "intersecting, use [method intersects], instead." msgstr "" "返回该边界框与 [param with] 之间的交集。如果框不相交,则返回空的 [AABB]。如果" "框在边相交,则返回没有体积的平 [AABB](请参阅 [method has_surface] 和 " "[method has_volume])。\n" "[codeblocks]\n" "[gdscript]\n" "var box1 = AABB(Vector3(0, 0, 0), Vector3(5, 2, 8))\n" "var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4))\n" "\n" "var intersection = box1.intersection(box2)\n" "print(intersection.position) # 输出 (2.0, 0.0, 2.0)\n" "print(intersection.size) # 输出 (3.0, 2.0, 4.0)\n" "[/gdscript]\n" "[csharp]\n" "var box1 = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 8));\n" "var box2 = new Aabb(new Vector3(2, 0, 2), new Vector3(8, 4, 4));\n" "\n" "var intersection = box1.Intersection(box2);\n" "GD.Print(intersection.Position); // 输出 (2, 0, 2)\n" "GD.Print(intersection.Size); // 输出 (3, 2, 4)\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]如果你只需要知道两个边界框是否相交,请改用 [method intersects]。" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if this bounding box overlaps with the box [param " "with]. The edges of both boxes are [i]always[/i] excluded." msgstr "" "如果该边界框与框 [param with] 重叠,则返回 [code]true[/code]。两个框的边[i]总" "是[/i]被排除。" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if this bounding box is on both sides of the given " "[param plane]." msgstr "如果该边界框位于给定 [param plane] 的两侧,则返回 [code]true[/code]。" #: doc/classes/AABB.xml msgid "" "Returns the first point where this bounding box and the given ray intersect, " "as a [Vector3]. If no intersection occurs, returns [code]null[/code].\n" "The ray begin at [param from], faces [param dir] and extends towards " "infinity." msgstr "" "返回该边界框与给定射线相交的第一个点,作为 [Vector3]。如果没有交集存在,则返" "回 [code]null[/code]。\n" "射线从 [param from] 开始,面向 [param dir] 并向无穷远延伸。" #: doc/classes/AABB.xml msgid "" "Returns the first point where this bounding box and the given segment " "intersect, as a [Vector3]. If no intersection occurs, returns [code]null[/" "code].\n" "The segment begins at [param from] and ends at [param to]." msgstr "" "返回该边界框与给定线段相交的第一个点,作为 [Vector3]。如果没有交集存在,则返" "回 [code]null[/code]。\n" "该线段从 [param from] 开始,到 [param to] 结束。" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if this bounding box and [param aabb] are " "approximately equal, by calling [method Vector3.is_equal_approx] on the " "[member position] and the [member size]." msgstr "" "如果该边界框和 [param aabb] 近似相等,则返回 [code]true[/code],判断方法是通" "过在 [member position] 和 [member size] 上调用 [method " "Vector3.is_equal_approx]。" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if this bounding box's values are finite, by " "calling [method Vector3.is_finite] on the [member position] and the [member " "size]." msgstr "" "如果该边界框的值是有限的,则返回 [code]true[/code],判断方法是通过在 [member " "position] 和 [member size] 上调用 [method Vector3.is_finite]。" #: doc/classes/AABB.xml msgid "" "Returns an [AABB] that encloses both this bounding box and [param with] " "around the edges. See also [method encloses]." msgstr "" "返回边界包围该边界框和 [param with] 的 [AABB]。另见 [method encloses]。" #: doc/classes/AABB.xml msgid "" "The ending point. This is usually the corner on the top-right and back of " "the bounding box, and is equivalent to [code]position + size[/code]. Setting " "this point affects the [member size]." msgstr "" "终点。通常是边界框的背面右上角,等价于 [code]position + size[/code]。设置该点" "会影响 [member size]。" #: doc/classes/AABB.xml msgid "" "The origin point. This is usually the corner on the bottom-left and forward " "of the bounding box." msgstr "原点。通常是边界框的正面左下角。" #: doc/classes/AABB.xml msgid "" "The bounding box's width, height, and depth starting from [member position]. " "Setting this value also affects the [member end] point.\n" "[b]Note:[/b] It's recommended setting the width, height, and depth to non-" "negative values. This is because most methods in Godot assume that the " "[member position] is the bottom-left-forward corner, and the [member end] is " "the top-right-back corner. To get an equivalent bounding box with non-" "negative size, use [method abs]." msgstr "" "边界框的宽度、高度、深度,相对于 [member position]。设置该值会影响终点 " "[member end]。\n" "[b]注意:[/b]建议将宽度、高度、深度设置为非负数,因为 Godot 中的大多数方法假" "设 [member position] 为正面的左下角、[member end] 为背面的右上角。要获取等价" "且大小非负的边界框,请使用 [method abs]。" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if the [member position] or [member size] of both " "bounding boxes are not equal.\n" "[b]Note:[/b] Due to floating-point precision errors, consider using [method " "is_equal_approx] instead, which is more reliable." msgstr "" "如果两个边界框的 [member position] 不相等或 [member size] 不相等,则返回 " "[code]true[/code]。\n" "[b]注意:[/b]由于浮点数精度误差,请考虑改用 [method is_equal_approx],会更可" "靠。" #: doc/classes/AABB.xml msgid "" "Inversely transforms (multiplies) the [AABB] by the given [Transform3D] " "transformation matrix, under the assumption that the transformation basis is " "orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).\n" "[code]aabb * transform[/code] is equivalent to [code]transform.inverse() * " "aabb[/code]. See [method Transform3D.inverse].\n" "For transforming by inverse of an affine transformation (e.g. with scaling) " "[code]transform.affine_inverse() * aabb[/code] can be used instead. See " "[method Transform3D.affine_inverse]." msgstr "" "假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜则不行),将 [AABB] 逆向变" "换(乘以)给定的 [Transform3D] 变换矩阵。\n" "[code]aabb * transform[/code] 相当于 [code]transform.inverse() * aabb[/" "code]。见 [method Transform3D.inverse]。\n" "对于通过仿射变换的逆进行的变换(例如,缩放),可以使用 " "[code]transform.affine_inverse() * aabb[/code] 代替。见 [method " "Transform3D.affine_inverse]。" #: doc/classes/AABB.xml msgid "" "Returns [code]true[/code] if both [member position] and [member size] of the " "bounding boxes are exactly equal, respectively.\n" "[b]Note:[/b] Due to floating-point precision errors, consider using [method " "is_equal_approx] instead, which is more reliable." msgstr "" "如果两个边界框的 [member position] 完全相等且 [member size] 完全相等,则返回 " "[code]true[/code]。\n" "[b]注意:[/b]由于浮点数精度误差,请考虑改用 [method is_equal_approx],会更可" "靠。" #: doc/classes/AcceptDialog.xml msgid "A base dialog used for user notification." msgstr "用于用户通知的基本对话框。" #: doc/classes/AcceptDialog.xml #, fuzzy msgid "" "The default use of [AcceptDialog] is to allow it to only be accepted or " "closed, with the same result. However, the [signal confirmed] and [signal " "canceled] signals allow to make the two actions different, and the [method " "add_button] method allows to add custom buttons and actions.\n" "[b]Note:[/b] [AcceptDialog] is invisible by default. To make it visible, " "call one of the [code]popup_*[/code] methods from [Window] on the node, such " "as [method Window.popup_centered_clamped]." msgstr "" "[AcceptDialog] 的默认用途是允许它只被接受或关闭,结果相同。但是,[signal " "confirmed] 和 [signal canceled] 信号允许使两个动作不同,[method add_button] " "方法允许添加自定义按钮和动作。" #: doc/classes/AcceptDialog.xml msgid "" "Adds a button with label [param text] and a custom [param action] to the " "dialog and returns the created button.\n" "If [param action] is not empty, pressing the button will emit the [signal " "custom_action] signal with the specified action string.\n" "If [code]true[/code], [param right] will place the button to the right of " "any sibling buttons.\n" "You can use [method remove_button] method to remove a button created with " "this method from the dialog." msgstr "" "将带有标签 [param text] 和自定义 [param action] 的按钮添加到对话框,并返回该" "创建的按钮。\n" "如果 [param action] 不为空,按下按钮将发出具有指定动作字符串的 [signal " "custom_action] 信号。\n" "如果 [param right] 为 [code]true[/code],按钮会被放置在所有同级按钮的右侧。\n" "可以使用 [method remove_button] 方法从对话框中移除使用该方法创建的按钮。" #: doc/classes/AcceptDialog.xml msgid "" "Adds a button with label [param name] and a cancel action to the dialog and " "returns the created button.\n" "You can use [method remove_button] method to remove a button created with " "this method from the dialog." msgstr "" "在对话框中添加一个带有标签 [param name] 和取消动作的按钮,并返回创建的按" "钮。\n" "你可以使用 [method remove_button] 方法从对话框中删除用此方法创建的按钮。" #: doc/classes/AcceptDialog.xml msgid "" "Returns the label used for built-in text.\n" "[b]Warning:[/b] This is a required internal node, removing and freeing it " "may cause a crash. If you wish to hide it or any of its children, use their " "[member CanvasItem.visible] property." msgstr "" "返回内置文本所使用的标签。\n" "[b]警告:[/b]这是个必要的内部节点,移除并释放它有可能造成崩溃。如果你希望隐藏" "它或它的任意一个子节点,请使用它们的 [member CanvasItem.visible] 属性。" #: doc/classes/AcceptDialog.xml msgid "" "Returns the OK [Button] instance.\n" "[b]Warning:[/b] This is a required internal node, removing and freeing it " "may cause a crash. If you wish to hide it or any of its children, use their " "[member CanvasItem.visible] property." msgstr "" "返回确定按钮 [Button] 实例。\n" "[b]警告:[/b]这是个必要的内部节点,移除并释放它有可能造成崩溃。如果你希望隐藏" "它或它的任意一个子节点,请使用它们的 [member CanvasItem.visible] 属性。" #: doc/classes/AcceptDialog.xml msgid "" "Registers a [LineEdit] in the dialog. When the enter key is pressed, the " "dialog will be accepted." msgstr "在对话框中注册 [LineEdit]。当按下回车键时,对话框将被接受。" #: doc/classes/AcceptDialog.xml msgid "" "Removes the [param button] from the dialog. Does NOT free the [param " "button]. The [param button] must be a [Button] added with [method " "add_button] or [method add_cancel_button] method. After removal, pressing " "the [param button] will no longer emit this dialog's [signal custom_action] " "or [signal canceled] signals." msgstr "" "从对话框中移除 [param button]。但不释放该 [param button] 对象。[param " "button] 必须是用 [method add_button] 或 [method add_cancel_button] 方法添加" "的 [Button]。移除后,按下该 [param button] 将不再发出该对话框的 [signal " "custom_action] 或 [signal canceled] 信号。" #: doc/classes/AcceptDialog.xml msgid "Sets autowrapping for the text in the dialog." msgstr "为对话框中的文本设置自动换行。" #: doc/classes/AcceptDialog.xml #, fuzzy msgid "" "If [code]true[/code], the dialog will be hidden when the " "[code]ui_close_dialog[/code] action is pressed (by default, this action is " "bound to [kbd]Escape[/kbd], or [kbd]Cmd + W[/kbd] on macOS)." msgstr "" "如果为 [code]true[/code],则按下 [code]ui_cancel[/code] 动作时会隐藏对话框" "(该动作默认绑定至 [constant KEY_ESCAPE])。" #: doc/classes/AcceptDialog.xml msgid "" "If [code]true[/code], the dialog is hidden when the OK button is pressed. " "You can set it to [code]false[/code] if you want to do e.g. input validation " "when receiving the [signal confirmed] signal, and handle hiding the dialog " "in your own logic.\n" "[b]Note:[/b] Some nodes derived from this class can have a different default " "value, and potentially their own built-in logic overriding this setting. For " "example [FileDialog] defaults to [code]false[/code], and has its own input " "validation code that is called when you press OK, which eventually hides the " "dialog if the input is valid. As such, this property can't be used in " "[FileDialog] to disable hiding the dialog when pressing OK." msgstr "" "如果为 [code]true[/code],按下确定按钮时对话框将隐藏。如果要在收到 [signal " "confirmed] 信号时执行类似输入验证的操作,则可以将其设置为 [code]false[/" "code],然后在自己的逻辑中处理对话框的隐藏。\n" "[b]注意:[/b]从此类派生的某些节点可以具有不同的默认值,并且可能有自己的内置逻" "辑会覆盖此设置。例如 [FileDialog] 默认其为 [code]false[/code],并在按下确定时" "实现了自己的输入验证代码,如果输入有效,最终将隐藏对话框。因此,不能在 " "[FileDialog] 中使用此属性来禁止在按确定时隐藏对话框。" #: doc/classes/AcceptDialog.xml msgid "The text displayed by the dialog." msgstr "对话框显示的文本。" #: doc/classes/AcceptDialog.xml msgid "" "The text displayed by the OK button (see [method get_ok_button]). If empty, " "a default text will be used." msgstr "确定按钮显示的文本(见 [method get_ok_button])。留空时使用默认文本。" #: doc/classes/AcceptDialog.xml msgid "" "Emitted when the dialog is closed or the button created with [method " "add_cancel_button] is pressed." msgstr "当对话框关闭或按下 [method add_cancel_button] 创建的按钮时发出。" #: doc/classes/AcceptDialog.xml msgid "Emitted when the dialog is accepted, i.e. the OK button is pressed." msgstr "接受对话框时,即按下确定按钮时发出。" #: doc/classes/AcceptDialog.xml msgid "" "Emitted when a custom button with an action is pressed. See [method " "add_button]." msgstr "按下带有动作的自定义按钮时发出。参见 [method add_button]。" #: doc/classes/AcceptDialog.xml msgid "" "The minimum height of each button in the bottom row (such as OK/Cancel) in " "pixels. This can be increased to make buttons with short texts easier to " "click/tap." msgstr "" "底部按钮(如确定、取消)的最小高度,单位为像素。可以让文本较短的按钮更便于点" "击/点按。" #: doc/classes/AcceptDialog.xml msgid "" "The minimum width of each button in the bottom row (such as OK/Cancel) in " "pixels. This can be increased to make buttons with short texts easier to " "click/tap." msgstr "" "底部按钮(如确定、取消)的最小宽度,单位为像素。可以让文本较短的按钮更便于点" "击/点按。" #: doc/classes/AcceptDialog.xml msgid "" "The size of the vertical space between the dialog's content and the button " "row." msgstr "对话框内容和按钮行之间的垂直空间的大小。" #: doc/classes/AcceptDialog.xml msgid "The panel that fills the background of the window." msgstr "填充窗口背景的面板。" #: doc/classes/AESContext.xml msgid "Provides access to AES encryption/decryption of raw data." msgstr "提供对原始数据的 AES 加密/解密的访问。" #: doc/classes/AESContext.xml msgid "" "This class holds the context information required for encryption and " "decryption operations with AES (Advanced Encryption Standard). Both AES-ECB " "and AES-CBC modes are supported.\n" "[codeblocks]\n" "[gdscript]\n" "extends Node\n" "\n" "var aes = AESContext.new()\n" "\n" "func _ready():\n" "\tvar key = \"My secret key!!!\" # Key must be either 16 or 32 bytes.\n" "\tvar data = \"My secret text!!\" # Data size must be multiple of 16 bytes, " "apply padding if needed.\n" "\t# Encrypt ECB\n" "\taes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer())\n" "\tvar encrypted = aes.update(data.to_utf8_buffer())\n" "\taes.finish()\n" "\t# Decrypt ECB\n" "\taes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer())\n" "\tvar decrypted = aes.update(encrypted)\n" "\taes.finish()\n" "\t# Check ECB\n" "\tassert(decrypted == data.to_utf8_buffer())\n" "\n" "\tvar iv = \"My secret iv!!!!\" # IV must be of exactly 16 bytes.\n" "\t# Encrypt CBC\n" "\taes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), " "iv.to_utf8_buffer())\n" "\tencrypted = aes.update(data.to_utf8_buffer())\n" "\taes.finish()\n" "\t# Decrypt CBC\n" "\taes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), " "iv.to_utf8_buffer())\n" "\tdecrypted = aes.update(encrypted)\n" "\taes.finish()\n" "\t# Check CBC\n" "\tassert(decrypted == data.to_utf8_buffer())\n" "[/gdscript]\n" "[csharp]\n" "using Godot;\n" "using System.Diagnostics;\n" "\n" "public partial class MyNode : Node\n" "{\n" "\tprivate AesContext _aes = new AesContext();\n" "\n" "\tpublic override void _Ready()\n" "\t{\n" "\t\tstring key = \"My secret key!!!\"; // Key must be either 16 or 32 " "bytes.\n" "\t\tstring data = \"My secret text!!\"; // Data size must be multiple of 16 " "bytes, apply padding if needed.\n" "\t\t// Encrypt ECB\n" "\t\t_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer());\n" "\t\tbyte[] encrypted = _aes.Update(data.ToUtf8Buffer());\n" "\t\t_aes.Finish();\n" "\t\t// Decrypt ECB\n" "\t\t_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer());\n" "\t\tbyte[] decrypted = _aes.Update(encrypted);\n" "\t\t_aes.Finish();\n" "\t\t// Check ECB\n" "\t\tDebug.Assert(decrypted == data.ToUtf8Buffer());\n" "\n" "\t\tstring iv = \"My secret iv!!!!\"; // IV must be of exactly 16 bytes.\n" "\t\t// Encrypt CBC\n" "\t\t_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), " "iv.ToUtf8Buffer());\n" "\t\tencrypted = _aes.Update(data.ToUtf8Buffer());\n" "\t\t_aes.Finish();\n" "\t\t// Decrypt CBC\n" "\t\t_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), " "iv.ToUtf8Buffer());\n" "\t\tdecrypted = _aes.Update(encrypted);\n" "\t\t_aes.Finish();\n" "\t\t// Check CBC\n" "\t\tDebug.Assert(decrypted == data.ToUtf8Buffer());\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "这个类存放的是进行 AES(Advanced Encryption Standard,高级加密标准)加解密所" "需的上下文信息。支持 AES-ECB 和 AES-CBC 两种模式。\n" "[codeblocks]\n" "[gdscript]\n" "extends Node\n" "\n" "var aes = AESContext.new()\n" "\n" "func _ready():\n" "\tvar key = \"My secret key!!!\" # 密钥必须是 16 或 32 字节。\n" "\tvar data = \"My secret text!!\" # 数据大小必须是 16 字节的倍数,需要时添加" "补白。\n" "\t# ECB 加密\n" "\taes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer())\n" "\tvar encrypted = aes.update(data.to_utf8_buffer())\n" "\taes.finish()\n" "\t# ECB 解密\n" "\taes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer())\n" "\tvar decrypted = aes.update(encrypted)\n" "\taes.finish()\n" "\t# ECB 校验\n" "\tassert(decrypted == data.to_utf8_buffer())\n" "\n" "\tvar iv = \"My secret iv!!!!\" # IV 必须是 16 字节。\n" "\t# CBC 加密\n" "\taes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), " "iv.to_utf8_buffer())\n" "\tencrypted = aes.update(data.to_utf8_buffer())\n" "\taes.finish()\n" "\t# CBC 解密\n" "\taes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), " "iv.to_utf8_buffer())\n" "\tdecrypted = aes.update(encrypted)\n" "\taes.finish()\n" "\t# CBC 校验\n" "\tassert(decrypted == data.to_utf8_buffer())\n" "[/gdscript]\n" "[csharp]\n" "using Godot;\n" "using System.Diagnostics;\n" "\n" "public partial class MyNode : Node\n" "{\n" "\tprivate AesContext _aes = new AesContext();\n" "\n" "\tpublic override void _Ready()\n" "\t{\n" "\t\tstring key = \"My secret key!!!\"; // 密钥必须是 16 或 32 字节。\n" "\t\tstring data = \"My secret text!!\"; // 数据大小必须是 16 字节的倍数,需要" "时添加补白。\n" "\t\t// ECB 加密\n" "\t\t_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer());\n" "\t\tbyte[] encrypted = _aes.Update(data.ToUtf8Buffer());\n" "\t\t_aes.Finish();\n" "\t\t// ECB 解密\n" "\t\t_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer());\n" "\t\tbyte[] decrypted = _aes.Update(encrypted);\n" "\t\t_aes.Finish();\n" "\t\t// ECB 校验\n" "\t\tDebug.Assert(decrypted == data.ToUtf8Buffer());\n" "\n" "\t\tstring iv = \"My secret iv!!!!\"; // IV 必须是 16 字节。\n" "\t\t// CBC 加密\n" "\t\t_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), " "iv.ToUtf8Buffer());\n" "\t\tencrypted = _aes.Update(data.ToUtf8Buffer());\n" "\t\t_aes.Finish();\n" "\t\t// CBC 解密\n" "\t\t_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), " "iv.ToUtf8Buffer());\n" "\t\tdecrypted = _aes.Update(encrypted);\n" "\t\t_aes.Finish();\n" "\t\t// CBC 校验\n" "\t\tDebug.Assert(decrypted == data.ToUtf8Buffer());\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AESContext.xml msgid "Close this AES context so it can be started again. See [method start]." msgstr "关闭此 AES 上下文,以便可以再次启动它。见 [method start]。" #: doc/classes/AESContext.xml msgid "" "Get the current IV state for this context (IV gets updated when calling " "[method update]). You normally don't need this function.\n" "[b]Note:[/b] This function only makes sense when the context is started with " "[constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]." msgstr "" "获取此上下文的当前 IV 状态(调用 [method update] 时会更新 IV)。通常不需要此" "函数。\n" "[b]注意:[/b]仅当上下文以 [constant MODE_CBC_ENCRYPT] 或 [constant " "MODE_CBC_DECRYPT] 开头时,此函数才有意义。" #: doc/classes/AESContext.xml msgid "" "Start the AES context in the given [param mode]. A [param key] of either 16 " "or 32 bytes must always be provided, while an [param iv] (initialization " "vector) of exactly 16 bytes, is only needed when [param mode] is either " "[constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]." msgstr "" "在给定的 [param mode] 中启动 AES 上下文。必须始终提供 16 或 32 字节的 [param " "key],而仅当 [param mode] 为 [constant MODE_CBC_ENCRYPT] 或 [constant " "MODE_CBC_DECRYPT] 时,才需要正好为 16 字节的 [param iv](初始化向量)。" #: doc/classes/AESContext.xml msgid "" "Run the desired operation for this AES context. Will return a " "[PackedByteArray] containing the result of encrypting (or decrypting) the " "given [param src]. See [method start] for mode of operation.\n" "[b]Note:[/b] The size of [param src] must be a multiple of 16. Apply some " "padding if needed." msgstr "" "运行此 AES 上下文所需的操作。将返回包含加密(或解密)给定 [param src] 结果的 " "[PackedByteArray] 。有关操作模式,请参阅 [method start]。\n" "[b]注意:[/b][param src] 的大小必须是 16 倍的倍数。如果需要,应用一些填充。" #: doc/classes/AESContext.xml msgid "AES electronic codebook encryption mode." msgstr "AES 电子密码簿加密模式。" #: doc/classes/AESContext.xml msgid "AES electronic codebook decryption mode." msgstr "AES 电子密码簿解密模式。" #: doc/classes/AESContext.xml #, fuzzy msgid "AES cipher block chaining encryption mode." msgstr "AES 密码封锁器链式加密模式。" #: doc/classes/AESContext.xml #, fuzzy msgid "AES cipher block chaining decryption mode." msgstr "AES 密码封锁器链式解密模式。" #: doc/classes/AESContext.xml msgid "Maximum value for the mode enum." msgstr "模式列举的最大值。" #: doc/classes/AimModifier3D.xml msgid "The [AimModifier3D] rotates a bone to look at a reference bone." msgstr "[AimModifier3D] 会旋转骨骼,让它看向某个目标。" #: doc/classes/AimModifier3D.xml msgid "" "This is a simple version of [LookAtModifier3D] that only allows bone to the " "reference without advanced options such as angle limitation or time-based " "interpolation.\n" "The feature is simplified, but instead it is implemented with smooth " "tracking without euler, see [method set_use_euler]." msgstr "" "这是 [LookAtModifier3D] 的简易版本,只允许骨骼指向参考项,不带角度限制、基于" "时间的插值等高级选项。\n" "功能虽简,但实现了无需欧拉值的平滑跟踪,见 [method set_use_euler]。" #: doc/classes/AimModifier3D.xml msgid "Returns the forward axis of the bone." msgstr "返回骨骼的向前轴。" #: doc/classes/AimModifier3D.xml msgid "" "Returns the axis of the first rotation. It is enabled only if [method " "is_using_euler] is [code]true[/code]." msgstr "" "返回第一个旋转的转轴。仅在 [method is_using_euler] 为 [code]true[/code] 时启" "用。" #: doc/classes/AimModifier3D.xml doc/classes/ConvertTransformModifier3D.xml #: doc/classes/CopyTransformModifier3D.xml msgid "" "Returns [code]true[/code] if the relative option is enabled in the setting " "at [param index]." msgstr "" "如果索引为 [param index] 的设置启用了相对选项,则返回 [code]true[/code]。" #: doc/classes/AimModifier3D.xml msgid "Returns [code]true[/code] if it provides rotation with using euler." msgstr "如果提供的旋转使用欧拉值则返回 [code]true[/code]。" #: doc/classes/AimModifier3D.xml msgid "" "Returns [code]true[/code] if it provides rotation by two axes. It is enabled " "only if [method is_using_euler] is [code]true[/code]." msgstr "" "如果提供的旋转是根据两个轴得到的,则返回 [code]true[/code]。仅在 [method " "is_using_euler] 为 [code]true[/code] 时启用。" #: doc/classes/AimModifier3D.xml msgid "Sets the forward axis of the bone." msgstr "设置骨骼的向前轴。" #: doc/classes/AimModifier3D.xml msgid "" "Sets the axis of the first rotation. It is enabled only if [method " "is_using_euler] is [code]true[/code]." msgstr "" "设置第一个旋转的转轴。仅在 [method is_using_euler] 为 [code]true[/code] 时启" "用。" #: doc/classes/AimModifier3D.xml #, fuzzy msgid "" "Sets relative option in the setting at [param index] to [param enabled].\n" "If sets [param enabled] to [code]true[/code], the rotation is applied " "relative to the pose.\n" "If sets [param enabled] to [code]false[/code], the rotation is applied " "relative to the rest. It means to replace the current pose with the " "[AimModifier3D]'s result." msgstr "" "将索引为 [param index] 的设置的相对选项设置为 [param enabled]。\n" "如果将 [param enabled] 设置为 [code]true[/code],则提取并应用的变换是相对于放" "松姿势的。\n" "如果将 [param enabled] 设置为 [code]false[/code],则提取到的变换是绝对的。" #: doc/classes/AimModifier3D.xml msgid "" "If sets [param enabled] to [code]true[/code], it provides rotation with " "using euler.\n" "If sets [param enabled] to [code]false[/code], it provides rotation with " "using rotation by arc generated from the forward axis vector and the vector " "toward the reference." msgstr "" "如果将 [param enabled] 设为 [code]true[/code],则提供的旋转使用欧拉值。\n" "如果将 [param enabled] 设为 [code]false[/code],则提供的旋转使用根据向前轴向" "量与指向参考的向量生成的旋转弧。" #: doc/classes/AimModifier3D.xml msgid "" "If sets [param enabled] to [code]true[/code], it provides rotation by two " "axes. It is enabled only if [method is_using_euler] is [code]true[/code]." msgstr "" "如果将 [param enabled] 设为 [code]true[/code],则提供的旋转是根据两个轴得到" "的,仅在 [method is_using_euler] 为 [code]true[/code] 时启用。" #: doc/classes/AimModifier3D.xml doc/classes/ConvertTransformModifier3D.xml #: doc/classes/CopyTransformModifier3D.xml msgid "The number of settings in the modifier." msgstr "修改器中设置的数量。" #: doc/classes/AnimatableBody2D.xml msgid "" "A 2D physics body that can't be moved by external forces. When moved " "manually, it affects other bodies in its path." msgstr "无法被外力移动的 2D 物理物体。手动移动时会影响路径上的其他物体。" #: doc/classes/AnimatableBody2D.xml msgid "" "An animatable 2D physics body. It can't be moved by external forces or " "contacts, but can be moved manually by other means such as code, " "[AnimationMixer]s (with [member AnimationMixer.callback_mode_process] set to " "[constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS]), and " "[RemoteTransform2D].\n" "When [AnimatableBody2D] is moved, its linear and angular velocity are " "estimated and used to affect other physics bodies in its path. This makes it " "useful for moving platforms, doors, and other moving objects." msgstr "" "可动画的 2D 物理物体。无法因外力和接触而移动,但可以通过代码、" "[AnimationMixer]([member AnimationMixer.callback_mode_process] 设为 " "[constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS])、" "[RemoteTransform2D] 等方法手动移动。\n" "[AnimatableBody2D] 发生移动时,会对线速度和角速度进行估算,并用于影响其路径上" "的其他物理物体。因此适用于移动平台、门等移动的对象。" #: doc/classes/AnimatableBody2D.xml doc/classes/AnimatableBody3D.xml #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml #: doc/classes/CollisionShape2D.xml doc/classes/CollisionShape3D.xml #: doc/classes/PhysicsBody2D.xml doc/classes/PhysicsBody3D.xml #: doc/classes/PhysicsDirectBodyState2D.xml #: doc/classes/PhysicsDirectBodyState3D.xml #: doc/classes/PhysicsDirectSpaceState2D.xml #: doc/classes/PhysicsDirectSpaceState3D.xml doc/classes/RigidBody2D.xml #: doc/classes/RigidBody3D.xml doc/classes/Shape2D.xml doc/classes/Shape3D.xml #: doc/classes/StaticBody2D.xml doc/classes/StaticBody3D.xml #: doc/classes/VehicleBody3D.xml msgid "Physics introduction" msgstr "物理介绍" #: doc/classes/AnimatableBody2D.xml doc/classes/AnimatableBody3D.xml #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml #: doc/classes/PhysicsBody2D.xml doc/classes/PhysicsBody3D.xml #: doc/classes/RigidBody2D.xml doc/classes/RigidBody3D.xml #: doc/classes/StaticBody2D.xml doc/classes/StaticBody3D.xml #: doc/classes/VehicleBody3D.xml msgid "Troubleshooting physics issues" msgstr "排查物理问题" #: doc/classes/AnimatableBody2D.xml msgid "" "If [code]true[/code], the body's movement will be synchronized to the " "physics frame. This is useful when animating movement via [AnimationPlayer], " "for example on moving platforms. Do [b]not[/b] use together with [method " "PhysicsBody2D.move_and_collide]." msgstr "" "如果为 [code]true[/code],则物体的运动将与物理帧同步。当通过 " "[AnimationPlayer] 为运动设置动画时,例如在移动的平台上,这个功能很有用。[b]不" "要[/b]与[method PhysicsBody2D.move_and_collide]一起使用。" #: doc/classes/AnimatableBody3D.xml msgid "" "A 3D physics body that can't be moved by external forces. When moved " "manually, it affects other bodies in its path." msgstr "无法被外力移动的 3D 物理物体。手动移动时会影响路径上的其他物体。" #: doc/classes/AnimatableBody3D.xml msgid "" "An animatable 3D physics body. It can't be moved by external forces or " "contacts, but can be moved manually by other means such as code, " "[AnimationMixer]s (with [member AnimationMixer.callback_mode_process] set to " "[constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS]), and " "[RemoteTransform3D].\n" "When [AnimatableBody3D] is moved, its linear and angular velocity are " "estimated and used to affect other physics bodies in its path. This makes it " "useful for moving platforms, doors, and other moving objects." msgstr "" "可动画的 3D 物理物体。无法因外力或接触而移动,但可以通过代码、" "[AnimationMixer]([member AnimationMixer.callback_mode_process] 设为 " "[constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS])、" "[RemoteTransform3D] 等方法手动移动。\n" "[AnimatableBody3D] 发生移动时,会对线速度和角速度进行估算,并用于影响其路径上" "的其他物理物体。因此适用于移动平台、门等移动的对象。" #: doc/classes/AnimatableBody3D.xml doc/classes/BoxShape3D.xml #: doc/classes/CapsuleShape3D.xml doc/classes/ConcavePolygonShape3D.xml #: doc/classes/ConvexPolygonShape3D.xml doc/classes/CylinderShape3D.xml #: doc/classes/ProjectSettings.xml doc/classes/RigidBody3D.xml #: doc/classes/SphereShape3D.xml doc/classes/StaticBody3D.xml msgid "3D Physics Tests Demo" msgstr "3D 物理测试演示" #: doc/classes/AnimatableBody3D.xml doc/classes/AnimationNodeAdd3.xml #: doc/classes/AnimationNodeAnimation.xml doc/classes/AnimationNodeBlend2.xml #: doc/classes/AnimationNodeBlendSpace2D.xml #: doc/classes/AnimationNodeOneShot.xml doc/classes/AnimationNodeOutput.xml #: doc/classes/AnimationNodeTransition.xml doc/classes/AnimationPlayer.xml #: doc/classes/AnimationTree.xml doc/classes/AudioEffectReverb.xml #: doc/classes/Camera3D.xml doc/classes/CharacterBody3D.xml #: doc/classes/CollisionShape3D.xml doc/classes/CylinderShape3D.xml #: doc/classes/Environment.xml doc/classes/GPUParticles3D.xml #: doc/classes/Light3D.xml doc/classes/Material.xml doc/classes/Mesh.xml #: doc/classes/MeshInstance3D.xml doc/classes/Quaternion.xml #: doc/classes/Skeleton3D.xml doc/classes/SpotLight3D.xml #: doc/classes/StaticBody3D.xml doc/classes/VoxelGI.xml #: doc/classes/VoxelGIData.xml doc/classes/WorldEnvironment.xml msgid "Third Person Shooter (TPS) Demo" msgstr "第三人称射击(TPS)演示" #: doc/classes/AnimatableBody3D.xml doc/classes/Basis.xml #: doc/classes/CharacterBody3D.xml doc/classes/CylinderShape3D.xml #: doc/classes/Dictionary.xml doc/classes/FileAccess.xml doc/classes/Input.xml #: doc/classes/InputEvent.xml doc/classes/InputEventAction.xml #: doc/classes/InputEventMouseMotion.xml doc/classes/RayCast3D.xml #: doc/classes/StaticBody3D.xml doc/classes/SurfaceTool.xml #: doc/classes/TextureButton.xml doc/classes/TextureRect.xml #: doc/classes/Thread.xml doc/classes/VBoxContainer.xml msgid "3D Voxel Demo" msgstr "3D 体素演示" #: doc/classes/AnimatableBody3D.xml msgid "" "If [code]true[/code], the body's movement will be synchronized to the " "physics frame. This is useful when animating movement via [AnimationPlayer], " "for example on moving platforms. Do [b]not[/b] use together with [method " "PhysicsBody3D.move_and_collide]." msgstr "" "如果为 [code]true[/code],则实体的运动将与物理帧同步。当通过 " "[AnimationPlayer] 为运动设置动画时,例如在移动的平台上,这个功能很有用。请[b]" "不要[/b]与 [method PhysicsBody3D.move_and_collide] 函数一起使用。" #: doc/classes/AnimatedSprite2D.xml msgid "" "Sprite node that contains multiple textures as frames to play for animation." msgstr "包含多个纹理作为动画播放帧的 Sprite 节点。" #: doc/classes/AnimatedSprite2D.xml msgid "" "[AnimatedSprite2D] is similar to the [Sprite2D] node, except it carries " "multiple textures as animation frames. Animations are created using a " "[SpriteFrames] resource, which allows you to import image files (or a folder " "containing said files) to provide the animation frames for the sprite. The " "[SpriteFrames] resource can be configured in the editor via the SpriteFrames " "bottom panel." msgstr "" "[AnimatedSprite2D] 与 [Sprite2D] 节点类似,但是包含多张纹理,可用作动画帧。动" "画使用 [SpriteFrames] 资源创建,可以导入图像文件(或包含此类文件的文件夹)为" "该精灵提供动画帧。可以在编辑器的“动画帧”底部面板中配置 [SpriteFrames] 资源。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimationPlayer.xml msgid "2D Sprite animation" msgstr "2D 精灵动画" #: doc/classes/AnimatedSprite2D.xml doc/classes/Area2D.xml #: doc/classes/AudioStreamPlayer.xml doc/classes/Button.xml #: doc/classes/CanvasLayer.xml doc/classes/CollisionShape2D.xml #: doc/classes/ColorRect.xml doc/classes/Input.xml doc/classes/InputEvent.xml #: doc/classes/InputEventAction.xml doc/classes/Label.xml doc/classes/Timer.xml #: doc/classes/VisibleOnScreenNotifier2D.xml msgid "2D Dodge The Creeps Demo" msgstr "2D Dodge The Creeps 演示" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml #: doc/classes/AnimationPlayer.xml msgid "" "Returns the actual playing speed of current animation or [code]0[/code] if " "not playing. This speed is the [member speed_scale] property multiplied by " "[code]custom_speed[/code] argument specified when calling the [method play] " "method.\n" "Returns a negative value if the current animation is playing backwards." msgstr "" "返回当前动画的实际播放速度,未播放时则为 [code]0[/code]。这个速度是 [member " "speed_scale] 属性乘以调用 [method play] 时指定的 [code]custom_speed[/code] 参" "数。\n" "如果当前动画是倒放的,则返回负值。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml #: doc/classes/AnimationPlayer.xml msgid "" "Returns [code]true[/code] if an animation is currently playing (even if " "[member speed_scale] and/or [code]custom_speed[/code] are [code]0[/code])." msgstr "" "如果动画目前正在播放,则返回 [code]true[/code](即便 [member speed_scale] 和/" "或 [code]custom_speed[/code] 为 [code]0[/code])。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "" "Pauses the currently playing animation. The [member frame] and [member " "frame_progress] will be kept and calling [method play] or [method " "play_backwards] without arguments will resume the animation from the current " "playback position.\n" "See also [method stop]." msgstr "" "暂停当前正在播放的动画。会保留 [member frame] 和 [member frame_progress],不" "带参数调用 [method play] 或 [method play_backwards] 会从当前播放位置恢复播放" "该动画。\n" "另见 [method stop]。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "" "Plays the animation with key [param name]. If [param custom_speed] is " "negative and [param from_end] is [code]true[/code], the animation will play " "backwards (which is equivalent to calling [method play_backwards]).\n" "If this method is called with that same animation [param name], or with no " "[param name] parameter, the assigned animation will resume playing if it was " "paused." msgstr "" "播放名称键为 [param name] 的动画。如果 [param custom_speed] 为负且 [param " "from_end] 为 [code]true[/code],则该动画会倒放(等价于 [method " "play_backwards])。\n" "如果调用这个方法时使用了相同的动画名称 [param name] 或者没有使用 [param " "name] 参数,则会继续播放已暂停的分配动画。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml #: doc/classes/AnimationPlayer.xml msgid "" "Plays the animation with key [param name] in reverse.\n" "This method is a shorthand for [method play] with [code]custom_speed = -1.0[/" "code] and [code]from_end = true[/code], so see its description for more " "information." msgstr "" "倒放名称键为 [param name] 的动画。\n" "这个方法是简写,等价于调用 [method play] 时使用 [code]custom_speed = -1.0[/" "code] 和 [code]from_end = true[/code],所以更多信息请参阅其描述。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "" "Sets [member frame] and [member frame_progress] to the given values. Unlike " "setting [member frame], this method does not reset the [member " "frame_progress] to [code]0.0[/code] implicitly.\n" "[b]Example:[/b] Change the animation while keeping the same [member frame] " "and [member frame_progress]:\n" "[codeblocks]\n" "[gdscript]\n" "var current_frame = animated_sprite.get_frame()\n" "var current_progress = animated_sprite.get_frame_progress()\n" "animated_sprite.play(\"walk_another_skin\")\n" "animated_sprite.set_frame_and_progress(current_frame, current_progress)\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "将帧设置为 [member frame]、帧进度设置为 [member frame_progress]。与直接设置 " "[member frame] 不同,此方法不会隐式地将 [member frame_progress] 重置为 " "[code]0.0[/code]。\n" "[b]示例:[/b]在保持相同的 [member frame] 和 [member frame_progress] 的情况下" "更改动画:\n" "[codeblocks]\n" "[gdscript]\n" "var current_frame = animated_sprite.get_frame()\n" "var current_progress = animated_sprite.get_frame_progress()\n" "animated_sprite.play(\"行走动画_换皮版\")\n" "animated_sprite.set_frame_and_progress(current_frame, current_progress)\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "" "Stops the currently playing animation. The animation position is reset to " "[code]0[/code] and the [code]custom_speed[/code] is reset to [code]1.0[/" "code]. See also [method pause]." msgstr "" "停止当前正在播放的动画。会将动画的位置重置为 [code]0[/code],并将 " "[code]custom_speed[/code] 重置为 [code]1.0[/code]。另见 [method pause]。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "" "The current animation from the [member sprite_frames] resource. If this " "value is changed, the [member frame] counter and the [member frame_progress] " "are reset." msgstr "" "当前动画,来自 [member sprite_frames]。如果更改了这个值,会重置 [member " "frame] 计数和 [member frame_progress]。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml #: doc/classes/AnimationPlayer.xml msgid "The key of the animation to play when the scene loads." msgstr "场景加载时要播放的动画名称。" #: doc/classes/AnimatedSprite2D.xml msgid "" "If [code]true[/code], texture will be centered.\n" "[b]Note:[/b] For games with a pixel art aesthetic, textures may appear " "deformed when centered. This is caused by their position being between " "pixels. To prevent this, set this property to [code]false[/code], or " "consider enabling [member ProjectSettings.rendering/2d/snap/" "snap_2d_vertices_to_pixel] and [member ProjectSettings.rendering/2d/snap/" "snap_2d_transforms_to_pixel]." msgstr "" "如果为 [code]true[/code],则纹理居中。\n" "[b]注意:[/b]像素风游戏中,纹理在居中后可能会变形。这是因为此时纹理的位置在两" "个像素之间。要避免这种情况,请将该属性设为 [code]false[/code],或者考虑启用 " "[member ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel] 和 " "[member ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel]。" #: doc/classes/AnimatedSprite2D.xml doc/classes/Sprite2D.xml #: doc/classes/SpriteBase3D.xml doc/classes/TextureButton.xml #: doc/classes/TextureRect.xml msgid "If [code]true[/code], texture is flipped horizontally." msgstr "如果为 [code]true[/code],纹理将被水平翻转。" #: doc/classes/AnimatedSprite2D.xml doc/classes/Sprite2D.xml #: doc/classes/SpriteBase3D.xml doc/classes/TextureButton.xml #: doc/classes/TextureRect.xml msgid "If [code]true[/code], texture is flipped vertically." msgstr "如果为 [code]true[/code],纹理将被垂直翻转。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "" "The displayed animation frame's index. Setting this property also resets " "[member frame_progress]. If this is not desired, use [method " "set_frame_and_progress]." msgstr "" "所显示动画帧的索引。设置这个属性会重置 [member frame_progress]。如果不希望这" "样,请使用 [method set_frame_and_progress]。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "" "The progress value between [code]0.0[/code] and [code]1.0[/code] until the " "current frame transitions to the next frame. If the animation is playing " "backwards, the value transitions from [code]1.0[/code] to [code]0.0[/code]." msgstr "" "当前帧过渡到下一帧的进度值,在 [code]0.0[/code] 和 [code]1.0[/code] 之间。如" "果动画是倒放的,则该值是从 [code]1.0[/code] 到 [code]0.0[/code]。" #: doc/classes/AnimatedSprite2D.xml msgid "The texture's drawing offset." msgstr "纹理的绘图偏移量。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml #: doc/classes/AnimationPlayer.xml msgid "" "The speed scaling ratio. For example, if this value is [code]1[/code], then " "the animation plays at normal speed. If it's [code]0.5[/code], then it plays " "at half speed. If it's [code]2[/code], then it plays at double speed.\n" "If set to a negative value, the animation is played in reverse. If set to " "[code]0[/code], the animation will not advance." msgstr "" "速度缩放比。例如,如果该值为 [code]1[/code],则动画以正常速度播放。如果它是 " "[code]0.5[/code],那么它会半速播放。如果是 [code]2[/code],则会以双倍速度播" "放。\n" "如果设置为负值,则动画反向播放。如果设置为[code]0[/code],则动画不会前进。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "" "The [SpriteFrames] resource containing the animation(s). Allows you the " "option to load, edit, clear, make unique and save the states of the " "[SpriteFrames] resource." msgstr "" "包含动画的 [SpriteFrames] 资源。可以对 [SpriteFrames] 资源进行加载、编辑、清" "空、唯一化、保存状态等操作。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "Emitted when [member animation] changes." msgstr "当 [member animation] 更改时发出。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "" "Emitted when the animation reaches the end, or the start if it is played in " "reverse. When the animation finishes, it pauses the playback.\n" "[b]Note:[/b] This signal is not emitted if an animation is looping." msgstr "" "当动画到达结尾时,或者如果反向播放则到达起点时发出。当动画结束时,它会暂停播" "放。\n" "[b]注意:[/b]如果动画正在循环播放,则不会发出该信号。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "Emitted when the animation loops." msgstr "当动画循环播放时发出。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "Emitted when [member frame] changes." msgstr "[member frame] 更改时发出。" #: doc/classes/AnimatedSprite2D.xml doc/classes/AnimatedSprite3D.xml msgid "Emitted when [member sprite_frames] changes." msgstr "当 [member sprite_frames] 更改时发出。" #: doc/classes/AnimatedSprite3D.xml msgid "" "2D sprite node in 3D world, that can use multiple 2D textures for animation." msgstr "3D 世界中的 2D 精灵节点,可以使用多个 2D 纹理进行动画处理。" #: doc/classes/AnimatedSprite3D.xml msgid "" "[AnimatedSprite3D] is similar to the [Sprite3D] node, except it carries " "multiple textures as animation [member sprite_frames]. Animations are " "created using a [SpriteFrames] resource, which allows you to import image " "files (or a folder containing said files) to provide the animation frames " "for the sprite. The [SpriteFrames] resource can be configured in the editor " "via the SpriteFrames bottom panel." msgstr "" "[AnimatedSprite3D] 与 [Sprite3D] 节点类似,但是包含多张纹理,可用作动画 " "[member sprite_frames]。动画使用 [SpriteFrames] 资源创建,可以导入图像文件" "(或包含此类文件的文件夹)为该精灵提供动画帧。可以在编辑器的“动画帧”底部面板" "中配置 [SpriteFrames] 资源。" #: doc/classes/AnimatedSprite3D.xml msgid "2D Sprite animation (also applies to 3D)" msgstr "2D 精灵动画(也适用于 3D)" #: doc/classes/AnimatedTexture.xml msgid "" "This class does not work properly in current versions and may be removed in " "the future. There is currently no equivalent workaround." msgstr "" "该类在当前版本中无法正常工作,将来可能会被移除。目前没有等效的解决方法。" #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "用于简单帧动画的代理纹理。" #: doc/classes/AnimatedTexture.xml msgid "" "[AnimatedTexture] is a resource format for frame-based animations, where " "multiple textures can be chained automatically with a predefined delay for " "each frame. Unlike [AnimationPlayer] or [AnimatedSprite2D], it isn't a " "[Node], but has the advantage of being usable anywhere a [Texture2D] " "resource can be used, e.g. in a [TileSet].\n" "The playback of the animation is controlled by the [member speed_scale] " "property, as well as each frame's duration (see [method " "set_frame_duration]). The animation loops, i.e. it will restart at frame 0 " "automatically after playing the last frame.\n" "[AnimatedTexture] currently requires all frame textures to have the same " "size, otherwise the bigger ones will be cropped to match the smallest one.\n" "[b]Note:[/b] AnimatedTexture doesn't support using [AtlasTexture]s. Each " "frame needs to be a separate [Texture2D].\n" "[b]Warning:[/b] The current implementation is not efficient for the modern " "renderers." msgstr "" "[AnimatedTexture] 是一种用于帧动画的资源格式,其中多个纹理可以自动链接,每个" "帧都有预定义的延迟。与 [AnimationPlayer] 或 [AnimatedSprite2D] 不同,它不是 " "[Node],但具有可在任何可以使用 [Texture2D] 资源的地方使用的优势,例如在 " "[TileSet] 中。\n" "动画的播放由 [member speed_scale] 属性以及每帧的持续时间(见 [method " "set_frame_duration])控制。动画是循环播放的,即它会在播放完最后一帧后自动从" "第 0 帧重新开始。\n" "[AnimatedTexture] 目前要求所有帧的纹理具有相同的大小,否则较大的纹理将被裁剪" "以匹配最小的纹理。\n" "[b]注意:[/b]AnimatedTexture 不支持使用 [AtlasTexture]。 每个帧都需要是一个单" "独的 [Texture2D]。\n" "[b]警告:[/b]当前的实现对于现代渲染器来说效率不高。" #: doc/classes/AnimatedTexture.xml msgid "Returns the given [param frame]'s duration, in seconds." msgstr "返回给定的 [param frame] 的持续时间,以秒为单位。" #: doc/classes/AnimatedTexture.xml msgid "Returns the given frame's [Texture2D]." msgstr "返回给定帧的 [Texture2D]。" #: doc/classes/AnimatedTexture.xml msgid "" "Sets the duration of any given [param frame]. The final duration is affected " "by the [member speed_scale]. If set to [code]0[/code], the frame is skipped " "during playback." msgstr "" "设置任何给定 [param frame] 的持续时间。最终的持续时间受 [member speed_scale] " "影响。如果设置为 [code]0[/code],则该帧在播放过程中被跳过。" #: doc/classes/AnimatedTexture.xml msgid "" "Assigns a [Texture2D] to the given frame. Frame IDs start at 0, so the first " "frame has ID 0, and the last frame of the animation has ID [member frames] - " "1.\n" "You can define any number of textures up to [constant MAX_FRAMES], but keep " "in mind that only frames from 0 to [member frames] - 1 will be part of the " "animation." msgstr "" "将 [Texture2D] 分配给给定的帧。帧 ID 从 0 开始,因此第一帧的 ID 为 0,动画的" "最后一帧的 ID 为 [member frames] - 1。\n" "最多可以定义 [constant MAX_FRAMES] 个纹理,但要记住,只有 0 到 [member " "frames] - 1 的帧会成为动画的一部分。" #: doc/classes/AnimatedTexture.xml msgid "" "Sets the currently visible frame of the texture. Setting this frame while " "playing resets the current frame time, so the newly selected frame plays for " "its whole configured frame duration." msgstr "" "设置纹理的当前可见帧。在播放时设置此帧会重置当前帧时间,因此新选择的帧将播放" "为其配置的整个帧持续时间。" #: doc/classes/AnimatedTexture.xml msgid "" "Number of frames to use in the animation. While you can create the frames " "independently with [method set_frame_texture], you need to set this value " "for the animation to take new frames into account. The maximum number of " "frames is [constant MAX_FRAMES]." msgstr "" "动画中要使用的帧数。虽然你可以使用 [method set_frame_texture] 独立创建帧,但" "是你需要为动画设置这个值,才能考虑到新帧。最大帧数为 [constant MAX_FRAMES]。" #: doc/classes/AnimatedTexture.xml msgid "" "If [code]true[/code], the animation will only play once and will not loop " "back to the first frame after reaching the end. Note that reaching the end " "will not set [member pause] to [code]true[/code]." msgstr "" "如果为 [code]true[/code],则动画将只播放一次,并且在到达结尾后将不会循环回到" "第一帧。请注意,到达终点不会将 [member pause] 设置为 [code]true[/code]。" #: doc/classes/AnimatedTexture.xml msgid "" "If [code]true[/code], the animation will pause where it currently is (i.e. " "at [member current_frame]). The animation will continue from where it was " "paused when changing this property to [code]false[/code]." msgstr "" "如果为 [code]true[/code],则动画将暂停在当前位置(即 [member " "current_frame])。将此属性更改为 [code]false[/code] 时,动画将从暂停处继续播" "放。" #: doc/classes/AnimatedTexture.xml msgid "" "The animation speed is multiplied by this value. If set to a negative value, " "the animation is played in reverse." msgstr "动画速度将乘以该值。如果设置为负值,则动画反向播放。" #: doc/classes/AnimatedTexture.xml msgid "" "The maximum number of frames supported by [AnimatedTexture]. If you need " "more frames in your animation, use [AnimationPlayer] or [AnimatedSprite2D]." msgstr "" "[AnimatedTexture] 支持的最大帧数。如果动画需要更多帧,请使用 " "[AnimationPlayer] 或 [AnimatedSprite2D]。" #: doc/classes/Animation.xml msgid "Holds data that can be used to animate anything in the engine." msgstr "存放的是用于对引擎中的任何对象进行动画处理的数据。" #: doc/classes/Animation.xml msgid "" "This resource holds data that can be used to animate anything in the engine. " "Animations are divided into tracks and each track must be linked to a node. " "The state of that node can be changed through time, by adding timed keys " "(events) to the track.\n" "[codeblocks]\n" "[gdscript]\n" "# This creates an animation that makes the node \"Enemy\" move to the right " "by\n" "# 100 pixels in 2.0 seconds.\n" "var animation = Animation.new()\n" "var track_index = animation.add_track(Animation.TYPE_VALUE)\n" "animation.track_set_path(track_index, \"Enemy:position:x\")\n" "animation.track_insert_key(track_index, 0.0, 0)\n" "animation.track_insert_key(track_index, 2.0, 100)\n" "animation.length = 2.0\n" "[/gdscript]\n" "[csharp]\n" "// This creates an animation that makes the node \"Enemy\" move to the right " "by\n" "// 100 pixels in 2.0 seconds.\n" "var animation = new Animation();\n" "int trackIndex = animation.AddTrack(Animation.TrackType.Value);\n" "animation.TrackSetPath(trackIndex, \"Enemy:position:x\");\n" "animation.TrackInsertKey(trackIndex, 0.0f, 0);\n" "animation.TrackInsertKey(trackIndex, 2.0f, 100);\n" "animation.Length = 2.0f;\n" "[/csharp]\n" "[/codeblocks]\n" "Animations are just data containers, and must be added to nodes such as an " "[AnimationPlayer] to be played back. Animation tracks have different types, " "each with its own set of dedicated methods. Check [enum TrackType] to see " "available types.\n" "[b]Note:[/b] For 3D position/rotation/scale, using the dedicated [constant " "TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] " "track types instead of [constant TYPE_VALUE] is recommended for performance " "reasons." msgstr "" "这个资源存放的是用于对引擎中的任何对象进行动画处理的数据。动画分为轨道,轨道" "必须与节点关联。向轨道添加定时关键帧(事件)后,节点的状态可以随时间变化。\n" "[codeblocks]\n" "[gdscript]\n" "# 创建动画,让“Enemy”节点在 2.0 秒内\n" "# 向右移动 100 像素。\n" "var animation = Animation.new()\n" "var track_index = animation.add_track(Animation.TYPE_VALUE)\n" "animation.track_set_path(track_index, \"Enemy:position:x\")\n" "animation.track_insert_key(track_index, 0.0, 0)\n" "animation.track_insert_key(track_index, 2.0, 100)\n" "animation.length = 2.0\n" "[/gdscript]\n" "[csharp]\n" "// 创建动画,让“Enemy”节点在 2.0 秒内\n" "// 向右移动 100 像素。\n" "var animation = new Animation();\n" "int trackIndex = animation.AddTrack(Animation.TrackType.Value);\n" "animation.TrackSetPath(trackIndex, \"Enemy:position:x\");\n" "animation.TrackInsertKey(trackIndex, 0.0f, 0);\n" "animation.TrackInsertKey(trackIndex, 2.0f, 100);\n" "animation.Length = 2.0f;\n" "[/csharp]\n" "[/codeblocks]\n" "动画只是数据的容器,必须添加至 [AnimationPlayer] 等节点才能进行播放。动画轨道" "分为不同的类型,不同的类型有各自不同的专属方法。可用的类型请查看 [enum " "TrackType]。\n" "[b]注意:[/b]对于 3D 的位置、旋转、缩放,推荐使用专门的 [constant " "TYPE_POSITION_3D]、[constant TYPE_ROTATION_3D]、[constant TYPE_SCALE_3D] 轨道" "类型,不要使用 [constant TYPE_VALUE],性能更高。" #: doc/classes/Animation.xml doc/classes/AnimationPlayer.xml msgid "Animation documentation index" msgstr "动画教程索引" #: doc/classes/Animation.xml msgid "Adds a marker to this Animation." msgstr "在动画中添加一个标记。" #: doc/classes/Animation.xml msgid "Adds a track to the Animation." msgstr "向动画添加轨道。" #: doc/classes/Animation.xml msgid "" "Returns the animation name at the key identified by [param key_idx]. The " "[param track_idx] must be the index of an Animation Track." msgstr "" "返回由 [param key_idx] 标识的键处的动画名称。[param track_idx] 必须是动画轨道" "的索引。" #: doc/classes/Animation.xml msgid "" "Inserts a key with value [param animation] at the given [param time] (in " "seconds). The [param track_idx] must be the index of an Animation Track." msgstr "" "在给定的 [param time](以秒为单位)插入一个值为 [param animation] 的键。" "[param track_idx] 必须是动画轨道的索引。" #: doc/classes/Animation.xml msgid "" "Sets the key identified by [param key_idx] to value [param animation]. The " "[param track_idx] must be the index of an Animation Track." msgstr "" "将 [param key_idx] 标识的键设置为值 [param animation]。[param track_idx] 必须" "是动画轨道的索引。" #: doc/classes/Animation.xml msgid "" "Returns the end offset of the key identified by [param key_idx]. The [param " "track_idx] must be the index of an Audio Track.\n" "End offset is the number of seconds cut off at the ending of the audio " "stream." msgstr "" "返回由 [param key_idx] 标识的键的结束偏移量。[param track_idx] 必须是音频轨道" "的索引。\n" "结束偏移量是在音频流结束时截断的秒数。" #: doc/classes/Animation.xml msgid "" "Returns the start offset of the key identified by [param key_idx]. The " "[param track_idx] must be the index of an Audio Track.\n" "Start offset is the number of seconds cut off at the beginning of the audio " "stream." msgstr "" "返回由 [param key_idx] 标识的键的起始偏移量。[param track_idx] 必须是音频轨道" "的索引。\n" "起始偏移量是在音频流开始时截断的秒数。" #: doc/classes/Animation.xml msgid "" "Returns the audio stream of the key identified by [param key_idx]. The " "[param track_idx] must be the index of an Audio Track." msgstr "" "返回由 [param key_idx] 标识的键的音频流。[param track_idx] 必须是音频轨道的索" "引。" #: doc/classes/Animation.xml msgid "" "Inserts an Audio Track key at the given [param time] in seconds. The [param " "track_idx] must be the index of an Audio Track.\n" "[param stream] is the [AudioStream] resource to play. [param start_offset] " "is the number of seconds cut off at the beginning of the audio stream, while " "[param end_offset] is at the ending." msgstr "" "在 [param time] 秒处插入音频轨道关键帧。[param track_idx] 必须是音频轨道的索" "引。\n" "[param stream] 是要播放的 [AudioStream] 资源。[param start_offset] 是音频流开" "头截断的秒数,而 [param end_offset] 是在结尾处截断的秒数。" #: doc/classes/Animation.xml msgid "" "Returns [code]true[/code] if the track at [param track_idx] will be blended " "with other animations." msgstr "" "如果 [param track_idx] 处的轨道将与其他动画混合,则返回 [code]true[/code]。" #: doc/classes/Animation.xml msgid "" "Sets the end offset of the key identified by [param key_idx] to value [param " "offset]. The [param track_idx] must be the index of an Audio Track." msgstr "" "将由 [param key_idx] 标识的键的结束偏移量设置为值 [param offset]。[param " "track_idx] 必须是音频轨道的索引。" #: doc/classes/Animation.xml msgid "" "Sets the start offset of the key identified by [param key_idx] to value " "[param offset]. The [param track_idx] must be the index of an Audio Track." msgstr "" "将由 [param key_idx] 标识的键的起始偏移量设置为值 [param offset]。[param " "track_idx] 必须是音频轨道的索引。" #: doc/classes/Animation.xml msgid "" "Sets the stream of the key identified by [param key_idx] to value [param " "stream]. The [param track_idx] must be the index of an Audio Track." msgstr "" "将由 [param key_idx] 标识的键的流设置为值 [param stream]。[param track_idx] " "必须是音频轨道的索引。" #: doc/classes/Animation.xml msgid "" "Sets whether the track will be blended with other animations. If [code]true[/" "code], the audio playback volume changes depending on the blend value." msgstr "" "设置轨道是否将与其他动画混合。如果为 [code]true[/code],音频播放音量会根据混" "合值而变化。" #: doc/classes/Animation.xml msgid "" "Returns the in handle of the key identified by [param key_idx]. The [param " "track_idx] must be the index of a Bezier Track." msgstr "" "返回由 [param key_idx] 识别的关键帧的入点句柄,[param track_idx] 必须是贝赛尔" "曲线轨道的索引。" #: doc/classes/Animation.xml msgid "" "Returns the out handle of the key identified by [param key_idx]. The [param " "track_idx] must be the index of a Bezier Track." msgstr "" "返回由 [param key_idx] 识别的关键帧的出点句柄,[param track_idx] 必须是贝赛尔" "曲线轨道的索引。" #: doc/classes/Animation.xml msgid "" "Returns the value of the key identified by [param key_idx]. The [param " "track_idx] must be the index of a Bezier Track." msgstr "" "返回由 [param key_idx] 识别的键的值,[param track_idx] 必须是贝塞尔轨道的索" "引。" #: doc/classes/Animation.xml msgid "" "Inserts a Bezier Track key at the given [param time] in seconds. The [param " "track_idx] must be the index of a Bezier Track.\n" "[param in_handle] is the left-side weight of the added Bezier curve point, " "[param out_handle] is the right-side one, while [param value] is the actual " "value at this point." msgstr "" "在给定的时间 [param time] 秒处插入贝塞尔轨道关键帧。[param track_idx] 必须是" "贝塞尔轨道的索引。\n" "[param in_handle] 是添加的贝塞尔曲线点的左侧权重,[param out_handle] 是右侧权" "重,而 [param value] 是这个点的实际值。" #: doc/classes/Animation.xml msgid "" "Returns the interpolated value at the given [param time] (in seconds). The " "[param track_idx] must be the index of a Bezier Track." msgstr "" "返回给定 [param time] 处的插值(以秒为单位)。[param track_idx] 必须是贝塞尔" "轨道的索引。" #: doc/classes/Animation.xml msgid "" "Sets the in handle of the key identified by [param key_idx] to value [param " "in_handle]. The [param track_idx] must be the index of a Bezier Track." msgstr "" "将 [param key_idx] 所标识的关键帧的入点句柄设置为 [param in_handle] 值。" "[param track_idx] 必须是贝塞尔轨道的索引。" #: doc/classes/Animation.xml msgid "" "Sets the out handle of the key identified by [param key_idx] to value [param " "out_handle]. The [param track_idx] must be the index of a Bezier Track." msgstr "" "将由 [param key_idx] 确定的关键帧的出点句柄设置为 [param out_handle]。参数 " "[param track_idx] 必须是贝塞尔轨道的索引。" #: doc/classes/Animation.xml msgid "" "Sets the value of the key identified by [param key_idx] to the given value. " "The [param track_idx] must be the index of a Bezier Track." msgstr "" "将 [param key_idx] 所标识的键值设置为给定值。[param track_idx] 必须是贝塞尔轨" "道的索引。" #: doc/classes/Animation.xml msgid "Inserts a key in a given blend shape track. Returns the key index." msgstr "在给定的混合形状轨道中插入一个关键帧。返回键索引。" #: doc/classes/Animation.xml msgid "" "Returns the interpolated blend shape value at the given time (in seconds). " "The [param track_idx] must be the index of a blend shape track." msgstr "" "返回位于给定时间(以秒为单位)的插值后的混合形状值。[param track_idx] 必须是" "混合形状轨道的索引。" #: doc/classes/Animation.xml msgid "Clear the animation (clear all tracks and reset all)." msgstr "清除动画(清除所有轨道并重置所有)。" #: doc/classes/Animation.xml msgid "" "Compress the animation and all its tracks in-place. This will make [method " "track_is_compressed] return [code]true[/code] once called on this " "[Animation]. Compressed tracks require less memory to be played, and are " "designed to be used for complex 3D animations (such as cutscenes) imported " "from external 3D software. Compression is lossy, but the difference is " "usually not noticeable in real world conditions.\n" "[b]Note:[/b] Compressed tracks have various limitations (such as not being " "editable from the editor), so only use compressed animations if you actually " "need them." msgstr "" "就地压缩动画及其所有轨道。这将使 [method track_is_compressed] 一旦在这个 " "[Animation] 上被调用就会返回 [code]true[/code]。压缩后的轨道在播放时需要更少" "的内存,并且这被设计用于从外部3D软件导入的复杂的3D动画(比如过场动画)。压缩" "是有损失的,但现实中通常不会注意到这种差异。\n" "[b]注意:[/b]压缩轨道有各种限制(比如不能从编辑器中编辑),所以只有在你真正需" "要时才使用压缩动画。" #: doc/classes/Animation.xml msgid "" "Adds a new track to [param to_animation] that is a copy of the given track " "from this animation." msgstr "" "向 [param to_animation] 添加一个新轨道,该轨道是该动画中给定轨道的副本。" #: doc/classes/Animation.xml msgid "" "Returns the index of the specified track. If the track is not found, return " "-1." msgstr "返回指定轨迹的索引。如果没有找到,返回 -1。" #: doc/classes/Animation.xml msgid "Returns the name of the marker located at the given time." msgstr "返回位于给定时间点的标记的名称。" #: doc/classes/Animation.xml msgid "Returns the given marker's color." msgstr "返回给定标记的颜色。" #: doc/classes/Animation.xml msgid "Returns every marker in this Animation, sorted ascending by time." msgstr "返回动画中的所有标记,按时间升序排列。" #: doc/classes/Animation.xml msgid "Returns the given marker's time." msgstr "返回给定标记的时间点。" #: doc/classes/Animation.xml msgid "" "Returns the closest marker that comes after the given time. If no such " "marker exists, an empty string is returned." msgstr "返回晚于并最接近给定时间的标签,若该标签不存在,则返回空字符串。" #: doc/classes/Animation.xml msgid "" "Returns the closest marker that comes before the given time. If no such " "marker exists, an empty string is returned." msgstr "返回早于并最接近给定时刻的标签,若此标签不存在,返回空字符串。" #: doc/classes/Animation.xml msgid "Returns the amount of tracks in the animation." msgstr "返回动画中的轨道数。" #: doc/classes/Animation.xml msgid "" "Returns [code]true[/code] if this Animation contains a marker with the given " "name." msgstr "如果动画中包含给定名称的标记,则返回 [code]true[/code]。" #: doc/classes/Animation.xml msgid "Returns the method name of a method track." msgstr "返回一个方法轨道的方法名。" #: doc/classes/Animation.xml msgid "" "Returns the arguments values to be called on a method track for a given key " "in a given track." msgstr "返回给定方法轨道中给定键的方法要调用的参数值。" #: doc/classes/Animation.xml msgid "" "Optimize the animation and all its tracks in-place. This will preserve only " "as many keys as are necessary to keep the animation within the specified " "bounds." msgstr "" "对该动画及其轨迹进行原地优化,这将仅保留使动画保持在特定边界内所需数量的关键" "帧。" #: doc/classes/Animation.xml msgid "Inserts a key in a given 3D position track. Returns the key index." msgstr "在给定的 3D 位置轨道中插入关键帧。返回该关键帧的索引。" #: doc/classes/Animation.xml msgid "" "Returns the interpolated position value at the given time (in seconds). The " "[param track_idx] must be the index of a 3D position track." msgstr "" "返回位于给定时间(以秒为单位)的插值后的位置值。[param track_idx] 必须是 3D " "位置轨道的索引。" #: doc/classes/Animation.xml msgid "Removes the marker with the given name from this Animation." msgstr "从动画中移除给定名称的标记。" #: doc/classes/Animation.xml msgid "Removes a track by specifying the track index." msgstr "通过指定轨道索引来移除一个轨道。" #: doc/classes/Animation.xml msgid "Inserts a key in a given 3D rotation track. Returns the key index." msgstr "在给定的 3D 旋转轨道中插入关键帧。返回该关键帧的索引。" #: doc/classes/Animation.xml msgid "" "Returns the interpolated rotation value at the given time (in seconds). The " "[param track_idx] must be the index of a 3D rotation track." msgstr "" "返回位于给定时间(以秒为单位)的插值后的旋转值。[param track_idx] 必须是 3D " "旋转轨道的索引。" #: doc/classes/Animation.xml msgid "Inserts a key in a given 3D scale track. Returns the key index." msgstr "在给定的 3D 缩放轨道中插入关键帧。返回该关键帧的索引。" #: doc/classes/Animation.xml msgid "" "Returns the interpolated scale value at the given time (in seconds). The " "[param track_idx] must be the index of a 3D scale track." msgstr "" "返回位于给定时间(以秒为单位)的插值后的缩放值。[param track_idx] 必须是 3D " "缩放轨道的索引。" #: doc/classes/Animation.xml msgid "Sets the given marker's color." msgstr "设置给定标记的颜色。" #: doc/classes/Animation.xml msgid "" "Finds the key index by time in a given track. Optionally, only find it if " "the approx/exact time is given.\n" "If [param limit] is [code]true[/code], it does not return keys outside the " "animation range.\n" "If [param backward] is [code]true[/code], the direction is reversed in " "methods that rely on one directional processing.\n" "For example, in case [param find_mode] is [constant FIND_MODE_NEAREST], if " "there is no key in the current position just after seeked, the first key " "found is retrieved by searching before the position, but if [param backward] " "is [code]true[/code], the first key found is retrieved after the position." msgstr "" "根据时间查找给定轨道中的关键帧索引号。查找时可以要求与给定时间近似/一致。\n" "如果 [param limit] 为 [code]true[/code],则不会返回动画范围外的关键帧。\n" "如果 [param backward] 为 [code]true[/code],则会按照反方向执行需要单向处理的" "方法。\n" "例如 [param find_mode] 为 [constant FIND_MODE_NEAREST] 时,如果查找的位置不存" "在关键帧,那么就会查找并返回该位置之前的第一个关键帧,而如果 [param " "backward] 为 [code]true[/code],则会返回该位置之后的第一个关键帧。" #: doc/classes/Animation.xml msgid "" "Returns [code]true[/code] if the track at [param track_idx] wraps the " "interpolation loop. New tracks wrap the interpolation loop by default." msgstr "" "如果 [param track_idx] 处的轨道环绕插值循环,则返回 [code]true[/code]。新建的" "轨道默认都会环绕插值循环。" #: doc/classes/Animation.xml msgid "Returns the interpolation type of a given track." msgstr "返回给定轨道的插值类型。" #: doc/classes/Animation.xml msgid "Returns the number of keys in a given track." msgstr "返回给定轨道中关键帧的数量。" #: doc/classes/Animation.xml msgid "Returns the time at which the key is located." msgstr "返回关键帧所在的时间。" #: doc/classes/Animation.xml msgid "" "Returns the transition curve (easing) for a specific key (see the built-in " "math function [method @GlobalScope.ease])." msgstr "" "返回给定关键帧的过渡曲线(缓动)(见内置数学函数 [method " "@GlobalScope.ease])。" #: doc/classes/Animation.xml msgid "Returns the value of a given key in a given track." msgstr "返回给定轨道中给定关键帧的值。" #: doc/classes/Animation.xml msgid "" "Gets the path of a track. For more information on the path format, see " "[method track_set_path]." msgstr "" "获取轨道的路径。有关路径格式的详细信息,请参阅 [method track_set_path]。" #: doc/classes/Animation.xml msgid "Gets the type of a track." msgstr "获取轨道的类型。" #: doc/classes/Animation.xml msgid "Inserts a generic key in a given track. Returns the key index." msgstr "在给定的轨道中插入一个通用关键帧。返回关键帧索引。" #: doc/classes/Animation.xml msgid "" "Returns [code]true[/code] if the track is compressed, [code]false[/code] " "otherwise. See also [method compress]." msgstr "" "如果轨道被压缩,则返回 [code]true[/code],否则返回 [code]false[/code]。另见 " "[method compress]。" #: doc/classes/Animation.xml msgid "" "Returns [code]true[/code] if the track at index [param track_idx] is enabled." msgstr "如果启用了索引 [param track_idx] 处的轨道,则返回 [code]true[/code]。" #: doc/classes/Animation.xml msgid "" "Returns [code]true[/code] if the given track is imported. Else, return " "[code]false[/code]." msgstr "" "如果给定的轨道是被导入的,返回 [code]true[/code]。否则返回 [code]false[/" "code]。" #: doc/classes/Animation.xml msgid "Moves a track down." msgstr "将轨道下移。" #: doc/classes/Animation.xml msgid "" "Changes the index position of track [param track_idx] to the one defined in " "[param to_idx]." msgstr "将轨道 [param track_idx] 的索引位置改为 [param to_idx] 中定义的位置。" #: doc/classes/Animation.xml msgid "Moves a track up." msgstr "将轨道上移。" #: doc/classes/Animation.xml msgid "Removes a key by index in a given track." msgstr "在指定的轨道上按索引移除一个键。" #: doc/classes/Animation.xml msgid "Removes a key at [param time] in a given track." msgstr "在给定轨道中的 [param time] 移除一个键。" #: doc/classes/Animation.xml msgid "Enables/disables the given track. Tracks are enabled by default." msgstr "启用/禁用给定的轨道。轨道默认为启用。" #: doc/classes/Animation.xml msgid "Sets the given track as imported or not." msgstr "将指定的轨道设置为导入或不导入。" #: doc/classes/Animation.xml msgid "" "If [code]true[/code], the track at [param track_idx] wraps the interpolation " "loop." msgstr "如果为 [code]true[/code],则 [param track_idx] 处的轨道环绕插值循环。" #: doc/classes/Animation.xml msgid "Sets the interpolation type of a given track." msgstr "设置指定轨道的插值类型。" #: doc/classes/Animation.xml msgid "Sets the time of an existing key." msgstr "设置现有关键帧的时间。" #: doc/classes/Animation.xml msgid "" "Sets the transition curve (easing) for a specific key (see the built-in math " "function [method @GlobalScope.ease])." msgstr "" "设置指定关键帧的过渡曲线(缓动)(参阅内置数学函数 [method " "@GlobalScope.ease])。" #: doc/classes/Animation.xml msgid "Sets the value of an existing key." msgstr "设置现有关键帧的值。" #: doc/classes/Animation.xml msgid "" "Sets the path of a track. Paths must be valid scene-tree paths to a node and " "must be specified starting from the [member AnimationMixer.root_node] that " "will reproduce the animation. Tracks that control properties or bones must " "append their name after the path, separated by [code]\":\"[/code].\n" "For example, [code]\"character/skeleton:ankle\"[/code] or [code]\"character/" "mesh:transform/local\"[/code]." msgstr "" "设置轨道的路径。路径必须是指向某一节点的有效场景树路径,必须从将要播放动画的 " "[member AnimationMixer.root_node] 开始指定。控制属性或骨骼的轨道必须在路径后" "面加上它们的名字,用 [code]\":\"[/code] 分隔。\n" "例如,[code]\"character/skeleton:ankle\"[/code] 或 [code]\"character/" "mesh:transform/local\"[/code]。" #: doc/classes/Animation.xml msgid "" "Swaps the track [param track_idx]'s index position with the track [param " "with_idx]." msgstr "" "将轨道 [param track_idx] 的索引位置与轨道 [param with_idx] 的索引位置互换。" #: doc/classes/Animation.xml msgid "Returns the update mode of a value track." msgstr "返回值轨道的更新模式。" #: doc/classes/Animation.xml msgid "" "Returns the interpolated value at the given time (in seconds). The [param " "track_idx] must be the index of a value track.\n" "A [param backward] mainly affects the direction of key retrieval of the " "track with [constant UPDATE_DISCRETE] converted by [constant " "AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS] to match " "the result with [method track_find_key]." msgstr "" "返回在给定时间点(单位为秒)插值后的值。[param track_idx] 必须是值轨道的索引" "号。\n" "[param backward] 影响的主要是从轨道获取关键帧的方向,与 [method " "track_find_key] 的结果一致,此处的轨道指根据 [constant " "AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS] 转换的 " "[constant UPDATE_DISCRETE] 轨道。" #: doc/classes/Animation.xml msgid "Sets the update mode of a value track." msgstr "设置值轨道的更新模式。" #: doc/classes/Animation.xml msgid "" "Returns [code]true[/code] if the capture track is included. This is a cached " "readonly value for performance." msgstr "" "如果包含捕获轨道,则返回 [code]true[/code]。这是一个只读的缓存值,旨在提升性" "能。" #: doc/classes/Animation.xml msgid "" "The total length of the animation (in seconds).\n" "[b]Note:[/b] Length is not delimited by the last key, as this one may be " "before or after the end to ensure correct interpolation and looping." msgstr "" "动画的总长度(单位为秒)。\n" "[b]注意:[/b]长度不以最后一个关键帧为界,因为这个关键帧可能位于结束前或结束" "后,以确保正确的插值和循环。" #: doc/classes/Animation.xml msgid "" "Determines the behavior of both ends of the animation timeline during " "animation playback. This indicates whether and how the animation should be " "restarted, and is also used to correctly interpolate animation cycles." msgstr "" "确定动画播放期间动画时间轴两端的行为。这指示动画是否应该以及应该如何重新启" "动,也用于动画循环的正确插值。" #: doc/classes/Animation.xml msgid "The animation step value." msgstr "动画步长值。" #: doc/classes/Animation.xml msgid "" "Value tracks set values in node properties, but only those which can be " "interpolated. For 3D position/rotation/scale, using the dedicated [constant " "TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] " "track types instead of [constant TYPE_VALUE] is recommended for performance " "reasons." msgstr "" "值轨道设置节点属性中的值,但仅限于那些可以被插值的属性。对于 3D 位置/旋转/缩" "放,出于性能原因,建议使用专用的 [constant TYPE_POSITION_3D]、[constant " "TYPE_ROTATION_3D] 和 [constant TYPE_SCALE_3D] 轨道类型而不是 [constant " "TYPE_VALUE]。" #: doc/classes/Animation.xml msgid "3D position track (values are stored in [Vector3]s)." msgstr "3D 位置轨道(值存储在 [Vector3] 中)。" #: doc/classes/Animation.xml msgid "3D rotation track (values are stored in [Quaternion]s)." msgstr "3D 旋转轨道(值存储在 [Quaternion] 中)。" #: doc/classes/Animation.xml msgid "3D scale track (values are stored in [Vector3]s)." msgstr "3D 缩放轨道(值存储在 [Vector3] 中)。" #: doc/classes/Animation.xml msgid "Blend shape track." msgstr "混合形状轨道。" #: doc/classes/Animation.xml msgid "Method tracks call functions with given arguments per key." msgstr "方法轨道会在各个关键帧上使用给定参数的调用函数。" #: doc/classes/Animation.xml msgid "" "Bezier tracks are used to interpolate a value using custom curves. They can " "also be used to animate sub-properties of vectors and colors (e.g. alpha " "value of a [Color])." msgstr "" "贝塞尔轨道可以用来根据自定义曲线对数值进行插值。它们也可以用来对向量和颜色的" "子属性进行动画处理(例如 [Color] 的 Alpha 值)。" #: doc/classes/Animation.xml msgid "" "Audio tracks are used to play an audio stream with either type of " "[AudioStreamPlayer]. The stream can be trimmed and previewed in the " "animation." msgstr "" "音频轨道可以用来通过任意类型的 [AudioStreamPlayer] 播放音频流。该流可以在动画" "中进行修剪和预览。" #: doc/classes/Animation.xml msgid "Animation tracks play animations in other [AnimationPlayer] nodes." msgstr "动画轨道会在其他 [AnimationPlayer] 节点中播放动画。" #: doc/classes/Animation.xml msgid "No interpolation (nearest value)." msgstr "无插值(最邻近的值)。" #: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "线性插值。" #: doc/classes/Animation.xml msgid "" "Cubic interpolation. This looks smoother than linear interpolation, but is " "more expensive to interpolate. Stick to [constant INTERPOLATION_LINEAR] for " "complex 3D animations imported from external software, even if it requires " "using a higher animation framerate in return." msgstr "" "三次插值。这看起来比线性插值更平滑,但插值成本更高。对于从外部软件导入的复杂 " "3D 动画,坚持使用 [constant INTERPOLATION_LINEAR],即使它需要使用更高的动画帧" "率作为回报。" #: doc/classes/Animation.xml msgid "" "Linear interpolation with shortest path rotation.\n" "[b]Note:[/b] The result value is always normalized and may not match the key " "value." msgstr "" "具有最短路径旋转的线性插值。\n" "[b]注意:[/b]结果值总是归一化的,可能与关键帧的值不匹配。" #: doc/classes/Animation.xml msgid "" "Cubic interpolation with shortest path rotation.\n" "[b]Note:[/b] The result value is always normalized and may not match the key " "value." msgstr "" "具有最短路径旋转的三次插值。\n" "[b]注意:[/b]结果值总是归一化的,可能与关键帧的值不匹配。" #: doc/classes/Animation.xml msgid "Update between keyframes and hold the value." msgstr "在关键帧之间更新并保持值。" #: doc/classes/Animation.xml msgid "Update at the keyframes." msgstr "在关键帧更新。" #: doc/classes/Animation.xml msgid "" "Same as [constant UPDATE_CONTINUOUS] but works as a flag to capture the " "value of the current object and perform interpolation in some methods. See " "also [method AnimationMixer.capture], [member " "AnimationPlayer.playback_auto_capture], and [method " "AnimationPlayer.play_with_capture]." msgstr "" "与 [constant UPDATE_CONTINUOUS] 相同,但是会捕获当前对象的取值并在部分方法中" "进行插值。另见 [method AnimationMixer.capture]、[member " "AnimationPlayer.playback_auto_capture] 和 [method " "AnimationPlayer.play_with_capture]。" #: doc/classes/Animation.xml msgid "At both ends of the animation, the animation will stop playing." msgstr "在动画的两端,动画将停止播放。" #: doc/classes/Animation.xml msgid "" "At both ends of the animation, the animation will be repeated without " "changing the playback direction." msgstr "在动画的两端,动画会在不改变播放方向的情况下重复播放。" #: doc/classes/Animation.xml msgid "Repeats playback and reverse playback at both ends of the animation." msgstr "在动画的两端重复进行播放和反向播放。" #: doc/classes/Animation.xml msgid "This flag indicates that the animation proceeds without any looping." msgstr "该标志指示动画在没有任何循环的情况下继续进行。" #: doc/classes/Animation.xml msgid "" "This flag indicates that the animation has reached the end of the animation " "and just after loop processed." msgstr "该标志表示动画已到达动画的末尾并且刚好在循环处理之后。" #: doc/classes/Animation.xml msgid "" "This flag indicates that the animation has reached the start of the " "animation and just after loop processed." msgstr "该标志表示动画已经到达动画的开始并且刚好在循环处理之后。" #: doc/classes/Animation.xml msgid "Finds the nearest time key." msgstr "查找与时间最接近的关键帧。" #: doc/classes/Animation.xml msgid "Finds only the key with approximating the time." msgstr "仅查找与时间近似的关键帧。" #: doc/classes/Animation.xml msgid "Finds only the key with matching the time." msgstr "仅查找与时间一致的关键帧。" #: doc/classes/AnimationLibrary.xml msgid "Container for [Animation] resources." msgstr "[Animation] 资源的容器。" #: doc/classes/AnimationLibrary.xml msgid "" "An animation library stores a set of animations accessible through " "[StringName] keys, for use with [AnimationPlayer] nodes." msgstr "" "动画库存储一组可通过 [StringName] 键访问的动画,可用于 [AnimationPlayer] 节" "点。" #: doc/classes/AnimationLibrary.xml msgid "Animation tutorial index" msgstr "动画教程索引" #: doc/classes/AnimationLibrary.xml msgid "" "Adds the [param animation] to the library, accessible by the key [param " "name]." msgstr "将 [param animation] 添加到库中,可通过键 [param name] 访问。" #: doc/classes/AnimationLibrary.xml doc/classes/AnimationMixer.xml msgid "" "Returns the [Animation] with the key [param name]. If the animation does not " "exist, [code]null[/code] is returned and an error is logged." msgstr "" "返回带有键 [param name] 的 [Animation]。如果动画不存在,则返回 [code]null[/" "code] 并记录错误。" #: doc/classes/AnimationLibrary.xml msgid "Returns the keys for the [Animation]s stored in the library." msgstr "返回库中存储的所有 [Animation] 键。" #: doc/classes/AnimationLibrary.xml msgid "Returns the key count for the [Animation]s stored in the library." msgstr "返回库中存储的 [Animation] 键的数量。" #: doc/classes/AnimationLibrary.xml msgid "" "Returns [code]true[/code] if the library stores an [Animation] with [param " "name] as the key." msgstr "" "如果该库存储了以 [param name] 作为键的 [Animation],则返回 [code]true[/" "code]。" #: doc/classes/AnimationLibrary.xml msgid "Removes the [Animation] with the key [param name]." msgstr "使用键 [param name] 移除 [Animation]。" #: doc/classes/AnimationLibrary.xml msgid "" "Changes the key of the [Animation] associated with the key [param name] to " "[param newname]." msgstr "将与键 [param name] 关联的 [Animation] 的键更改为 [param newname]。" #: doc/classes/AnimationLibrary.xml msgid "Emitted when an [Animation] is added, under the key [param name]." msgstr "在键 [param name] 下添加 [Animation] 时发出。" #: doc/classes/AnimationLibrary.xml msgid "" "Emitted when there's a change in one of the animations, e.g. tracks are " "added, moved or have changed paths. [param name] is the key of the animation " "that was changed.\n" "See also [signal Resource.changed], which this acts as a relay for." msgstr "" "当其中一个动画发生变化时发出,例如轨道被添加、移动,或路径被更改。[param " "name] 是被改变的动画的键。\n" "另见 [signal Resource.changed],本信号充当该信号的中继。" #: doc/classes/AnimationLibrary.xml msgid "" "Emitted when an [Animation] stored with the key [param name] is removed." msgstr "当使用键 [param name] 存储的 [Animation] 被移除时发出。" #: doc/classes/AnimationLibrary.xml msgid "" "Emitted when the key for an [Animation] is changed, from [param name] to " "[param to_name]." msgstr "当 [Animation] 的键从 [param name] 更改为 [param to_name] 时发出。" #: doc/classes/AnimationMixer.xml msgid "Base class for [AnimationPlayer] and [AnimationTree]." msgstr "[AnimationPlayer] 和 [AnimationTree] 的基类。" #: doc/classes/AnimationMixer.xml msgid "" "Base class for [AnimationPlayer] and [AnimationTree] to manage animation " "lists. It also has general properties and methods for playback and " "blending.\n" "After instantiating the playback information data within the extended class, " "the blending is processed by the [AnimationMixer]." msgstr "" "[AnimationPlayer] 和 [AnimationTree] 的基类,用于管理动画列表。同时还提供了用" "于播放和混合的常用属性和方法。\n" "在扩展后的类中实例化播放信息数据后,就会由 [AnimationMixer] 负责处理混合。" #: doc/classes/AnimationMixer.xml msgid "Migrating Animations from Godot 4.0 to 4.3" msgstr "将动画从 Godot 4.0 迁移到 4.3" #: doc/classes/AnimationMixer.xml msgid "A virtual function for processing after getting a key during playback." msgstr "虚函数,用于播放期间在获取关键帧之后的处理。" #: doc/classes/AnimationMixer.xml msgid "" "Adds [param library] to the animation player, under the key [param name].\n" "AnimationMixer has a global library by default with an empty string as key. " "For adding an animation to the global library:\n" "[codeblocks]\n" "[gdscript]\n" "var global_library = mixer.get_animation_library(\"\")\n" "global_library.add_animation(\"animation_name\", animation_resource)\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "将动画库 [param library] 添加至动画播放器中,键名为 [param name]。\n" "AnimationMixer 默认拥有一个全局库,键名为空字符串。要向这个全局库中添加动" "画:\n" "[codeblocks]\n" "[gdscript]\n" "var global_library = mixer.get_animation_library(\"\")\n" "global_library.add_animation(\"animation_name\", animation_resource)\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/AnimationMixer.xml msgid "Manually advance the animations by the specified time (in seconds)." msgstr "手动将动画前进指定的时间(单位为秒)。" #: doc/classes/AnimationMixer.xml msgid "" "If the animation track specified by [param name] has an option [constant " "Animation.UPDATE_CAPTURE], stores current values of the objects indicated by " "the track path as a cache. If there is already a captured cache, the old " "cache is discarded.\n" "After this it will interpolate with current animation blending result during " "the playback process for the time specified by [param duration], working " "like a crossfade.\n" "You can specify [param trans_type] as the curve for the interpolation. For " "better results, it may be appropriate to specify [constant " "Tween.TRANS_LINEAR] for cases where the first key of the track begins with a " "non-zero value or where the key value does not change, and [constant " "Tween.TRANS_QUAD] for cases where the key value changes linearly." msgstr "" "如果 [param name] 指定的动画轨道具有 [constant Animation.UPDATE_CAPTURE] 选" "项,则会将轨道路径表示的对象当前值存储下来作为缓存。如果已存在捕获缓存,则会" "丢弃旧缓存。\n" "在此之后,就会在播放过程中进行时长为 [param duration] 的与当前动画混合结果的" "插值,类似淡入淡出。\n" "可以使用 [param trans_type] 来指定插值曲线。为了达到最佳效果,如果轨道的第一" "个关键帧非零或键值不会改变,则最好使用 [constant Tween.TRANS_LINEAR];如果键" "值有线性变化,则最好使用 [constant Tween.TRANS_QUAD]。" #: doc/classes/AnimationMixer.xml msgid "" "[AnimationMixer] caches animated nodes. It may not notice if a node " "disappears; [method clear_caches] forces it to update the cache again." msgstr "" "[AnimationMixer] 会缓存动画节点。如果一个节点消失,它可能不会注意到;[method " "clear_caches] 能够强制它再次更新缓存。" #: doc/classes/AnimationMixer.xml msgid "" "Returns the key of [param animation] or an empty [StringName] if not found." msgstr "返回 [param animation] 的键;如果未找到,则返回一个空的 [StringName]。" #: doc/classes/AnimationMixer.xml msgid "" "Returns the key for the [AnimationLibrary] that contains [param animation] " "or an empty [StringName] if not found." msgstr "" "返回包含 [param animation] 的 [AnimationLibrary] 的键;如果找不到,则返回一个" "空的 [StringName]。" #: doc/classes/AnimationMixer.xml msgid "" "Returns the first [AnimationLibrary] with key [param name] or [code]null[/" "code] if not found.\n" "To get the [AnimationMixer]'s global animation library, use " "[code]get_animation_library(\"\")[/code]." msgstr "" "返回第一个键为 [param name] 的 [AnimationLibrary],如果没有找到则返回 " "[code]null[/code]。\n" "要获得 [AnimationMixer] 的全局动画库,请使用 " "[code]get_animation_library(\"\")[/code]。" #: doc/classes/AnimationMixer.xml msgid "Returns the list of stored library keys." msgstr "返回存储库的键名列表。" #: doc/classes/AnimationMixer.xml msgid "Returns the list of stored animation keys." msgstr "返回存储的动画键列表。" #: doc/classes/AnimationMixer.xml msgid "" "Retrieve the motion delta of position with the [member root_motion_track] as " "a [Vector3] that can be used elsewhere.\n" "If [member root_motion_track] is not a path to a track of type [constant " "Animation.TYPE_POSITION_3D], returns [code]Vector3(0, 0, 0)[/code].\n" "See also [member root_motion_track] and [RootMotionView].\n" "The most basic example is applying position to [CharacterBody3D]:\n" "[codeblocks]\n" "[gdscript]\n" "var current_rotation\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tcurrent_rotation = get_quaternion()\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tvar velocity = current_rotation * " "animation_tree.get_root_motion_position() / delta\n" "\tset_velocity(velocity)\n" "\tmove_and_slide()\n" "[/gdscript]\n" "[/codeblocks]\n" "By using this in combination with [method " "get_root_motion_rotation_accumulator], you can apply the root motion " "position more correctly to account for the rotation of the node.\n" "[codeblocks]\n" "[gdscript]\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tset_quaternion(get_quaternion() * " "animation_tree.get_root_motion_rotation())\n" "\tvar velocity = " "(animation_tree.get_root_motion_rotation_accumulator().inverse() * " "get_quaternion()) * animation_tree.get_root_motion_position() / delta\n" "\tset_velocity(velocity)\n" "\tmove_and_slide()\n" "[/gdscript]\n" "[/codeblocks]\n" "If [member root_motion_local] is [code]true[/code], returns the pre-" "multiplied translation value with the inverted rotation.\n" "In this case, the code can be written as follows:\n" "[codeblocks]\n" "[gdscript]\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tset_quaternion(get_quaternion() * " "animation_tree.get_root_motion_rotation())\n" "\tvar velocity = get_quaternion() * " "animation_tree.get_root_motion_position() / delta\n" "\tset_velocity(velocity)\n" "\tmove_and_slide()\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "获取 [member root_motion_track] 的位置运动增量,这是一个可以在其他地方使用的 " "[Vector3]。\n" "如果 [member root_motion_track] 所指向的轨道不是 [constant " "Animation.TYPE_POSITION_3D] 类型,则返回 [code]Vector3(0, 0, 0)[/code]。\n" "另见 [member root_motion_track] 和 [RootMotionView]。\n" "最基础的示例就是将位置应用到 [CharacterBody3D] 上:\n" "[codeblocks]\n" "[gdscript]\n" "var current_rotation\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tcurrent_rotation = get_quaternion()\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tvar velocity = current_rotation * " "animation_tree.get_root_motion_position() / delta\n" "\tset_velocity(velocity)\n" "\tmove_and_slide()\n" "[/gdscript]\n" "[/codeblocks]\n" "与 [method get_root_motion_rotation_accumulator] 配合使用就可以将节点的旋转考" "虑进来,让应用的根运动位置更为准确。\n" "[codeblocks]\n" "[gdscript]\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tset_quaternion(get_quaternion() * " "animation_tree.get_root_motion_rotation())\n" "\tvar velocity = " "(animation_tree.get_root_motion_rotation_accumulator().inverse() * " "get_quaternion()) * animation_tree.get_root_motion_position() / delta\n" "\tset_velocity(velocity)\n" "\tmove_and_slide()\n" "[/gdscript]\n" "[/codeblocks]\n" "如果 [member root_motion_local] 为 [code]true[/code],则会返回预先与逆向旋转" "相乘后的平移值。\n" "此时可以这样编写代码:\n" "[codeblocks]\n" "[gdscript]\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tset_quaternion(get_quaternion() * " "animation_tree.get_root_motion_rotation())\n" "\tvar velocity = get_quaternion() * " "animation_tree.get_root_motion_position() / delta\n" "\tset_velocity(velocity)\n" "\tmove_and_slide()\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/AnimationMixer.xml msgid "" "Retrieve the blended value of the position tracks with the [member " "root_motion_track] as a [Vector3] that can be used elsewhere.\n" "This is useful in cases where you want to respect the initial key values of " "the animation.\n" "For example, if an animation with only one key [code]Vector3(0, 0, 0)[/code] " "is played in the previous frame and then an animation with only one key " "[code]Vector3(1, 0, 1)[/code] is played in the next frame, the difference " "can be calculated as follows:\n" "[codeblocks]\n" "[gdscript]\n" "var prev_root_motion_position_accumulator\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tvar current_root_motion_position_accumulator = " "animation_tree.get_root_motion_position_accumulator()\n" "\tvar difference = current_root_motion_position_accumulator - " "prev_root_motion_position_accumulator\n" "\tprev_root_motion_position_accumulator = " "current_root_motion_position_accumulator\n" "\ttransform.origin += difference\n" "[/gdscript]\n" "[/codeblocks]\n" "However, if the animation loops, an unintended discrete change may occur, so " "this is only useful for some simple use cases." msgstr "" "检索具有 [member root_motion_track] 的位置轨道的混合值,返回的是可以在其他地" "方使用的 [Vector3]。\n" "在想要遵循动画的初始动画帧值的情况下很有用。\n" "例如,如果前一帧播放的是一个只有单个动画帧 [code]Vector3(0, 0, 0)[/code] 的动" "画,然后下一帧播放的是一个只有单个动画帧[code]Vector3(1, 0, 1)[/code] 的动" "画,它们之间的差异可以这样计算:\n" "[codeblocks]\n" "[gdscript]\n" "var prev_root_motion_position_accumulator\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tvar current_root_motion_position_accumulator = " "animation_tree.get_root_motion_position_accumulator()\n" "\tvar difference = current_root_motion_position_accumulator - " "prev_root_motion_position_accumulator\n" "\tprev_root_motion_position_accumulator = " "current_root_motion_position_accumulator\n" "\ttransform.origin += difference\n" "[/gdscript]\n" "[/codeblocks]\n" "不过,如果动画是循环播放的,就可能会发生预料之外的不连续变化,所以这只对一些" "简单的情况有用。" #: doc/classes/AnimationMixer.xml msgid "" "Retrieve the motion delta of rotation with the [member root_motion_track] as " "a [Quaternion] that can be used elsewhere.\n" "If [member root_motion_track] is not a path to a track of type [constant " "Animation.TYPE_ROTATION_3D], returns [code]Quaternion(0, 0, 0, 1)[/code].\n" "See also [member root_motion_track] and [RootMotionView].\n" "The most basic example is applying rotation to [CharacterBody3D]:\n" "[codeblocks]\n" "[gdscript]\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tset_quaternion(get_quaternion() * " "animation_tree.get_root_motion_rotation())\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "检索带有 [member root_motion_track] 的旋转运动,作为一个 [Quaternion],可以在" "其他地方使用。\n" "如果 [member root_motion_track] 不是 [constant Animation.TYPE_ROTATION_3D] 类" "型的轨迹的路径,返回 [code]Quaternion(0, 0, 0, 1)[/code] 。\n" "另见 [member root_motion_track] 和 [RootMotionView]。\n" "最基本的例子是对 [CharacterBody3D] 应用旋转。\n" "[codeblocks]\n" "[gdscript]\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tset_quaternion(get_quaternion() * " "animation_tree.get_root_motion_rotation() )\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/AnimationMixer.xml msgid "" "Retrieve the blended value of the rotation tracks with the [member " "root_motion_track] as a [Quaternion] that can be used elsewhere.\n" "This is necessary to apply the root motion position correctly, taking " "rotation into account. See also [method get_root_motion_position].\n" "Also, this is useful in cases where you want to respect the initial key " "values of the animation.\n" "For example, if an animation with only one key [code]Quaternion(0, 0, 0, 1)[/" "code] is played in the previous frame and then an animation with only one " "key [code]Quaternion(0, 0.707, 0, 0.707)[/code] is played in the next frame, " "the difference can be calculated as follows:\n" "[codeblocks]\n" "[gdscript]\n" "var prev_root_motion_rotation_accumulator\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tvar current_root_motion_rotation_accumulator = " "animation_tree.get_root_motion_rotation_accumulator()\n" "\tvar difference = prev_root_motion_rotation_accumulator.inverse() * " "current_root_motion_rotation_accumulator\n" "\tprev_root_motion_rotation_accumulator = " "current_root_motion_rotation_accumulator\n" "\ttransform.basis *= Basis(difference)\n" "[/gdscript]\n" "[/codeblocks]\n" "However, if the animation loops, an unintended discrete change may occur, so " "this is only useful for some simple use cases." msgstr "" "检索带有 [member root_motion_track] 的旋转轨道的混合值,作为一个 " "[Quaternion],可以在其他地方使用。\n" "这里必须正确地结合根运动位置,并且要考虑到旋转。参考 [method " "get_root_motion_position]。\n" "并且,当你想重视动画的初始动画帧的值时,这会很有用。\n" "比如说,如果一个动画在上一帧只播放一个 [code]Quaternion(0, 0, 0, 1)[/code] 动" "画帧,并且一个动画在下一帧只播放了一个动画帧的 [code]Quaternion(0, 0.707, 0, " "0.707)[/code] 时,它们相差的值可以这样求出:\n" "[codeblocks]\n" "[gdscript]\n" "var prev_root_motion_rotation_accumulator\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tvar current_root_motion_rotation_accumulator = " "animation_tree.get_root_motion_rotation_accumulator()\n" "\tvar difference = prev_root_motion_rotation_accumulator.inverse() * " "current_root_motion_rotation_accumulator\n" "\tprev_root_motion_rotation_accumulator = " "current_root_motion_rotation_accumulator\n" "\ttransform.basis *= Basis(difference)\n" "[/gdscript]\n" "[/codeblocks]\n" "然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情" "况下才有用。" #: doc/classes/AnimationMixer.xml msgid "" "Retrieve the motion delta of scale with the [member root_motion_track] as a " "[Vector3] that can be used elsewhere.\n" "If [member root_motion_track] is not a path to a track of type [constant " "Animation.TYPE_SCALE_3D], returns [code]Vector3(0, 0, 0)[/code].\n" "See also [member root_motion_track] and [RootMotionView].\n" "The most basic example is applying scale to [CharacterBody3D]:\n" "[codeblocks]\n" "[gdscript]\n" "var current_scale = Vector3(1, 1, 1)\n" "var scale_accum = Vector3(1, 1, 1)\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tcurrent_scale = get_scale()\n" "\t\tscale_accum = Vector3(1, 1, 1)\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tscale_accum += animation_tree.get_root_motion_scale()\n" "\tset_scale(current_scale * scale_accum)\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "获取 [member root_motion_track] 的缩放运动增量,类型为 [Vector3],可以在其他" "地方使用。\n" "如果 [member root_motion_track] 不是类型为 [constant " "Animation.TYPE_SCALE_3D] 的轨道的路径,则返回 [code]Vector3(0, 0, 0)[/" "code] 。\n" "另见 [member root_motion_track] 和 [RootMotionView]。\n" "最基本的例子是对 [CharacterBody3D] 应用缩放。\n" "[codeblocks]\n" "[gdscript]\n" "var current_scale = Vector3(1, 1, 1)\n" "var scale_accum = Vector3(1, 1, 1)\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tcurrent_scale = get_scale()\n" "\t\tscale_accum = Vector3(1, 1, 1)\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tscale_accum += animation_tree.get_root_motion_scale()\n" "\tset_scale(current_scale * scale_accum)\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/AnimationMixer.xml msgid "" "Retrieve the blended value of the scale tracks with the [member " "root_motion_track] as a [Vector3] that can be used elsewhere.\n" "For example, if an animation with only one key [code]Vector3(1, 1, 1)[/code] " "is played in the previous frame and then an animation with only one key " "[code]Vector3(2, 2, 2)[/code] is played in the next frame, the difference " "can be calculated as follows:\n" "[codeblocks]\n" "[gdscript]\n" "var prev_root_motion_scale_accumulator\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tvar current_root_motion_scale_accumulator = " "animation_tree.get_root_motion_scale_accumulator()\n" "\tvar difference = current_root_motion_scale_accumulator - " "prev_root_motion_scale_accumulator\n" "\tprev_root_motion_scale_accumulator = " "current_root_motion_scale_accumulator\n" "\ttransform.basis = transform.basis.scaled(difference)\n" "[/gdscript]\n" "[/codeblocks]\n" "However, if the animation loops, an unintended discrete change may occur, so " "this is only useful for some simple use cases." msgstr "" "检索带有 [member root_motion_track] 的缩放轨道的混合值,作为一个 [Vector3]," "可以在其他地方使用。\n" "例如,如果一个动画在前一帧只播放了一个动画帧 [code]Vector3(1, 1, 1)[/code]," "并且一个动画在后一帧只播放了一个动画帧 [code]Vector3(2, 2, 2)[/code],他们之" "间相差的值可以这样求出:\n" "[codeblocks]\n" "[gdscript]\n" "var prev_root_motion_scale_accumulator\n" "\n" "func _process(delta):\n" "\tif Input.is_action_just_pressed(\"animate\"):\n" "\t\tstate_machine.travel(\"Animate\")\n" "\tvar current_root_motion_scale_accumulator = " "animation_tree.get_root_motion_scale_accumulator()\n" "\tvar difference = current_root_motion_scale_accumulator - " "prev_root_motion_scale_accumulator\n" "\tprev_root_motion_scale_accumulator = " "current_root_motion_scale_accumulator\n" "\ttransform.basis = transform.basis.scaled(difference)\n" "[/gdscript]\n" "[/codeblocks]\n" "然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情" "况下才有用。" #: doc/classes/AnimationMixer.xml msgid "" "Returns [code]true[/code] if the [AnimationMixer] stores an [Animation] with " "key [param name]." msgstr "" "如果该 [AnimationMixer] 存有键名为 [param name] 的 [Animation],则返回 " "[code]true[/code]。" #: doc/classes/AnimationMixer.xml msgid "" "Returns [code]true[/code] if the [AnimationMixer] stores an " "[AnimationLibrary] with key [param name]." msgstr "" "如果该 [AnimationMixer] 存有键名为 [param name] 的 [AnimationLibrary],则返" "回 [code]true[/code]。" #: doc/classes/AnimationMixer.xml msgid "Removes the [AnimationLibrary] associated with the key [param name]." msgstr "移除与键 [param name] 关联的 [AnimationLibrary]。" #: doc/classes/AnimationMixer.xml msgid "" "Moves the [AnimationLibrary] associated with the key [param name] to the key " "[param newname]." msgstr "" "将与键 [param name] 关联的 [AnimationLibrary] 移动到键 [param newname]。" #: doc/classes/AnimationMixer.xml msgid "If [code]true[/code], the [AnimationMixer] will be processing." msgstr "如果 [code]true[/code] 时,[AnimationMixer] 将执行逻辑处理。" #: doc/classes/AnimationMixer.xml msgid "" "The number of possible simultaneous sounds for each of the assigned " "AudioStreamPlayers.\n" "For example, if this value is [code]32[/code] and the animation has two " "audio tracks, the two [AudioStreamPlayer]s assigned can play simultaneously " "up to [code]32[/code] voices each." msgstr "" "每个指定的 AudioStreamPlayer 可能同时发出的声音的数量。\n" "例如,如果该值为 [code]32[/code] 并且动画有两个音轨,则分配的两个 " "[AudioStreamPlayer] 可以同时播放最多 [code]32[/code] 个声音。" #: doc/classes/AnimationMixer.xml msgid "" "Ordinarily, tracks can be set to [constant Animation.UPDATE_DISCRETE] to " "update infrequently, usually when using nearest interpolation.\n" "However, when blending with [constant Animation.UPDATE_CONTINUOUS] several " "results are considered. The [member callback_mode_discrete] specify it " "explicitly. See also [enum AnimationCallbackModeDiscrete].\n" "To make the blended results look good, it is recommended to set this to " "[constant ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS] to update every " "frame during blending. Other values exist for compatibility and they are " "fine if there is no blending, but not so, may produce artifacts." msgstr "" "一般而言,可以将轨道设置为 [constant Animation.UPDATE_DISCRETE] 降低更新频" "率,通常在最近邻插值时使用。\n" "但在使用 [constant Animation.UPDATE_CONTINUOUS] 进行混合时需要考虑不同的结" "果,可以用 [member callback_mode_discrete] 来显式指定。另见 [enum " "AnimationCallbackModeDiscrete]。\n" "为了在混合时得到更好的结果,建议将其设置为 [constant " "ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS],在混合时每一帧都更新。其" "他值主要用于兼容,在不需要混合时没有问题,但需要混合时则可能产生问题。" #: doc/classes/AnimationMixer.xml msgid "The call mode used for \"Call Method\" tracks." msgstr "用于“方法调用”轨道的调用模式。" #: doc/classes/AnimationMixer.xml msgid "The process notification in which to update animations." msgstr "更新动画的过程通知。" #: doc/classes/AnimationMixer.xml msgid "" "If [code]true[/code], the blending uses the deterministic algorithm. The " "total weight is not normalized and the result is accumulated with an initial " "value ([code]0[/code] or a [code]\"RESET\"[/code] animation if present).\n" "This means that if the total amount of blending is [code]0.0[/code], the " "result is equal to the [code]\"RESET\"[/code] animation.\n" "If the number of tracks between the blended animations is different, the " "animation with the missing track is treated as if it had the initial value.\n" "If [code]false[/code], The blend does not use the deterministic algorithm. " "The total weight is normalized and always [code]1.0[/code]. If the number of " "tracks between the blended animations is different, nothing is done about " "the animation that is missing a track.\n" "[b]Note:[/b] In [AnimationTree], the blending with [AnimationNodeAdd2], " "[AnimationNodeAdd3], [AnimationNodeSub2] or the weight greater than " "[code]1.0[/code] may produce unexpected results.\n" "For example, if [AnimationNodeAdd2] blends two nodes with the amount " "[code]1.0[/code], then total weight is [code]2.0[/code] but it will be " "normalized to make the total amount [code]1.0[/code] and the result will be " "equal to [AnimationNodeBlend2] with the amount [code]0.5[/code]." msgstr "" "如果为 [code]true[/code],则混合使用确定性算法。总权重不进行归一化,在初始值" "的基础上进行累加(初始值为 [code]0[/code],表示可能存在的 [code]\"RESET\"[/" "code] 动画)。\n" "这意味着如果混合总权重为 [code]0.0[/code],则结果等于 [code]\"RESET\"[/code] " "动画。\n" "如果混合动画之间的轨道数量不同,则缺少轨道的动画将被视为具有初始值。\n" "如果为 [code]false[/code],则混合不会使用确定性算法。总权重将归一化且始终为 " "[code]1.0[/code]。如果混合动画之间的轨道数量不同,则不会对缺少轨道的动画执行" "任何操作。\n" "[b]注意:[/b]在 [AnimationTree] 中,与 [AnimationNodeAdd2] 、 " "[AnimationNodeAdd3] 、 [AnimationNodeSub2] 或权重大于 [code]1.0[/code] 混合可" "能产生意想不到的结果。\n" "例如,如果 [AnimationNodeAdd2] 混合了两个取值为 [code]1.0[/code] 的节点,则总" "权重为 [code]2.0[/code],但它将被归一化使总权重保持 [code]1.0[/code],且结果" "将等于取值为 [code]0.5[/code] 的 [AnimationNodeBlend2]。" #: doc/classes/AnimationMixer.xml msgid "" "This is used by the editor. If set to [code]true[/code], the scene will be " "saved with the effects of the reset animation (the animation with the key " "[code]\"RESET\"[/code]) applied as if it had been seeked to time 0, with the " "editor keeping the values that the scene had before saving.\n" "This makes it more convenient to preview and edit animations in the editor, " "as changes to the scene will not be saved as long as they are set in the " "reset animation." msgstr "" "由编辑器使用。如果设置为 [code]true[/code],场景将被保存,并应用重置动画(带" "有键 [code]\"RESET\"[/code] 的动画)的效果,就好像它已被定位到时间 0 一样,编" "辑器保留场景在保存之前的值。\n" "这使得在编辑器中预览和编辑动画更加方便,因为对场景的更改,只要在重置动画中被" "设置,就不会被保存。" #: doc/classes/AnimationMixer.xml msgid "" "If [code]true[/code], [method get_root_motion_position] value is extracted " "as a local translation value before blending. In other words, it is treated " "like the translation is done after the rotation." msgstr "" "如果为 [code]true[/code],则混合前会将 [method get_root_motion_position] 的值" "当作局部平移值提取。换句话说,会被当作在旋转后再进行平移。" #: doc/classes/AnimationMixer.xml msgid "" "The path to the Animation track used for root motion. Paths must be valid " "scene-tree paths to a node, and must be specified starting from the parent " "node of the node that will reproduce the animation. The [member " "root_motion_track] uses the same format as [method " "Animation.track_set_path], but note that a bone must be specified.\n" "If the track has type [constant Animation.TYPE_POSITION_3D], [constant " "Animation.TYPE_ROTATION_3D], or [constant Animation.TYPE_SCALE_3D] the " "transformation will be canceled visually, and the animation will appear to " "stay in place. See also [method get_root_motion_position], [method " "get_root_motion_rotation], [method get_root_motion_scale], and " "[RootMotionView]." msgstr "" "用于根部运动的动画轨道的路径。路径必须是指向某一节点的有效场景树路径,必须从" "将实现动画的节点的父节点开始指定。[member root_motion_track] 使用与 [method " "Animation.track_set_path] 相同的格式,但注意必须指定一个骨骼。\n" "如果轨道的类型是 [constant Animation.TYPE_POSITION_3D]、[constant " "Animation.TYPE_ROTATION_3D]、或者 [constant Animation.TYPE_SCALE_3D],那么将" "取消视觉上的变换,其动画看起来将是留在原地。另见 [method " "get_root_motion_position]、[method get_root_motion_rotation]、[method " "get_root_motion_scale]、[RootMotionView]。" #: doc/classes/AnimationMixer.xml msgid "The node which node path references will travel from." msgstr "节点路径引用将从其出发的节点。" #: doc/classes/AnimationMixer.xml msgid "" "Notifies when an animation finished playing.\n" "[b]Note:[/b] This signal is not emitted if an animation is looping." msgstr "" "动画播放结束时通知。\n" "[b]注意:[/b]如果动画正在循环播放,则不会发出此信号。" #: doc/classes/AnimationMixer.xml msgid "Notifies when the animation libraries have changed." msgstr "当动画库发生更改时发出通知。" #: doc/classes/AnimationMixer.xml msgid "Notifies when an animation list is changed." msgstr "当动画列表发生更改时发出通知。" #: doc/classes/AnimationMixer.xml msgid "" "Notifies when an animation starts playing.\n" "[b]Note:[/b] This signal is not emitted if an animation is looping." msgstr "" "动画开始播放时通知。\n" "[b]注意:[/b]如果动画正在循环播放,则不会发出该信号。" #: doc/classes/AnimationMixer.xml msgid "" "Notifies when the caches have been cleared, either automatically, or " "manually via [method clear_caches]." msgstr "" "当缓存被清除时通知,可以是自动清除,也可以是通过 [method clear_caches] 手动清" "除。" #: doc/classes/AnimationMixer.xml msgid "" "Notifies when the blending result related have been applied to the target " "objects." msgstr "当相关的混合结果应用于目标对象时发出通知。" #: doc/classes/AnimationMixer.xml msgid "Notifies when the property related process have been updated." msgstr "当处理相关属性发生更改时发出通知。" #: doc/classes/AnimationMixer.xml msgid "" "Process animation during physics frames (see [constant " "Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]). This is especially useful when " "animating physics bodies." msgstr "" "在物理帧中处理动画(见 [constant " "Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS])。尤其适用于对物理体进行动画处" "理。" #: doc/classes/AnimationMixer.xml msgid "" "Process animation during process frames (see [constant " "Node.NOTIFICATION_INTERNAL_PROCESS])." msgstr "" "在处理帧中处理动画(见 [constant Node.NOTIFICATION_INTERNAL_PROCESS])。" #: doc/classes/AnimationMixer.xml msgid "" "Do not process animation. Use [method advance] to process the animation " "manually." msgstr "不处理动画。使用[method advance]手动处理动画。" #: doc/classes/AnimationMixer.xml msgid "" "Batch method calls during the animation process, then do the calls after " "events are processed. This avoids bugs involving deleting nodes or modifying " "the AnimationPlayer while playing." msgstr "" "在动画过程中批量调用方法,然后在处理完事件后再进行调用。这样就避免了在播放过" "程中涉及删除节点或修改AnimationPlayer的错误。" #: doc/classes/AnimationMixer.xml msgid "Make method calls immediately when reached in the animation." msgstr "在动画中达到时立即进行方法调用。" #: doc/classes/AnimationMixer.xml msgid "" "An [constant Animation.UPDATE_DISCRETE] track value takes precedence when " "blending [constant Animation.UPDATE_CONTINUOUS] or [constant " "Animation.UPDATE_CAPTURE] track values and [constant " "Animation.UPDATE_DISCRETE] track values." msgstr "" "将 [constant Animation.UPDATE_CONTINUOUS] 或 [constant " "Animation.UPDATE_CAPTURE] 轨道值与 [constant Animation.UPDATE_DISCRETE] 轨道" "值混合时,[constant Animation.UPDATE_DISCRETE] 轨道值优先。" #: doc/classes/AnimationMixer.xml msgid "" "An [constant Animation.UPDATE_CONTINUOUS] or [constant " "Animation.UPDATE_CAPTURE] track value takes precedence when blending the " "[constant Animation.UPDATE_CONTINUOUS] or [constant " "Animation.UPDATE_CAPTURE] track values and the [constant " "Animation.UPDATE_DISCRETE] track values. This is the default behavior for " "[AnimationPlayer]." msgstr "" "将 [constant Animation.UPDATE_CONTINUOUS] 或 [constant " "Animation.UPDATE_CAPTURE] 轨道值与 [constant Animation.UPDATE_DISCRETE] 轨道" "值混合时,[constant Animation.UPDATE_CONTINUOUS] 或 [constant " "Animation.UPDATE_CAPTURE] 轨道值优先。这是 [AnimationPlayer] 的默认行为。" #: doc/classes/AnimationMixer.xml msgid "" "Always treat the [constant Animation.UPDATE_DISCRETE] track value as " "[constant Animation.UPDATE_CONTINUOUS] with [constant " "Animation.INTERPOLATION_NEAREST]. This is the default behavior for " "[AnimationTree].\n" "If a value track has un-interpolatable type key values, it is internally " "converted to use [constant ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE] with " "[constant Animation.UPDATE_DISCRETE].\n" "Un-interpolatable type list:\n" "- [constant @GlobalScope.TYPE_NIL]\n" "- [constant @GlobalScope.TYPE_NODE_PATH]\n" "- [constant @GlobalScope.TYPE_RID]\n" "- [constant @GlobalScope.TYPE_OBJECT]\n" "- [constant @GlobalScope.TYPE_CALLABLE]\n" "- [constant @GlobalScope.TYPE_SIGNAL]\n" "- [constant @GlobalScope.TYPE_DICTIONARY]\n" "- [constant @GlobalScope.TYPE_PACKED_BYTE_ARRAY]\n" "[constant @GlobalScope.TYPE_BOOL] and [constant @GlobalScope.TYPE_INT] are " "treated as [constant @GlobalScope.TYPE_FLOAT] during blending and rounded " "when the result is retrieved.\n" "It is same for arrays and vectors with them such as [constant " "@GlobalScope.TYPE_PACKED_INT32_ARRAY] or [constant " "@GlobalScope.TYPE_VECTOR2I], they are treated as [constant " "@GlobalScope.TYPE_PACKED_FLOAT32_ARRAY] or [constant " "@GlobalScope.TYPE_VECTOR2]. Also note that for arrays, the size is also " "interpolated.\n" "[constant @GlobalScope.TYPE_STRING] and [constant " "@GlobalScope.TYPE_STRING_NAME] are interpolated between character codes and " "lengths, but note that there is a difference in algorithm between " "interpolation between keys and interpolation by blending." msgstr "" "始终将 [constant Animation.UPDATE_DISCRETE] 轨道的值视为 [constant " "Animation.UPDATE_CONTINUOUS] 和 [constant Animation.INTERPOLATION_NEAREST]。" "这是 [AnimationTree] 的默认行为。\n" "如果值轨道上关键帧的值为无法插值的类型,则会在内部转换为 [constant " "ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE] 和 [constant " "Animation.UPDATE_DISCRETE]。\n" "无法插值的类型列表:\n" "- [constant @GlobalScope.TYPE_NIL]\n" "- [constant @GlobalScope.TYPE_NODE_PATH]\n" "- [constant @GlobalScope.TYPE_RID]\n" "- [constant @GlobalScope.TYPE_OBJECT]\n" "- [constant @GlobalScope.TYPE_CALLABLE]\n" "- [constant @GlobalScope.TYPE_SIGNAL]\n" "- [constant @GlobalScope.TYPE_DICTIONARY]\n" "- [constant @GlobalScope.TYPE_PACKED_BYTE_ARRAY]\n" "[constant @GlobalScope.TYPE_BOOL] 和 [constant @GlobalScope.TYPE_INT] 在混合" "时会被视为 [constant @GlobalScope.TYPE_FLOAT],获取值时会四舍五入。\n" "数组和向量同理,以 [constant @GlobalScope.TYPE_PACKED_INT32_ARRAY] 和 " "[constant @GlobalScope.TYPE_VECTOR2I] 为例,它们会被视为 [constant " "@GlobalScope.TYPE_PACKED_FLOAT32_ARRAY] 和 [constant " "@GlobalScope.TYPE_VECTOR2]。另外请注意,数组的大小也会发生插值。\n" "[constant @GlobalScope.TYPE_STRING] 和 [constant " "@GlobalScope.TYPE_STRING_NAME] 的字符代码和长度会发生插值,但是关键帧的插值和" "混合时的插值在算法上有区别。" #: doc/classes/AnimationNode.xml msgid "Base class for [AnimationTree] nodes. Not related to scene nodes." msgstr "[AnimationTree] 节点的基类。与场景节点无关。" #: doc/classes/AnimationNode.xml msgid "" "Base resource for [AnimationTree] nodes. In general, it's not used directly, " "but you can create custom ones with custom blending formulas.\n" "Inherit this when creating animation nodes mainly for use in " "[AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used " "instead.\n" "You can access the time information as read-only parameter which is " "processed and stored in the previous frame for all nodes except " "[AnimationNodeOutput].\n" "[b]Note:[/b] If multiple inputs exist in the [AnimationNode], which time " "information takes precedence depends on the type of [AnimationNode].\n" "[codeblock]\n" "var current_length = $AnimationTree[\"parameters/AnimationNodeName/" "current_length\"]\n" "var current_position = $AnimationTree[\"parameters/AnimationNodeName/" "current_position\"]\n" "var current_delta = $AnimationTree[\"parameters/AnimationNodeName/" "current_delta\"]\n" "[/codeblock]" msgstr "" "[AnimationTree] 节点的基本资源。通常不会直接使用,不过你可以使用自定义混合公" "式创建自定义节点。\n" "继承这个类的动画节点主要用于 [AnimationNodeBlendTree],否则请使用 " "[AnimationRootNode]。\n" "除 [AnimationNodeOutput] 外,所有节点的时间信息都可以通过只读参数来访问,这些" "信息是在上一帧处理并存储的。\n" "[b]注意:[/b]如果 [AnimationNode] 中存在多个输入,优先使用哪个输入的时间信息" "取决于 [AnimationNode] 的类型。\n" "[codeblock]\n" "var current_length = $AnimationTree[\"parameters/AnimationNodeName/" "current_length\"]\n" "var current_position = $AnimationTree[\"parameters/AnimationNodeName/" "current_position\"]\n" "var current_delta = $AnimationTree[\"parameters/AnimationNodeName/" "current_delta\"]\n" "[/codeblock]" #: doc/classes/AnimationNode.xml doc/classes/AnimationNodeAdd2.xml #: doc/classes/AnimationNodeAdd3.xml doc/classes/AnimationNodeAnimation.xml #: doc/classes/AnimationNodeBlend2.xml doc/classes/AnimationNodeBlend3.xml #: doc/classes/AnimationNodeBlendSpace1D.xml #: doc/classes/AnimationNodeBlendSpace2D.xml #: doc/classes/AnimationNodeBlendTree.xml doc/classes/AnimationNodeOneShot.xml #: doc/classes/AnimationNodeOutput.xml #: doc/classes/AnimationNodeStateMachine.xml #: doc/classes/AnimationNodeStateMachinePlayback.xml #: doc/classes/AnimationNodeStateMachineTransition.xml #: doc/classes/AnimationNodeSync.xml doc/classes/AnimationNodeTimeScale.xml #: doc/classes/AnimationNodeTimeSeek.xml #: doc/classes/AnimationNodeTransition.xml doc/classes/AnimationRootNode.xml #: doc/classes/AnimationTree.xml msgid "Using AnimationTree" msgstr "使用 AnimationTree" #: doc/classes/AnimationNode.xml msgid "" "When inheriting from [AnimationRootNode], implement this virtual method to " "override the text caption for this animation node." msgstr "" "继承 [AnimationRootNode] 时,实现这个虚方法可以覆盖这个动画节点的标题文本。" #: doc/classes/AnimationNode.xml msgid "" "When inheriting from [AnimationRootNode], implement this virtual method to " "return a child animation node by its [param name]." msgstr "" "继承 [AnimationRootNode] 时,实现这个虚方法可以根据名称 [param name] 来返回对" "应的子动画节点。" #: doc/classes/AnimationNode.xml msgid "" "When inheriting from [AnimationRootNode], implement this virtual method to " "return all child animation nodes in order as a [code]name: node[/code] " "dictionary." msgstr "" "继承 [AnimationRootNode] 时,实现这个虚方法可以用 [code]名称:节点[/code] 字典" "的形式按顺序返回所有子动画节点。" #: doc/classes/AnimationNode.xml msgid "" "When inheriting from [AnimationRootNode], implement this virtual method to " "return the default value of a [param parameter]. Parameters are custom local " "memory used for your animation nodes, given a resource can be reused in " "multiple trees." msgstr "" "继承 [AnimationRootNode] 时,实现这个虚方法可以返回参数“[param parameter]”的" "默认值。参数是动画节点的自定义本地存储,资源可以在多个树中重用。" #: doc/classes/AnimationNode.xml msgid "" "When inheriting from [AnimationRootNode], implement this virtual method to " "return a list of the properties on this animation node. Parameters are " "custom local memory used for your animation nodes, given a resource can be " "reused in multiple trees. Format is similar to [method " "Object.get_property_list]." msgstr "" "继承 [AnimationRootNode] 时,实现这个虚方法可以返回这个节点的属性列表。参数是" "动画节点的自定义本地存储,资源可以在多个树中重用。格式与 [method " "Object.get_property_list] 类似。" #: doc/classes/AnimationNode.xml msgid "" "When inheriting from [AnimationRootNode], implement this virtual method to " "return whether the blend tree editor should display filter editing on this " "animation node." msgstr "" "继承 [AnimationRootNode] 时,实现这个虚方法可以返回混合树编辑器是否应该在这个" "动画节点上显示过滤器编辑。" #: doc/classes/AnimationNode.xml msgid "" "When inheriting from [AnimationRootNode], implement this virtual method to " "return whether the [param parameter] is read-only. Parameters are custom " "local memory used for your animation nodes, given a resource can be reused " "in multiple trees." msgstr "" "继承 [AnimationRootNode] 时,实现这个虚方法可以返回参数 [param parameter] 是" "否只读。参数是动画节点的自定义本地存储,资源可以在多个树中重用。" #: doc/classes/AnimationNode.xml msgid "" "Currently this is mostly useless as there is a lack of many APIs to extend " "AnimationNode by GDScript. It is planned that a more flexible API using " "structures will be provided in the future." msgstr "" "目前,这基本上是无用的,因为缺乏许多API来通过GDScript扩展AnimationNode。计划" "在未来提供更灵活的API使用结构。" #: doc/classes/AnimationNode.xml msgid "" "When inheriting from [AnimationRootNode], implement this virtual method to " "run some code when this animation node is processed. The [param time] " "parameter is a relative delta, unless [param seek] is [code]true[/code], in " "which case it is absolute.\n" "Here, call the [method blend_input], [method blend_node] or [method " "blend_animation] functions. You can also use [method get_parameter] and " "[method set_parameter] to modify local memory.\n" "This function should return the delta." msgstr "" "继承 [AnimationRootNode] 时,实现这个虚方法可以在这个动画节点进行处理时执行代" "码。参数 [param time] 是相对增量,除非 [param seek] 为 [code]true[/code],此" "时为绝对增量。\n" "请在此处调用 [method blend_input]、[method blend_node] 或 [method " "blend_animation] 函数。你也可以使用 [method get_parameter] 和 [method " "set_parameter] 来修改本地存储。\n" "这个函数应当返回这个增量。" #: doc/classes/AnimationNode.xml msgid "" "Adds an input to the animation node. This is only useful for animation nodes " "created for use in an [AnimationNodeBlendTree]. If the addition fails, " "returns [code]false[/code]." msgstr "" "为节点添加一个输入。这只对创建用于 [AnimationNodeBlendTree] 的动画节点有用。" "如果添加失败,返回 [code]false[/code]。" #: doc/classes/AnimationNode.xml msgid "" "Blends an animation by [param blend] amount (name must be valid in the " "linked [AnimationPlayer]). A [param time] and [param delta] may be passed, " "as well as whether [param seeked] happened.\n" "A [param looped_flag] is used by internal processing immediately after the " "loop." msgstr "" "按 [param blend] 量混合一个动画(名称必须在链接的 [AnimationPlayer] 中有" "效)。可以传入时间 [param time] 和增量 [param delta],以及表示是否发生寻道的 " "[param seeked]。\n" "[param looped_flag] 在循环后立即由内部处理使用。" #: doc/classes/AnimationNode.xml msgid "" "Blends an input. This is only useful for animation nodes created for an " "[AnimationNodeBlendTree]. The [param time] parameter is a relative delta, " "unless [param seek] is [code]true[/code], in which case it is absolute. A " "filter mode may be optionally passed." msgstr "" "混合一个输入。这只对为 [AnimationNodeBlendTree] 创建的动画节点有用。时间参数 " "[param time] 是一个相对的增量,除非 [param seek] 是 [code]true[/code],此时它" "是绝对的。可以选择传入过滤模式。" #: doc/classes/AnimationNode.xml msgid "" "Blend another animation node (in case this animation node contains child " "animation nodes). This function is only useful if you inherit from " "[AnimationRootNode] instead, otherwise editors will not display your " "animation node for addition." msgstr "" "混合另一个动画节点(在这个动画节点包含子动画节点的情况下)。这个函数只有在你" "继承 [AnimationRootNode] 时才有用,否则编辑器在添加节点时不会显示你的动画节" "点。" #: doc/classes/AnimationNode.xml msgid "" "Returns the input index which corresponds to [param name]. If not found, " "returns [code]-1[/code]." msgstr "" "返回与名称 [param name] 相关的输入索引,如果不存在则返回 [code]-1[/code]。" #: doc/classes/AnimationNode.xml msgid "" "Amount of inputs in this animation node, only useful for animation nodes " "that go into [AnimationNodeBlendTree]." msgstr "" "这个动画节点的输入数量,只对进入 [AnimationNodeBlendTree] 的动画节点有用。" #: doc/classes/AnimationNode.xml msgid "Gets the name of an input by index." msgstr "通过索引获取输入的名称。" #: doc/classes/AnimationNode.xml msgid "" "Gets the value of a parameter. Parameters are custom local memory used for " "your animation nodes, given a resource can be reused in multiple trees." msgstr "" "获取一个参数的值。参数是你的动画节点使用的自定义本地内存,给定的资源可以在多" "个树中重复使用。" #: doc/classes/AnimationNode.xml msgid "" "Returns the object id of the [AnimationTree] that owns this node.\n" "[b]Note:[/b] This method should only be called from within the [method " "AnimationNodeExtension._process_animation_node] method, and will return an " "invalid id otherwise." msgstr "" "返回拥有此节点的[AnimationTree]对象ID。\n" "[b]注意:[/b]此方法应仅在[method " "AnimationNodeExtension._process_animation_node]方法内部调用,否则将返回一个无" "效ID。" #: doc/classes/AnimationNode.xml msgid "Returns [code]true[/code] if the given path is filtered." msgstr "如果给定的路径被过滤,则返回 [code]true[/code]。" #: doc/classes/AnimationNode.xml msgid "" "Returns [code]true[/code] if this animation node is being processed in test-" "only mode." msgstr "如果该动画节点正在仅测试模式下处理,则返回 [code]true[/code]。" #: doc/classes/AnimationNode.xml msgid "Removes an input, call this only when inactive." msgstr "移除输入,仅在处于非活动状态时调用此输入。" #: doc/classes/AnimationNode.xml msgid "Adds or removes a path for the filter." msgstr "添加或移除筛选器的路径。" #: doc/classes/AnimationNode.xml msgid "" "Sets the name of the input at the given [param input] index. If the setting " "fails, returns [code]false[/code]." msgstr "" "在给定的 [param input] 索引处设置输入的名称。如果设置失败,返回 [code]false[/" "code]。" #: doc/classes/AnimationNode.xml msgid "" "Sets a custom parameter. These are used as local memory, because resources " "can be reused across the tree or scenes." msgstr "" "设置一个自定义参数。这些参数被用作本地内存,因为资源可以在树或场景中重复使" "用。" #: doc/classes/AnimationNode.xml msgid "If [code]true[/code], filtering is enabled." msgstr "如果为 [code]true[/code],则启用筛选功能。" #: doc/classes/AnimationNode.xml msgid "" "Emitted by nodes that inherit from this class and that have an internal tree " "when one of their animation nodes removes. The animation nodes that emit " "this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], " "[AnimationNodeStateMachine], and [AnimationNodeBlendTree]." msgstr "" "由继承自该类的节点发出,并且当其中一个动画节点移除时具有内部树。发出此信号的" "动画节点可以是 [AnimationNodeBlendSpace1D]、[AnimationNodeBlendSpace2D]、" "[AnimationNodeStateMachine] 和 [AnimationNodeBlendTree]。" #: doc/classes/AnimationNode.xml msgid "" "Emitted by nodes that inherit from this class and that have an internal tree " "when one of their animation node names changes. The animation nodes that " "emit this signal are [AnimationNodeBlendSpace1D], " "[AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and " "[AnimationNodeBlendTree]." msgstr "" "由继承自该类的节点发出,并且当其中一个动画节点名称更改时具有内部树。发出此信" "号的动画节点可以是 [AnimationNodeBlendSpace1D]、[AnimationNodeBlendSpace2D]、" "[AnimationNodeStateMachine] 和 [AnimationNodeBlendTree]。" #: doc/classes/AnimationNode.xml msgid "" "Emitted by nodes that inherit from this class and that have an internal tree " "when one of their animation nodes changes. The animation nodes that emit " "this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], " "[AnimationNodeStateMachine], [AnimationNodeBlendTree] and " "[AnimationNodeTransition]." msgstr "" "由继承自该类的节点发出,并且当其一个动画节点发生变化时具有内部树。发出此信号" "的动画节点可以是 [AnimationNodeBlendSpace1D]、[AnimationNodeBlendSpace2D]、" "[AnimationNodeStateMachine]、[AnimationNodeBlendTree] 和 " "[AnimationNodeTransition]。" #: doc/classes/AnimationNode.xml msgid "Do not use filtering." msgstr "不要使用筛选功能。" #: doc/classes/AnimationNode.xml msgid "Paths matching the filter will be allowed to pass." msgstr "与筛选器匹配的路径将被允许通过。" #: doc/classes/AnimationNode.xml msgid "Paths matching the filter will be discarded." msgstr "与筛选器匹配的路径将被丢弃。" #: doc/classes/AnimationNode.xml msgid "Paths matching the filter will be blended (by the blend value)." msgstr "与筛选器匹配的路径将被混合(根据混合值)。" #: doc/classes/AnimationNodeAdd2.xml msgid "Blends two animations additively inside of an [AnimationNodeBlendTree]." msgstr "在 [AnimationNodeBlendTree] 中加法地混合两个动画。" #: doc/classes/AnimationNodeAdd2.xml msgid "" "A resource to add to an [AnimationNodeBlendTree]. Blends two animations " "additively based on the amount value.\n" "If the amount is greater than [code]1.0[/code], the animation connected to " "\"in\" port is blended with the amplified animation connected to \"add\" " "port.\n" "If the amount is less than [code]0.0[/code], the animation connected to " "\"in\" port is blended with the inverted animation connected to \"add\" port." msgstr "" "可添加到 [AnimationNodeBlendTree] 的资源。根据取值将两个动画加法混合在一" "起。\n" "如果取值大于 [code]1.0[/code],则与“in”端口相连的动画相混合的是放大后的" "与“add”端口相连的动画。\n" "如果取值小于 [code]0.0[/code],则与“in”端口相连的动画相混合的是反转后的" "与“add”端口相连的动画。" #: doc/classes/AnimationNodeAdd3.xml msgid "" "Blends two of three animations additively inside of an " "[AnimationNodeBlendTree]." msgstr "在 [AnimationNodeBlendTree] 中将三个动画中的两个动画相加。" #: doc/classes/AnimationNodeAdd3.xml msgid "" "A resource to add to an [AnimationNodeBlendTree]. Blends two animations out " "of three additively out of three based on the amount value.\n" "This animation node has three inputs:\n" "- The base animation to add to\n" "- A \"-add\" animation to blend with when the blend amount is negative\n" "- A \"+add\" animation to blend with when the blend amount is positive\n" "If the absolute value of the amount is greater than [code]1.0[/code], the " "animation connected to \"in\" port is blended with the amplified animation " "connected to \"-add\"/\"+add\" port." msgstr "" "可添加到 [AnimationNodeBlendTree] 的资源。根据取值将三个动画中的两个进行加法" "混合。\n" "这个动画节点有三个输入:\n" "- 加法混合的基础动画\n" "- 混合取值为负时进行混合的“-add”动画\n" "- 混合取值为正时进行混合的“+add”动画\n" "如果取值的绝对值大于 [code]1.0[/code],则与“in”端口相连的动画相混合的是放大后" "的与“-add”/“+add”端口相连的动画。" #: doc/classes/AnimationNodeAnimation.xml msgid "An input animation for an [AnimationNodeBlendTree]." msgstr "[AnimationNodeBlendTree] 的输入动画。" #: doc/classes/AnimationNodeAnimation.xml msgid "" "A resource to add to an [AnimationNodeBlendTree]. Only has one output port " "using the [member animation] property. Used as an input for [AnimationNode]s " "that blend animations together." msgstr "" "一种添加到 [AnimationNodeBlendTree] 的资源。只有一个输出端口,使用的是 " "[member animation] 属性。可用作 [AnimationNode] 的输入,将动画混合在一起。" #: doc/classes/AnimationNodeAnimation.xml doc/classes/AnimationNodeBlend2.xml #: doc/classes/AnimationNodeOutput.xml doc/classes/AnimationNodeTimeScale.xml #: doc/classes/AnimationNodeTransition.xml doc/classes/Area3D.xml #: doc/classes/Basis.xml doc/classes/BoxShape3D.xml #: doc/classes/CharacterBody3D.xml doc/classes/CollisionShape3D.xml #: modules/gridmap/doc_classes/GridMap.xml doc/classes/Mesh.xml #: doc/classes/MeshInstance3D.xml doc/classes/MeshLibrary.xml #: doc/classes/ProjectSettings.xml doc/classes/Transform3D.xml msgid "3D Platformer Demo" msgstr "3D 平台跳跃演示" #: doc/classes/AnimationNodeAnimation.xml msgid "" "If [code]true[/code], on receiving a request to play an animation from the " "start, the first frame is not drawn, but only processed, and playback starts " "from the next frame.\n" "See also the notes of [method AnimationPlayer.play]." msgstr "" "若为[code]true[/code],在收到一个从头播放某个动画的请求时,第一帧会被绘制,但" "仅仅是被处理,而回放会从第二帧开始。\n" "另见[method AnimationPlayer.play]的注意事项。" #: doc/classes/AnimationNodeAnimation.xml msgid "" "Animation to use as an output. It is one of the animations provided by " "[member AnimationTree.anim_player]." msgstr "" "作为输出使用的动画。它是 [member AnimationTree.anim_player] 提供的动画之一。" #: doc/classes/AnimationNodeAnimation.xml msgid "" "If [member use_custom_timeline] is [code]true[/code], override the loop " "settings of the original [Animation] resource with the value.\n" "[b]Note:[/b] If the [member Animation.loop_mode] isn't set to looping, the " "[method Animation.track_set_interpolation_loop_wrap] option will not be " "respected. If you cannot get the expected behavior, consider duplicating the " "[Animation] resource and changing the loop settings." msgstr "" "如果 [member use_custom_timeline] 为 [code]true[/code],则会用该值覆盖原始 " "[Animation] 资源的循环设置。\n" "[b]注意:[/b]如果 [member Animation.loop_mode] 未设置为循环,就不会遵守 " "[method Animation.track_set_interpolation_loop_wrap] 选项。如果无法得到想要的" "行为,请考虑制作 [Animation] 资源的副本并修改其循环设置。" #: doc/classes/AnimationNodeAnimation.xml msgid "Determines the playback direction of the animation." msgstr "确定动画的播放方向。" #: doc/classes/AnimationNodeAnimation.xml msgid "" "If [member use_custom_timeline] is [code]true[/code], offset the start " "position of the animation.\n" "This is useful for adjusting which foot steps first in 3D walking animations." msgstr "" "如果[member use_custom_timeline]为[code]true[/code],则偏移动画的开始位置。\n" "这对于调整三维行走动画中最先迈出的脚步非常有用。" #: doc/classes/AnimationNodeAnimation.xml msgid "" "If [code]true[/code], scales the time so that the length specified in " "[member timeline_length] is one cycle.\n" "This is useful for matching the periods of walking and running animations.\n" "If [code]false[/code], the original animation length is respected. If you " "set the loop to [member loop_mode], the animation will loop in [member " "timeline_length]." msgstr "" "如果[code]true[/code],则缩放时间,使[member timeline_length]中指定的长度为一" "个周期。\n" "这对于匹配行走和跑步动画的周期非常有用。\n" "如果[code]false[/code],则尊重原始动画长度。如果将循环设置为[member " "loop_mode],动画将在[member timeline_length]中循环。" #: doc/classes/AnimationNodeAnimation.xml msgid "" "If [member use_custom_timeline] is [code]true[/code], offset the start " "position of the animation." msgstr "" "如果 [member use_custom_timeline] 为 [code]true[/code],则会对动画的起始位置" "进行偏移。" #: doc/classes/AnimationNodeAnimation.xml msgid "" "If [code]true[/code], [AnimationNode] provides an animation based on the " "[Animation] resource with some parameters adjusted." msgstr "" "如果为 [code]true[/code],则 [AnimationNode] 会根据 [Animation] 资源提供动画" "并调整部分参数。" #: doc/classes/AnimationNodeAnimation.xml msgid "Plays animation in forward direction." msgstr "正序播放动画。" #: doc/classes/AnimationNodeAnimation.xml msgid "Plays animation in backward direction." msgstr "逆序播放动画。" #: doc/classes/AnimationNodeBlend2.xml msgid "Blends two animations linearly inside of an [AnimationNodeBlendTree]." msgstr "在 [AnimationNodeBlendTree] 中将两个动画进行线性混合。" #: doc/classes/AnimationNodeBlend2.xml msgid "" "A resource to add to an [AnimationNodeBlendTree]. Blends two animations " "linearly based on the amount value.\n" "In general, the blend value should be in the [code][0.0, 1.0][/code] range. " "Values outside of this range can blend amplified or inverted animations, " "however, [AnimationNodeAdd2] works better for this purpose." msgstr "" "添加到 [AnimationNodeBlendTree] 的资源。根据取值将两个动画进行线性混合。\n" "一般而言,混合值应该在 [code][0.0, 1.0][/code] 的范围内。超出该范围的值可以混" "合放大或翻转后的动画,然而,这种场合 [AnimationNodeAdd2] 的效果更好。" #: doc/classes/AnimationNodeBlend3.xml msgid "" "Blends two of three animations linearly inside of an " "[AnimationNodeBlendTree]." msgstr "在 [AnimationNodeBlendTree] 中将三个动画中的两个进行线性混合。" #: doc/classes/AnimationNodeBlend3.xml msgid "" "A resource to add to an [AnimationNodeBlendTree]. Blends two animations out " "of three linearly out of three based on the amount value.\n" "This animation node has three inputs:\n" "- The base animation to blend with\n" "- A \"-blend\" animation to blend with when the blend amount is negative " "value\n" "- A \"+blend\" animation to blend with when the blend amount is positive " "value\n" "In general, the blend value should be in the [code][-1.0, 1.0][/code] range. " "Values outside of this range can blend amplified animations, however, " "[AnimationNodeAdd3] works better for this purpose." msgstr "" "可添加到 [AnimationNodeBlendTree] 的资源。根据取值将三个动画中的两个进行线性" "混合。\n" "这个动画节点有三个输入:\n" "- 加法混合的基础动画\n" "- 混合取值为负时进行混合的“-blend”动画\n" "- 混合取值为正时进行混合的“+blend”动画\n" "一般而言,混合值应该在 [code][-1.0, 1.0][/code] 的范围内。在此范围外的取值能" "够混合放大后的动画,然而这种场合使用 [AnimationNodeAdd3] 更合适。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "" "A set of [AnimationRootNode]s placed on a virtual axis, crossfading between " "the two adjacent ones. Used by [AnimationTree]." msgstr "" "一组放置在一个虚拟轴上的 [AnimationRootNode],在两个相邻节点之间交叉淡化。被 " "[AnimationTree] 使用。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "" "A resource used by [AnimationNodeBlendTree].\n" "[AnimationNodeBlendSpace1D] represents a virtual axis on which any type of " "[AnimationRootNode]s can be added using [method add_blend_point]. Outputs " "the linear blend of the two [AnimationRootNode]s adjacent to the current " "value.\n" "You can set the extents of the axis with [member min_space] and [member " "max_space]." msgstr "" "可添加到 [AnimationNodeBlendTree] 的资源。\n" "[AnimationNodeBlendSpace1D] 代表一个虚拟轴,可以使用 [method " "add_blend_point] 在上面添加任何类型的 [AnimationRootNode]。输出的是最接近当前" "值的两个 [AnimationRootNode] 之间的线性混合。\n" "可以使用 [member min_space] 和 [member max_space] 来扩展轴的范围。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "" "Adds a new point that represents a [param node] on the virtual axis at a " "given position set by [param pos]. You can insert it at a specific index " "using the [param at_index] argument. If you use the default value for [param " "at_index], the point is inserted at the end of the blend points array." msgstr "" "在虚拟轴上 [param pos] 设定的给定位置添加一个代表 [param node] 的新点。你可以" "使用 [param at_index] 参数将其插入到特定的索引处。如果使用 [param at_index] " "的默认值,这个点会被插入到混合点数组的末尾。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "Returns the number of points on the blend axis." msgstr "返回混合轴上的点的数量。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "" "Returns the [AnimationNode] referenced by the point at index [param point]." msgstr "返回索引 [param point] 处的点所引用的 [AnimationNode]。" #: doc/classes/AnimationNodeBlendSpace1D.xml #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "Returns the position of the point at index [param point]." msgstr "返回索引 [param point] 处的点的位置。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "Removes the point at index [param point] from the blend axis." msgstr "从混合轴移除索引 [param point] 处的点。" #: doc/classes/AnimationNodeBlendSpace1D.xml #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "Changes the [AnimationNode] referenced by the point at index [param point]." msgstr "更改索引 [param point] 处的点所引用的 [AnimationNode]。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "" "Updates the position of the point at index [param point] on the blend axis." msgstr "更新混合轴上索引 [param point] 处的点的位置。" #: doc/classes/AnimationNodeBlendSpace1D.xml #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "Controls the interpolation between animations." msgstr "控制动画之间的插值。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "" "The blend space's axis's upper limit for the points' position. See [method " "add_blend_point]." msgstr "用于点位置的混合空间轴的上限。见 [method add_blend_point]。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "" "The blend space's axis's lower limit for the points' position. See [method " "add_blend_point]." msgstr "用于点位置的混合空间轴的下限。见 [method add_blend_point]。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "Position increment to snap to when moving a point on the axis." msgstr "当在轴上移动一个点时,要捕捉到的位置增量。" #: doc/classes/AnimationNodeBlendSpace1D.xml #: doc/classes/AnimationNodeBlendSpace2D.xml doc/classes/AnimationNodeSync.xml msgid "" "If [code]false[/code], the blended animations' frame are stopped when the " "blend value is [code]0[/code].\n" "If [code]true[/code], forcing the blended animations to advance frame." msgstr "" "如果为 [code]false[/code],则当混合值为 [code]0[/code] 时,停止混合动画的" "帧。\n" "如果为 [code]true[/code],则强制混合动画以前进帧。" #: doc/classes/AnimationNodeBlendSpace1D.xml msgid "Label of the virtual axis of the blend space." msgstr "混合空间虚拟轴的标签。" #: doc/classes/AnimationNodeBlendSpace1D.xml #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "The interpolation between animations is linear." msgstr "动画之间的插值是线性的。" #: doc/classes/AnimationNodeBlendSpace1D.xml #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "The blend space plays the animation of the animation node which blending " "position is closest to. Useful for frame-by-frame 2D animations." msgstr "混合空间播放混合位置最接近的动画节点的动画。可用于逐帧的 2D 动画。" #: doc/classes/AnimationNodeBlendSpace1D.xml #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at " "the last animation's playback position." msgstr "" "类似于 [constant BLEND_MODE_DISCRETE],但在最后一个动画的播放位置开始新的动" "画。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "A set of [AnimationRootNode]s placed on 2D coordinates, crossfading between " "the three adjacent ones. Used by [AnimationTree]." msgstr "" "一组放置在 2D 坐标上的 [AnimationRootNode],在三个相邻节点之间交叉淡化。被 " "[AnimationTree] 使用。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "A resource used by [AnimationNodeBlendTree].\n" "[AnimationNodeBlendSpace2D] represents a virtual 2D space on which " "[AnimationRootNode]s are placed. Outputs the linear blend of the three " "adjacent animations using a [Vector2] weight. Adjacent in this context means " "the three [AnimationRootNode]s making up the triangle that contains the " "current value.\n" "You can add vertices to the blend space with [method add_blend_point] and " "automatically triangulate it by setting [member auto_triangles] to " "[code]true[/code]. Otherwise, use [method add_triangle] and [method " "remove_triangle] to triangulate the blend space by hand." msgstr "" "[AnimationNodeBlendTree] 使用的资源。\n" "[AnimationNodeBlendSpace2D] 代表放置 [AnimationRootNode] 的虚拟 2D 空间。输出" "的是使用 [Vector2] 权重对相邻的三个动画进行线性混合的结果。此处的“相邻”指的是" "构成包含当前值的三角形的三个 [AnimationRootNode]。\n" "你可以使用 [method add_blend_point] 向混合空间中添加顶点,将 [member " "auto_triangles] 设为 [code]true[/code] 可以将其自动三角形化。否则,请使用 " "[method add_triangle] 和 [method remove_triangle] 手动对混合空间进行三角形" "化。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "Adds a new point that represents a [param node] at the position set by " "[param pos]. You can insert it at a specific index using the [param " "at_index] argument. If you use the default value for [param at_index], the " "point is inserted at the end of the blend points array." msgstr "" "在 [param pos] 设定的位置添加一个代表 [param node] 的新点。你可以使用 [param " "at_index] 参数将其插入到特定的索引中。如果使用 [param at_index] 的默认值,这" "个点会被插入到混合点数组的末尾。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "Creates a new triangle using three points [param x], [param y], and [param " "z]. Triangles can overlap. You can insert the triangle at a specific index " "using the [param at_index] argument. If you use the default value for [param " "at_index], the point is inserted at the end of the blend points array." msgstr "" "使用三个点 [param x]、[param y] 和 [param z] 创建一个新三角形。三角形可以重" "叠。可以使用 [param at_index] 参数在特定索引处插入三角形。如果使用 [param " "at_index] 的默认值,该点将插入到混合点数组的末尾。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "Returns the number of points in the blend space." msgstr "返回混合空间中的点的数量。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "Returns the [AnimationRootNode] referenced by the point at index [param " "point]." msgstr "返回索引 [param point] 处的点所引用的 [AnimationRootNode]。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "Returns the number of triangles in the blend space." msgstr "返回混合空间中三角形的数量。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "Returns the position of the point at index [param point] in the triangle of " "index [param triangle]." msgstr "" "返回索引 [param point] 处的点在索引 [param triangle] 的三角形中的位置。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "Removes the point at index [param point] from the blend space." msgstr "从混合空间中移除索引 [param point] 处的点。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "Removes the triangle at index [param triangle] from the blend space." msgstr "从混合空间中移除索引 [param triangle] 处的三角形。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "Updates the position of the point at index [param point] in the blend space." msgstr "更新混合空间中索引 [param point] 处的点的位置。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "If [code]true[/code], the blend space is triangulated automatically. The " "mesh updates every time you add or remove points with [method " "add_blend_point] and [method remove_blend_point]." msgstr "" "如果为 [code]true[/code],混合空间会自动进行三角测量。每次使用 [method " "add_blend_point] 和 [method remove_blend_point] 添加或移除点时,网格都会更" "新。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "The blend space's X and Y axes' upper limit for the points' position. See " "[method add_blend_point]." msgstr "" "用于点的位置的混合空间的 X 轴和 Y 轴的上限。请参阅 [method add_blend_point]。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "The blend space's X and Y axes' lower limit for the points' position. See " "[method add_blend_point]." msgstr "" "用于点的位置的混合空间的 X 轴和 Y 轴的下限。请参阅 [method add_blend_point]。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "Position increment to snap to when moving a point." msgstr "移动点时要吸附到的位置增量。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "Name of the blend space's X axis." msgstr "混合空间 X 轴的名称。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "Name of the blend space's Y axis." msgstr "混合空间 Y 轴的名称。" #: doc/classes/AnimationNodeBlendSpace2D.xml msgid "" "Emitted every time the blend space's triangles are created, removed, or when " "one of their vertices changes position." msgstr "每当创建、移除混合空间的三角形,或当其中一个顶点改变位置时发出。" #: doc/classes/AnimationNodeBlendTree.xml msgid "" "A sub-tree of many type [AnimationNode]s used for complex animations. Used " "by [AnimationTree]." msgstr "" "用于复杂动画的许多类型 [AnimationNode] 的子树。由 [AnimationTree] 使用。" #: doc/classes/AnimationNodeBlendTree.xml msgid "" "This animation node may contain a sub-tree of any other type animation " "nodes, such as [AnimationNodeTransition], [AnimationNodeBlend2], " "[AnimationNodeBlend3], [AnimationNodeOneShot], etc. This is one of the most " "commonly used animation node roots.\n" "An [AnimationNodeOutput] node named [code]output[/code] is created by " "default." msgstr "" "这个动画节点可以包含任何其他类型动画节点的子树,例如 " "[AnimationNodeTransition]、[AnimationNodeBlend2]、[AnimationNodeBlend3]、" "[AnimationNodeOneShot] 等。这是最常用的动画节点根之一。\n" "默认会创建一个名为 [code]output[/code] 的 [AnimationNodeOutput] 节点。" #: doc/classes/AnimationNodeBlendTree.xml msgid "" "Adds an [AnimationNode] at the given [param position]. The [param name] is " "used to identify the created sub animation node later." msgstr "" "在给定的位置 [param position] 添加一个 [AnimationNode]。[param name] 用于后续" "识别该创建的子动画节点。" #: doc/classes/AnimationNodeBlendTree.xml msgid "" "Connects the output of an [AnimationNode] as input for another " "[AnimationNode], at the input port specified by [param input_index]." msgstr "" "连接一个 [AnimationNode] 的输出作为另一个 [AnimationNode] 的输入,连接在 " "[param input_index] 指定的输入端口。" #: doc/classes/AnimationNodeBlendTree.xml msgid "Disconnects the animation node connected to the specified input." msgstr "断开连接到指定输入端的动画节点。" #: doc/classes/AnimationNodeBlendTree.xml msgid "Returns the sub animation node with the specified [param name]." msgstr "返回名称为 [param name] 的子动画节点。" #: doc/classes/AnimationNodeBlendTree.xml msgid "" "Returns a list containing the names of all sub animation nodes in this blend " "tree." msgstr "返回包含该混合树中所有子动画节点名称的列表。" #: doc/classes/AnimationNodeBlendTree.xml msgid "" "Returns the position of the sub animation node with the specified [param " "name]." msgstr "返回名称为 [param name] 的子动画节点的位置。" #: doc/classes/AnimationNodeBlendTree.xml msgid "" "Returns [code]true[/code] if a sub animation node with specified [param " "name] exists." msgstr "如果存在名称为 [param name] 的动画子节点,则返回 [code]true[/code]。" #: doc/classes/AnimationNodeBlendTree.xml msgid "Removes a sub animation node." msgstr "移除一个子动画节点。" #: doc/classes/AnimationNodeBlendTree.xml msgid "Changes the name of a sub animation node." msgstr "更改子动画节点的名称。" #: doc/classes/AnimationNodeBlendTree.xml msgid "Modifies the position of a sub animation node." msgstr "修改子动画节点的位置。" #: doc/classes/AnimationNodeBlendTree.xml msgid "The global offset of all sub animation nodes." msgstr "所有子动画节点的全局偏移量。" #: doc/classes/AnimationNodeBlendTree.xml msgid "Emitted when the input port information is changed." msgstr "当输入端口信息发生更改时发出。" #: doc/classes/AnimationNodeBlendTree.xml msgid "The connection was successful." msgstr "连接成功。" #: doc/classes/AnimationNodeBlendTree.xml msgid "The input node is [code]null[/code]." msgstr "输入节点为 [code]null[/code]。" #: doc/classes/AnimationNodeBlendTree.xml msgid "The specified input port is out of range." msgstr "指定的输入端口超出范围。" #: doc/classes/AnimationNodeBlendTree.xml msgid "The output node is [code]null[/code]." msgstr "输出节点为 [code]null[/code]。" #: doc/classes/AnimationNodeBlendTree.xml msgid "Input and output nodes are the same." msgstr "输入和输出节点相同。" #: doc/classes/AnimationNodeBlendTree.xml msgid "The specified connection already exists." msgstr "指定的连接已经存在。" #: doc/classes/AnimationNodeExtension.xml msgid "" "Base class for extending [AnimationRootNode]s from GDScript, C#, or C++." msgstr "用于从GDScript、C#或C++中继承[AnimationRootNode]的基类。" #: doc/classes/AnimationNodeExtension.xml msgid "" "[AnimationNodeExtension] exposes the APIs of [AnimationRootNode] to allow " "users to extend it from GDScript, C#, or C++. This class is not meant to be " "used directly, but to be extended by other classes. It is used to create " "custom nodes for the [AnimationTree] system." msgstr "" "[AnimationNodeExtension]暴露了[AnimationRootNode]的API,使得用户能够在" "GDScript、C#或C++中扩展它。这个类并不应被直接使用,而是通过其他类进行扩展。它" "被用于为[AnimationTree]系统创建自定义节点。" #: doc/classes/AnimationNodeExtension.xml msgid "" "A version of the [method AnimationNode._process] method that is meant to be " "overridden by custom nodes. It returns a [PackedFloat32Array] with the " "processed animation data.\n" "The [PackedFloat64Array] parameter contains the playback information, " "containing the following values encoded as floating point numbers (in " "order): playback time and delta, start and end times, whether a seek was " "requested (encoded as a float greater than [code]0[/code]), whether the seek " "request was externally requested (encoded as a float greater than [code]0[/" "code]), the current [enum Animation.LoopedFlag] (encoded as a float), and " "the current blend weight.\n" "The function must return a [PackedFloat32Array] of the node's time info, " "containing the following values (in order): animation length, time position, " "delta, [enum Animation.LoopMode] (encoded as a float), whether the animation " "is about to end (encoded as a float greater than [code]0[/code]) and whether " "the animation is infinite (encoded as a float greater than [code]0[/code]). " "All values must be included in the returned array." msgstr "" "方法 [method AnimationNode._process] 的某个版本是供自定义节点覆盖所用。它会返" "回一个带有已处理过的动画数据的[PackedFloat32Array]。\n" "[PackedFloat64Array]参数包含了回访信息,包括编码成浮点数的如下值(按顺序):" "回访时间与偏移、开始和结束时间、是否请求快进快退(编码为一个大于[code]0[/" "code]的浮点数)、快进快退请求是否是外部请求(编码为一个大于[code]0[/code]的浮" "点数)、当前位置[enum Animation.LoopedFlag](编码为一个浮点数)以及当前混合权" "重。\n" "此函数必须返回该节点时间信息的一个[PackedFloat32Array],包含如下值(按顺" "序):动画长度、时间位置、偏移、[enum Animation.LoopMode](编码为一个浮点" "数)、动画是否接近结束(编码为一个大于[code]0[/code]的浮点数)以及动画是否永" "不结束(编码为一个大于[code]0[/code]的浮点数)。所有值都须包含在返回的数组" "中。" #: doc/classes/AnimationNodeExtension.xml msgid "" "Returns the animation's remaining time for the given node info. For looping " "animations, it will only return the remaining time if [param break_loop] is " "[code]true[/code], a large integer value will be returned otherwise." msgstr "" "返回给定节点信息的动画剩余时间。对于循环动画,若 [param break_loop]为" "[code]true[/code],将仅返回剩余时间,否则将返回一个巨大的整型数值。" #: doc/classes/AnimationNodeExtension.xml msgid "" "Returns [code]true[/code] if the animation for the given [param node_info] " "is looping." msgstr "" "如果给定的 [param node_info] 对应的动画正在循环,则返回 [code]true[/code]。" #: doc/classes/AnimationNodeOneShot.xml msgid "Plays an animation once in an [AnimationNodeBlendTree]." msgstr "在 [AnimationNodeBlendTree] 中播放一次动画。" #: doc/classes/AnimationNodeOneShot.xml msgid "" "A resource to add to an [AnimationNodeBlendTree]. This animation node will " "execute a sub-animation and return once it finishes. Blend times for fading " "in and out can be customized, as well as filters.\n" "After setting the request and changing the animation playback, the one-shot " "node automatically clears the request on the next process frame by setting " "its [code]request[/code] value to [constant ONE_SHOT_REQUEST_NONE].\n" "[codeblocks]\n" "[gdscript]\n" "# Play child animation connected to \"shot\" port.\n" "animation_tree.set(\"parameters/OneShot/request\", " "AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/OneShot/request\"] = " "AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE\n" "\n" "# Abort child animation connected to \"shot\" port.\n" "animation_tree.set(\"parameters/OneShot/request\", " "AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT)\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/OneShot/request\"] = " "AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT\n" "\n" "# Abort child animation with fading out connected to \"shot\" port.\n" "animation_tree.set(\"parameters/OneShot/request\", " "AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT)\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/OneShot/request\"] = " "AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT\n" "\n" "# Get current state (read-only).\n" "animation_tree.get(\"parameters/OneShot/active\")\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/OneShot/active\"]\n" "\n" "# Get current internal state (read-only).\n" "animation_tree.get(\"parameters/OneShot/internal_active\")\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/OneShot/internal_active\"]\n" "[/gdscript]\n" "[csharp]\n" "// Play child animation connected to \"shot\" port.\n" "animationTree.Set(\"parameters/OneShot/request\", " "(int)AnimationNodeOneShot.OneShotRequest.Fire);\n" "\n" "// Abort child animation connected to \"shot\" port.\n" "animationTree.Set(\"parameters/OneShot/request\", " "(int)AnimationNodeOneShot.OneShotRequest.Abort);\n" "\n" "// Abort child animation with fading out connected to \"shot\" port.\n" "animationTree.Set(\"parameters/OneShot/request\", " "(int)AnimationNodeOneShot.OneShotRequest.FadeOut);\n" "\n" "// Get current state (read-only).\n" "animationTree.Get(\"parameters/OneShot/active\");\n" "\n" "// Get current internal state (read-only).\n" "animationTree.Get(\"parameters/OneShot/internal_active\");\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "添加到 [AnimationNodeBlendTree] 的资源。这个动画节点将执行子动画并在完成后返" "回。可以自定义淡入和淡出的混合时间以及过滤器。\n" "在设置请求并更改动画播放后,一次性节点会在下一个处理帧中通过将其 " "[code]request[/code] 值设置为 [constant ONE_SHOT_REQUEST_NONE] 来自动清除请" "求。\n" "[codeblocks]\n" "[gdscript]\n" "# 播放连接到 “shot” 端口的子动画。\n" "animation_tree.set(\"parameters/OneShot/request\", " "AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/OneShot/request\"] = " "AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE\n" "\n" "# 中止连接到 “shot” 端口的子动画。\n" "animation_tree.set(\"parameters/OneShot/request\", " "AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT)\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/OneShot/request\"] = " "AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT\n" "\n" "# 使用淡出的方法中止连接到 “shot”端口的子动画。\n" "animation_tree.set(\"parameters/OneShot/request\", " "AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT)\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/OneShot/request\"] = " "AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT\n" "\n" "# 获取当前状态(只读)。\n" "animation_tree.get(\"parameters/OneShot/active\"))\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/OneShot/active\"]\n" "\n" "# 获取当前内部状态(只读)。\n" "animation_tree.get(\"parameters/OneShot/internal_active\")\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/OneShot/internal_active\"]\n" "[/gdscript]\n" "[csharp]\n" "// 播放连接到 “shot” 端口的子动画。\n" "animationTree.Set(\"parameters/OneShot/request\", " "(int)AnimationNodeOneShot.OneShotRequest.Fire);\n" "\n" "// 中止连接到 “shot” 端口的子动画。\n" "animationTree.Set(\"parameters/OneShot/request\", " "(int)AnimationNodeOneShot.OneShotRequest.Abort);\n" "\n" "// 使用淡出的方法中止连接到 “shot”端口的子动画。\n" "animationTree.Set(\"parameters/OneShot/request\", " "(int)AnimationNodeOneShot.OneShotRequest.FadeOut);\n" "\n" "// 获取当前状态(只读)。\n" "animationTree.Get(\"parameters/OneShot/active\");\n" "\n" "// 获取当前内部状态(只读)。\n" "animationTree.Get(\"parameters/OneShot/internal_active\");\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AnimationNodeOneShot.xml #, fuzzy msgid "" "If [code]true[/code], the sub-animation will abort if resumed with a reset " "after a prior interruption." msgstr "如果为 [code]true[/code],则目标动画在动画过渡时重新启动。" #: doc/classes/AnimationNodeOneShot.xml msgid "" "If [code]true[/code], the sub-animation will restart automatically after " "finishing.\n" "In other words, to start auto restarting, the animation must be played once " "with the [constant ONE_SHOT_REQUEST_FIRE] request. The [constant " "ONE_SHOT_REQUEST_ABORT] request stops the auto restarting, but it does not " "disable the [member autorestart] itself. So, the [constant " "ONE_SHOT_REQUEST_FIRE] request will start auto restarting again." msgstr "" "如果为 [code]true[/code],子动画结束后会自动重新开始。\n" "换句话说,要开始自动重启,必须使用 [constant ONE_SHOT_REQUEST_FIRE] 请求播放" "一次动画。[constant ONE_SHOT_REQUEST_ABORT] 请求停止自动重启,但它不会禁用 " "[member autorestart] 本身。因此,[constant ONE_SHOT_REQUEST_FIRE] 请求将再次" "开始自动重启。" #: doc/classes/AnimationNodeOneShot.xml msgid "The delay after which the automatic restart is triggered, in seconds." msgstr "触发自动重启的延迟时间,以秒为单位。" #: doc/classes/AnimationNodeOneShot.xml msgid "" "If [member autorestart] is [code]true[/code], a random additional delay (in " "seconds) between 0 and this value will be added to [member " "autorestart_delay]." msgstr "" "如果 [member autorestart] 为 [code]true[/code],则介于0和此值之间的随机附加延" "迟(以秒为单位)将添加到 [member autorestart_delay]。" #: doc/classes/AnimationNodeOneShot.xml #: doc/classes/AnimationNodeStateMachineTransition.xml #: doc/classes/AnimationNodeTransition.xml msgid "" "If [code]true[/code], breaks the loop at the end of the loop cycle for " "transition, even if the animation is looping." msgstr "" "如果[code]true[/code],则在循环循环结束时中断循环以进行转换,即使动画正在循" "环。" #: doc/classes/AnimationNodeOneShot.xml doc/classes/AnimationNodeTransition.xml msgid "" "Determines how cross-fading between animations is eased. If empty, the " "transition will be linear. Should be a unit [Curve]." msgstr "" "确定如何对动画之间的淡入淡出进行缓动。如果为空,则进行线性过渡。应为单位 " "[Curve]。" #: doc/classes/AnimationNodeOneShot.xml msgid "" "The fade-in duration. For example, setting this to [code]1.0[/code] for a 5 " "second length animation will produce a cross-fade that starts at 0 second " "and ends at 1 second during the animation.\n" "[b]Note:[/b] [AnimationNodeOneShot] transitions the current state after the " "fading has finished." msgstr "" "淡入的持续时间。例如有一个长度为 5 秒的动画,如果将该属性设置为 [code]1.0[/" "code],就会生成一个从动画的 0 秒处开始、1 秒处结束的交叉渐变。\n" "[b]注意:[/b][AnimationNodeOneShot] 是在淡入淡出结束后转换当前状态的。" #: doc/classes/AnimationNodeOneShot.xml msgid "" "The fade-out duration. For example, setting this to [code]1.0[/code] for a 5 " "second length animation will produce a cross-fade that starts at 4 second " "and ends at 5 second during the animation.\n" "[b]Note:[/b] [AnimationNodeOneShot] transitions the current state after the " "fading has finished." msgstr "" "淡出的持续时间。例如有一个长度为 5 秒的动画,如果将该属性设置为 [code]1.0[/" "code],就会生成一个从动画的 4 秒处开始、5 秒处结束的交叉渐变。\n" "[b]注意:[/b][AnimationNodeOneShot] 是在淡入淡出结束后转换当前状态的。" #: doc/classes/AnimationNodeOneShot.xml msgid "The blend type." msgstr "混合类型。" #: doc/classes/AnimationNodeOneShot.xml msgid "The default state of the request. Nothing is done." msgstr "请求的默认状态。未完成任何操作。" #: doc/classes/AnimationNodeOneShot.xml msgid "The request to play the animation connected to \"shot\" port." msgstr "播放连接到“shot”端口的动画的请求。" #: doc/classes/AnimationNodeOneShot.xml msgid "The request to stop the animation connected to \"shot\" port." msgstr "停止连接到“shot”端口的动画的请求。" #: doc/classes/AnimationNodeOneShot.xml msgid "The request to fade out the animation connected to \"shot\" port." msgstr "淡出连接到“shot”端口的动画的请求。" #: doc/classes/AnimationNodeOneShot.xml msgid "Blends two animations. See also [AnimationNodeBlend2]." msgstr "混合两个动画。另请参见 [AnimationNodeBlend2]。" #: doc/classes/AnimationNodeOneShot.xml msgid "Blends two animations additively. See also [AnimationNodeAdd2]." msgstr "以相加方式混合两个动画。另见 [AnimationNodeAdd2]。" #: doc/classes/AnimationNodeOutput.xml msgid "The animation output node of an [AnimationNodeBlendTree]." msgstr "[AnimationNodeBlendTree] 的动画输出节点。" #: doc/classes/AnimationNodeOutput.xml msgid "" "A node created automatically in an [AnimationNodeBlendTree] that outputs the " "final animation." msgstr "在输出最终动画的 [AnimationNodeBlendTree] 中自动创建的节点。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "A state machine with multiple [AnimationRootNode]s, used by [AnimationTree]." msgstr "带有多个 [AnimationRootNode] 的状态机,用于 [AnimationTree]。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "Contains multiple [AnimationRootNode]s representing animation states, " "connected in a graph. State transitions can be configured to happen " "automatically or via code, using a shortest-path algorithm. Retrieve the " "[AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to " "control it programmatically.\n" "[codeblocks]\n" "[gdscript]\n" "var state_machine = $AnimationTree.get(\"parameters/playback\")\n" "state_machine.travel(\"some_state\")\n" "[/gdscript]\n" "[csharp]\n" "var stateMachine = " "GetNode(\"AnimationTree\").Get(\"parameters/playback\") as " "AnimationNodeStateMachinePlayback;\n" "stateMachine.Travel(\"some_state\");\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "包含表示动画状态的多个 [AnimationRootNode],以图的形式连接。可以使用最短路径" "算法,将节点过渡配置为自动发生或通过代码发生。要以编程的方式控制过渡,请从 " "[AnimationTree] 节点获取 [AnimationNodeStateMachinePlayback] 对象。\n" "[codeblocks]\n" "[gdscript]\n" "var state_machine = $AnimationTree.get(\"parameters/playback\")\n" "state_machine.travel(\"some_state\")\n" "[/gdscript]\n" "[csharp]\n" "var stateMachine = " "GetNode(\"AnimationTree\").Get(\"parameters/playback\") as " "AnimationNodeStateMachinePlayback;\n" "stateMachine.Travel(\"some_state\");\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "Adds a new animation node to the graph. The [param position] is used for " "display in the editor." msgstr "向图中添加一个新的动画节点。[param position] 用于在编辑器中显示。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Adds a transition between the given animation nodes." msgstr "在给定动画节点之间添加一个过渡。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Returns the draw offset of the graph. Used for display in the editor." msgstr "返回图的绘制偏移。用于在编辑器中显示。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Returns the animation node with the given name." msgstr "返回指定名称的动画节点。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "Returns a list containing the names of all animation nodes in this state " "machine." msgstr "返回包含状态机中所有动画节点名称的列表。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Returns the given animation node's name." msgstr "返回指定动画节点的名称。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "Returns the given animation node's coordinates. Used for display in the " "editor." msgstr "返回给定动画节点的坐标。用于在编辑器中显示。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Returns the given transition." msgstr "返回给定的过渡。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Returns the number of connections in the graph." msgstr "返回图中的连接数。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Returns the given transition's start node." msgstr "返回给定过渡的开始节点。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Returns the given transition's end node." msgstr "返回给定过渡的末端节点。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "Returns [code]true[/code] if the graph contains the given animation node." msgstr "如果图中包含给定的动画节点,则返回 [code]true[/code]。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "Returns [code]true[/code] if there is a transition between the given " "animation nodes." msgstr "如果在给定动画节点之间存在过渡,则返回 [code]true[/code]。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Deletes the given animation node from the graph." msgstr "从图中删除指定的动画节点。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Deletes the transition between the two specified animation nodes." msgstr "删除两个指定动画节点之间的过渡。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Deletes the given transition by index." msgstr "按索引删除给定的过渡。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Renames the given animation node." msgstr "重命名给定的动画节点。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Replaces the given animation node with a new animation node." msgstr "用新的动画节点替换给定的动画节点。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Sets the draw offset of the graph. Used for display in the editor." msgstr "设置图形的绘制偏移。用于在编辑器中显示。" #: doc/classes/AnimationNodeStateMachine.xml msgid "Sets the animation node's coordinates. Used for display in the editor." msgstr "设置动画节点的坐标。用于在编辑器中显示。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "If [code]true[/code], allows teleport to the self state with [method " "AnimationNodeStateMachinePlayback.travel]. When the reset option is enabled " "in [method AnimationNodeStateMachinePlayback.travel], the animation is " "restarted. If [code]false[/code], nothing happens on the teleportation to " "the self state." msgstr "" "如果为 [code]true[/code],允许使用 [method " "AnimationNodeStateMachinePlayback.travel] 传送到当前状态。当在 [method " "AnimationNodeStateMachinePlayback.travel] 中启用重置选项时,动画将重新启动。" "如果为 [code]false[/code],传送到当前状态时不会发生任何事情。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "If [code]true[/code], treat the cross-fade to the start and end nodes as a " "blend with the RESET animation.\n" "In most cases, when additional cross-fades are performed in the parent " "[AnimationNode] of the state machine, setting this property to [code]false[/" "code] and matching the cross-fade time of the parent [AnimationNode] and the " "state machine's start node and end node gives good results." msgstr "" "如果为 [code]true[/code],则将与开始和结束节点的淡入淡出视为与 RESET 动画的混" "合。\n" "大多数情况下,状态机的父级 [AnimationNode] 执行额外的淡入淡出时,将这个属性设" "置为 [code]false[/code] 并将父 [AnimationNode] 和该状态机的开始和结束节点的淡" "入淡出时间设为相同的值能够得到不错的效果。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "This property can define the process of transitions for different use cases. " "See also [enum AnimationNodeStateMachine.StateMachineType]." msgstr "" "该属性可以为不同用例定义过渡过程。另见 [enum " "AnimationNodeStateMachine.StateMachineType]。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "Seeking to the beginning is treated as playing from the start state. " "Transition to the end state is treated as exiting the state machine." msgstr "寻道到开头被视为从开始状态开始播放。过渡到结束状态被视为退出状态机。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "Seeking to the beginning is treated as seeking to the beginning of the " "animation in the current state. Transition to the end state, or the absence " "of transitions in each state, is treated as exiting the state machine." msgstr "" "寻道到开头被视为在当前状态下寻道到动画的开头。过渡到结束状态,或每个状态的过" "渡都缺失,被视为退出状态机。" #: doc/classes/AnimationNodeStateMachine.xml msgid "" "This is a grouped state machine that can be controlled from a parent state " "machine. It does not work independently. There must be a state machine with " "[member state_machine_type] of [constant STATE_MACHINE_TYPE_ROOT] or " "[constant STATE_MACHINE_TYPE_NESTED] in the parent or ancestor." msgstr "" "这是一个可以从父状态机控制的编组的状态机。它不能独立运行。父级或祖先中必须有" "一个 [member state_machine_type] 为 [constant STATE_MACHINE_TYPE_ROOT] 或 " "[constant STATE_MACHINE_TYPE_NESTED] 的状态机。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "Provides playback control for an [AnimationNodeStateMachine]." msgstr "为 [AnimationNodeStateMachine] 提供播放控制。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "" "Allows control of [AnimationTree] state machines created with " "[AnimationNodeStateMachine]. Retrieve with [code]" "$AnimationTree.get(\"parameters/playback\")[/code].\n" "[codeblocks]\n" "[gdscript]\n" "var state_machine = $AnimationTree.get(\"parameters/playback\")\n" "state_machine.travel(\"some_state\")\n" "[/gdscript]\n" "[csharp]\n" "var stateMachine = " "GetNode(\"AnimationTree\").Get(\"parameters/" "playback\").As();\n" "stateMachine.Travel(\"some_state\");\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "允许控制使用 [AnimationNodeStateMachine] 创建的 [AnimationTree] 状态机。使用 " "[code]$AnimationTree.get(\"parameters/playback\")[/code] 检索。\n" "[codeblocks]\n" "[gdscript]\n" "var state_machine = $AnimationTree.get(\"parameters/playback\")\n" "state_machine.travel(\"some_state\")\n" "[/gdscript]\n" "[csharp]\n" "var stateMachine = " "GetNode(\"AnimationTree\").Get(\"parameters/" "playback\").As();\n" "stateMachine.Travel(\"some_state\");\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "" "Returns the current state length.\n" "[b]Note:[/b] It is possible that any [AnimationRootNode] can be nodes as " "well as animations. This means that there can be multiple animations within " "a single state. Which animation length has priority depends on the nodes " "connected inside it. Also, if a transition does not reset, the remaining " "length at that point will be returned." msgstr "" "返回当前状态长度。\n" "[b]注意:[/b]有可能任何 [AnimationRootNode] 既可以是节点也可以是动画。这意味" "着在单个状态中可以有多个动画。哪个动画长度会优先,取决于其内部连接的节点。此" "外,如果过渡未重置,则将返回该点的剩余长度。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "" "Returns the currently playing animation state.\n" "[b]Note:[/b] When using a cross-fade, the current state changes to the next " "state immediately after the cross-fade begins." msgstr "" "返回当前的动画播放状态。\n" "[b]注意:[/b]使用交叉叠化时,当前状态会在交叉叠化开始后理解变为下一个状态。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "Returns the playback position within the current animation state." msgstr "返回当前动画状态内的播放位置。" #: doc/classes/AnimationNodeStateMachinePlayback.xml #, fuzzy msgid "" "Returns the playback state length of the node from [method " "get_fading_from_node]. Returns [code]0[/code] if no animation fade is " "occurring." msgstr "返回当前焦点项目的索引。如果没有焦点,则返回 [code]-1[/code]。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "Returns the starting state of currently fading animation." msgstr "返回当前淡入淡出动画的开始状态。" #: doc/classes/AnimationNodeStateMachinePlayback.xml #, fuzzy msgid "" "Returns the playback position of the node from [method " "get_fading_from_node]. Returns [code]0[/code] if no animation fade is " "occurring." msgstr "返回当前焦点项目的索引。如果没有焦点,则返回 [code]-1[/code]。" #: doc/classes/AnimationNodeStateMachinePlayback.xml #, fuzzy msgid "" "Returns the length of the current fade animation. Returns [code]0[/code] if " "no animation fade is occurring." msgstr "返回当前焦点项目的索引。如果没有焦点,则返回 [code]-1[/code]。" #: doc/classes/AnimationNodeStateMachinePlayback.xml #, fuzzy msgid "" "Returns the playback position of the current fade animation. Returns " "[code]0[/code] if no animation fade is occurring." msgstr "返回当前焦点项目的索引。如果没有焦点,则返回 [code]-1[/code]。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "" "Returns the current travel path as computed internally by the A* algorithm." msgstr "返回 A* 算法内部计算的当前行进路径。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "Returns [code]true[/code] if an animation is playing." msgstr "如果正在播放动画,返回 [code]true[/code]。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "" "If there is a next path by travel or auto advance, immediately transitions " "from the current state to the next state." msgstr "如果通过行进或自动前进有下一条路径,则立即从当前状态过渡到下一个状态。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "" "Starts playing the given animation.\n" "If [param reset] is [code]true[/code], the animation is played from the " "beginning." msgstr "" "开始播放给定的动画。\n" "如果 [param reset] 为 [code]true[/code],则动画从头开始播放。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "Stops the currently playing animation." msgstr "停止当前播放的动画。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "" "Transitions from the current state to another one, following the shortest " "path.\n" "If the path does not connect from the current state, the animation will play " "after the state teleports.\n" "If [param reset_on_teleport] is [code]true[/code], the animation is played " "from the beginning when the travel cause a teleportation." msgstr "" "按照最短的路径从当前状态过渡到另一个状态。\n" "如果路径没有连接到当前状态,则动画将在状态传送后播放。\n" "如果 [param reset_on_teleport] 为 [code]true[/code],当行进导致传送时,该动画" "将从头开始播放。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "" "Emitted when the [param state] finishes playback. If [param state] is a " "state machine set to grouped mode, its signals are passed through with its " "name prefixed.\n" "If there is a crossfade, this will be fired when the influence of the " "[method get_fading_from_node] animation is no longer present." msgstr "" "[param state] 播放完毕时发出。如果 [param state] 是设置为编组模式的状态机,则" "其信号会以其名称作为前缀传递。\n" "如果存在交叉淡入淡出,则它将在 [method get_fading_from_node] 动画的影响不再存" "在时触发。" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "" "Emitted when the [param state] starts playback. If [param state] is a state " "machine set to grouped mode, its signals are passed through with its name " "prefixed." msgstr "" "当 [param state] 开始播放时发出。如果 [param state] 是一个设置为编组模式的状" "态机,则其信号将以其名称作为前缀传递。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "A transition within an [AnimationNodeStateMachine] connecting two " "[AnimationRootNode]s." msgstr "[AnimationNodeStateMachine] 中连接两个 [AnimationRootNode] 的过渡。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "The path generated when using [method " "AnimationNodeStateMachinePlayback.travel] is limited to the nodes connected " "by [AnimationNodeStateMachineTransition].\n" "You can set the timing and conditions of the transition in detail." msgstr "" "使用 [method AnimationNodeStateMachinePlayback.travel] 时生成的路径,仅限于通" "过 [AnimationNodeStateMachineTransition] 连接的节点。\n" "可以详细设置过渡的时机和条件。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Turn on auto advance when this condition is set. The provided name will " "become a boolean parameter on the [AnimationTree] that can be controlled " "from code (see [url=$DOCS_URL/tutorials/animation/" "animation_tree.html#controlling-from-code]Using AnimationTree[/url]). For " "example, if [member AnimationTree.tree_root] is an " "[AnimationNodeStateMachine] and [member advance_condition] is set to [code]" "\"idle\"[/code]:\n" "[codeblocks]\n" "[gdscript]\n" "$animation_tree.set(\"parameters/conditions/idle\", is_on_floor and " "(linear_velocity.x == 0))\n" "[/gdscript]\n" "[csharp]\n" "GetNode(\"animation_tree\").Set(\"parameters/conditions/" "idle\", IsOnFloor && (LinearVelocity.X == 0));\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "该条件被设置时打开自动前进。提供的名称将成为 [AnimationTree] 上的布尔参数,可" "以通过代码进行控制(请参阅 [url=$DOCS_URL/tutorials/animation/" "animation_tree.html#controlling-from-code]使用 AnimationTree[/url])。例如," "如果 [member AnimationTree.tree_root] 是一个 [AnimationNodeStateMachine] 并" "且 [member advance_condition] 被设置为 [code]\"idle\"[/code]:\n" "[codeblocks]\n" "[gdscript]\n" "$animation_tree.set(\"parameters/conditions/idle\", is_on_floor and " "(linear_velocity.x == 0))\n" "[/gdscript]\n" "[csharp]\n" "GetNode(\"animation_tree\").Set(\"parameters/conditions/" "idle\", IsOnFloor && (LinearVelocity.X == 0));\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Use an expression as a condition for state machine transitions. It is " "possible to create complex animation advance conditions for switching " "between states and gives much greater flexibility for creating complex state " "machines by directly interfacing with the script code." msgstr "" "将表达式用作状态机过渡的条件。可以为状态之间的切换创建复杂的动画推进条件,并" "通过直接与脚本代码交互为创建复杂的状态机提供更大的灵活性。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Determines whether the transition should be disabled, enabled when using " "[method AnimationNodeStateMachinePlayback.travel], or traversed " "automatically if the [member advance_condition] and [member " "advance_expression] checks are [code]true[/code] (if assigned)." msgstr "" "决定过渡应当被禁用,使用 [method AnimationNodeStateMachinePlayback.travel] 时" "启用,还是在 [member advance_condition] 和 [member advance_expression] 均为 " "[code]true[/code] 时自动前进(已赋值时)。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Lower priority transitions are preferred when travelling through the tree " "via [method AnimationNodeStateMachinePlayback.travel] or [member " "advance_mode] is set to [constant ADVANCE_MODE_AUTO]." msgstr "" "当在树中通过 [method AnimationNodeStateMachinePlayback.travel] 或将 [member " "advance_mode] 设置为 [constant ADVANCE_MODE_AUTO] 行进时,倾向于优先级较低的" "过渡。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "If [code]true[/code], the destination animation is played back from the " "beginning when switched." msgstr "如果为 [code]true[/code],切换时目标动画从头开始播放。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "The transition type." msgstr "过渡类型。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Ease curve for better control over cross-fade between this state and the " "next. Should be a unit [Curve]." msgstr "" "缓动曲线可以更好地控制此状态和下一个状态之间的交叉淡入淡出。应为单位 " "[Curve]。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "The time to cross-fade between this state and the next.\n" "[b]Note:[/b] [AnimationNodeStateMachine] transitions the current state " "immediately after the start of the fading. The precise remaining time can " "only be inferred from the main animation. When [AnimationNodeOutput] is " "considered as the most upstream, so the [member xfade_time] is not scaled " "depending on the downstream delta. See also [member " "AnimationNodeOneShot.fadeout_time]." msgstr "" "在该状态和下一个状态之间交叉渐变的时间。\n" "[b]注意:[/b][AnimationNodeStateMachine] 是在淡入淡出结束后转换当前状态的。只" "能根据主动画推断精确的剩余时间。将 [AnimationNodeOutput] 视为最上游时," "[member xfade_time] 不会根据下游增量进行缩放。另见 [member " "AnimationNodeOneShot.fadeout_time]。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "Emitted when [member advance_condition] is changed." msgstr "变更 [member advance_condition] 时发出。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Switch to the next state immediately. The current state will end and blend " "into the beginning of the new one." msgstr "立即切换到下一个状态。当前状态将结束,并混合到新状态的开始。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Switch to the next state immediately, but will seek the new state to the " "playback position of the old state." msgstr "立即切换到下一个状态,但会将新的状态定位到旧状态的播放位置。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Wait for the current state playback to end, then switch to the beginning of " "the next state animation." msgstr "等待当前状态播放结束,然后切换到下一个状态动画的开头。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "Don't use this transition." msgstr "不要使用该过渡。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Only use this transition during [method " "AnimationNodeStateMachinePlayback.travel]." msgstr "仅在 [method AnimationNodeStateMachinePlayback.travel] 时使用该过渡。" #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" "Automatically use this transition if the [member advance_condition] and " "[member advance_expression] checks are [code]true[/code] (if assigned)." msgstr "" "如果 [member advance_condition] 和 [member advance_expression] 检查为 " "[code]true[/code],则自动使用该过渡(如果已分配)。" #: doc/classes/AnimationNodeSub2.xml msgid "" "Blends two animations subtractively inside of an [AnimationNodeBlendTree]." msgstr "在 [AnimationNodeBlendTree] 中对两个动画进行减法混合。" #: doc/classes/AnimationNodeSub2.xml msgid "" "A resource to add to an [AnimationNodeBlendTree]. Blends two animations " "subtractively based on the amount value.\n" "This animation node is usually used for pre-calculation to cancel out any " "extra poses from the animation for the \"add\" animation source in " "[AnimationNodeAdd2] or [AnimationNodeAdd3].\n" "In general, the blend value should be in the [code][0.0, 1.0][/code] range, " "but values outside of this range can be used for amplified or inverted " "animations.\n" "[b]Note:[/b] This calculation is different from using a negative value in " "[AnimationNodeAdd2], since the transformation matrices do not satisfy the " "commutative law. [AnimationNodeSub2] multiplies the transformation matrix of " "the inverted animation from the left side, while negative " "[AnimationNodeAdd2] multiplies it from the right side." msgstr "" "要添加到 [AnimationNodeBlendTree] 的资源。根据数量值以减法方式混合两个动" "画。\n" "该动画节点通常用于预先计算,从 [AnimationNodeAdd2] 或 [AnimationNodeAdd3] 的" "“添加”动画源的动画中抵消额外的姿势。\n" "一般而言,混合值应在 [code][0.0, 1.0][/code] 范围内,但超出该范围的值可用于放" "大或反转动画。\n" "[b]注意:[/b]因为变换矩阵不满足交换律,这个计算不同于在 [AnimationNodeAdd2] " "中使用负值。[AnimationNodeSub2] 从左侧乘以反转动画的变换矩阵,而负的 " "[AnimationNodeAdd2] 则是从右侧相乘。" #: doc/classes/AnimationNodeSub2.xml msgid "AnimationTree" msgstr "AnimationTree" #: doc/classes/AnimationNodeSync.xml msgid "" "Base class for [AnimationNode]s with multiple input ports that must be " "synchronized." msgstr "带有多个必须同步的输入端口的 [AnimationNode] 基类。" #: doc/classes/AnimationNodeSync.xml msgid "" "An animation node used to combine, mix, or blend two or more animations " "together while keeping them synchronized within an [AnimationTree]." msgstr "" "一种动画节点,用于将两个或多个动画组合、混合或混合在一起,同时使它们在 " "[AnimationTree] 中保持同步。" #: doc/classes/AnimationNodeTimeScale.xml msgid "A time-scaling animation node used in [AnimationTree]." msgstr "对时间进行缩放的动画节点,在 [AnimationTree] 中使用。" #: doc/classes/AnimationNodeTimeScale.xml msgid "" "Allows to scale the speed of the animation (or reverse it) in any child " "[AnimationNode]s. Setting it to [code]0.0[/code] will pause the animation." msgstr "" "允许缩放任何子节点中动画的速度(或反转)。将其设置为 [code]0.0[/code] 将暂停" "动画。" #: doc/classes/AnimationNodeTimeSeek.xml msgid "A time-seeking animation node used in [AnimationTree]." msgstr "对时间进行检索的动画节点,在 [AnimationTree] 中使用。" #: doc/classes/AnimationNodeTimeSeek.xml msgid "" "This animation node can be used to cause a seek command to happen to any sub-" "children of the animation graph. Use to play an [Animation] from the start " "or a certain playback position inside the [AnimationNodeBlendTree].\n" "After setting the time and changing the animation playback, the time seek " "node automatically goes into sleep mode on the next process frame by setting " "its [code]seek_request[/code] value to [code]-1.0[/code].\n" "[codeblocks]\n" "[gdscript]\n" "# Play child animation from the start.\n" "animation_tree.set(\"parameters/TimeSeek/seek_request\", 0.0)\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/TimeSeek/seek_request\"] = 0.0\n" "\n" "# Play child animation from 12 second timestamp.\n" "animation_tree.set(\"parameters/TimeSeek/seek_request\", 12.0)\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/TimeSeek/seek_request\"] = 12.0\n" "[/gdscript]\n" "[csharp]\n" "// Play child animation from the start.\n" "animationTree.Set(\"parameters/TimeSeek/seek_request\", 0.0);\n" "\n" "// Play child animation from 12 second timestamp.\n" "animationTree.Set(\"parameters/TimeSeek/seek_request\", 12.0);\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "这个动画节点可用于使检索命令发生在动画图的任何次级子节点上。用于从 " "[AnimationNodeBlendTree] 的开头或某个特定播放位置开始播放 [Animation]。\n" "设置时间并更改动画播放后,时间检索节点会在下一个处理帧中将其 " "[code]seek_request[/code] 值设置为 [code]-1.0[/code],自动进入睡眠模式。\n" "[codeblocks]\n" "[gdscript]\n" "# 从开始处播放子动画。\n" "animation_tree.set(\"parameters/TimeSeek/seek_request\", 0.0)\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/TimeSeek/seek_request\"] = 0.0\n" "\n" "# 从 12 秒的时间戳开始播放子动画。\n" "animation_tree.set(\"parameters/TimeSeek/seek_request\", 12.0)\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/TimeSeek/seek_request\"] = 12.0\n" "[/gdscript]\n" "[csharp]\n" "// 从开始处播放子动画。\n" "animationTree.Set(\"parameters/TimeSeek/seek_request\", 0.0);\n" "\n" "// 从 12 秒的时间戳开始播放子动画。\n" "animationTree.Set(\"parameters/TimeSeek/seek_request\", 12.0);\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AnimationNodeTimeSeek.xml msgid "" "If [code]true[/code], some processes are executed to handle keys between " "seeks, such as calculating root motion and finding the nearest discrete key." msgstr "" "如果为 [code]true[/code],某些旨在控制快进快退之间的帧的进程(例如计算根动态" "或寻找最接近的离散帧)将被执行。" #: doc/classes/AnimationNodeTransition.xml msgid "A transition within an [AnimationTree] connecting two [AnimationNode]s." msgstr "[AnimationTree] 中连接两个 [AnimationNode] 的过渡。" #: doc/classes/AnimationNodeTransition.xml msgid "" "Simple state machine for cases which don't require a more advanced " "[AnimationNodeStateMachine]. Animations can be connected to the inputs and " "transition times can be specified.\n" "After setting the request and changing the animation playback, the " "transition node automatically clears the request on the next process frame " "by setting its [code]transition_request[/code] value to empty.\n" "[b]Note:[/b] When using a cross-fade, [code]current_state[/code] and " "[code]current_index[/code] change to the next state immediately after the " "cross-fade begins.\n" "[codeblocks]\n" "[gdscript]\n" "# Play child animation connected to \"state_2\" port.\n" "animation_tree.set(\"parameters/Transition/transition_request\", " "\"state_2\")\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/Transition/transition_request\"] = \"state_2\"\n" "\n" "# Get current state name (read-only).\n" "animation_tree.get(\"parameters/Transition/current_state\")\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/Transition/current_state\"]\n" "\n" "# Get current state index (read-only).\n" "animation_tree.get(\"parameters/Transition/current_index\")\n" "# Alternative syntax (same result as above).\n" "animation_tree[\"parameters/Transition/current_index\"]\n" "[/gdscript]\n" "[csharp]\n" "// Play child animation connected to \"state_2\" port.\n" "animationTree.Set(\"parameters/Transition/transition_request\", " "\"state_2\");\n" "\n" "// Get current state name (read-only).\n" "animationTree.Get(\"parameters/Transition/current_state\");\n" "\n" "// Get current state index (read-only).\n" "animationTree.Get(\"parameters/Transition/current_index\");\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "适用于不需要更高级 [AnimationNodeStateMachine] 的情况的简单状态机。可以将动画" "连接到输入,还可以指定过渡时间。\n" "设置请求并更改动画播放后,过渡节点会在下一个处理帧中通过将其 " "[code]transition_request[/code] 值设置为空,来自动清除请求。\n" "[b]注意:[/b]使用交叉淡入淡出时,[code]current_state[/code] 和 " "[code]current_index[/code] 在交叉淡入淡出开始后立即更改为下一个状态。\n" "[codeblocks]\n" "[gdscript]\n" "# 播放连接到 “state_2” 端口的子动画。\n" "animation_tree.set(\"parameters/Transition/transition_request\", " "\"state_2\")\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/Transition/transition_request\"] = \"state_2\"\n" "\n" "# 获取当前状态名称(只读)。\n" "animation_tree.get(\"parameters/Transition/current_state\")\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/Transition/current_state\"]\n" "\n" "# 获取当前状态索引(只读)。\n" "animation_tree.get(\"parameters/Transition/current_index\"))\n" "# 替代语法(与上述结果相同)。\n" "animation_tree[\"parameters/Transition/current_index\"]\n" "[/gdscript]\n" "[csharp]\n" "// 播放连接到 “state_2” 端口的子动画。\n" "animationTree.Set(\"parameters/Transition/transition_request\", " "\"state_2\");\n" "\n" "// 获取当前状态名称(只读)。\n" "animationTree.Get(\"parameters/Transition/current_state\");\n" "\n" "// 获取当前状态索引(只读)。\n" "animationTree.Get(\"parameters/Transition/current_index\");\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AnimationNodeTransition.xml msgid "" "Returns whether the animation breaks the loop at the end of the loop cycle " "for transition." msgstr "返回动画是否在过渡循环结束时中断循环。" #: doc/classes/AnimationNodeTransition.xml msgid "" "Returns whether the animation restarts when the animation transitions from " "the other animation." msgstr "返回当动画从另一个动画过渡时,该动画是否重新开始。" #: doc/classes/AnimationNodeTransition.xml msgid "" "Returns [code]true[/code] if auto-advance is enabled for the given [param " "input] index." msgstr "" "如果为给定的 [param input] 索引启用了自动前进,则返回 [code]true[/code]。" #: doc/classes/AnimationNodeTransition.xml msgid "" "Enables or disables auto-advance for the given [param input] index. If " "enabled, state changes to the next input after playing the animation once. " "If enabled for the last input state, it loops to the first." msgstr "" "为给定的 [param input] 索引启用或禁用自动前进。如果启用,状态会在播放一次动画" "后更改为下一个输入。如果为最后一个输入状态启用,它会循环到第一个。" #: doc/classes/AnimationNodeTransition.xml msgid "" "If [code]true[/code], the destination animation is restarted when the " "animation transitions." msgstr "如果为 [code]true[/code],则目标动画在动画过渡时重新启动。" #: doc/classes/AnimationNodeTransition.xml msgid "" "If [code]true[/code], allows transition to the self state. When the reset " "option is enabled in input, the animation is restarted. If [code]false[/" "code], nothing happens on the transition to the self state." msgstr "" "如果为 [code]true[/code],允许过渡到当前状态。当在输入中启用重置选项时,动画" "将重新启动。如果为 [code]false[/code],则在过渡到 当前状态时不会发生任何事" "情。" #: doc/classes/AnimationNodeTransition.xml msgid "The number of enabled input ports for this animation node." msgstr "这个动画节点启用的输入端口的数量。" #: doc/classes/AnimationNodeTransition.xml msgid "" "Cross-fading time (in seconds) between each animation connected to the " "inputs.\n" "[b]Note:[/b] [AnimationNodeTransition] transitions the current state " "immediately after the start of the fading. The precise remaining time can " "only be inferred from the main animation. When [AnimationNodeOutput] is " "considered as the most upstream, so the [member xfade_time] is not scaled " "depending on the downstream delta. See also [member " "AnimationNodeOneShot.fadeout_time]." msgstr "" "输入所连接的动画之间交叉渐变的时间(单位为秒)。\n" "[b]注意:[/b][AnimationNodeTransition] 是在淡入淡出结束后转换当前状态的。只能" "根据主动画推断精确的剩余时间。将 [AnimationNodeOutput] 视为最上游时,[member " "xfade_time] 不会根据下游增量进行缩放。另见 [member " "AnimationNodeOneShot.fadeout_time]。" #: doc/classes/AnimationPlayer.xml msgid "A node used for animation playback." msgstr "用于播放动画的节点。" #: doc/classes/AnimationPlayer.xml msgid "" "An animation player is used for general-purpose playback of animations. It " "contains a dictionary of [AnimationLibrary] resources and custom blend times " "between animation transitions.\n" "Some methods and properties use a single key to reference an animation " "directly. These keys are formatted as the key for the library, followed by a " "forward slash, then the key for the animation within the library, for " "example [code]\"movement/run\"[/code]. If the library's key is an empty " "string (known as the default library), the forward slash is omitted, being " "the same key used by the library.\n" "[AnimationPlayer] is better-suited than [Tween] for more complex animations, " "for example ones with non-trivial timings. It can also be used over [Tween] " "if the animation track editor is more convenient than doing it in code.\n" "Updating the target properties of animations occurs at the process frame." msgstr "" "动画播放器用于动画的通用播放。它包含 [AnimationLibrary] 资源的字典和动画过渡" "之间的自定义混合时间。\n" "某些方法和属性使用单个键直接引用动画。这些键的格式为动画库的键,后跟正斜杠," "然后是动画库内动画的键,例如 [code]\"movement/run\"[/code]。如果动画库的键为" "空字符串(称为默认库),则省略正斜杠,与动画库使用相同的键。\n" "[AnimationPlayer] 比 [Tween] 更适合用于复杂动画,例如不规则计时的动画。如果用" "动画轨道编辑器比用代码实现更方便,也可以优先于 [Tween] 使用。\n" "更新动画的目标属性是在处理帧中进行的。" #: doc/classes/AnimationPlayer.xml msgid "" "Returns the key of the animation which is queued to play after the [param " "animation_from] animation." msgstr "返回在 [param animation_from] 动画之后排队播放的动画的键。" #: doc/classes/AnimationPlayer.xml msgid "" "Triggers the [param animation_to] animation when the [param animation_from] " "animation completes." msgstr "当 [param animation_from] 动画完成时,触发 [param animation_to] 动画。" #: doc/classes/AnimationPlayer.xml msgid "Clears all queued, unplayed animations." msgstr "清除所有已排队、未播放的动画。" #: doc/classes/AnimationPlayer.xml msgid "" "Returns the blend time (in seconds) between two animations, referenced by " "their keys." msgstr "返回两个动画之间的混合时间(以秒为单位),由它们的键引用。" #: doc/classes/AnimationPlayer.xml msgid "Use [member AnimationMixer.callback_mode_method] instead." msgstr "请改用 [member AnimationMixer.callback_mode_method]。" #: doc/classes/AnimationPlayer.xml msgid "Returns the call mode used for \"Call Method\" tracks." msgstr "返回用于“方法调用”轨道的调用模式。" #: doc/classes/AnimationPlayer.xml doc/classes/AnimationTree.xml msgid "Use [member AnimationMixer.callback_mode_process] instead." msgstr "请改用 [member AnimationMixer.callback_mode_process]。" #: doc/classes/AnimationPlayer.xml doc/classes/AnimationTree.xml msgid "Returns the process notification in which to update animations." msgstr "返回要更新动画的过程通知。" #: doc/classes/AnimationPlayer.xml msgid "Returns a list of the animation keys that are currently queued to play." msgstr "返回当前排队播放的动画键列表。" #: doc/classes/AnimationPlayer.xml msgid "Use [member AnimationMixer.root_node] instead." msgstr "使用 [member AnimationMixer.root_node] 代替。" #: doc/classes/AnimationPlayer.xml msgid "Returns the node which node path references will travel from." msgstr "返回节点路径引用将从其出发的节点。" #: doc/classes/AnimationPlayer.xml msgid "Returns the end time of the section currently being played." msgstr "返回当前正在播放区域的结束时间点。" #: doc/classes/AnimationPlayer.xml msgid "Returns the start time of the section currently being played." msgstr "返回当前正在播放区域的开始时间点。" #: doc/classes/AnimationPlayer.xml msgid "" "Returns [code]true[/code] if an animation is currently playing with a " "section." msgstr "如果正在播放动画中的某个区域,则返回 [code]true[/code]。" #: doc/classes/AnimationPlayer.xml msgid "" "Returns [code]true[/code] if the an animation is currently active. An " "animation is active if it was played by calling [method play] and was not " "finished yet, or was stopped by calling [method stop].\n" "This can be used to check whether an animation is currently paused or " "stopped.\n" "[codeblock]\n" "var is_paused = not is_playing() and is_animation_active()\n" "var is_stopped = not is_playing() and not is_animation_active()\n" "[/codeblock]" msgstr "" #: doc/classes/AnimationPlayer.xml msgid "" "Pauses the currently playing animation. The [member " "current_animation_position] will be kept and calling [method play] or " "[method play_backwards] without arguments or with the same animation name as " "[member assigned_animation] will resume the animation.\n" "See also [method stop]." msgstr "" "暂停当前播放的动画。[member current_animation_position] 将被保留,调用 " "[method play] 或 [method play_backwards] 时,不带参数或使用与 [member " "assigned_animation] 相同的动画名称,将恢复动画。\n" "另见 [method stop]。" #: doc/classes/AnimationPlayer.xml msgid "" "Plays the animation with key [param name]. Custom blend times and speed can " "be set.\n" "The [param from_end] option only affects when switching to a new animation " "track, or if the same track but at the start or end. It does not affect " "resuming playback that was paused in the middle of an animation. If [param " "custom_speed] is negative and [param from_end] is [code]true[/code], the " "animation will play backwards (which is equivalent to calling [method " "play_backwards]).\n" "The [AnimationPlayer] keeps track of its current or last played animation " "with [member assigned_animation]. If this method is called with that same " "animation [param name], or with no [param name] parameter, the assigned " "animation will resume playing if it was paused.\n" "[b]Note:[/b] The animation will be updated the next time the " "[AnimationPlayer] is processed. If other variables are updated at the same " "time this is called, they may be updated too early. To perform the update " "immediately, call [code]advance(0)[/code]." msgstr "" "播放键名为 [param name] 的动画。可以设置自定义混合时间和速度。\n" "[param from_end] 选项仅在切换到新的动画轨道,或在相同轨道的开始或结束时生效。" "它不影响在动画被中途暂停时恢复播放。如果 [param custom_speed] 为负,且 " "[param from_end] 为 [code]true[/code],则动画将向后播放(相当于调用 [method " "play_backwards])。\n" "[AnimationPlayer] 使用 [member assigned_animation] 跟踪其当前或上次播放的动" "画。如果使用相同的动画 [param name] 或没有 [param name] 参数调用此方法,则分" "配的动画将在暂停时恢复播放。\n" "[b]注意:[/b]动画将在下次处理 [AnimationPlayer] 时更新。如果在调用该方法的同" "时更新了其他变量,则它们可能更新得太早。要立即执行更新,请调用 " "[code]advance(0)[/code]。" #: doc/classes/AnimationPlayer.xml msgid "" "Plays the animation with key [param name] and the section starting from " "[param start_time] and ending on [param end_time]. See also [method play].\n" "Setting [param start_time] to a value outside the range of the animation " "means the start of the animation will be used instead, and setting [param " "end_time] to a value outside the range of the animation means the end of the " "animation will be used instead. [param start_time] cannot be equal to [param " "end_time]." msgstr "" "播放键名为 [param name] 的动画中的指定区域,该区域的开始时间为 [param " "start_time]、结束时间为 [param end_time]。另见 [method play]。\n" "将 [param start_time] 设置为动画范围外的值表示使用动画的开头,将 [param " "end_time] 设置为动画范围外的值表示使用动画的结尾。[param start_time] 不能等" "于 [param end_time]。" #: doc/classes/AnimationPlayer.xml msgid "" "Plays the animation with key [param name] and the section starting from " "[param start_time] and ending on [param end_time] in reverse.\n" "This method is a shorthand for [method play_section] with [code]custom_speed " "= -1.0[/code] and [code]from_end = true[/code], see its description for more " "information." msgstr "" "倒放键名为 [param name] 的动画中的指定区域,该区域的开始时间为 [param " "start_time]、结束时间为 [param end_time]。\n" "该方法是 [method play_section] 的简写,等价于 [code]custom_speed = -1.0[/" "code]、[code]from_end = true[/code],详见其描述。" #: doc/classes/AnimationPlayer.xml msgid "" "Plays the animation with key [param name] and the section starting from " "[param start_marker] and ending on [param end_marker].\n" "If the start marker is empty, the section starts from the beginning of the " "animation. If the end marker is empty, the section ends on the end of the " "animation. See also [method play]." msgstr "" "播放键名为 [param name] 的动画中的指定区域,该区域从 [param start_marker] 标" "记开始、到 [param end_marker] 标记结束。\n" "如果开始标记为空,则区域从动画的开头开始。如果结束标记为空,则区域在动画的结" "尾结束。另见 [method play]。" #: doc/classes/AnimationPlayer.xml msgid "" "Plays the animation with key [param name] and the section starting from " "[param start_marker] and ending on [param end_marker] in reverse.\n" "This method is a shorthand for [method play_section_with_markers] with " "[code]custom_speed = -1.0[/code] and [code]from_end = true[/code], see its " "description for more information." msgstr "" "倒放键名为 [param name] 的动画中的指定区域,该区域从 [param start_marker] 标" "记开始、到 [param end_marker] 标记结束。\n" "该方法是 [method play_section_with_markers] 的简写,等价于 " "[code]custom_speed = -1.0[/code]、[code]from_end = true[/code],详见其描述。" #: doc/classes/AnimationPlayer.xml msgid "" "See also [method AnimationMixer.capture].\n" "You can use this method to use more detailed options for capture than those " "performed by [member playback_auto_capture]. When [member " "playback_auto_capture] is [code]false[/code], this method is almost the same " "as the following:\n" "[codeblock]\n" "capture(name, duration, trans_type, ease_type)\n" "play(name, custom_blend, custom_speed, from_end)\n" "[/codeblock]\n" "If [param name] is blank, it specifies [member assigned_animation].\n" "If [param duration] is a negative value, the duration is set to the interval " "between the current position and the first key, when [param from_end] is " "[code]true[/code], uses the interval between the current position and the " "last key instead.\n" "[b]Note:[/b] The [param duration] takes [member speed_scale] into account, " "but [param custom_speed] does not, because the capture cache is interpolated " "with the blend result and the result may contain multiple animations." msgstr "" "另见 [method AnimationMixer.capture]。\n" "该方法提供的选项比 [member playback_auto_capture] 更丰富。[member " "playback_auto_capture] 为 [code]false[/code] 时,该方法与下面这两行基本相" "同:\n" "[codeblock]\n" "capture(name, duration, trans_type, ease_type)\n" "play(name, custom_blend, custom_speed, from_end)\n" "[/codeblock]\n" "如果 [param name] 为空,则指定的是 [member assigned_animation]。\n" "如果 [param duration] 为负值,则持续时间是当前位置与第一个关键帧的间隔," "[param from_end] 为 [code]true[/code] 时使用的则是当前位置与最后一个关键帧之" "间的间隔。\n" "[b]注意:[/b][param duration] 会考虑 [member speed_scale],但 [param " "custom_speed] 不会考虑,因为捕获缓存会和混合结果进行插值,而混合结果可能包含" "多个动画。" #: doc/classes/AnimationPlayer.xml msgid "" "Queues an animation for playback once the current animation and all " "previously queued animations are done.\n" "[b]Note:[/b] If a looped animation is currently playing, the queued " "animation will never play unless the looped animation is stopped somehow." msgstr "" "将动画加入队列,在当前动画和所有先前排队的动画完毕后播放。\n" "[b]注意:[/b]如果当前正在播放循环动画,除非以某种方式停止循环动画,否则排队的" "动画将永远不会播放。" #: doc/classes/AnimationPlayer.xml msgid "Resets the current section. Does nothing if a section has not been set." msgstr "重置当前区域。如果尚未设置区域则不做任何事情。" #: doc/classes/AnimationPlayer.xml msgid "" "Seeks the animation to the [param seconds] point in time (in seconds). If " "[param update] is [code]true[/code], the animation updates too, otherwise it " "updates at process time. Events between the current frame and [param " "seconds] are skipped.\n" "If [param update_only] is [code]true[/code], the method / audio / animation " "playback tracks will not be processed.\n" "[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " "AnimationMixer.animation_finished]. If you want to skip animation and emit " "the signal, use [method AnimationMixer.advance]." msgstr "" "将动画寻道到时间点 [param seconds](单位为秒)。[param update] 为 " "[code]true[/code] 时会同时更新动画,否则会在处理时更新。当前帧和 [param " "seconds] 之间的事件会被跳过。\n" "如果 [param update_only] 为 [code]true[/code],则不会处理方法轨道、音频轨道、" "动画播放轨道。\n" "[b]注意:[/b]寻道至动画的末尾不会触发 [signal " "AnimationMixer.animation_finished]。如果想要跳过动画并触发该信号,请使用 " "[method AnimationMixer.advance]。" #: doc/classes/AnimationPlayer.xml msgid "" "Specifies a blend time (in seconds) between two animations, referenced by " "their keys." msgstr "指定两个动画(由它们的键所引用)之间的混合时间(以秒为单位)。" #: doc/classes/AnimationPlayer.xml msgid "Sets the call mode used for \"Call Method\" tracks." msgstr "设置用于“方法调用”轨道的调用模式。" #: doc/classes/AnimationPlayer.xml doc/classes/AnimationTree.xml msgid "Sets the process notification in which to update animations." msgstr "设置要更新动画的过程通知。" #: doc/classes/AnimationPlayer.xml msgid "Sets the node which node path references will travel from." msgstr "设置节点路径引用将从哪个节点出发。" #: doc/classes/AnimationPlayer.xml msgid "" "Changes the start and end times of the section being played. The current " "playback position will be clamped within the new section. See also [method " "play_section]." msgstr "" "更改正在被播放的段落的起止时间。当前的回放位置将被限定在新段落范围内。参见" "[method play_section]。" #: doc/classes/AnimationPlayer.xml msgid "" "Changes the start and end markers of the section being played. The current " "playback position will be clamped within the new section. See also [method " "play_section_with_markers].\n" "If the argument is empty, the section uses the beginning or end of the " "animation. If both are empty, it means that the section is not set." msgstr "" "改变正在播放的段落的开始和结束标记。当前的回放位置将被固定到新段落中。参见" "[method play_section_with_markers]。\n" "如果参数为空,段落将使用动画本身的起始或结束。如果两者都是空,那就意味着段落" "还没有设置。" #: doc/classes/AnimationPlayer.xml msgid "" "Stops the currently playing animation. The animation position is reset to " "[code]0[/code] and the [code]custom_speed[/code] is reset to [code]1.0[/" "code]. See also [method pause].\n" "If [param keep_state] is [code]true[/code], the animation state is not " "updated visually.\n" "[b]Note:[/b] The method / audio / animation playback tracks will not be " "processed by this method." msgstr "" "停止当前播放的动画。动画位置被重置为 [code]0[/code],[code]custom_speed[/" "code] 被重置为 [code]1.0[/code]。另见 [method pause]。\n" "如果 [param keep_state] 为 [code]true[/code],则动画状态不会在视觉上更新。\n" "[b]注意:[/b]方法/音频/动画播放轨道不会被该方法处理。" #: doc/classes/AnimationPlayer.xml msgid "" "If playing, the current animation's key, otherwise, the animation last " "played. When set, this changes the animation, but will not play it unless " "already playing. See also [member current_animation]." msgstr "" "如果正在播放,则为当前动画的键,否则为上次播放的动画。设置后会改变动画,但除" "非已经播放,否则不会播放。另见 [member current_animation]。" #: doc/classes/AnimationPlayer.xml msgid "" "The key of the currently playing animation. If no animation is playing, the " "property's value is an empty string. Changing this value does not restart " "the animation. See [method play] for more information on playing " "animations.\n" "[b]Note:[/b] While this property appears in the Inspector, it's not meant to " "be edited, and it's not saved in the scene. This property is mainly used to " "get the currently playing animation, and internally for animation playback " "tracks. For more information, see [Animation]." msgstr "" "当前播放的动画的名称。如果没有动画正在播放,该属性的值是一个空字符串。改变这" "个值不会重新启动动画。关于播放动画的更多信息请参阅 [method play]。\n" "[b]注意:[/b]虽然这个属性会出现在检查器中,但它不是用来编辑的,也不会保存在场" "景中。该属性主要用于获取当前播放的动画,内部用于动画播放轨道。详见 " "[Animation]。" #: doc/classes/AnimationPlayer.xml msgid "The length (in seconds) of the currently playing animation." msgstr "当前正在播放的动画的长度(以秒为单位)。" #: doc/classes/AnimationPlayer.xml msgid "The position (in seconds) of the currently playing animation." msgstr "当前播放的动画的位置(以秒为单位)。" #: doc/classes/AnimationPlayer.xml msgid "" "If [code]true[/code] and the engine is running in Movie Maker mode (see " "[MovieWriter]), exits the engine with [method SceneTree.quit] as soon as an " "animation is done playing in this [AnimationPlayer]. A message is printed " "when the engine quits for this reason.\n" "[b]Note:[/b] This obeys the same logic as the [signal " "AnimationMixer.animation_finished] signal, so it will not quit the engine if " "the animation is set to be looping." msgstr "" "如果为 [code]true[/code],并且引擎在 Movie Maker 模式下运行(见 " "[MovieWriter]),则会在此 [AnimationPlayer] 中播放完动画后,立即使用 [method " "SceneTree.quit] 退出引擎。当引擎因此而退出时,会打印一条消息。\n" "[b]注意:[/b]这与 [signal AnimationMixer.animation_finished] 信号遵循相同的逻" "辑,因此如果动画被设置为循环,它不会退出引擎。" #: doc/classes/AnimationPlayer.xml msgid "" "If [code]true[/code], performs [method AnimationMixer.capture] before " "playback automatically. This means just [method play_with_capture] is " "executed with default arguments instead of [method play].\n" "[b]Note:[/b] Capture interpolation is only performed if the animation " "contains a capture track. See also [constant Animation.UPDATE_CAPTURE]." msgstr "" "如果为 [code]true[/code],则会在自动播放之前执行 [method " "AnimationMixer.capture]。这意味着只会使用默认参数执行 [method " "play_with_capture],不会执行 [method play]。\n" "[b]注意:[/b]只有当动画包含捕获轨道时才会执行捕获插值。另见 [constant " "Animation.UPDATE_CAPTURE]。" #: doc/classes/AnimationPlayer.xml msgid "" "See also [method play_with_capture] and [method AnimationMixer.capture].\n" "If [member playback_auto_capture_duration] is negative value, the duration " "is set to the interval between the current position and the first key." msgstr "" "另请参见[method play_with_capture]和[method AnimationMixer.capture]。\n" "如果[member playback_auto_capture_duration]为负值,则持续时间设置为当前位置和" "第一个关键点之间的间隔。" #: doc/classes/AnimationPlayer.xml msgid "" "The ease type of the capture interpolation. See also [enum Tween.EaseType]." msgstr "捕获插值的缓动类型。另见 [enum Tween.EaseType]。" #: doc/classes/AnimationPlayer.xml msgid "" "The transition type of the capture interpolation. See also [enum " "Tween.TransitionType]." msgstr "捕捉插值的过渡类型。另请参见[enum Tween.TransitionType]。" #: doc/classes/AnimationPlayer.xml msgid "" "The default time in which to blend animations. Ranges from 0 to 4096 with " "0.01 precision." msgstr "混合动画的默认时间。范围从 0 到 4096,精度为 0.01。" #: doc/classes/AnimationPlayer.xml msgid "" "Emitted when a queued animation plays after the previous animation finished. " "See also [method AnimationPlayer.queue].\n" "[b]Note:[/b] The signal is not emitted when the animation is changed via " "[method AnimationPlayer.play] or by an [AnimationTree]." msgstr "" "在前一个动画完成后,队列中的动画播放时发出。另见 [method " "AnimationPlayer.queue]。\n" "[b]注意:[/b]通过 [method AnimationPlayer.play] 或 [AnimationTree] 改变动画" "时,不会发出此信号。" #: doc/classes/AnimationPlayer.xml msgid "Emitted when [member current_animation] changes." msgstr "当 [member current_animation] 更改时发出。" #: doc/classes/AnimationPlayer.xml doc/classes/AnimationTree.xml msgid "See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS]." msgstr "见 [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS]。" #: doc/classes/AnimationPlayer.xml doc/classes/AnimationTree.xml msgid "See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE]." msgstr "见 [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE]。" #: doc/classes/AnimationPlayer.xml doc/classes/AnimationTree.xml msgid "See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL]." msgstr "见 [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL]。" #: doc/classes/AnimationPlayer.xml msgid "See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_DEFERRED]." msgstr "见 [constant AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_DEFERRED]。" #: doc/classes/AnimationPlayer.xml msgid "See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE]." msgstr "" "见 [constant AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE]。" #: doc/classes/AnimationRootNode.xml msgid "" "Base class for [AnimationNode]s that hold one or multiple composite " "animations. Usually used for [member AnimationTree.tree_root]." msgstr "" "包含一个或多个复合动画的 [AnimationNode] 的基类。通常用于 [member " "AnimationTree.tree_root]。" #: doc/classes/AnimationRootNode.xml msgid "" "[AnimationRootNode] is a base class for [AnimationNode]s that hold a " "complete animation. A complete animation refers to the output of an " "[AnimationNodeOutput] in an [AnimationNodeBlendTree] or the output of " "another [AnimationRootNode]. Used for [member AnimationTree.tree_root] or in " "other [AnimationRootNode]s.\n" "Examples of built-in root nodes include [AnimationNodeBlendTree] (allows " "blending nodes between each other using various modes), " "[AnimationNodeStateMachine] (allows to configure blending and transitions " "between nodes using a state machine pattern), [AnimationNodeBlendSpace2D] " "(allows linear blending between [b]three[/b] [AnimationNode]s), " "[AnimationNodeBlendSpace1D] (allows linear blending only between [b]two[/b] " "[AnimationNode]s)." msgstr "" "[AnimationRootNode] 是存放完整动画的 [AnimationNode] 的基类。完整动画指的是 " "[AnimationNodeBlendTree] 中 [AnimationNodeOutput] 的输出,或者其他 " "[AnimationRootNode] 的输出。可以在 [member AnimationTree.tree_root] 或其他 " "[AnimationRootNode] 中使用。\n" "内置根节点有 [AnimationNodeBlendTree](能够使用不同的模式将节点进行混合)、" "[AnimationNodeStateMachine](能够使用状态机模式配置节点之间的混合和过渡)、" "[AnimationNodeBlendSpace2D](能够在[b]三个[/b] [AnimationNode] 之间进行线性混" "合)、[AnimationNodeBlendSpace1D](能够在[b]两个[/b] [AnimationNode] 之间进行" "线性混合)等。" #: doc/classes/AnimationTree.xml msgid "A node used for advanced animation transitions in an [AnimationPlayer]." msgstr "用于 [AnimationPlayer] 中高级动画过渡的节点。" #: doc/classes/AnimationTree.xml msgid "" "A node used for advanced animation transitions in an [AnimationPlayer].\n" "[b]Note:[/b] When linked with an [AnimationPlayer], several properties and " "methods of the corresponding [AnimationPlayer] will not function as " "expected. Playback and transitions should be handled using only the " "[AnimationTree] and its constituent [AnimationNode](s). The " "[AnimationPlayer] node should be used solely for adding, deleting, and " "editing animations." msgstr "" "用于 [AnimationPlayer] 中高级动画过渡的节点。\n" "[b]注意:[/b]与 [AnimationPlayer] 连接时,该 [AnimationPlayer] 的部分属性和方" "法将不会像预期的那样发挥作用。播放和过渡应该只使用 [AnimationTree] 和组成它" "的 [AnimationNode] 来处理。[AnimationPlayer] 节点应仅用于添加、删除和编辑动" "画。" #: doc/classes/AnimationTree.xml msgid "" "The path to the [Node] used to evaluate the [AnimationNode] [Expression] if " "one is not explicitly specified internally." msgstr "" "用于评估 [AnimationNode] [Expression] 的 [Node] 的路径,内部未明确指定路径时" "使用。" #: doc/classes/AnimationTree.xml msgid "The path to the [AnimationPlayer] used for animating." msgstr "用于动画的 [AnimationPlayer] 的路径。" #: doc/classes/AnimationTree.xml msgid "" "The root animation node of this [AnimationTree]. See [AnimationRootNode]." msgstr "该 [AnimationTree] 的根动画节点。见 [AnimationRootNode]。" #: doc/classes/AnimationTree.xml msgid "Emitted when the [member anim_player] is changed." msgstr "当 [member anim_player] 被改变时发出。" #: doc/classes/Area2D.xml msgid "" "A region of 2D space that detects other [CollisionObject2D]s entering or " "exiting it." msgstr "2D 空间中的一个区域,能够检测到其他 [CollisionObject2D] 的进入或退出。" #: doc/classes/Area2D.xml msgid "" "[Area2D] is a region of 2D space defined by one or multiple " "[CollisionShape2D] or [CollisionPolygon2D] child nodes. It detects when " "other [CollisionObject2D]s enter or exit it, and it also keeps track of " "which collision objects haven't exited it yet (i.e. which one are " "overlapping it).\n" "This node can also locally alter or override physics parameters (gravity, " "damping) and route audio to custom audio buses.\n" "[b]Note:[/b] Areas and bodies created with [PhysicsServer2D] might not " "interact as expected with [Area2D]s, and might not emit signals or track " "objects correctly." msgstr "" "[Area2D] 是 2D 空间中的一个区域,由一个或多个 [CollisionShape2D] 或 " "[CollisionPolygon2D] 子节点定义,能够检测到其他 [CollisionObject2D] 进入或退" "出该区域,同时也会记录哪些碰撞对象尚未退出(即哪些对象与其存在重叠)。\n" "这个节点也可以在局部修改或覆盖物理参数(重力、阻尼),将音频引导至自定义音频" "总线。\n" "[b]注意:[/b]使用 [PhysicsServer2D] 创建的区域和物体可能无法按预期与 " "[Area2D] 交互,并且可能无法正确发出信号或跟踪对象。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "Using Area2D" msgstr "使用 Area2D" #: doc/classes/Area2D.xml doc/classes/CollisionShape2D.xml #: doc/classes/RectangleShape2D.xml msgid "2D Pong Demo" msgstr "2D Pong 演示" #: doc/classes/Area2D.xml doc/classes/Camera2D.xml #: doc/classes/CharacterBody2D.xml doc/classes/TileMap.xml #: doc/classes/TileMapLayer.xml doc/classes/TileSet.xml msgid "2D Platformer Demo" msgstr "2D 平台跳跃演示" #: doc/classes/Area2D.xml msgid "" "Returns a list of intersecting [Area2D]s. The overlapping area's [member " "CollisionObject2D.collision_layer] must be part of this area's [member " "CollisionObject2D.collision_mask] in order to be detected.\n" "For performance reasons (collisions are all processed at the same time) this " "list is modified once during the physics step, not immediately after objects " "are moved. Consider using signals instead." msgstr "" "返回相交的 [Area2D] 的列表。重叠区域的 [member " "CollisionObject2D.collision_layer] 必须是这个区域 [member " "CollisionObject2D.collision_mask] 的一部分,这样才能被检测到。\n" "出于性能的考虑(所有碰撞都是一起处理的),这个列表会在物理迭代时进行一次修" "改,而不是在物体被移动后立即修改。可考虑改用信号。" #: doc/classes/Area2D.xml msgid "" "Returns a list of intersecting [PhysicsBody2D]s and [TileMap]s. The " "overlapping body's [member CollisionObject2D.collision_layer] must be part " "of this area's [member CollisionObject2D.collision_mask] in order to be " "detected.\n" "For performance reasons (collisions are all processed at the same time) this " "list is modified once during the physics step, not immediately after objects " "are moved. Consider using signals instead." msgstr "" "返回相交的 [PhysicsBody2D] 和 [TileMap]。重叠物体的 [member " "CollisionObject2D.collision_layer] 必须是该区域 [member " "CollisionObject2D.collision_mask] 的一部分,才能被检测到。\n" "出于性能原因(所有碰撞都是一起处理的),这个列表只会在每次物理迭代时发生一次" "更改,不会在对象移动后立即更改。请考虑使用信号。" #: doc/classes/Area2D.xml msgid "" "Returns [code]true[/code] if intersecting any [Area2D]s, otherwise returns " "[code]false[/code]. The overlapping area's [member " "CollisionObject2D.collision_layer] must be part of this area's [member " "CollisionObject2D.collision_mask] in order to be detected.\n" "For performance reasons (collisions are all processed at the same time) the " "list of overlapping areas is modified once during the physics step, not " "immediately after objects are moved. Consider using signals instead." msgstr "" "如果与其他 [Area2D] 相交,则返回 [code]true[/code],否则返回 [code]false[/" "code]。重叠区域的 [member CollisionObject2D.collision_layer] 必须是该区域 " "[member CollisionObject2D.collision_mask] 的一部分,才能被检测到。\n" "出于性能原因(所有碰撞都是一起处理的),重叠区域的列表只会在每次物理迭代时发" "生一次更改,不会在对象移动后立即更改。请考虑使用信号。" #: doc/classes/Area2D.xml msgid "" "Returns [code]true[/code] if intersecting any [PhysicsBody2D]s or " "[TileMap]s, otherwise returns [code]false[/code]. The overlapping body's " "[member CollisionObject2D.collision_layer] must be part of this area's " "[member CollisionObject2D.collision_mask] in order to be detected.\n" "For performance reasons (collisions are all processed at the same time) the " "list of overlapping bodies is modified once during the physics step, not " "immediately after objects are moved. Consider using signals instead." msgstr "" "如果与其他 [PhysicsBody2D] 或 [TileMap] 相交,则返回 [code]true[/code],否则" "返回 [code]false[/code]。重叠物体的 [member " "CollisionObject2D.collision_layer] 必须是该区域 [member " "CollisionObject2D.collision_mask] 的一部分,才能被检测到。\n" "出于性能原因(所有碰撞都是一起处理的),重叠物体的列表只会在每次物理迭代时发" "生一次更改,不会在对象移动后立即更改。请考虑使用信号。" #: doc/classes/Area2D.xml msgid "" "Returns [code]true[/code] if the given [Area2D] intersects or overlaps this " "[Area2D], [code]false[/code] otherwise.\n" "[b]Note:[/b] The result of this test is not immediate after moving objects. " "For performance, the list of overlaps is updated once per frame and before " "the physics step. Consider using signals instead." msgstr "" "如果给定的 [Area2D] 与此 [Area2D] 相交或重叠,则返回 [code]true[/code],否则" "返回 [code]false[/code]。\n" "[b]注意:[/b]测试结果不反映对象移动后的即时状态。出于性能原因,重叠列表每帧只" "会在物理迭代前更新一次。请考虑使用信号。" #: doc/classes/Area2D.xml msgid "" "Returns [code]true[/code] if the given physics body intersects or overlaps " "this [Area2D], [code]false[/code] otherwise.\n" "[b]Note:[/b] The result of this test is not immediate after moving objects. " "For performance, list of overlaps is updated once per frame and before the " "physics step. Consider using signals instead.\n" "The [param body] argument can either be a [PhysicsBody2D] or a [TileMap] " "instance. While TileMaps are not physics bodies themselves, they register " "their tiles with collision shapes as a virtual physics body." msgstr "" "如果给定的物理物体与此 [Area2D] 相交或重叠,则返回 [code]true[/code],否则返" "回 [code]false[/code]。\n" "[b]注意:[/b]测试结果不反映对象移动后的即时状态。出于性能原因,重叠列表每帧只" "会在物理迭代前更新一次。请考虑使用信号。\n" "参数 [param body] 可以是 [PhysicsBody2D] 实例,也可以是 [TileMap] 实例。" "TileMap 虽然不是物理物体,但会把图块的碰撞形状注册为虚拟物理物体。" #: doc/classes/Area2D.xml msgid "" "The rate at which objects stop spinning in this area. Represents the angular " "velocity lost per second.\n" "See [member ProjectSettings.physics/2d/default_angular_damp] for more " "details about damping." msgstr "" "物体在此区域停止旋转的速度。代表每秒损失的角速度。\n" "关于阻尼的更多细节见 [member ProjectSettings.physics/2d/" "default_angular_damp]。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "Override mode for angular damping calculations within this area." msgstr "此区域内的角阻尼计算的覆盖模式。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "The name of the area's audio bus." msgstr "该区域音频总线的名称。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "If [code]true[/code], the area's audio bus overrides the default audio bus." msgstr "如果为 [code]true[/code],该区域的音频总线将覆盖默认的音频总线。" #: doc/classes/Area2D.xml msgid "" "The area's gravity intensity (in pixels per second squared). This value " "multiplies the gravity direction. This is useful to alter the force of " "gravity without altering its direction." msgstr "" "该区域的重力强度(以像素每平方秒为单位)。这个值是重力向量的倍数。这对于改变" "重力大小而不改变其方向很有用。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "The area's gravity vector (not normalized)." msgstr "该区域的重力向量(未归一化)。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "If [code]true[/code], gravity is calculated from a point (set via [member " "gravity_point_center]). See also [member gravity_space_override]." msgstr "" "如果为 [code]true[/code],则从一个点(通过 [member gravity_point_center] 设" "置)计算重力。参阅 [member gravity_space_override]。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "If gravity is a point (see [member gravity_point]), this will be the point " "of attraction." msgstr "如果重力是一个点(参见 [member gravity_point]),这将是吸引力点。" #: doc/classes/Area2D.xml msgid "" "The distance at which the gravity strength is equal to [member gravity]. For " "example, on a planet 100 pixels in radius with a surface gravity of 4.0 px/" "s², set the [member gravity] to 4.0 and the unit distance to 100.0. The " "gravity will have falloff according to the inverse square law, so in the " "example, at 200 pixels from the center the gravity will be 1.0 px/s² (twice " "the distance, 1/4th the gravity), at 50 pixels it will be 16.0 px/s² (half " "the distance, 4x the gravity), and so on.\n" "The above is true only when the unit distance is a positive number. When " "this is set to 0.0, the gravity will be constant regardless of distance." msgstr "" "重力强度等于 [member gravity] 的距离。例如,在一个半径为 100 像素、表面重力" "为 4.0 px/s² 的行星上,将 [member gravity] 设置为 4.0,将单位距离设置为 " "100.0。重力将根据平方反比定律衰减,因此在该示例中,距离中心 200 像素处的重力" "将为 1.0 px/s²(距离的两倍,重力的 1/4),距离 50 像素处为 16.0 px/s²(距离的" "一半,重力的 4 倍),依此类推。\n" "仅当单位距离为正数时,上述情况才成立。当该属性被设置为 0.0 时,无论距离如何," "重力都将保持不变。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "Override mode for gravity calculations within this area." msgstr "该区域内重力计算的覆盖模式。" #: doc/classes/Area2D.xml msgid "" "The rate at which objects stop moving in this area. Represents the linear " "velocity lost per second.\n" "See [member ProjectSettings.physics/2d/default_linear_damp] for more details " "about damping." msgstr "" "物体在此区域停止运动的速度。代表每秒损失的线速度。\n" "关于阻尼的更多细节见 [member ProjectSettings.physics/2d/" "default_linear_damp]。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "Override mode for linear damping calculations within this area." msgstr "该区域内线性阻尼计算的覆盖模式。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "If [code]true[/code], other monitoring areas can detect this area." msgstr "如果为 [code]true[/code],其他监测区域可以检测到这个区域。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "If [code]true[/code], the area detects bodies or areas entering and exiting " "it." msgstr "" "为 [code]true[/code] 时,该区域能够检测到进入和退出该区域的实体或区域。" #: doc/classes/Area2D.xml msgid "" "The area's priority. Higher priority areas are processed first. The " "[World2D]'s physics is always processed last, after all areas." msgstr "" "该区域的优先级。将优先处理优先级较高的区域。[World2D] 的物理始终在所有区域之" "后处理。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "Emitted when the received [param area] enters this area. Requires [member " "monitoring] to be set to [code]true[/code]." msgstr "" "当接收的 [param area] 进入此区域时发出。需要 [member monitoring] 被设置为 " "[code]true[/code]。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "Emitted when the received [param area] exits this area. Requires [member " "monitoring] to be set to [code]true[/code]." msgstr "" "当接收的 [param area] 退出此区域时发出。需要 [member monitoring] 被设置为 " "[code]true[/code]。" #: doc/classes/Area2D.xml msgid "" "Emitted when a [Shape2D] of the received [param area] enters a shape of this " "area. Requires [member monitoring] to be set to [code]true[/code].\n" "[param local_shape_index] and [param area_shape_index] contain indices of " "the interacting shapes from this area and the other area, respectively. " "[param area_rid] contains the [RID] of the other area. These values can be " "used with the [PhysicsServer2D].\n" "[b]Example:[/b] Get the [CollisionShape2D] node from the shape index:\n" "[codeblocks]\n" "[gdscript]\n" "var other_shape_owner = area.shape_find_owner(area_shape_index)\n" "var other_shape_node = area.shape_owner_get_owner(other_shape_owner)\n" "\n" "var local_shape_owner = shape_find_owner(local_shape_index)\n" "var local_shape_node = shape_owner_get_owner(local_shape_owner)\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "当收到的 [param area] 的 [Shape2D] 进入这个区域的形状时发出。要求 [member " "monitoring] 被设置为 [code]true[/code] 。\n" "[param local_shape_index] 和 [param area_shape_index] 分别包含来自这个区域和" "另一个区域的交互形状的索引。[param area_rid] 包含另一个区域的 [RID]。这些值可" "以与 [PhysicsServer2D] 一起使用。\n" "[b]示例:[/b]根据形状索引获取 [CollisionShape2D] 节点:\n" "[codeblocks]\n" "[gdscript]\n" "var other_shape_owner = area.shape_find_owner( area_shape_index)\n" "var other_shape_node = area.shape_owner_get_owner(other_shape_owner)\n" "\n" "var local_shape_owner = shape_find_owner(local_shape_index)\n" "var local_shape_node = shape_owner_get_owner(local_shape_owner)\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/Area2D.xml msgid "" "Emitted when a [Shape2D] of the received [param area] exits a shape of this " "area. Requires [member monitoring] to be set to [code]true[/code].\n" "See also [signal area_shape_entered]." msgstr "" "当接收的 [param area] 的 [Shape2D] 退出此区域的形状时发出。需要 [member " "monitoring] 被设置为 [code]true[/code]。\n" "另见 [signal area_shape_entered]。" #: doc/classes/Area2D.xml msgid "" "Emitted when the received [param body] enters this area. [param body] can be " "a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] " "has collision shapes configured. Requires [member monitoring] to be set to " "[code]true[/code]." msgstr "" "当接收到的 [param body] 进入这个区域时发出的。[param body] 可能是 " "[PhysicsBody2D] 也可能是 [TileMap]。[TileMap] 的 [TileSet] 配置了碰撞形状就能" "够被检测到。需要将 [member monitoring] 设置为 [code]true[/code] 。" #: doc/classes/Area2D.xml msgid "" "Emitted when the received [param body] exits this area. [param body] can be " "a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] " "has collision shapes configured. Requires [member monitoring] to be set to " "[code]true[/code]." msgstr "" "当接收到的 [param body] 离开这个区域时发出的。[param body] 可能是 " "[PhysicsBody2D] 也可能是 [TileMap]。[TileMap] 的 [TileSet] 配置了碰撞形状就能" "够被检测到。要求 [member monitoring] 被设置为 [code]true[/code] 。" #: doc/classes/Area2D.xml msgid "" "Emitted when a [Shape2D] of the received [param body] enters a shape of this " "area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are " "detected if their [TileSet] has collision shapes configured. Requires " "[member monitoring] to be set to [code]true[/code].\n" "[param local_shape_index] and [param body_shape_index] contain indices of " "the interacting shapes from this area and the interacting body, " "respectively. [param body_rid] contains the [RID] of the body. These values " "can be used with the [PhysicsServer2D].\n" "[b]Example:[/b] Get the [CollisionShape2D] node from the shape index:\n" "[codeblocks]\n" "[gdscript]\n" "var body_shape_owner = body.shape_find_owner(body_shape_index)\n" "var body_shape_node = body.shape_owner_get_owner(body_shape_owner)\n" "\n" "var local_shape_owner = shape_find_owner(local_shape_index)\n" "var local_shape_node = shape_owner_get_owner(local_shape_owner)\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "当收到的 [param body] 的 [Shape2D] 进入这个区域的形状时发出。[param body] 可" "能是 [PhysicsBody2D] 也可能是 [TileMap]。[TileMap] 的 [TileSet] 配置了碰撞形" "状就能够被检测到。要求 [member monitoring] 被设置为 [code]true[/code] 。\n" "[param local_shape_index] 和 [param body_shape_index] 分别包含来自这个区域和" "交互体的交互形状的指数。[param body_rid] 包含体的 [RID]。这些值可以与 " "[PhysicsServer2D] 一起使用。\n" "[b]示例:[/b]根据形状索引获取 [CollisionShape2D] 节点:\n" "[codeblocks]\n" "[gdscript]\n" "var body_shape_owner = body.shape_find_owner(body_shape_index)\n" "var body_shape_node = body.shape_owner_get_owner(body_shape_owner)\n" "\n" "var local_shape_owner = shape_find_owner(local_shape_index)\n" "var local_shape_node = shape_owner_get_owner(local_shape_owner)\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/Area2D.xml msgid "" "Emitted when a [Shape2D] of the received [param body] exits a shape of this " "area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are " "detected if their [TileSet] has collision shapes configured. Requires " "[member monitoring] to be set to [code]true[/code].\n" "See also [signal body_shape_entered]." msgstr "" "当收到的 [param body] 的 [Shape2D] 退出这个区域的形状时发出。[param body] 可" "能是 [PhysicsBody2D] 也可能是 [TileMap]。[TileMap] 的 [TileSet] 配置了碰撞形" "状就能够被检测到。要求 [member monitoring] 被设置为 [code]true[/code] 。\n" "另见 [signal body_shape_entered]。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "This area does not affect gravity/damping." msgstr "该区域不影响重力/阻尼。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "This area adds its gravity/damping values to whatever has been calculated so " "far (in [member priority] order)." msgstr "" "该区域将其重力/阻尼值加到目前已经计算出的结果上(按 [member priority] 顺" "序)。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "This area adds its gravity/damping values to whatever has been calculated so " "far (in [member priority] order), ignoring any lower priority areas." msgstr "" "该区域将其重力/阻尼值加到目前已经计算出的结果上(按 [member priority] 顺" "序),将忽略任何较低优先级的区域。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "This area replaces any gravity/damping, even the defaults, ignoring any " "lower priority areas." msgstr "该区域将替换所有重力/阻尼,甚至是默认值,将忽略任何较低优先级的区域。" #: doc/classes/Area2D.xml doc/classes/Area3D.xml msgid "" "This area replaces any gravity/damping calculated so far (in [member " "priority] order), but keeps calculating the rest of the areas." msgstr "" "该区域将替换目前已经计算出的任何重力/阻尼(按 [member priority] 顺序),但仍" "将继续计算其余区域。" #: doc/classes/Area3D.xml msgid "" "A region of 3D space that detects other [CollisionObject3D]s entering or " "exiting it." msgstr "3D 空间中的一个区域,能够检测到其他 [CollisionObject3D] 的进入或退出。" #: doc/classes/Area3D.xml msgid "" "[Area3D] is a region of 3D space defined by one or multiple " "[CollisionShape3D] or [CollisionPolygon3D] child nodes. It detects when " "other [CollisionObject3D]s enter or exit it, and it also keeps track of " "which collision objects haven't exited it yet (i.e. which one are " "overlapping it).\n" "This node can also locally alter or override physics parameters (gravity, " "damping) and route audio to custom audio buses.\n" "[b]Note:[/b] Areas and bodies created with [PhysicsServer3D] might not " "interact as expected with [Area3D]s, and might not emit signals or track " "objects correctly.\n" "[b]Warning:[/b] Using a [ConcavePolygonShape3D] inside a [CollisionShape3D] " "child of this node (created e.g. by using the [b]Create Trimesh Collision " "Sibling[/b] option in the [b]Mesh[/b] menu that appears when selecting a " "[MeshInstance3D] node) may give unexpected results, since this collision " "shape is hollow. If this is not desired, it has to be split into multiple " "[ConvexPolygonShape3D]s or primitive shapes like [BoxShape3D], or in some " "cases it may be replaceable by a [CollisionPolygon3D]." msgstr "" "[Area3D] 是 3D 空间中的一个区域,由一个或多个 [CollisionShape3D] 或 " "[CollisionPolygon3D] 子节点定义,能够检测到其他 [CollisionObject3D] 进入或退" "出该区域,同时也会记录哪些碰撞对象尚未退出(即哪些对象与其存在重叠)。\n" "这个节点也可以在局部修改或覆盖物理参数(重力、阻尼),将音频引导至自定义音频" "总线。\n" "[b]注意:[/b]使用 [PhysicsServer3D] 创建的区域和物体可能无法按预期与 " "[Area3D] 交互,并且可能无法正确发出信号或跟踪对象。\n" "[b]警告:[/b]在这个节点的 [CollisionShape3D] 子节点中使用 " "[ConcavePolygonShape3D](创建方法是在选中 [MeshInstance3D] 节点后,在出现的 " "[b]Mesh[/b] 菜单中选择[b]创建三角网格碰撞同级[/b]选项)可能得到意外的结果,因" "为碰撞形状是空心的。如果不想要这种行为,则应该将其拆分为多个 " "[ConvexPolygonShape3D] 或 [BoxShape3D] 等基础网格,有些情况下也可以用 " "[CollisionPolygon3D] 代替。" #: doc/classes/Area3D.xml doc/classes/QuadMesh.xml doc/classes/SubViewport.xml #: doc/classes/Viewport.xml doc/classes/ViewportTexture.xml msgid "GUI in 3D Viewport Demo" msgstr "3D 视口中的 GUI 演示" #: doc/classes/Area3D.xml msgid "" "Returns a list of intersecting [Area3D]s. The overlapping area's [member " "CollisionObject3D.collision_layer] must be part of this area's [member " "CollisionObject3D.collision_mask] in order to be detected.\n" "For performance reasons (collisions are all processed at the same time) this " "list is modified once during the physics step, not immediately after objects " "are moved. Consider using signals instead." msgstr "" "返回相交的 [Area3D] 的列表。重叠区域的 [member " "CollisionObject3D.collision_layer] 必须是该区域的 [member " "CollisionObject3D.collision_mask] 的一部分才能被检测到。\n" "出于性能的考虑(所有碰撞都是一起处理的),这个列表会在物理迭代时进行一次修" "改,而不是在实体被移动后立即修改。可考虑改用信号。" #: doc/classes/Area3D.xml msgid "" "Returns a list of intersecting [PhysicsBody3D]s and [GridMap]s. The " "overlapping body's [member CollisionObject3D.collision_layer] must be part " "of this area's [member CollisionObject3D.collision_mask] in order to be " "detected.\n" "For performance reasons (collisions are all processed at the same time) this " "list is modified once during the physics step, not immediately after objects " "are moved. Consider using signals instead." msgstr "" "返回相交的 [PhysicsBody3D] 和 [GridMap]。重叠物体的 [member " "CollisionObject3D.collision_layer] 必须是该区域 [member " "CollisionObject3D.collision_mask] 的一部分,才能被检测到。\n" "出于性能原因(所有碰撞都是一起处理的),这个列表只会在每次物理迭代时发生一次" "更改,不会在对象移动后立即更改。请考虑使用信号。" #: doc/classes/Area3D.xml msgid "" "Returns [code]true[/code] if intersecting any [Area3D]s, otherwise returns " "[code]false[/code]. The overlapping area's [member " "CollisionObject3D.collision_layer] must be part of this area's [member " "CollisionObject3D.collision_mask] in order to be detected.\n" "For performance reasons (collisions are all processed at the same time) the " "list of overlapping areas is modified once during the physics step, not " "immediately after objects are moved. Consider using signals instead." msgstr "" "如果与其他 [Area3D] 相交,则返回 [code]true[/code],否则返回 [code]false[/" "code]。重叠区域的 [member CollisionObject3D.collision_layer] 必须是该区域 " "[member CollisionObject3D.collision_mask] 的一部分,才能被检测到。\n" "出于性能原因(所有碰撞都是一起处理的),重叠区域的列表只会在每次物理迭代时发" "生一次更改,不会在对象移动后立即更改。请考虑使用信号。" #: doc/classes/Area3D.xml msgid "" "Returns [code]true[/code] if intersecting any [PhysicsBody3D]s or " "[GridMap]s, otherwise returns [code]false[/code]. The overlapping body's " "[member CollisionObject3D.collision_layer] must be part of this area's " "[member CollisionObject3D.collision_mask] in order to be detected.\n" "For performance reasons (collisions are all processed at the same time) the " "list of overlapping bodies is modified once during the physics step, not " "immediately after objects are moved. Consider using signals instead." msgstr "" "如果与其他 [PhysicsBody3D] 或 [GridMap] 相交,则返回 [code]true[/code],否则" "返回 [code]false[/code]。重叠物体的 [member " "CollisionObject3D.collision_layer] 必须是该区域 [member " "CollisionObject3D.collision_mask] 的一部分,才能被检测到。\n" "出于性能原因(所有碰撞都是一起处理的),重叠物体的列表只会在每次物理迭代时发" "生一次更改,不会在对象移动后立即更改。请考虑使用信号。" #: doc/classes/Area3D.xml msgid "" "Returns [code]true[/code] if the given [Area3D] intersects or overlaps this " "[Area3D], [code]false[/code] otherwise.\n" "[b]Note:[/b] The result of this test is not immediate after moving objects. " "For performance, list of overlaps is updated once per frame and before the " "physics step. Consider using signals instead." msgstr "" "如果给定的 [Area3D] 与此 [Area3D] 相交或重叠,则返回 [code]true[/code],否则" "返回 [code]false[/code]。\n" "[b]注意:[/b]测试结果不反映对象移动后的即时状态。出于性能原因,重叠列表每帧只" "会在物理迭代前更新一次。请考虑使用信号。" #: doc/classes/Area3D.xml msgid "" "Returns [code]true[/code] if the given physics body intersects or overlaps " "this [Area3D], [code]false[/code] otherwise.\n" "[b]Note:[/b] The result of this test is not immediate after moving objects. " "For performance, list of overlaps is updated once per frame and before the " "physics step. Consider using signals instead.\n" "The [param body] argument can either be a [PhysicsBody3D] or a [GridMap] " "instance. While GridMaps are not physics body themselves, they register " "their tiles with collision shapes as a virtual physics body." msgstr "" "如果给定的物理物体与此 [Area3D] 相交或重叠,则返回 [code]true[/code],否则返" "回 [code]false[/code]。\n" "[b]注意:[/b]测试结果不反映对象移动后的即时状态。出于性能原因,重叠列表每帧只" "会在物理迭代前更新一次。请考虑使用信号。\n" "参数 [param body] 可以是 [PhysicsBody3D] 实例,也可以是 [GridMap] 实例。" "GridMap 虽然不是物理物体,但会把图块的碰撞形状注册为虚拟物理物体。" #: doc/classes/Area3D.xml msgid "" "The rate at which objects stop spinning in this area. Represents the angular " "velocity lost per second.\n" "See [member ProjectSettings.physics/3d/default_angular_damp] for more " "details about damping." msgstr "" "物体在此区域停止旋转的速度。代表每秒损失的角速度.\n" "关于阻尼的更多细节,见 [member ProjectSettings.physics/3d/" "default_angular_damp]。" #: doc/classes/Area3D.xml msgid "" "The area's gravity intensity (in meters per second squared). This value " "multiplies the gravity direction. This is useful to alter the force of " "gravity without altering its direction." msgstr "" "该区域的重力强度(以米每平方秒为单位)。这个值是重力向量的倍数。这对于改变重" "力大小而不改变其方向很有用。" #: doc/classes/Area3D.xml msgid "" "The distance at which the gravity strength is equal to [member gravity]. For " "example, on a planet 100 meters in radius with a surface gravity of 4.0 m/" "s², set the [member gravity] to 4.0 and the unit distance to 100.0. The " "gravity will have falloff according to the inverse square law, so in the " "example, at 200 meters from the center the gravity will be 1.0 m/s² (twice " "the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half " "the distance, 4x the gravity), and so on.\n" "The above is true only when the unit distance is a positive number. When " "this is set to 0.0, the gravity will be constant regardless of distance." msgstr "" "重力强度等于 [member gravity] 的距离。例如,在一个半径为 100 米、表面重力为 " "4.0 m/s² 的行星上,将 [member gravity] 设置为 4.0,将单位距离设置为 100.0。重" "力会根据平方反比定律衰减,因此在该示例中,距中心 200 米处的重力将为 1.0 m/s²" "(距离的两倍,重力的 1/4),在 50 米处为 16.0 m/s²(距离的一半,重力的 4 " "倍),依此类推。\n" "仅当单位距离为正数时,上述情况才成立。当该属性被设置为 0.0 时,无论距离如何," "重力都将保持不变。" #: doc/classes/Area3D.xml msgid "" "The rate at which objects stop moving in this area. Represents the linear " "velocity lost per second.\n" "See [member ProjectSettings.physics/3d/default_linear_damp] for more details " "about damping." msgstr "" "实体在此区域减速的速率。代表每秒损失的线速度。\n" "关于阻尼的更多细节,见[member ProjectSettings.physics/3d/" "default_linear_damp]。" #: doc/classes/Area3D.xml msgid "" "The area's priority. Higher priority areas are processed first. The " "[World3D]'s physics is always processed last, after all areas." msgstr "" "该区域的优先级。将优先处理优先级较高的区域。[World3D] 的物理始终在所有区域之" "后处理。" #: doc/classes/Area3D.xml msgid "" "The degree to which this area applies reverb to its associated audio. Ranges " "from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision." msgstr "" "该区域对其相关音频应用混响的程度。范围从 [code]0[/code] 到 [code]1[/code],精" "度为 [code]0.1[/code]。" #: doc/classes/Area3D.xml msgid "If [code]true[/code], the area applies reverb to its associated audio." msgstr "如果为 [code]true[/code],该区域会将混响应用于其关联音频。" #: doc/classes/Area3D.xml msgid "The name of the reverb bus to use for this area's associated audio." msgstr "用于该区域关联音频的混响总线的名称。" #: doc/classes/Area3D.xml msgid "" "The degree to which this area's reverb is a uniform effect. Ranges from " "[code]0[/code] to [code]1[/code] with [code]0.1[/code] precision." msgstr "" "该区域的混响效果均匀的程度。范围从 [code]0[/code] 到 [code]1[/code],精度为 " "[code]0.1[/code]。" #: doc/classes/Area3D.xml msgid "" "The exponential rate at which wind force decreases with distance from its " "origin.\n" "[b]Note:[/b] This wind force only applies to [SoftBody3D] nodes. Other " "physics bodies are currently not affected by wind." msgstr "" "风力随距离原点的距离而减小的指数速率。\n" "[b]注意:[/b]风力仅适用于 [SoftBody3D] 节点。其他物理体目前不受风的影响。" #: doc/classes/Area3D.xml msgid "" "The magnitude of area-specific wind force.\n" "[b]Note:[/b] This wind force only applies to [SoftBody3D] nodes. Other " "physics bodies are currently not affected by wind." msgstr "" "特定区域风力的大小。\n" "[b]注意:[/b]风力仅适用于 [SoftBody3D] 节点。其他物理体目前不受风的影响。" #: doc/classes/Area3D.xml msgid "" "The [Node3D] which is used to specify the direction and origin of an area-" "specific wind force. The direction is opposite to the z-axis of the " "[Node3D]'s local transform, and its origin is the origin of the [Node3D]'s " "local transform.\n" "[b]Note:[/b] This wind force only applies to [SoftBody3D] nodes. Other " "physics bodies are currently not affected by wind." msgstr "" "指定区域风力方向和原点的 [Node3D]。方向与 [Node3D] 本地变换的 Z 轴相反,原点" "为 [Node3D] 本地变换的原点。\n" "[b]注意:[/b]这种风力只适用于 [SoftBody3D] 节点。其他物理体目前不受风力影响。" #: doc/classes/Area3D.xml msgid "" "Emitted when a [Shape3D] of the received [param area] enters a shape of this " "area. Requires [member monitoring] to be set to [code]true[/code].\n" "[param local_shape_index] and [param area_shape_index] contain indices of " "the interacting shapes from this area and the other area, respectively. " "[param area_rid] contains the [RID] of the other area. These values can be " "used with the [PhysicsServer3D].\n" "[b]Example:[/b] Get the [CollisionShape3D] node from the shape index:\n" "[codeblocks]\n" "[gdscript]\n" "var other_shape_owner = area.shape_find_owner(area_shape_index)\n" "var other_shape_node = area.shape_owner_get_owner(other_shape_owner)\n" "\n" "var local_shape_owner = shape_find_owner(local_shape_index)\n" "var local_shape_node = shape_owner_get_owner(local_shape_owner)\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "当收到的 [param area] 的 [Shape3D] 进入这个区域的形状时发出。要求 [member " "monitoring] 被设置为 [code]true[/code] 。\n" "[param local_shape_index] 和 [param area_shape_index] 分别包含来自这个区域和" "另一个区域的交互形状的索引。[param area_rid] 包含另一个区域的 [RID]。这些值可" "以与 [PhysicsServer3D] 一起使用。\n" "[b]示例:[/b]根据形状索引获取 [CollisionShape3D] 节点:\n" "[codeblocks]\n" "[gdscript]\n" "var other_shape_owner = area.shape_find_owner( area_shape_index)\n" "var other_shape_node = area.shape_owner_get_owner(other_shape_owner)\n" "\n" "var local_shape_owner = shape_find_owner(local_shape_index)\n" "var local_shape_node = shape_owner_get_owner(local_shape_owner)\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/Area3D.xml msgid "" "Emitted when a [Shape3D] of the received [param area] exits a shape of this " "area. Requires [member monitoring] to be set to [code]true[/code].\n" "See also [signal area_shape_entered]." msgstr "" "当接收的 [param area] 的 [Shape3D] 退出此区域的形状时发出。需要 [member " "monitoring] 被设置为 [code]true[/code]。\n" "另见 [signal area_shape_entered]。" #: doc/classes/Area3D.xml msgid "" "Emitted when the received [param body] enters this area. [param body] can be " "a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their " "[MeshLibrary] has collision shapes configured. Requires [member monitoring] " "to be set to [code]true[/code]." msgstr "" "当接收到的 [param body] 进入这个区域时发出。[param body] 可能是 " "[PhysicsBody3D] 也可能是 [GridMap]。[GridMap] 的 [MeshLibrary] 配置了碰撞形状" "就能够被检测到。需要将 [member monitoring] 设置为 [code]true[/code] 。" #: doc/classes/Area3D.xml msgid "" "Emitted when the received [param body] exits this area. [param body] can be " "a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their " "[MeshLibrary] has collision shapes configured. Requires [member monitoring] " "to be set to [code]true[/code]." msgstr "" "当接收到的 [param body] 离开这个区域时发出的。[param body] 可能是 " "[PhysicsBody3D] 也可能是 [GridMap]。[GridMap] 的 [MeshLibrary] 配置了碰撞形状" "就能够被检测到。要求 [member monitoring] 被设置为 [code]true[/code] 。" #: doc/classes/Area3D.xml msgid "" "Emitted when a [Shape3D] of the received [param body] enters a shape of this " "area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are " "detected if their [MeshLibrary] has collision shapes configured. Requires " "[member monitoring] to be set to [code]true[/code].\n" "[param local_shape_index] and [param body_shape_index] contain indices of " "the interacting shapes from this area and the interacting body, " "respectively. [param body_rid] contains the [RID] of the body. These values " "can be used with the [PhysicsServer3D].\n" "[b]Example:[/b] Get the [CollisionShape3D] node from the shape index:\n" "[codeblocks]\n" "[gdscript]\n" "var body_shape_owner = body.shape_find_owner(body_shape_index)\n" "var body_shape_node = body.shape_owner_get_owner(body_shape_owner)\n" "\n" "var local_shape_owner = shape_find_owner(local_shape_index)\n" "var local_shape_node = shape_owner_get_owner(local_shape_owner)\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "当接收到的物体 [param body] 中的某个 [Shape3D] 进入此区域中的某个形状时发出。" "[param body] 可以是 [PhysicsBody3D] 或 [GridMap]。[GridMap] 的 [MeshLibrary] " "配置有碰撞形状时才能够被检测到。要求将 [member monitoring] 设置为 " "[code]true[/code]。\n" "[param local_shape_index] 和 [param body_shape_index] 分别对应此区域中以及交" "互物体中正在进行交互的形状的索引。[param body_rid] 包含该物体的 [RID]。这些值" "可以在 [PhysicsServer3D] 中使用。\n" "[b]示例:[/b]根据形状索引获取 [CollisionShape3D] 节点:\n" "[codeblocks]\n" "[gdscript]\n" "var body_shape_owner = body.shape_find_owner(body_shape_index)\n" "var body_shape_node = body.shape_owner_get_owner(body_shape_owner)\n" "\n" "var local_shape_owner = shape_find_owner(local_shape_index)\n" "var local_shape_node = shape_owner_get_owner(local_shape_owner)\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/Area3D.xml msgid "" "Emitted when a [Shape3D] of the received [param body] exits a shape of this " "area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are " "detected if their [MeshLibrary] has collision shapes configured. Requires " "[member monitoring] to be set to [code]true[/code].\n" "See also [signal body_shape_entered]." msgstr "" "当接收到的物体 [param body] 中的某个 [Shape3D] 离开此区域中的某个形状时发出。" "[param body] 可以是 [PhysicsBody3D] 或 [GridMap]。[GridMap] 的 [MeshLibrary] " "配置有碰撞形状时才能够被检测到。要求将 [member monitoring] 设置为 " "[code]true[/code]。\n" "另见 [signal body_shape_entered]。" #: doc/classes/Array.xml msgid "A built-in data structure that holds a sequence of elements." msgstr "一种内置数据结构,包含一系列元素。" #: doc/classes/Array.xml msgid "" "An array data structure that can contain a sequence of elements of any " "[Variant] type by default. Values can optionally be constrained to a " "specific type by creating a [i]typed array[/i]. Elements are accessed by a " "numerical index starting at [code]0[/code]. Negative indices are used to " "count from the back ([code]-1[/code] is the last element, [code]-2[/code] is " "the second to last, etc.).\n" "[codeblocks]\n" "[gdscript]\n" "var array = [\"First\", 2, 3, \"Last\"]\n" "print(array[0]) # Prints \"First\"\n" "print(array[2]) # Prints 3\n" "print(array[-1]) # Prints \"Last\"\n" "\n" "array[1] = \"Second\"\n" "print(array[1]) # Prints \"Second\"\n" "print(array[-3]) # Prints \"Second\"\n" "\n" "# This typed array can only contain integers.\n" "# Attempting to add any other type will result in an error.\n" "var typed_array: Array[int] = [1, 2, 3]\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array array = [\"First\", 2, 3, \"Last\"];\n" "GD.Print(array[0]); // Prints \"First\"\n" "GD.Print(array[2]); // Prints 3\n" "GD.Print(array[^1]); // Prints \"Last\"\n" "\n" "array[1] = \"Second\";\n" "GD.Print(array[1]); // Prints \"Second\"\n" "GD.Print(array[^3]); // Prints \"Second\"\n" "\n" "// This typed array can only contain integers.\n" "// Attempting to add any other type will result in an error.\n" "Godot.Collections.Array typedArray = [1, 2, 3];\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] Arrays are always passed by [b]reference[/b]. To get a copy of " "an array that can be modified independently of the original array, use " "[method duplicate].\n" "[b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] " "supported and will result in unpredictable behavior.\n" "[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] " "Packed arrays are generally faster to iterate on and modify compared to a " "typed array of the same type (e.g. [PackedInt64Array] versus [code]Array[int]" "[/code]). Also, packed arrays consume less memory. As a downside, packed " "arrays are less flexible as they don't offer as many convenience methods " "such as [method Array.map]. Typed arrays are in turn faster to iterate on " "and modify than untyped arrays." msgstr "" "数组数据类型,默认可以包含任意 [Variant] 类型元素的序列。创建[i]类型化数组[/" "i]可以将其中的值限制为特定的类型。可以使用从 [code]0[/code] 开始的索引号来访" "问元素。可以使用负的索引号从结尾开始计数([code]-1[/code] 表示倒数第一个元" "素、[code]-2[/code] 表示倒数第二个元素,以此类推)。\n" "[codeblocks]\n" "[gdscript]\n" "var array = [\"第一\", 2, 3, \"最后\"]\n" "print(array[0]) # 输出“第一”\n" "print(array[2]) # 输出 3\n" "print(array[-1]) # 输出“最后”\n" "\n" "array[1] = \"第二\"\n" "print(array[1]) # 输出“第二”\n" "print(array[-3]) # 输出“第二”\n" "\n" "# 这个类型化数组中只能包含整数。\n" "# 尝试向其中添加其他类型会报错。\n" "var typed_array: Array[int] = [1, 2, 3]\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array array = [\"第一\", 2, 3, \"最后\"];\n" "GD.Print(array[0]); // 输出“开头”\n" "GD.Print(array[2]); // 输出 3\n" "GD.Print(array[^1]); // 输出“最后”\n" "\n" "array[2] = \"第二\";\n" "GD.Print(array[1]); // 输出“第二”\n" "GD.Print(array[^3]); // 输出“第二”\n" "\n" "// 这个类型化数组中只能包含整数。\n" "// 尝试向其中添加其他类型会报错。\n" "Godot.Collections.Array typedArray = [1, 2, 3];\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]数组始终按[b]引用[/b]传递。如果要获取数组的副本,让改动独立于原" "始数组,请使用 [method duplicate]。\n" "[b]注意:[/b][b]不支持[/b]在遍历数组元素时擦除元素,这样做可能造成预料之外的" "行为。\n" "[b]紧缩数组、类型数组、无类型数组:[/b]紧缩数组在遍历和修改时通常比同类型的类" "型数组要快(例如将 [PackedInt64Array] 和 [code]Array[int][/code] 相比)。紧缩" "数组占据的内存也相对较少。但紧缩数组的缺点是不够灵活,因为没有提供 [method " "Array.map] 之类的便捷方法。相应地,类型数组在遍历和修改时要比无类型数组要快。" #: doc/classes/Array.xml msgid "Constructs an empty [Array]." msgstr "构造空的 [Array]。" #: doc/classes/Array.xml msgid "" "Creates a typed array from the [param base] array. A typed array can only " "contain elements of the given type, or that inherit from the given class, as " "described by this constructor's parameters:\n" "- [param type] is the built-in [Variant] type, as one the [enum " "Variant.Type] constants.\n" "- [param class_name] is the built-in class name (see [method " "Object.get_class]).\n" "- [param script] is the associated script. It must be a [Script] instance or " "[code]null[/code].\n" "If [param type] is not [constant TYPE_OBJECT], [param class_name] must be an " "empty [StringName] and [param script] must be [code]null[/code].\n" "[codeblock]\n" "class_name Sword\n" "extends Node\n" "\n" "class Stats:\n" "\tpass\n" "\n" "func _ready():\n" "\tvar a = Array([], TYPE_INT, \"\", null) # Array[int]\n" "\tvar b = Array([], TYPE_OBJECT, \"Node\", null) # Array[Node]\n" "\tvar c = Array([], TYPE_OBJECT, \"Node\", Sword) # Array[Sword]\n" "\tvar d = Array([], TYPE_OBJECT, \"RefCounted\", Stats) # Array[Stats]\n" "[/codeblock]\n" "The [param base] array's elements are converted when necessary. If this is " "not possible or [param base] is already typed, this constructor fails and " "returns an empty [Array].\n" "In GDScript, this constructor is usually not necessary, as it is possible to " "create a typed array through static typing:\n" "[codeblock]\n" "var numbers: Array[float] = []\n" "var children: Array[Node] = [$Node, $Sprite2D, $RigidBody3D]\n" "\n" "var integers: Array[int] = [0.2, 4.5, -2.0]\n" "print(integers) # Prints [0, 4, -2]\n" "[/codeblock]" msgstr "" "根据 [param base] 数组创建类型化的数组。类型化的数组只能包含给定类型的元素," "或者从给定类继承的元素,构造函数的参数如下所述:\n" "- [param type] 是内置 [Variant] 类型,是一个 [enum Variant.Type] 常量。\n" "- [param class_name] 是内置类名(见 [method Object.get_class])。\n" "- [param script] 是关联的脚本。它必须是 [Script] 实例或 [code]null[/code]。\n" "如果 [param type] 不是 [constant TYPE_OBJECT],则 [param class_name] 必须为空" "的 [StringName],且 [param script] 必须为 [code]null[/code]。\n" "[codeblock]\n" "class_name Sword\n" "extends Node\n" "\n" "class Stats:\n" "\tpass\n" "\n" "func _ready():\n" "\tvar a = Array([], TYPE_INT, \"\", null) # Array[int]\n" "\tvar b = Array([], TYPE_OBJECT, \"Node\", null) # Array[Node]\n" "\tvar c = Array([], TYPE_OBJECT, \"Node\", Sword) # Array[Sword]\n" "\tvar d = Array([], TYPE_OBJECT, \"RefCounted\", Stats) # Array[Stats]\n" "[/codeblock]\n" "[param base] 数组的元素在必要时进行转换。如果无法转换或 [param base] 已被类型" "化,则该构造函数失败并返回一个空的 [Array]。\n" "在 GDScript 中,这个构造函数通常不是必需的,因为可以通过静态类型创建类型化的" "数组:\n" "[codeblock]\n" "var numbers: Array[float] = []\n" "var children: Array[Node] = [$Node, $Sprite2D, $RigidBody3D]\n" "\n" "var integers: Array[int] = [0.2, 4.5, -2.0]\n" "print(integers) # 输出 [0, 4, -2]\n" "[/codeblock]" #: doc/classes/Array.xml msgid "" "Returns the same array as [param from]. If you need a copy of the array, use " "[method duplicate]." msgstr "" "返回与 [param from] 相同的数组。如果你需要一个数组的副本,请使用 [method " "duplicate]。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedByteArray]." msgstr "从 [PackedByteArray] 构造一个数组。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedColorArray]." msgstr "从 [PackedColorArray] 构造一个数组。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedFloat32Array]." msgstr "从 [PackedFloat32Array] 构造一个数组。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedFloat64Array]." msgstr "从 [PackedFloat64Array] 构造一个数组。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedInt32Array]." msgstr "从 [PackedInt32Array] 构造一个数组。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedInt64Array]." msgstr "从 [PackedInt64Array] 构造一个数组。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedStringArray]." msgstr "从 [PackedStringArray] 构造一个数组。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedVector2Array]." msgstr "从 [PackedVector2Array] 构造一个数组。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedVector3Array]." msgstr "从 [PackedVector3Array] 构造一个数组。" #: doc/classes/Array.xml msgid "Constructs an array from a [PackedVector4Array]." msgstr "从 [PackedVector4Array] 构造一个数组。" #: doc/classes/Array.xml msgid "" "Calls the given [Callable] on each element in the array and returns " "[code]true[/code] if the [Callable] returns [code]true[/code] for [i]all[/i] " "elements in the array. If the [Callable] returns [code]false[/code] for one " "array element or more, this method returns [code]false[/code].\n" "The [param method] should take one [Variant] parameter (the current array " "element) and return a [bool].\n" "[codeblocks]\n" "[gdscript]\n" "func greater_than_5(number):\n" "\treturn number > 5\n" "\n" "func _ready():\n" "\tprint([6, 10, 6].all(greater_than_5)) # Prints true (3/3 elements evaluate " "to true).\n" "\tprint([4, 10, 4].all(greater_than_5)) # Prints false (1/3 elements " "evaluate to true).\n" "\tprint([4, 4, 4].all(greater_than_5)) # Prints false (0/3 elements " "evaluate to true).\n" "\tprint([].all(greater_than_5)) # Prints true (0/0 elements evaluate " "to true).\n" "\n" "\t# Same as the first line above, but using a lambda function.\n" "\tprint([6, 10, 6].all(func(element): return element > 5)) # Prints true\n" "[/gdscript]\n" "[csharp]\n" "private static bool GreaterThan5(int number)\n" "{\n" "\treturn number > 5;\n" "}\n" "\n" "public override void _Ready()\n" "{\n" "\t// Prints True (3/3 elements evaluate to true).\n" "\tGD.Print(new Godot.Collections.Array>int< { 6, 10, " "6 }.All(GreaterThan5));\n" "\t// Prints False (1/3 elements evaluate to true).\n" "\tGD.Print(new Godot.Collections.Array>int< { 4, 10, " "4 }.All(GreaterThan5));\n" "\t// Prints False (0/3 elements evaluate to true).\n" "\tGD.Print(new Godot.Collections.Array>int< { 4, 4, 4 }.All(GreaterThan5));\n" "\t// Prints True (0/0 elements evaluate to true).\n" "\tGD.Print(new Godot.Collections.Array>int< { }.All(GreaterThan5));\n" "\n" "\t// Same as the first line above, but using a lambda function.\n" "\tGD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => " "element > 5)); // Prints True\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "See also [method any], [method filter], [method map] and [method reduce].\n" "[b]Note:[/b] Unlike relying on the size of an array returned by [method " "filter], this method will return as early as possible to improve performance " "(especially with large arrays).\n" "[b]Note:[/b] For an empty array, this method [url=https://en.wikipedia.org/" "wiki/Vacuous_truth]always[/url] returns [code]true[/code]." msgstr "" "对数组中的每个元素调用给定的 [Callable],如果 [Callable] 为数组中的 [i]所有[/" "i] 元素返回 [code]true[/code],则返回 [code]true[/code]。如果 [Callable] 为一" "个或多个数组元素返回 [code]false[/code],则此方法返回 [code]false[/code]。\n" "该 [param method] 应采用一个 [Variant] 参数(当前数组元素)并返回一个 " "[bool]。\n" "[codeblocks]\n" "[gdscript]\n" "func greater_than_5(number):\n" "\treturn number > 5\n" "\n" "func _ready():\n" "\tprint([6, 10, 6].all(greater_than_5)) # 输出 true (3/3 元素被评估为" "真)。\n" "\tprint([4, 10, 4].all(greater_than_5)) # 输出 false (1/3 元素被评估为" "真)。\n" "\tprint([4, 4, 4].all(greater_than_5)) # 输出 false (0/3 元素被评估为" "真)。\n" "\tprint([].all(greater_than_5)) # 输出 true (0/0 元素被评估为" "真)。\n" "\n" "\t# 与上面的第一行相同,但使用 lambda 函数。\n" "\tprint([6, 10, 6].all(func(element): return element > 5)) # 输出 true\n" "[/gdscript]\n" "[csharp]\n" "private static bool GreaterThan5(int number)\n" "{\n" "\treturn number > 5;\n" "}\n" "\n" "public override void _Ready()\n" "{\n" "\t// 输出 True (3/3 元素被评估为真)。\n" "\tGD.Print(new Godot.Collections.Array>int< { 6, 10, " "6 }.All(GreaterThan5));\n" "\t// 输出 False (1/3 元素被评估为真)。\n" "\tGD.Print(new Godot.Collections.Array>int< { 4, 10, " "4 }.All(GreaterThan5));\n" "\t// 输出 False (0/3 元素被评估为真)。\n" "\tGD.Print(new Godot.Collections.Array>int< { 4, 4, 4 }.All(GreaterThan5));\n" "\t// 输出 True (0/0 元素被评估为真)。\n" "\tGD.Print(new Godot.Collections.Array>int< { }.All(GreaterThan5));\n" "\n" "\t// 与上面的第一行相同,但使用 lambda 函数。\n" "\tGD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => " "element > 5)); // 输出 True\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "另请参见 [method any]、[method filter]、[method map] 和 [method reduce]。\n" "[b]注意:[/b]与依赖 [method filter] 返回的数组大小不同,此方法会尽可能早地返" "回以提高性能(尤其是对于大型数组)。\n" "[b]注意:[/b]对于空数组,此方法 [url=https://en.wikipedia.org/wiki/" "Vacuous_truth]总是[/url] 返回 [code]true[/code]。" #: doc/classes/Array.xml msgid "" "Calls the given [Callable] on each element in the array and returns " "[code]true[/code] if the [Callable] returns [code]true[/code] for [i]one or " "more[/i] elements in the array. If the [Callable] returns [code]false[/code] " "for all elements in the array, this method returns [code]false[/code].\n" "The [param method] should take one [Variant] parameter (the current array " "element) and return a [bool].\n" "[codeblock]\n" "func greater_than_5(number):\n" "\treturn number > 5\n" "\n" "func _ready():\n" "\tprint([6, 10, 6].any(greater_than_5)) # Prints true (3 elements evaluate " "to true).\n" "\tprint([4, 10, 4].any(greater_than_5)) # Prints true (1 elements evaluate " "to true).\n" "\tprint([4, 4, 4].any(greater_than_5)) # Prints false (0 elements evaluate " "to true).\n" "\tprint([].any(greater_than_5)) # Prints false (0 elements evaluate " "to true).\n" "\n" "\t# Same as the first line above, but using a lambda function.\n" "\tprint([6, 10, 6].any(func(number): return number > 5)) # Prints true\n" "[/codeblock]\n" "See also [method all], [method filter], [method map] and [method reduce].\n" "[b]Note:[/b] Unlike relying on the size of an array returned by [method " "filter], this method will return as early as possible to improve performance " "(especially with large arrays).\n" "[b]Note:[/b] For an empty array, this method always returns [code]false[/" "code]." msgstr "" "对数组中的每个元素调用给定的 [Callable],如果 [Callable] 为数组中的[i] 一个或" "多个[/i]元素返回 [code]true[/code],则返回 [code]true[/code]。如果 " "[Callable] 为数组中的所有元素返回 [code]false[/code],则该方法返回 " "[code]false[/code]。\n" "该 [param method] 应接受一个 [Variant] 参数(当前数组元素)并返回一个 " "[bool]。\n" "[codeblock]\n" "func greater_than_5(number):\n" "\treturn number > 5\n" "\n" "func _ready():\n" "\tprint([6, 10, 6].any(greater_than_5)) # 输出 true (3 个元素被评估为" "真)。\n" "\tprint([4, 10, 4].any(greater_than_5)) #输出 true (1 个元素被评估为真)。\n" "\tprint([4, 4, 4].any(greater_than_5)) # 输出 false (0 个元素被评估为" "真)。\n" "\tprint([].any(greater_than_5)) # 输出 false (0 个元素被评估为" "真)。\n" "\n" "\t# 与上面的第一行相同,但使用 lambda 函数。\n" "\tprint([6, 10, 6].any(func(number): return number > 5)) # 输出 true\n" "[/codeblock]\n" "另见 [method all]、[method filter]、[method map] 和 [method reduce]。\n" "[b]注意:[/b]与依赖 [method filter] 返回的数组大小不同,此方法会尽可能早地返" "回以提高性能(尤其是对于大型数组)。\n" "[b]注意:[/b]对于一个空数组,这个方法总是返回 [code]false[/code]。" #: doc/classes/Array.xml msgid "" "Appends [param value] at the end of the array (alias of [method push_back])." msgstr "将 [param value] 追加到数组末尾([method push_back] 的别名)。" #: doc/classes/Array.xml msgid "" "Appends another [param array] at the end of this array.\n" "[codeblock]\n" "var numbers = [1, 2, 3]\n" "var extra = [4, 5, 6]\n" "numbers.append_array(extra)\n" "print(numbers) # Prints [1, 2, 3, 4, 5, 6]\n" "[/codeblock]" msgstr "" "在该数组的末尾追加其他 [param array]。\n" "[codeblock]\n" "var numbers = [1, 2, 3]\n" "var extra = [4, 5, 6]\n" "numbers.append_array(extra)\n" "print(numbers) # 输出 [1, 2, 3, 4, 5, 6]\n" "[/codeblock]" #: doc/classes/Array.xml msgid "" "Assigns elements of another [param array] into the array. Resizes the array " "to match [param array]. Performs type conversions if the array is typed." msgstr "" "将另一个 [param array] 的元素赋值到该数组中。调整数组大小以匹配 [param " "array]。如果数组是有类型的,则执行类型转换。" #: doc/classes/Array.xml msgid "" "Returns the last element of the array. If the array is empty, fails and " "returns [code]null[/code]. See also [method front].\n" "[b]Note:[/b] Unlike with the [code][][/code] operator ([code]array[-1][/" "code]), an error is generated without stopping project execution." msgstr "" "返回数组的最后一个元素。如果数组为空,则失败并返回 [code]null[/code]。另见 " "[method front]。\n" "[b]注意:[/b]与 [code][][/code] 运算符([code]array[-1][/code])不同,错误生" "成时不会停止项目执行。" #: doc/classes/Array.xml msgid "" "Returns the index of [param value] in the sorted array. If it cannot be " "found, returns where [param value] should be inserted to keep the array " "sorted. The algorithm used is [url=https://en.wikipedia.org/wiki/" "Binary_search_algorithm]binary search[/url].\n" "If [param before] is [code]true[/code] (as by default), the returned index " "comes before all existing elements equal to [param value] in the array.\n" "[codeblock]\n" "var numbers = [2, 4, 8, 10]\n" "var idx = numbers.bsearch(7)\n" "\n" "numbers.insert(idx, 7)\n" "print(numbers) # Prints [2, 4, 7, 8, 10]\n" "\n" "var fruits = [\"Apple\", \"Lemon\", \"Lemon\", \"Orange\"]\n" "print(fruits.bsearch(\"Lemon\", true)) # Prints 1, points at the first " "\"Lemon\".\n" "print(fruits.bsearch(\"Lemon\", false)) # Prints 3, points at \"Orange\".\n" "[/codeblock]\n" "[b]Note:[/b] Calling [method bsearch] on an [i]unsorted[/i] array will " "result in unexpected behavior. Use [method sort] before calling this method." msgstr "" "返回已排序数组中 [param value] 的索引。如果找不到,则返回应被插入 [param " "value] 的位置以保持数组被排序。使用的算法是[url=https://zh.wikipedia.org/" "wiki/%E4%BA%8C%E5%88%86%E6%90%9C%E5%B0%8B%E6%BC%94%E7%AE%97%E6%B3%95]二分查找" "算法[/url]。\n" "如果 [param before] 为 [code]true[/code](默认情况下),则返回的索引位于数组" "中所有等于 [param value] 的已有元素之前。\n" "[codeblock]\n" "var numbers = [2, 4, 8, 10]\n" "var idx = numbers.bsearch(7)\n" "\n" "numbers.insert(idx, 7)\n" "print(numbers) # 输出 [2, 4, 7, 8, 10]\n" "\n" "var fruits = [\"Apple\", \"Lemon\", \"Lemon\", \"Orange\"]\n" "print(fruits.bsearch(\"Lemon\", true)) # 输出 1,位于第一个 \"Lemon\"。\n" "print(fruits.bsearch(\"Lemon\", false)) # 输出 3,位于 \"Orange\"。\n" "[/codeblock]\n" "[b]注意:[/b]对[i]未排序的[/i]数组调用 [method bsearch] 将导致意外行为。调用" "该方法之前,请使用 [method sort]。" #: doc/classes/Array.xml msgid "" "Returns the index of [param value] in the sorted array. If it cannot be " "found, returns where [param value] should be inserted to keep the array " "sorted (using [param func] for the comparisons). The algorithm used is " "[url=https://en.wikipedia.org/wiki/Binary_search_algorithm]binary search[/" "url].\n" "Similar to [method sort_custom], [param func] is called as many times as " "necessary, receiving one array element and [param value] as arguments. The " "function should return [code]true[/code] if the array element should be " "[i]behind[/i] [param value], otherwise it should return [code]false[/code].\n" "If [param before] is [code]true[/code] (as by default), the returned index " "comes before all existing elements equal to [param value] in the array.\n" "[codeblock]\n" "func sort_by_amount(a, b):\n" "\tif a[1] < b[1]:\n" "\t\treturn true\n" "\treturn false\n" "\n" "func _ready():\n" "\tvar my_items = [[\"Tomato\", 2], [\"Kiwi\", 5], [\"Rice\", 9]]\n" "\n" "\tvar apple = [\"Apple\", 5]\n" "\t# \"Apple\" is inserted before \"Kiwi\".\n" "\tmy_items.insert(my_items.bsearch_custom(apple, sort_by_amount, true), " "apple)\n" "\n" "\tvar banana = [\"Banana\", 5]\n" "\t# \"Banana\" is inserted after \"Kiwi\".\n" "\tmy_items.insert(my_items.bsearch_custom(banana, sort_by_amount, false), " "banana)\n" "\n" "\t# Prints [[\"Tomato\", 2], [\"Apple\", 5], [\"Kiwi\", 5], [\"Banana\", 5], " "[\"Rice\", 9]]\n" "\tprint(my_items)\n" "[/codeblock]\n" "[b]Note:[/b] Calling [method bsearch_custom] on an [i]unsorted[/i] array " "will result in unexpected behavior. Use [method sort_custom] with [param " "func] before calling this method." msgstr "" "返回已排序数组中 [param value] 的索引。如果找不到,则返回 [param value] 应插" "入的位置,以保持数组已排序(使用 [param func] 进行比较)。使用的算法是" "[url=https://zh.wikipedia.org/wiki/" "%E4%BA%8C%E5%88%86%E6%90%9C%E5%B0%8B%E6%BC%94%E7%AE%97%E6%B3%95]二分查找算法" "[/url]。\n" "与 [method sort_custom] 类似,[param func] 会根据需要多次调用,接收一个数组元" "素和 [param value] 作为参数。如果数组元素应该在 [param value] [i]后面[/i],则" "函数应该返回 [code]true[/code],否则应该返回 [code]false[/code]。\n" "如果 [param before] 为 [code]true[/code](默认情况下),则返回的索引位于数组" "中所有等于 [param value] 的已有元素之前。\n" "[codeblock]\n" "func sort_by_amount(a, b):\n" "\tif a[1] < b[1]:\n" "\t\treturn true\n" "\treturn false\n" "\n" "func _ready():\n" "\tvar my_items = [[\"Tomato\", 2], [\"Kiwi\", 5], [\"Rice\", 9]]\n" "\n" "\tvar apple = [\"Apple\", 5]\n" "\t# \"Apple\" 被插入在 \"Kiwi\" 之前。\n" "\tmy_items.insert(my_items.bsearch_custom(apple, sort_by_amount, true), " "apple)\n" "\n" "\tvar banana = [\"Banana\", 5]\n" "\t# \"Banana\" 被插入在 \"Kiwi\" 之后。\n" "\tmy_items.insert(my_items.bsearch_custom(banana, sort_by_amount, false), " "banana)\n" "\n" "\t# 输出 [[\"Tomato\", 2], [\"Apple\", 5], [\"Kiwi\", 5], [\"Banana\", 5], " "[\"Rice\", 9]]\n" "\tprint(my_items)\n" "[/codeblock]\n" "[b]注意:[/b]在[i]未排序的[/i]数组上调用 [method bsearch_custom] 将导致意外行" "为。在调用该方法之前,请将 [method sort_custom] 与 [param func] 结合使用。" #: doc/classes/Array.xml msgid "" "Removes all elements from the array. This is equivalent to using [method " "resize] with a size of [code]0[/code]." msgstr "" "从该数组中移除所有元素。相当于调用 [method resize] 时指定大小为 [code]0[/" "code]。" #: doc/classes/Array.xml msgid "" "Returns the number of times an element is in the array.\n" "To count how many elements in an array satisfy a condition, see [method " "reduce]." msgstr "" "返回数组中某个元素出现的次数。\n" "要计算某个数组中有多少元素满足某个条件,参见[method reduce]。" #: doc/classes/Array.xml msgid "" "Returns a new copy of the array.\n" "By default, a [b]shallow[/b] copy is returned: all nested [Array], " "[Dictionary], and [Resource] elements are shared with the original array. " "Modifying any of those in one array will also affect them in the other.\n" "If [param deep] is [code]true[/code], a [b]deep[/b] copy is returned: all " "nested arrays and dictionaries are also duplicated (recursively). Any " "[Resource] is still shared with the original array, though." msgstr "" "返回数组的新副本。\n" "默认情况下返回的是[b]浅拷贝[/b]:嵌套的 [Array]、[Dictionary] 和 [Resource] " "元素与原数组共享。对这些元素的修改会影响另一个数组。\n" "如果 [param deep] 为 [code]true[/code] 则会返回[b]深拷贝[/b]:嵌套的数组和字" "典也会进行(递归的)复制。不过 [Resource] 仍然是和原数组共享的。" #: doc/classes/Array.xml #, fuzzy msgid "" "Duplicates this array, deeply, like [method duplicate] when passing " "[code]true[/code], with extra control over how subresources are handled.\n" "[param deep_subresources_mode] must be one of the values from [enum " "Resource.DeepDuplicateMode]. By default, only internal resources will be " "duplicated (recursively)." msgstr "" "深度复制该数组,类似 [method duplicate][code](true)[/code],但能够额外控制子" "资源的处理方式。\n" "[param deep_subresources_mode] 必须是 [enum Resource.DeepDuplicateMode] 中的" "一个值。默认只会(递归)复制内部资源。" #: doc/classes/Array.xml msgid "" "Finds and removes the first occurrence of [param value] from the array. If " "[param value] does not exist in the array, nothing happens. To remove an " "element by index, use [method remove_at] instead.\n" "[b]Note:[/b] This method shifts every element's index after the removed " "[param value] back, which may have a noticeable performance cost, especially " "on larger arrays.\n" "[b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] " "supported and will result in unpredictable behavior." msgstr "" "查找并从数组中移除 [param value] 的第一个匹配值。如果数组中不存在 [param " "value],则什么也不会发生。要通过索引移除元素,请改用 [method remove_at]。\n" "[b]注意:[/b]该方法将移除的 [param value] 后每个元素的索引移回一位,这可能会" "产生明显的性能成本,尤其是在较大的数组上。\n" "[b]注意:[/b]在迭代数组时移除元素[b]不[/b]受支持,并且将导致不可预测的行为。" #: doc/classes/Array.xml msgid "" "Assigns the given [param value] to all elements in the array.\n" "This method can often be combined with [method resize] to create an array " "with a given size and initialized elements:\n" "[codeblocks]\n" "[gdscript]\n" "var array = []\n" "array.resize(5)\n" "array.fill(2)\n" "print(array) # Prints [2, 2, 2, 2, 2]\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array array = [];\n" "array.Resize(5);\n" "array.Fill(2);\n" "GD.Print(array); // Prints [2, 2, 2, 2, 2]\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] If [param value] is a [Variant] passed by reference ([Object]-" "derived, [Array], [Dictionary], etc.), the array will be filled with " "references to the same [param value], which are not duplicates." msgstr "" "将该数组中的所有元素都设置为给定的 [param value]。\n" "该方法通常与 [method resize] 一起使用,用于创建给定大小的数组并对其元素进行初" "始化:\n" "[codeblocks]\n" "[gdscript]\n" "var array = []\n" "array.resize(5)\n" "array.fill(2)\n" "print(array) # 输出 [2, 2, 2, 2, 2]\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array array = [];\n" "array.Resize(5);\n" "array.Fill(2);\n" "GD.Print(array); // 输出 [2, 2, 2, 2, 2]\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]如果 [param value] 是通过引用传递的 [Variant]([Object] 派生类、" "[Array]、[Dictionary] 等),则会用同一个 [param value] 的引用填充该数组,即不" "会创建副本。" #: doc/classes/Array.xml msgid "" "Calls the given [Callable] on each element in the array and returns a new, " "filtered [Array].\n" "The [param method] receives one of the array elements as an argument, and " "should return [code]true[/code] to add the element to the filtered array, or " "[code]false[/code] to exclude it.\n" "[codeblock]\n" "func is_even(number):\n" "\treturn number % 2 == 0\n" "\n" "func _ready():\n" "\tprint([1, 4, 5, 8].filter(is_even)) # Prints [4, 8]\n" "\n" "\t# Same as above, but using a lambda function.\n" "\tprint([1, 4, 5, 8].filter(func(number): return number % 2 == 0))\n" "[/codeblock]\n" "See also [method any], [method all], [method map] and [method reduce]." msgstr "" "在数组中的每个元素上调用给定的 [Callable],并返回一个新的、经过过滤的 " "[Array]。\n" "该 [param method] 接收一个数组元素作为参数,并且应返回 [code]true[/code] 以将" "该元素添加到过滤后的数组中,或返回 [code]false[/code] 以将其排除。\n" "[codeblock]\n" "func is_even(number):\n" "\treturn number % 2 == 0\n" "\n" "func _ready():\n" "\tprint([1, 4, 5, 8].filter(is_even)) # 输出 [4, 8]\n" "\n" "\t# 与上面相同,但使用 lambda 函数。\n" "\tprint([1, 4, 5, 8].filter(func(number): return number % 2 == 0))\n" "[/codeblock]\n" "另请参见 [method any]、[method all]、[method map] 和 [method reduce]。" #: doc/classes/Array.xml msgid "" "Returns the index of the [b]first[/b] occurrence of [param what] in this " "array, or [code]-1[/code] if there are none. The search's start can be " "specified with [param from], continuing to the end of the array.\n" "[b]Note:[/b] If you just want to know whether the array contains [param " "what], use [method has] ([code]Contains[/code] in C#). In GDScript, you may " "also use the [code]in[/code] operator.\n" "[b]Note:[/b] For performance reasons, the search is affected by [param " "what]'s [enum Variant.Type]. For example, [code]7[/code] ([int]) and " "[code]7.0[/code] ([float]) are not considered equal for this method." msgstr "" "返回 [param what] 在该数组中[b]第一次[/b]出现时的索引,不存在时返回 " "[code]-1[/code]。搜索的起点可以使用 [param from] 指定,终点为数组末尾。\n" "[b]注意:[/b]如果你只想知道数组中是否包含 [param what],请使用 [method has]" "(C# 则为 [code]Contains[/code])。在 GDScript 中,你还可以使用 [code]in[/" "code] 运算符。\n" "[b]注意:[/b]出于性能方面的考虑,搜索时会使用到 [param what] 的 [enum " "Variant.Type]。例如该方法不会认为 [code]7[/code]([int])和 [code]7.0[/code]" "([float])相等。" #: doc/classes/Array.xml msgid "" "Returns the index of the [b]first[/b] element in the array that causes " "[param method] to return [code]true[/code], or [code]-1[/code] if there are " "none. The search's start can be specified with [param from], continuing to " "the end of the array.\n" "[param method] is a callable that takes an element of the array, and returns " "a [bool].\n" "[b]Note:[/b] If you just want to know whether the array contains " "[i]anything[/i] that satisfies [param method], use [method any].\n" "[codeblocks]\n" "[gdscript]\n" "func is_even(number):\n" "\treturn number % 2 == 0\n" "\n" "func _ready():\n" "\tprint([1, 3, 4, 7].find_custom(is_even.bind())) # Prints 2\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "返回数组中使得 [param method] 返回 [code]true[/code] 的[b]第一个[/b]元素的索" "引,若元素不存在则返回 [code]-1[/code]。搜索的起始位置可以由 [param from] 指" "定,搜索将继续直至数组结束。\n" "[param method] 是可调用对象,接受数组元素,返回的是 [bool]。\n" "[b]注意:[/b]如果你只想知道数组中是否包含[i]任何[/i]能够满足 [param method] " "的东西,请使用 [method any]。\n" "[codeblocks]\n" "[gdscript]\n" "func is_even(number):\n" "\treturn number % 2 == 0\n" "\n" "func _ready():\n" "\tprint([1, 3, 4, 7].find_custom(is_even.bind())) # 输出 2\n" "[/gdscript]\n" "[/codeblocks]" #: doc/classes/Array.xml msgid "" "Returns the first element of the array. If the array is empty, fails and " "returns [code]null[/code]. See also [method back].\n" "[b]Note:[/b] Unlike with the [code][][/code] operator ([code]array[0][/" "code]), an error is generated without stopping project execution." msgstr "" "返回数组的第一个元素。如果数组为空,则失败并返回 [code]null[/code]。另见 " "[method back]。\n" "[b]注意:[/b]与 [code][][/code] 运算符([code]array[0][/code])不同,错误产生" "时不会停止项目执行。" #: doc/classes/Array.xml #, fuzzy msgid "" "Returns the element at the given [param index] in the array. If [param " "index] is out-of-bounds or negative, this method fails and returns " "[code]null[/code].\n" "This method is similar (but not identical) to the [code][][/code] operator. " "Most notably, when this method fails, it doesn't pause project execution if " "run from the editor." msgstr "" "返回数组中索引为 [param index] 的元素。如果 [param index] 越界或为负数,则该" "方法失败并返回 [code]null[/code]。\n" "该方法类似于 [code][][/code] 运算符(但不等价)。最显著的区别就是从编辑器中运" "行时,该方法失败不会暂停项目运行。" #: doc/classes/Array.xml msgid "" "Returns the built-in [Variant] type of the typed array as a [enum " "Variant.Type] constant. If the array is not typed, returns [constant " "TYPE_NIL]. See also [method is_typed]." msgstr "" "将类型化数组的内置 [Variant] 类型作为 [enum Variant.Type] 常量返回。如果该数" "组不是类型化的,则返回 [constant TYPE_NIL]。另见 [method is_typed]。" #: doc/classes/Array.xml msgid "" "Returns the [b]built-in[/b] class name of the typed array, if the built-in " "[Variant] type [constant TYPE_OBJECT]. Otherwise, returns an empty " "[StringName]. See also [method is_typed] and [method Object.get_class]." msgstr "" "如果内置 [Variant] 类型为 [constant TYPE_OBJECT],则返回类型数组的[b]内置[/b]" "类名。否则,返回一个空的 [StringName]。另见 [method is_typed] 和 [method " "Object.get_class]。" #: doc/classes/Array.xml msgid "" "Returns the [Script] instance associated with this typed array, or " "[code]null[/code] if it does not exist. See also [method is_typed]." msgstr "" "返回与该类型数组关联的 [Script] 实例,如果不存在则返回 [code]null[/code]。另" "见 [method is_typed]。" #: doc/classes/Array.xml msgid "" "Returns [code]true[/code] if the array contains the given [param value].\n" "[codeblocks]\n" "[gdscript]\n" "print([\"inside\", 7].has(\"inside\")) # Prints true\n" "print([\"inside\", 7].has(\"outside\")) # Prints false\n" "print([\"inside\", 7].has(7)) # Prints true\n" "print([\"inside\", 7].has(\"7\")) # Prints false\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array arr = [\"inside\", 7];\n" "// By C# convention, this method is renamed to `Contains`.\n" "GD.Print(arr.Contains(\"inside\")); // Prints True\n" "GD.Print(arr.Contains(\"outside\")); // Prints False\n" "GD.Print(arr.Contains(7)); // Prints True\n" "GD.Print(arr.Contains(\"7\")); // Prints False\n" "[/csharp]\n" "[/codeblocks]\n" "In GDScript, this is equivalent to the [code]in[/code] operator:\n" "[codeblock]\n" "if 4 in [2, 4, 6, 8]:\n" "\tprint(\"4 is here!\") # Will be printed.\n" "[/codeblock]\n" "[b]Note:[/b] For performance reasons, the search is affected by the [param " "value]'s [enum Variant.Type]. For example, [code]7[/code] ([int]) and " "[code]7.0[/code] ([float]) are not considered equal for this method." msgstr "" "如果该数组包含给定的 [param value],则返回 [code]true[/code]。\n" "[codeblocks]\n" "[gdscript]\n" "print([\"inside\", 7].has(\"inside\")) # 输出 true\n" "print([\"inside\", 7].has(\"outside\")) # 输出 false\n" "print([\"inside\", 7].has(7)) # 输出 true\n" "print([\"inside\", 7].has(\"7\")) # 输出 false\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array arr = [\"inside\", 7];\n" "// 按照 C# 惯例,该方法重命名为 `Contains`。\n" "GD.Print(arr.Contains(\"inside\")); // 输出 True\n" "GD.Print(arr.Contains(\"outside\")); // 输出 False\n" "GD.Print(arr.Contains(7)); // 输出 True\n" "GD.Print(arr.Contains(\"7\")); // 输出 False\n" "[/csharp]\n" "[/codeblocks]\n" "在 GDScript 中,这相当于 [code]in[/code] 运算符:\n" "[codeblock]\n" "if 4 in [2, 4, 6, 8]:\n" "\tprint(\"里面有 4!\") # 将被输出。\n" "[/codeblock]\n" "[b]注意:[/b]出于性能原因,搜索会受到 [param value] 的 [enum Variant.Type] 的" "影响。例如,对于该方法,[code]7[/code]([int])和 [code]7.0[/code]([float])" "不被视为相等。" #: doc/classes/Array.xml #, fuzzy msgid "" "Returns a hashed 32-bit integer value representing the array and its " "contents.\n" "[b]Note:[/b] Arrays with equal hash values are [i]not[/i] guaranteed to be " "the same, as a result of hash collisions. On the contrary, arrays with " "different hash values are guaranteed to be different." msgstr "" "返回代表该数组及其内容的散列 32 位整数值。\n" "[b]注意:[/b]由于哈希碰撞的缘故,哈希相同的数组[i]不[/i]保证相同。而相对的" "是,哈希不同的数组保证不同。" #: doc/classes/Array.xml msgid "" "Inserts a new element ([param value]) at a given index ([param position]) in " "the array. [param position] should be between [code]0[/code] and the array's " "[method size]. If negative, [param position] is considered relative to the " "end of the array.\n" "Returns [constant OK] on success, or one of the other [enum Error] constants " "if this method fails.\n" "[b]Note:[/b] Every element's index after [param position] needs to be " "shifted forward, which may have a noticeable performance cost, especially on " "larger arrays." msgstr "" "在数组中给定索引([param position])处插入新元素([param value])。[param " "position] 应介于 [code]0[/code] 和数组的 [method size] 之间。如果为负数,则认" "为 [param position] 为相对于数组结尾的索引。\n" "如果成功,则返回 [constant OK];如果该方法失败,则返回其他 [enum Error] 常量" "之一。\n" "[b]注意:[/b][param position] 之后的每个元素的索引都需要向前移动,这可能会产" "生明显的性能成本,尤其是在较大的数组上。" #: doc/classes/Array.xml msgid "" "Returns [code]true[/code] if the array is empty ([code][][/code]). See also " "[method size]." msgstr "" "如果数组为空([code][][/code]),则返回 [code]true[/code]。另见 [method " "size]。" #: doc/classes/Array.xml msgid "" "Returns [code]true[/code] if the array is read-only. See [method " "make_read_only].\n" "In GDScript, arrays are automatically read-only if declared with the " "[code]const[/code] keyword." msgstr "" "如果该数组是只读的,则返回 [code]true[/code]。请参阅 [method " "make_read_only]。\n" "在 GDScript 中,如果数组是使用 [code]const[/code] 关键字声明的,则该数组自动" "为只读。" #: doc/classes/Array.xml msgid "" "Returns [code]true[/code] if this array is typed the same as the given " "[param array]. See also [method is_typed]." msgstr "" "如果该数组的类型与给定的 [param array] 相同,则返回 [code]true[/code]。另见 " "[method is_typed]。" #: doc/classes/Array.xml msgid "" "Returns [code]true[/code] if the array is typed. Typed arrays can only " "contain elements of a specific type, as defined by the typed array " "constructor. The methods of a typed array are still expected to return a " "generic [Variant].\n" "In GDScript, it is possible to define a typed array with static typing:\n" "[codeblock]\n" "var numbers: Array[float] = [0.2, 4.2, -2.0]\n" "print(numbers.is_typed()) # Prints true\n" "[/codeblock]" msgstr "" "如果数组是类型化的,则返回 [code]true[/code]。类型化数组只能包含由类型化数组" "构造函数定义的特定类型的元素。类型化数组的方法仍应返回通用 [Variant]。\n" "在 GDScript 中,可以使用静态类型定义类型化数组:\n" "[codeblock]\n" "var numbers: Array[float] = [0.2, 4.2, -2.0]\n" "print(numbers.is_typed()) # 输出 true\n" "[/codeblock]" #: doc/classes/Array.xml msgid "" "Makes the array read-only. The array's elements cannot be overridden with " "different values, and their order cannot change. Does not apply to nested " "elements, such as dictionaries.\n" "In GDScript, arrays are automatically read-only if declared with the " "[code]const[/code] keyword." msgstr "" "使数组只读。数组的元素无法使用其他值覆盖,顺序也无法改变。不适用于字典等嵌套" "的元素。\n" "在 GDScript 中,使用 [code]const[/code] 关键字声明的数组会自动变为只读。" #: doc/classes/Array.xml msgid "" "Calls the given [Callable] for each element in the array and returns a new " "array filled with values returned by the [param method].\n" "The [param method] should take one [Variant] parameter (the current array " "element) and can return any [Variant].\n" "[codeblock]\n" "func double(number):\n" "\treturn number * 2\n" "\n" "func _ready():\n" "\tprint([1, 2, 3].map(double)) # Prints [2, 4, 6]\n" "\n" "\t# Same as above, but using a lambda function.\n" "\tprint([1, 2, 3].map(func(element): return element * 2))\n" "[/codeblock]\n" "See also [method filter], [method reduce], [method any] and [method all]." msgstr "" "为数组中的每个元素调用给定的 [Callable] 并返回一个新数组,其中填充了该 " "[param method] 返回的值。\n" "[param method] 应该采用一个 [Variant] 参数(当前数组元素)并且可以返回任意 " "[Variant]。\n" "[codeblock]\n" "func double(number):\n" "\treturn number * 2\n" "\n" "func _ready():\n" "\tprint([1, 2, 3].map(double)) # 输出 [2, 4, 6]\n" "\n" "\t# 与上面相同,但使用 lambda 函数。\n" "\tprint([1, 2, 3].map(func(element): return element * 2))\n" "[/codeblock]\n" "另请参见 [method filter]、[method reduce]、[method any] 和 [method all]。" #: doc/classes/Array.xml msgid "" "Returns the maximum value contained in the array, if all elements can be " "compared. Otherwise, returns [code]null[/code]. See also [method min].\n" "To find the maximum value using a custom comparator, you can use [method " "reduce]." msgstr "" "如果所有元素都可以比较,则返回数组中包含元素的最大值。否则,返回 [code]null[/" "code]。另见 [method min]。\n" "要使用自定义比较器查找最大值,可以使用 [method reduce]。" #: doc/classes/Array.xml msgid "" "Returns the minimum value contained in the array, if all elements can be " "compared. Otherwise, returns [code]null[/code]. See also [method max]." msgstr "" "如果所有元素都可以比较,则返回数组中包含元素的最小值。否则,返回 [code]null[/" "code]。另见 [method max]。" #: doc/classes/Array.xml msgid "" "Returns a random element from the array. Generates an error and returns " "[code]null[/code] if the array is empty.\n" "[codeblocks]\n" "[gdscript]\n" "# May print 1, 2, 3.25, or \"Hi\".\n" "print([1, 2, 3.25, \"Hi\"].pick_random())\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array array = [1, 2, 3.25f, \"Hi\"];\n" "GD.Print(array.PickRandom()); // May print 1, 2, 3.25, or \"Hi\".\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] Like many similar functions in the engine (such as [method " "@GlobalScope.randi] or [method shuffle]), this method uses a common, global " "random seed. To get a predictable outcome from this method, see [method " "@GlobalScope.seed]." msgstr "" "从该数组中返回一个随机元素。如果数组为空,则生成一个错误并返回 [code]null[/" "code]。\n" "[codeblocks]\n" "[gdscript]\n" "# 可能输出 1、2、3.25、或 \"Hi\"。\n" "print([1, 2, 3.25, \"Hi\"].pick_random())\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array array = [1, 2, 3.25f, \"Hi\"];\n" "GD.Print(array.PickRandom()); // 可能输出 1、2、3.25、或 \"Hi\"。\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]与引擎中的许多类似函数(例如 [method @GlobalScope.randi] 或 " "[method shuffle])一样,该方法使用通用的全局随机种子。要从该方法获得可预测的" "结果,请参阅 [method @GlobalScope.seed]。" #: doc/classes/Array.xml msgid "" "Removes and returns the element of the array at index [param position]. If " "negative, [param position] is considered relative to the end of the array. " "Returns [code]null[/code] if the array is empty. If [param position] is out " "of bounds, an error message is also generated.\n" "[b]Note:[/b] This method shifts every element's index after [param position] " "back, which may have a noticeable performance cost, especially on larger " "arrays." msgstr "" "移除并返回数组中位于 [param position] 索引处的元素。如果 [param position] 为" "负数,则认为是相对于该数组末尾的值。如果数组为空,则返回 [code]null[/code];" "如果 [param position] 超出范围,还会生成错误消息。\n" "[b]注意:[/b]该方法将 [param position] 之后每个元素的索引向前移动,这可能会产" "生明显的性能成本,尤其是在较大的数组上。" #: doc/classes/Array.xml msgid "" "Removes and returns the last element of the array. Returns [code]null[/code] " "if the array is empty, without generating an error. See also [method " "pop_front]." msgstr "" "移除并返回数组中的末尾元素。如果数组为空,则返回 [code]null[/code],而不会生" "成错误。另见 [method pop_front]。" #: doc/classes/Array.xml msgid "" "Removes and returns the first element of the array. Returns [code]null[/" "code] if the array is empty, without generating an error. See also [method " "pop_back].\n" "[b]Note:[/b] This method shifts every other element's index back, which may " "have a noticeable performance cost, especially on larger arrays." msgstr "" "移除并返回数组的第一个元素。如果数组为空,则返回 [code]null[/code],而不会生" "成错误。另见 [method pop_back]。\n" "[b]注意:[/b]该方法将每个其他元素的索引向后移动,这可能会产生明显的性能成本," "尤其是在较大的数组上。" #: doc/classes/Array.xml msgid "" "Appends an element at the end of the array. See also [method push_front]." msgstr "在数组的末端追加一个元素。另见 [method push_front]。" #: doc/classes/Array.xml msgid "" "Adds an element at the beginning of the array. See also [method push_back].\n" "[b]Note:[/b] This method shifts every other element's index forward, which " "may have a noticeable performance cost, especially on larger arrays." msgstr "" "在数组的开头添加一个元素。另见 [method push_back]。\n" "[b]注意:[/b]该方法将每个其他元素的索引向前移动,这可能会产生明显的性能成本," "尤其是在较大的数组上。" #: doc/classes/Array.xml msgid "" "Calls the given [Callable] for each element in array, accumulates the result " "in [param accum], then returns it.\n" "The [param method] takes two arguments: the current value of [param accum] " "and the current array element. If [param accum] is [code]null[/code] (as by " "default), the iteration will start from the second element, with the first " "one used as initial value of [param accum].\n" "[codeblock]\n" "func sum(accum, number):\n" "\treturn accum + number\n" "\n" "func _ready():\n" "\tprint([1, 2, 3].reduce(sum, 0)) # Prints 6\n" "\tprint([1, 2, 3].reduce(sum, 10)) # Prints 16\n" "\n" "\t# Same as above, but using a lambda function.\n" "\tprint([1, 2, 3].reduce(func(accum, number): return accum + number, 10))\n" "[/codeblock]\n" "If [method max] is not desirable, this method may also be used to implement " "a custom comparator:\n" "[codeblock]\n" "func _ready():\n" "\tvar arr = [Vector2i(5, 0), Vector2i(3, 4), Vector2i(1, 2)]\n" "\n" "\tvar longest_vec = arr.reduce(func(max, vec): return vec if " "is_length_greater(vec, max) else max)\n" "\tprint(longest_vec) # Prints (3, 4)\n" "\n" "func is_length_greater(a, b):\n" "\treturn a.length() > b.length()\n" "[/codeblock]\n" "This method can also be used to count how many elements in an array satisfy " "a certain condition, similar to [method count]:\n" "[codeblock]\n" "func is_even(number):\n" "\treturn number % 2 == 0\n" "\n" "func _ready():\n" "\tvar arr = [1, 2, 3, 4, 5]\n" "\t# If the current element is even, increment count, otherwise leave count " "the same.\n" "\tvar even_count = arr.reduce(func(count, next): return count + 1 if " "is_even(next) else count, 0)\n" "\tprint(even_count) # Prints 2\n" "[/codeblock]\n" "See also [method map], [method filter], [method any], and [method all]." msgstr "" "为数组中的每个元素调用给定的 [Callable],将结果累积在 [param accum] 中,然后" "将其返回。\n" "[param method] 接受两个参数:[param accum] 的当前值,以及当前的数组元素。如" "果 [param accum] 为 [code]null[/code](默认值),则会从第二个元素开始迭代,将" "第一个元素作为 [param accum] 的初始值。\n" "[codeblock]\n" "func sum(accum, number):\n" "\treturn accum + number\n" "\n" "func _ready():\n" "\tprint([1, 2, 3].reduce(sum, 0)) # 输出 6\n" "\tprint([1, 2, 3].reduce(sum, 10)) # 输出 16\n" "\n" "\t# 与上面相同,但是使用 lambda 函数。\n" "\tprint([1, 2, 3].reduce(func(accum, number): return accum + number, 10))\n" "[/codeblock]\n" "如果 [method max] 无法满足需求,也可以使用该方法来实现自定义比较器:\n" "[codeblock]\n" "func _ready():\n" "\tvar arr = [Vector2i(5, 0), Vector2i(3, 4), Vector2i(1, 2)]\n" "\n" "\tvar longest_vec = arr.reduce(func(max, vec): return vec if " "is_length_greater(vec, max) else max)\n" "\tprint(longest_vec) # 输出 (3, 4)\n" "\n" "func is_length_greater(a, b):\n" "\treturn a.length() > b.length()\n" "[/codeblock]\n" "该方法还可以用来计算数组中满足特定条件元素的数量,与 [method count] 类似:\n" "[codeblock]\n" "func is_even(number):\n" "\treturn number % 2 == 0\n" "\n" "func _ready():\n" "\tvar arr = [1, 2, 3, 4, 5]\n" "\t# 当前元素为偶数则增加计数器,否则保持计数不变。\n" "\tvar even_count = arr.reduce(func(count, next): return count + 1 if " "is_even(next) else count, 0)\n" "\tprint(even_count) # 输出 2\n" "[/codeblock]\n" "另见 [method map]、[method filter]、[method any]、[method all]。" #: doc/classes/Array.xml #, fuzzy msgid "" "Removes the element from the array at the given index ([param position]). If " "the index is out of bounds, this method fails. If the index is negative, " "[param position] is considered relative to the end of the array.\n" "If you need to return the removed element, use [method pop_at]. To remove an " "element by value, use [method erase] instead.\n" "[b]Note:[/b] This method shifts every element's index after [param position] " "back, which may have a noticeable performance cost, especially on larger " "arrays." msgstr "" "从数组中移除指定索引([param position])处的元素。如果索引超出范围,则该方法" "失败。如果为负数,则认为 [param position] 为相对于数组结尾的索引。\n" "如果需要返回被移除的元素,请使用 [method pop_at]。要按值移除元素,请改用 " "[method erase]。\n" "[b]注意:[/b]该方法将 [param position] 之后每个元素的索引向前移动,这可能会产" "生明显的性能成本,尤其是在较大的数组上。\n" "[b]注意:[/b][param position] 不能为负数。要移除相对于数组末尾的元素,请使用 " "[code]arr.remove_at(arr.size() - (i + 1))[/code]。要从数组中移除最后一个元" "素,请使用 [code]arr.resize(arr.size() - 1)[/code]。" #: doc/classes/Array.xml msgid "" "Sets the array's number of elements to [param size]. If [param size] is " "smaller than the array's current size, the elements at the end are removed. " "If [param size] is greater, new default elements (usually [code]null[/code]) " "are added, depending on the array's type.\n" "Returns [constant OK] on success, or one of the following [enum Error] " "constants if this method fails: [constant ERR_LOCKED] if the array is read-" "only, [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant " "ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual " "size of the array after resize.\n" "[b]Note:[/b] Calling this method once and assigning the new values is faster " "than calling [method append] for every new element." msgstr "" "将数组的元素数设置为 [param size]。如果 [param size] 小于数组的当前大小,则移" "除末尾的元素。如果 [param size] 大于数组的当前大小,则添加新的默认元素(通常" "为 [code]null[/code]),具体取决于数组的类型。\n" "如果成功则返回 [constant OK],如果该方法失败则返回其他 [enum Error] 常量之" "一:数组只读时为 [constant ERR_LOCKED],大小为负数时为 [constant " "ERR_INVALID_PARAMETER],分配失败时为 [constant ERR_OUT_OF_MEMORY]。请使用 " "[method size] 查看数组调整后的实际大小。\n" "[b]注意:[/b]调用该方法一次并分配新值,要比为每个新元素调用 [method append] " "更快。" #: doc/classes/Array.xml msgid "Reverses the order of all elements in the array." msgstr "反转数组中所有元素的顺序。" #: doc/classes/Array.xml msgid "" "Returns the index of the [b]last[/b] occurrence of [param what] in this " "array, or [code]-1[/code] if there are none. The search's start can be " "specified with [param from], continuing to the beginning of the array. This " "method is the reverse of [method find]." msgstr "" "返回该数组中 [param what] [b]最后一次[/b]出现时的索引,不存在时则为 " "[code]-1[/code]。搜索的起点可以用 [param from] 指定,终点为该数组的开头。该方" "法与 [method find] 相对。" #: doc/classes/Array.xml msgid "" "Returns the index of the [b]last[/b] element of the array that causes [param " "method] to return [code]true[/code], or [code]-1[/code] if there are none. " "The search's start can be specified with [param from], continuing to the " "beginning of the array. This method is the reverse of [method find_custom]." msgstr "" "返回数组中能够让 [param method] 返回 [code]true[/code] 的[b]最后一个[/b]元素" "的索引,不存在时返回 [code]-1[/code]。搜索的起点可以用 [param from] 指定,搜" "索的终点为数组的开头。该方法与 [method find_custom] 相对。" #: doc/classes/Array.xml msgid "" "Sets the value of the element at the given [param index] to the given [param " "value]. This will not change the size of the array, it only changes the " "value at an index already in the array. This is the same as using the [code]" "[][/code] operator ([code]array[index] = value[/code])." msgstr "" "将索引为 [param index] 的元素的值设置为 [param value]。数组的大小不会发生改" "变,改变的只有数组中现有索引所对应的值。与使用 [code][][/code] 运算符相同" "([code]array[index] = value[/code])。" #: doc/classes/Array.xml msgid "" "Shuffles all elements of the array in a random order.\n" "[b]Note:[/b] Like many similar functions in the engine (such as [method " "@GlobalScope.randi] or [method pick_random]), this method uses a common, " "global random seed. To get a predictable outcome from this method, see " "[method @GlobalScope.seed]." msgstr "" "随机打乱数组中所有元素的顺序。\n" "[b]注意:[/b]与引擎中很多类似的函数一样(例如 [method @GlobalScope.randi] 和 " "[method pick_random]),该方法使用的是通用的全局随机数种子。如何获取可预知的" "结果见 [method @GlobalScope.seed]。" #: doc/classes/Array.xml msgid "" "Returns the number of elements in the array. Empty arrays ([code][][/code]) " "always return [code]0[/code]. See also [method is_empty]." msgstr "" "返回该数组中元素的数量。空数组([code][][/code])始终返回 [code]0[/code]。另" "见 [method is_empty]。" #: doc/classes/Array.xml msgid "" "Returns a new [Array] containing this array's elements, from index [param " "begin] (inclusive) to [param end] (exclusive), every [param step] elements.\n" "If either [param begin] or [param end] are negative, their value is relative " "to the end of the array.\n" "If [param step] is negative, this method iterates through the array in " "reverse, returning a slice ordered backwards. For this to work, [param " "begin] must be greater than [param end].\n" "If [param deep] is [code]true[/code], all nested [Array] and [Dictionary] " "elements in the slice are duplicated from the original, recursively. See " "also [method duplicate].\n" "[codeblock]\n" "var letters = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\"]\n" "\n" "print(letters.slice(0, 2)) # Prints [\"A\", \"B\"]\n" "print(letters.slice(2, -2)) # Prints [\"C\", \"D\"]\n" "print(letters.slice(-2, 6)) # Prints [\"E\", \"F\"]\n" "\n" "print(letters.slice(0, 6, 2)) # Prints [\"A\", \"C\", \"E\"]\n" "print(letters.slice(4, 1, -1)) # Prints [\"E\", \"D\", \"C\"]\n" "[/codeblock]" msgstr "" "返回一个新的 [Array],其中包含该数组的元素,从索引 [param begin](含)到 " "[param end](不含),每个 [param step] 个元素。\n" "如果 [param begin] 或 [param end] 为负数,则它们的值相对于数组的末尾。\n" "如果 [param step] 为负数,则该方法反向遍历数组,返回按反向顺序排列的切片数" "组。要使其起作用,[param begin] 必须大于 [param end]。\n" "如果 [param deep] 为 [code]true[/code],则切片数组中所有嵌套的 [Array] 和 " "[Dictionary] 元素都将从原始元素中递归复制。另见 [method duplicate]。\n" "[codeblock]\n" "var letters = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\"]\n" "\n" "print(letters.slice(0, 2)) # 输出 [\"A\", \"B\"]\n" "print(letters.slice(2, -2)) # 输出 [\"C\", \"D\"]\n" "print(letters.slice(-2, 6)) # 输出 [\"E\", \"F\"]\n" "\n" "print(letters.slice(0, 6, 2)) # 输出 [\"A\", \"C\", \"E\"]\n" "print(letters.slice(4, 1, -1)) # 输出 [\"E\", \"D\", \"C\"]\n" "[/codeblock]" #: doc/classes/Array.xml msgid "" "Sorts the array in ascending order. The final order is dependent on the " "\"less than\" ([code]<[/code]) comparison between elements.\n" "[codeblocks]\n" "[gdscript]\n" "var numbers = [10, 5, 2.5, 8]\n" "numbers.sort()\n" "print(numbers) # Prints [2.5, 5, 8, 10]\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array numbers = [10, 5, 2.5, 8];\n" "numbers.Sort();\n" "GD.Print(numbers); // Prints [2.5, 5, 8, 10]\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] The sorting algorithm used is not [url=https://en.wikipedia.org/" "wiki/Sorting_algorithm#Stability]stable[/url]. This means that equivalent " "elements (such as [code]2[/code] and [code]2.0[/code]) may have their order " "changed when calling [method sort]." msgstr "" "按升序对数组进行排序。最终顺序取决于元素之间的“小于”([code]>[/code])比" "较。\n" "[codeblocks]\n" "[gdscript]\n" "var numbers = [10, 5, 2.5, 8]\n" "numbers.sort()\n" "print(numbers) # 输出 [2.5, 5, 8, 10]\n" "[/gdscript]\n" "[csharp]\n" "Godot.Collections.Array numbers = [10, 5, 2.5, 8];\n" "numbers.Sort();\n" "GD.Print(numbers); // 输出 [2.5, 5, 8, 10]\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]使用的排序算法并不[url=https://en.wikipedia.org/wiki/" "Sorting_algorithm#Stability]稳定[/url]。这意味着等效元素(例如 [code]2[/" "code] 和 [code]2.0[/code])在调用 [method sort] 时可能会改变其顺序。" #: doc/classes/Array.xml msgid "" "Sorts the array using a custom [Callable].\n" "[param func] is called as many times as necessary, receiving two array " "elements as arguments. The function should return [code]true[/code] if the " "first element should be moved [i]before[/i] the second one, otherwise it " "should return [code]false[/code].\n" "[codeblock]\n" "func sort_ascending(a, b):\n" "\tif a[1] < b[1]:\n" "\t\treturn true\n" "\treturn false\n" "\n" "func _ready():\n" "\tvar my_items = [[\"Tomato\", 5], [\"Apple\", 9], [\"Rice\", 4]]\n" "\tmy_items.sort_custom(sort_ascending)\n" "\tprint(my_items) # Prints [[\"Rice\", 4], [\"Tomato\", 5], [\"Apple\", 9]]\n" "\n" "\t# Sort descending, using a lambda function.\n" "\tmy_items.sort_custom(func(a, b): return a[1] > b[1])\n" "\tprint(my_items) # Prints [[\"Apple\", 9], [\"Tomato\", 5], [\"Rice\", 4]]\n" "[/codeblock]\n" "It may also be necessary to use this method to sort strings by natural " "order, with [method String.naturalnocasecmp_to], as in the following " "example:\n" "[codeblock]\n" "var files = [\"newfile1\", \"newfile2\", \"newfile10\", \"newfile11\"]\n" "files.sort_custom(func(a, b): return a.naturalnocasecmp_to(b) < 0)\n" "print(files) # Prints [\"newfile1\", \"newfile2\", \"newfile10\", " "\"newfile11\"]\n" "[/codeblock]\n" "[b]Note:[/b] In C#, this method is not supported.\n" "[b]Note:[/b] The sorting algorithm used is not [url=https://en.wikipedia.org/" "wiki/Sorting_algorithm#Stability]stable[/url]. This means that values " "considered equal may have their order changed when calling this method.\n" "[b]Note:[/b] You should not randomize the return value of [param func], as " "the heapsort algorithm expects a consistent result. Randomizing the return " "value will result in unexpected behavior." msgstr "" "使用自定义的 [Callable] 对数组进行排序。\n" "[param func] 可根据需要多次调用,接收两个数组元素作为参数。如果第一个元素应移" "到第二个元素的[i]前面[/i],则该函数应返回 [code]true[/code],否则应返回 " "[code]false[/code]。\n" "[codeblock]\n" "func sort_ascending(a, b):\n" "\tif a[1] < b[1]:\n" "\t\treturn true\n" "\treturn false\n" "\n" "func _ready():\n" "\tvar my_items = [[\"Tomato\", 5], [\"Apple\", 9], [\"Rice\", 4]]\n" "\tmy_items.sort_custom(sort_ascending)\n" "\tprint(my_items) # 输出 [[\"Rice\", 4], [\"Tomato\", 5], [\"Apple\", 9]]\n" "\n" "\t# 使用 lambda 函数按降序排序。\n" "\tmy_items.sort_custom(func(a, b): return a[0] > b[0])\n" "\tprint(my_items) # 输出 [[\"Apple\", 9], [\"Tomato\", 5], [\"Rice\", 4]]\n" "[/codeblock]\n" "可能还需要使用该方法按自然顺序对字符串进行排序,使用 [method " "String.naturalnocasecmp_to],如下例所示:\n" "[codeblock]\n" "var files = [\"newfile1\", \"newfile2\", \"newfile10\", \"newfile11\"]\n" "files.sort_custom(func(a, b): return a.naturalnocasecmp_to(b) < 0)\n" "print(files) # 输出 [\"newfile1\", \"newfile2\", \"newfile10\", " "\"newfile11\"]\n" "[/codeblock]\n" "[b]注意:[/b]在 C# 中,不支持该方法。\n" "[b]注意:[/b]使用的排序算法并不是[url=https://en.wikipedia.org/wiki/" "Sorting_algorithm#Stability]稳定的[/url]。这意味着在调用该方法时,被视为相等" "的值的顺序可能会发生变化。\n" "[b]注意:[/b]不应随机化 [param func] 的返回值,因为堆排序算法需要一致的结果。" "随机化返回值将导致意外行为。" #: doc/classes/Array.xml msgid "" "Returns [code]true[/code] if the array's size or its elements are different " "than [param right]'s." msgstr "" "如果该数组的大小或其元素与 [param right] 不同,则返回 [code]true[/code]。" #: doc/classes/Array.xml msgid "" "Appends the [param right] array to the left operand, creating a new [Array]. " "This is also known as an array concatenation.\n" "[codeblocks]\n" "[gdscript]\n" "var array1 = [\"One\", 2]\n" "var array2 = [3, \"Four\"]\n" "print(array1 + array2) # Prints [\"One\", 2, 3, \"Four\"]\n" "[/gdscript]\n" "[csharp]\n" "// Note that concatenation is not possible with C#'s native Array type.\n" "Godot.Collections.Array array1 = [\"One\", 2];\n" "Godot.Collections.Array array2 = [3, \"Four\"];\n" "GD.Print(array1 + array2); // Prints [\"One\", 2, 3, \"Four\"]\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] For existing arrays, [method append_array] is much more " "efficient than concatenation and assignment with the [code]+=[/code] " "operator." msgstr "" "将 [param right] 数组追加到左操作数,会创建一个新的 [Array]。这也称为数组拼" "接。\n" "[codeblocks]\n" "[gdscript]\n" "var array1 = [\"One\", 2]\n" "var array2 = [3, \"Four\"]\n" "print(array1 + array2) # 输出 [\"One\", 2, 3, \"Four\"]\n" "[/gdscript]\n" "[csharp]\n" "// 请注意,C# 的原生数组类型无法进行拼接。\n" "Godot.Collections.Array array1 = [\"One\", 2];\n" "Godot.Collections.Array array2 = [3, \"Four\"];\n" "GD.Print(array1 + array2); // 输出 [\"One\", 2, 3, \"Four\"]\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]对于已有数组,[method append_array] 比使用 [code]+=[/code] 运算" "符的拼接和赋值效率高得多。" #: doc/classes/Array.xml msgid "" "Compares the elements of both arrays in order, starting from index [code]0[/" "code] and ending on the last index in common between both arrays. For each " "pair of elements, returns [code]true[/code] if this array's element is less " "than [param right]'s, [code]false[/code] if this element is greater. " "Otherwise, continues to the next pair.\n" "If all searched elements are equal, returns [code]true[/code] if this " "array's size is less than [param right]'s, otherwise returns [code]false[/" "code]." msgstr "" "按顺序比较两个数组的元素,从索引 [code]0[/code] 开始,到两个数组共同的最后一" "个索引结束。对于每对元素,如果该数组的元素小于 [param right] 的元素,则返回 " "[code]true[/code];如果该元素大于 [param right] 的元素,则返回 [code]false[/" "code]。否则,继续下一对。\n" "当所有搜索到的元素都相等时,如果该数组的大小小于 [param right] 的大小,则返" "回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/Array.xml msgid "" "Compares the elements of both arrays in order, starting from index [code]0[/" "code] and ending on the last index in common between both arrays. For each " "pair of elements, returns [code]true[/code] if this array's element is less " "than [param right]'s, [code]false[/code] if this element is greater. " "Otherwise, continues to the next pair.\n" "If all searched elements are equal, returns [code]true[/code] if this " "array's size is less or equal to [param right]'s, otherwise returns " "[code]false[/code]." msgstr "" "按顺序比较两个数组的元素,从索引 [code]0[/code] 开始,到两个数组共同的最后一" "个索引结束。对于每对元素,如果该数组的元素小于 [param right] 的元素,则返回 " "[code]true[/code];如果该元素较大则返回 [code]false[/code]。否则,继续下一" "对。\n" "当所有搜索到的元素都相等时,如果该数组的大小小于或等于 [param right] 的大小," "则返回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/Array.xml msgid "" "Compares the left operand [Array] against the [param right] [Array]. Returns " "[code]true[/code] if the sizes and contents of the arrays are equal, " "[code]false[/code] otherwise." msgstr "" "将左操作数 [Array] 与 [param right] [Array] 进行比较。如果数组的大小和内容相" "等,则返回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/Array.xml msgid "" "Compares the elements of both arrays in order, starting from index [code]0[/" "code] and ending on the last index in common between both arrays. For each " "pair of elements, returns [code]true[/code] if this array's element is " "greater than [param right]'s, [code]false[/code] if this element is less. " "Otherwise, continues to the next pair.\n" "If all searched elements are equal, returns [code]true[/code] if this " "array's size is greater than [param right]'s, otherwise returns [code]false[/" "code]." msgstr "" "按顺序比较两个数组的元素,从索引 [code]0[/code] 开始,到两个数组共同的最后一" "个索引结束。对于每对元素,如果该数组的元素大于 [param right] 的元素,则返回 " "[code]true[/code];如果该元素较小则返回 [code]false[/code]。否则,继续下一" "对。\n" "当所有搜索到的元素都相等时,如果该数组的大小大于 [param right] 的大小,则返" "回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/Array.xml msgid "" "Compares the elements of both arrays in order, starting from index [code]0[/" "code] and ending on the last index in common between both arrays. For each " "pair of elements, returns [code]true[/code] if this array's element is " "greater than [param right]'s, [code]false[/code] if this element is less. " "Otherwise, continues to the next pair.\n" "If all searched elements are equal, returns [code]true[/code] if this " "array's size is greater or equal to [param right]'s, otherwise returns " "[code]false[/code]." msgstr "" "按顺序比较两个数组的元素,从索引 [code]0[/code] 开始,到两个数组共同的最后一" "个索引结束。对于每对元素,如果该数组的元素大于 [param right] 的元素,则返回 " "[code]true[/code],如果该元素较小则返回 [code]false[/code]。否则,继续下一" "对。\n" "当所有搜索到的元素都相等时,如果该数组的大小大于或等于 [param right] 的大小," "则返回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/Array.xml msgid "" "Returns the [Variant] element at the specified [param index]. Arrays start " "at index 0. If [param index] is greater or equal to [code]0[/code], the " "element is fetched starting from the beginning of the array. If [param " "index] is a negative value, the element is fetched starting from the end. " "Accessing an array out-of-bounds will cause a run-time error, pausing the " "project execution if run from the editor." msgstr "" "返回指定 [param index] 处的 [Variant] 元素。数组从索引 0 开始。如果 [param " "index] 大于或等于 [code]0[/code],则从数组开头开始获取元素。如果 [param " "index] 为负值,则从末尾开始获取元素。越界访问数组将导致运行时错误,从编辑器中" "运行时会暂停项目执行。" #: doc/classes/ArrayMesh.xml msgid "" "[Mesh] type that provides utility for constructing a surface from arrays." msgstr "[Mesh] 网格类型,提供了用于从数组构造表面的工具。" #: doc/classes/ArrayMesh.xml msgid "" "The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes " "as arrays.\n" "The most basic example is the creation of a single triangle:\n" "[codeblocks]\n" "[gdscript]\n" "var vertices = PackedVector3Array()\n" "vertices.push_back(Vector3(0, 1, 0))\n" "vertices.push_back(Vector3(1, 0, 0))\n" "vertices.push_back(Vector3(0, 0, 1))\n" "\n" "# Initialize the ArrayMesh.\n" "var arr_mesh = ArrayMesh.new()\n" "var arrays = []\n" "arrays.resize(Mesh.ARRAY_MAX)\n" "arrays[Mesh.ARRAY_VERTEX] = vertices\n" "\n" "# Create the Mesh.\n" "arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays)\n" "var m = MeshInstance3D.new()\n" "m.mesh = arr_mesh\n" "[/gdscript]\n" "[csharp]\n" "Vector3[] vertices =\n" "[\n" "\tnew Vector3(0, 1, 0),\n" "\tnew Vector3(1, 0, 0),\n" "\tnew Vector3(0, 0, 1),\n" "];\n" "\n" "// Initialize the ArrayMesh.\n" "var arrMesh = new ArrayMesh();\n" "Godot.Collections.Array arrays = [];\n" "arrays.Resize((int)Mesh.ArrayType.Max);\n" "arrays[(int)Mesh.ArrayType.Vertex] = vertices;\n" "\n" "// Create the Mesh.\n" "arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);\n" "var m = new MeshInstance3D();\n" "m.Mesh = arrMesh;\n" "[/csharp]\n" "[/codeblocks]\n" "The [MeshInstance3D] is ready to be added to the [SceneTree] to be shown.\n" "See also [ImmediateMesh], [MeshDataTool] and [SurfaceTool] for procedural " "geometry generation.\n" "[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-" "OpenGL/Face-culling]winding order[/url] for front faces of triangle " "primitive modes." msgstr "" "[ArrayMesh] 是用来构造 [Mesh] 的,其属性指定为数组。\n" "最基本的例子是创建单个三角形:\n" "[codeblocks]\n" "[gdscript]\n" "var vertices = PackedVector3Array()\n" "vertices.push_back(Vector3(0, 1, 0))\n" "vertices.push_back(Vector3(1, 0, 0))\n" "vertices.push_back(Vector3(0, 0, 1))\n" "\n" "# 初始化 ArrayMesh。\n" "var arr_mesh = ArrayMesh.new()\n" "var arrays = []\n" "arrays.resize(Mesh.ARRAY_MAX)\n" "arrays[Mesh.ARRAY_VERTEX] = vertices\n" "\n" "# 创建 Mesh。\n" "arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays)\n" "var m = MeshInstance3D.new()\n" "m.mesh = arr_mesh\n" "[/gdscript]\n" "[csharp]\n" "Vector3[] vertices =\n" "[\n" "\tnew Vector3(0, 1, 0),\n" "\tnew Vector3(1, 0, 0),\n" "\tnew Vector3(0, 0, 1),\n" "];\n" "\n" "// 初始化 ArrayMesh。\n" "var arrMesh = new ArrayMesh();\n" "Godot.Collections.Array arrays = [];\n" "arrays.Resize((int)Mesh.ArrayType.Max);\n" "arrays[(int)Mesh.ArrayType.Vertex] = vertices;\n" "\n" "// 创建 Mesh。\n" "arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);\n" "var m = new MeshInstance3D();\n" "m.Mesh = arrMesh;\n" "[/csharp]\n" "[/codeblocks]\n" "这个 [MeshInstance3D] 就可以添加到要显示的 [SceneTree] 中了。\n" "程序几何体生成请参阅 [ImmediateMesh]、[MeshDataTool]、[SurfaceTool]。\n" "[b]注意:[/b]Godot 对三角形图元模式的正面使用顺时针[url=https://learnopengl-" "cn.github.io/04%20Advanced%20OpenGL/04%20Face%20culling/]环绕顺序[/url]。" #: doc/classes/ArrayMesh.xml msgid "Procedural geometry using the ArrayMesh" msgstr "使用 ArrayMesh 的程序化几何体" #: doc/classes/ArrayMesh.xml msgid "" "Adds name for a blend shape that will be added with [method " "add_surface_from_arrays]. Must be called before surface is added." msgstr "" "为混合形状添加名称,该形状将用 [method add_surface_from_arrays] 添加。必须在" "添加面之前调用。" #: doc/classes/ArrayMesh.xml doc/classes/ImporterMesh.xml msgid "" "Creates a new surface. [method Mesh.get_surface_count] will become the " "[code]surf_idx[/code] for this new surface.\n" "Surfaces are created to be rendered using a [param primitive], which may be " "any of the values defined in [enum Mesh.PrimitiveType].\n" "The [param arrays] argument is an array of arrays. Each of the [constant " "Mesh.ARRAY_MAX] elements contains an array with some of the mesh data for " "this surface as described by the corresponding member of [enum " "Mesh.ArrayType] or [code]null[/code] if it is not used by the surface. For " "example, [code]arrays[0][/code] is the array of vertices. That first vertex " "sub-array is always required; the others are optional. Adding an index array " "puts this surface into \"index mode\" where the vertex and other arrays " "become the sources of data and the index array defines the vertex order. All " "sub-arrays must have the same length as the vertex array (or be an exact " "multiple of the vertex array's length, when multiple elements of a sub-array " "correspond to a single vertex) or be empty, except for [constant " "Mesh.ARRAY_INDEX] if it is used.\n" "The [param blend_shapes] argument is an array of vertex data for each blend " "shape. Each element is an array of the same structure as [param arrays], but " "[constant Mesh.ARRAY_VERTEX], [constant Mesh.ARRAY_NORMAL], and [constant " "Mesh.ARRAY_TANGENT] are set if and only if they are set in [param arrays] " "and all other entries are [code]null[/code].\n" "The [param lods] argument is a dictionary with [float] keys and " "[PackedInt32Array] values. Each entry in the dictionary represents an LOD " "level of the surface, where the value is the [constant Mesh.ARRAY_INDEX] " "array to use for the LOD level and the key is roughly proportional to the " "distance at which the LOD stats being used. I.e., increasing the key of an " "LOD also increases the distance that the objects has to be from the camera " "before the LOD is used.\n" "The [param flags] argument is the bitwise OR of, as required: One value of " "[enum Mesh.ArrayCustomFormat] left shifted by " "[code]ARRAY_FORMAT_CUSTOMn_SHIFT[/code] for each custom channel in use, " "[constant Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE], [constant " "Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS], or [constant " "Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY].\n" "[b]Note:[/b] When using indices, it is recommended to only use points, " "lines, or triangles." msgstr "" "创建一个新的表面。[method Mesh.get_surface_count] 将成为这个新表面的 " "[code]surf_idx[/code]。\n" "创建表面以使用 [param primitive] 进行渲染,它可以是 [enum " "Mesh.PrimitiveType] 中定义的任何值。\n" "[param arrays] 参数是数组的数组。每个 [constant Mesh.ARRAY_MAX] 元素都包含一" "个数组,其中包含此表面的一些网格数据,如 [enum Mesh.ArrayType] 的相应成员所描" "述的一样;如果它未被使用,则为 [code]null[/code]。例如,[code]arrays[0][/" "code] 是顶点数组。始终需要第一个顶点子数组;其他的是可选的。添加索引数组会将" "此表面置于“索引模式”,其中顶点和其他数组成为数据源,索引数组定义顶点顺序。所" "有子数组的长度必须与顶点数组的长度相同(或者是顶点数组长度的精确倍数,当子数" "组的多个元素对应于单个顶点时);或者为空,如果使用了 [constant " "Mesh.ARRAY_INDEX ] 则除外。\n" "[param blend_shapes] 参数是每个混合形状的顶点数据数组。 每个元素都是与 " "[param arrays] 具有相同结构的数组,但是 [constant Mesh.ARRAY_VERTEX]、" "[constant Mesh.ARRAY_NORMAL] 和 [constant Mesh.ARRAY_TANGENT] 这些条目,当且" "仅当在 [param arrays] 被设置且所有其他条目都是 [code]null[/code] 时,会被设" "置。\n" "[param lods] 参数是一个带有 [float] 键和 [PackedInt32Array] 值的字典。字典中" "的每个条目代表了表面的一个 LOD 级别,其中值是用于 LOD 级别的 [constant " "Mesh.ARRAY_INDEX] 数组,键大致与使用 LOD 统计信息的距离成正比。即,增加 LOD " "的关键点也会增加在使用 LOD 之前对象必须与相机的距离。\n" "[param flags] 参数是根据需要按位或的:[enum Mesh.ArrayCustomFormat] 的一个值" "左移 [code]ARRAY_FORMAT_CUSTOMn_SHIFT[/code],用于每个正在使用的自定义通道," "[constant Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE]、[constant " "Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS] 或 [constant " "Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY]。\n" "[b]注意:[/b]使用索引时,建议只使用点、线或三角形。" #: doc/classes/ArrayMesh.xml msgid "Removes all blend shapes from this [ArrayMesh]." msgstr "移除此 [ArrayMesh] 的所有混合形状。" #: doc/classes/ArrayMesh.xml msgid "Removes all surfaces from this [ArrayMesh]." msgstr "移除此 [ArrayMesh] 的所有表面。" #: doc/classes/ArrayMesh.xml msgid "Returns the number of blend shapes that the [ArrayMesh] holds." msgstr "返回 [ArrayMesh] 持有的混合形状的数量。" #: doc/classes/ArrayMesh.xml doc/classes/ImporterMesh.xml msgid "Returns the name of the blend shape at this index." msgstr "返回此索引处的混合形状的名称。" #: doc/classes/ArrayMesh.xml msgid "" "Performs a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping." msgstr "在 [ArrayMesh] 上执行 UV 展开,为光照贴图准备该网格。" #: doc/classes/ArrayMesh.xml msgid "Regenerates tangents for each of the [ArrayMesh]'s surfaces." msgstr "为每个 [ArrayMesh] 的表面重新生成切线。" #: doc/classes/ArrayMesh.xml msgid "Sets the name of the blend shape at this index." msgstr "在此索引处设置混合形状的名称。" #: doc/classes/ArrayMesh.xml msgid "" "Returns the index of the first surface with this name held within this " "[ArrayMesh]. If none are found, -1 is returned." msgstr "" "返回此 [ArrayMesh] 中带有此名称的第一个曲面的索引。如果没有找到,则返回 -1。" #: doc/classes/ArrayMesh.xml msgid "" "Returns the length in indices of the index array in the requested surface " "(see [method add_surface_from_arrays])." msgstr "" "返回所请求的面中索引数组的索引长度(参见 [method add_surface_from_arrays])。" #: doc/classes/ArrayMesh.xml msgid "" "Returns the length in vertices of the vertex array in the requested surface " "(see [method add_surface_from_arrays])." msgstr "" "返回所请求曲面中顶点数组的顶点长度(见 [method add_surface_from_arrays])。" #: doc/classes/ArrayMesh.xml msgid "" "Returns the format mask of the requested surface (see [method " "add_surface_from_arrays])." msgstr "返回所请求表面的格式掩码(见 [method add_surface_from_arrays])。" #: doc/classes/ArrayMesh.xml doc/classes/ImporterMesh.xml msgid "Gets the name assigned to this surface." msgstr "获取分配给此表面的名称。" #: doc/classes/ArrayMesh.xml msgid "" "Returns the primitive type of the requested surface (see [method " "add_surface_from_arrays])." msgstr "返回所请求曲面的图元类型(见 [method add_surface_from_arrays])。" #: doc/classes/ArrayMesh.xml doc/classes/RenderingServer.xml msgid "" "Removes the surface at the given index from the Mesh, shifting surfaces with " "higher index down by one." msgstr "移除 Mesh 中给定索引处的表面,将索引更大的表面向前移动一位。" #: doc/classes/ArrayMesh.xml doc/classes/ImporterMesh.xml msgid "Sets a name for a given surface." msgstr "设置给定曲面的名称。" #: doc/classes/ArrayMesh.xml msgid "The blend shape mode." msgstr "混合形状模式。" #: doc/classes/ArrayMesh.xml doc/classes/PrimitiveMesh.xml msgid "" "Overrides the [AABB] with one defined by user for use with frustum culling. " "Especially useful to avoid unexpected culling when using a shader to offset " "vertices." msgstr "" "用用户定义的用于使用视锥剔除的一种替代 [AABB]。在使用着色器偏移顶点时,避免非" "预期的剔除特别有用。" #: doc/classes/ArrayMesh.xml msgid "" "An optional mesh which can be used for rendering shadows and the depth " "prepass. Can be used to increase performance by supplying a mesh with fused " "vertices and only vertex position data (without normals, UVs, colors, " "etc.).\n" "[b]Note:[/b] This mesh must have exactly the same vertex positions as the " "source mesh (including the source mesh's LODs, if present). If vertex " "positions differ, then the mesh will not draw correctly." msgstr "" "可选网格,可用于渲染阴影和预深度阶段。可通过提供融合顶点和仅顶点位置数据(不" "含法线、UV、颜色等)的网格来提高性能。\n" "[b]注意:[/b]该网格必须具有与源网格完全相同的顶点位置(包括源网格的 LOD,如果" "存在)。如果顶点位置不同,则网格将无法正确绘制。" #: doc/classes/ArrayOccluder3D.xml msgid "" "3D polygon shape for use with occlusion culling in [OccluderInstance3D]." msgstr "用于与 [OccluderInstance3D] 中的遮挡剔除一起使用的 3D 多边形形状。" #: doc/classes/ArrayOccluder3D.xml msgid "" "[ArrayOccluder3D] stores an arbitrary 3D polygon shape that can be used by " "the engine's occlusion culling system. This is analogous to [ArrayMesh], but " "for occluders.\n" "See [OccluderInstance3D]'s documentation for instructions on setting up " "occlusion culling." msgstr "" "[ArrayOccluder3D] 存储一个任意的 3D 多边形形状,可供引擎的遮挡剔除系统使用。" "这类似于 [ArrayMesh],但适用于遮挡物。\n" "有关设置遮挡剔除的说明,请参阅 [OccluderInstance3D] 的文档。" #: doc/classes/ArrayOccluder3D.xml doc/classes/BoxOccluder3D.xml #: doc/classes/Occluder3D.xml doc/classes/OccluderInstance3D.xml #: doc/classes/PolygonOccluder3D.xml doc/classes/QuadOccluder3D.xml #: doc/classes/SphereOccluder3D.xml msgid "Occlusion culling" msgstr "遮挡剔除" #: doc/classes/ArrayOccluder3D.xml msgid "" "Sets [member indices] and [member vertices], while updating the final " "occluder only once after both values are set." msgstr "" "设置 [member indices] 和 [member vertices],同时会在两个值都被设置后仅更新一" "次最终遮挡物。" #: doc/classes/ArrayOccluder3D.xml msgid "" "The occluder's index position. Indices determine which points from the " "[member vertices] array should be drawn, and in which order.\n" "[b]Note:[/b] The occluder is always updated after setting this value. If " "creating occluders procedurally, consider using [method set_arrays] instead " "to avoid updating the occluder twice when it's created." msgstr "" "该遮挡物的索引位置。索引确定 [member vertices] 数组中的哪些点应被绘制,以及以" "哪种顺序绘制。\n" "[b]注意:[/b]该遮挡物总是在设置这个值后更新。如果程序化创建遮挡物,请考虑改" "用 [method set_arrays] 来避免在创建时更新遮挡物两次。" #: doc/classes/ArrayOccluder3D.xml msgid "" "The occluder's vertex positions in local 3D coordinates.\n" "[b]Note:[/b] The occluder is always updated after setting this value. If " "creating occluders procedurally, consider using [method set_arrays] instead " "to avoid updating the occluder twice when it's created." msgstr "" "该遮挡物在局部 3D 坐标中的顶点位置。\n" "[b]注意:[/b]该遮挡物总是在设置这个值后更新。如果程序化创建遮挡物,请考虑改" "用 [method set_arrays] 来避免在创建时更新遮挡物两次。" #: doc/classes/AspectRatioContainer.xml msgid "A container that preserves the proportions of its child controls." msgstr "保留子控件长宽比的容器。" #: doc/classes/AspectRatioContainer.xml msgid "" "A container type that arranges its child controls in a way that preserves " "their proportions automatically when the container is resized. Useful when a " "container has a dynamic size and the child nodes must adjust their sizes " "accordingly without losing their aspect ratios." msgstr "" "一种容器类型,它以一种在调整容器大小时自动保持其比例的方式排列其子控件。当容" "器具有动态大小,并且子节点必须相应地调整其大小而不丢失其长宽比时很有用。" #: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml #: doc/classes/CenterContainer.xml doc/classes/Container.xml #: doc/classes/FlowContainer.xml doc/classes/GridContainer.xml #: doc/classes/HBoxContainer.xml doc/classes/HFlowContainer.xml #: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml #: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml #: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml #: doc/classes/VBoxContainer.xml doc/classes/VFlowContainer.xml #: doc/classes/VSplitContainer.xml msgid "Using Containers" msgstr "使用容器" #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "指定子控件的水平相对位置。" #: doc/classes/AspectRatioContainer.xml msgid "Specifies the vertical relative position of child controls." msgstr "指定子控件的垂直相对位置。" #: doc/classes/AspectRatioContainer.xml msgid "" "The aspect ratio to enforce on child controls. This is the width divided by " "the height. The ratio depends on the [member stretch_mode]." msgstr "" "对子控件强制实施的长宽比。这是宽度除以高度。这个比例取决于 [member " "stretch_mode]。" #: doc/classes/AspectRatioContainer.xml msgid "The stretch mode used to align child controls." msgstr "用来对齐子控件的拉伸模式。" #: doc/classes/AspectRatioContainer.xml msgid "" "The height of child controls is automatically adjusted based on the width of " "the container." msgstr "子控件的高度会根据容器的宽度自动调整。" #: doc/classes/AspectRatioContainer.xml msgid "" "The width of child controls is automatically adjusted based on the height of " "the container." msgstr "子控件的宽度会根据容器的高度自动调整。" #: doc/classes/AspectRatioContainer.xml msgid "" "The bounding rectangle of child controls is automatically adjusted to fit " "inside the container while keeping the aspect ratio." msgstr "子控件的边界矩形会自动调整以适应容器,同时保持长宽比。" #: doc/classes/AspectRatioContainer.xml msgid "" "The width and height of child controls is automatically adjusted to make " "their bounding rectangle cover the entire area of the container while " "keeping the aspect ratio.\n" "When the bounding rectangle of child controls exceed the container's size " "and [member Control.clip_contents] is enabled, this allows to show only the " "container's area restricted by its own bounding rectangle." msgstr "" "子控件的宽度和高度被自动调整,以使其边框覆盖容器的整个区域,同时保持长宽" "比。\n" "当子控件的边界矩形超过容器的大小,并且 [member Control.clip_contents] 被启用" "时,这允许仅显示受其自身边界矩形限制的容器区域。" #: doc/classes/AspectRatioContainer.xml msgid "" "Aligns child controls with the beginning (left or top) of the container." msgstr "将子控件与容器的开头对齐(左侧或顶部)。" #: doc/classes/AspectRatioContainer.xml msgid "Aligns child controls with the center of the container." msgstr "使子控件与容器的中心对齐。" #: doc/classes/AspectRatioContainer.xml msgid "Aligns child controls with the end (right or bottom) of the container." msgstr "将子控件与容器的末端对齐(右侧或底部)。" #: doc/classes/AStar2D.xml msgid "" "An implementation of A* for finding the shortest path between two vertices " "on a connected graph in 2D space." msgstr "A* 的一种实现,用于查找 2D 空间中连通图上两个顶点之间的最短路径。" #: doc/classes/AStar2D.xml msgid "" "An implementation of the A* algorithm, used to find the shortest path " "between two vertices on a connected graph in 2D space.\n" "See [AStar3D] for a more thorough explanation on how to use this class. " "[AStar2D] is a wrapper for [AStar3D] that enforces 2D coordinates." msgstr "" "A* 算法的一种实现,用于在 2D 空间中的连通图上找到两个顶点之间的最短路径。\n" "有关如何使用该类的更详尽的解释,请参阅 [AStar3D]。[AStar2D] 是 [AStar3D] 的包" "装器,它强制执行 2D 坐标。" #: doc/classes/AStar2D.xml doc/classes/AStarGrid2D.xml #: doc/classes/PackedVector2Array.xml msgid "Grid-based Navigation with AStarGrid2D Demo" msgstr "AStarGrid2D 的网格导航演示" #: doc/classes/AStar2D.xml msgid "" "Called when computing the cost between two connected points.\n" "Note that this function is hidden in the default [AStar2D] class." msgstr "" "计算两个连接点之间的成本时调用。\n" "请注意,这个函数在默认的 [AStar2D] 类中是隐藏的。" #: doc/classes/AStar2D.xml msgid "" "Called when estimating the cost between a point and the path's ending " "point.\n" "Note that this function is hidden in the default [AStar2D] class." msgstr "" "估算某个点和路径终点之间的成本时调用。\n" "请注意,这个函数在默认的 [AStar2D] 类中是隐藏的。" #: doc/classes/AStar2D.xml msgid "" "Called when neighboring enters processing and if [member " "neighbor_filter_enabled] is [code]true[/code]. If [code]true[/code] is " "returned the point will not be processed.\n" "Note that this function is hidden in the default [AStar2D] class." msgstr "" "进入邻接处理且 [member neighbor_filter_enabled] 为 [code]true[/code] 时调用。" "如果返回 [code]true[/code],则不会处理对应的点。\n" "请注意,这个函数在默认的 [AStar2D] 类中是隐藏的。" #: doc/classes/AStar2D.xml msgid "" "Adds a new point at the given position with the given identifier. The [param " "id] must be 0 or larger, and the [param weight_scale] must be 0.0 or " "greater.\n" "The [param weight_scale] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " "the algorithm prefers points with lower [param weight_scale]s to form a " "path.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with " "weight_scale 4 and id 1\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(1, 0), 4); // Adds the point (1, 0) with " "weight_scale 4 and id 1\n" "[/csharp]\n" "[/codeblocks]\n" "If there already exists a point for the given [param id], its position and " "weight scale are updated to the given values." msgstr "" "在具有给定标识符的给定位置添加一个新点。[param id] 必须为 0 或更大,[param " "weight_scale] 必须为 0.0 或更大。\n" "在确定从相邻点到此点的一段路程的总成本时,[param weight_scale] 要乘以 " "[method _compute_cost] 的结果。因此,在其他条件相同的情况下,算法优先选择 " "[param weight_scale] 较低的点来形成路径。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(1, 0), 4) # 添加点 (1, 0)、权重为 4、ID 为 1\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(1, 0), 4); // 添加点 (1, 0)、权重为 4、ID 为 " "1\n" "[/csharp]\n" "[/codeblocks]\n" "如果已经存在一个给定 [param id] 的点,则它的位置和权重缩放将被更新为给定值。" #: doc/classes/AStar2D.xml msgid "" "Returns whether there is a connection/segment between the given points. If " "[param bidirectional] is [code]false[/code], returns whether movement from " "[param id] to [param to_id] is possible through this segment." msgstr "" "返回两个给定点之间是否存在连接/线段。如果 [param bidirectional] 为 " "[code]false[/code],则返回是否可以通过此段从 [param id] 移动到 [param " "to_id]。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "Clears all the points and segments." msgstr "清除所有点和线段。" #: doc/classes/AStar2D.xml msgid "" "Creates a segment between the given points. If [param bidirectional] is " "[code]false[/code], only movement from [param id] to [param to_id] is " "allowed, not the reverse direction.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(1, 1))\n" "astar.add_point(2, Vector2(0, 5))\n" "astar.connect_points(1, 2, false)\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(1, 1));\n" "astar.AddPoint(2, new Vector2(0, 5));\n" "astar.ConnectPoints(1, 2, false);\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "在给定的点之间创建一个线段。如果 [param bidirectional] 为 [code]false[/" "code],则只允许从 [param id] 到 [param to_id] 的移动,而不允许反向移动。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(1, 1))\n" "astar.add_point(2, Vector2(0, 5))\n" "astar.connect_points(1, 2, false)\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(1, 1));\n" "astar.AddPoint(2, new Vector2(0, 5));\n" "astar.ConnectPoints(1, 2, false);\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "" "Deletes the segment between the given points. If [param bidirectional] is " "[code]false[/code], only movement from [param id] to [param to_id] is " "prevented, and a unidirectional segment possibly remains." msgstr "" "删除给定点之间的线段。如果 [param bidirectional] 为 [code]false[/code],则仅" "阻止从 [param id] 到 [param to_id] 的移动,并且可能会保留一个单向线段。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "Returns the next available point ID with no point associated to it." msgstr "返回下一个没有关联点的可用点 ID。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "" "Returns the ID of the closest point to [param to_position], optionally " "taking disabled points into account. Returns [code]-1[/code] if there are no " "points in the points pool.\n" "[b]Note:[/b] If several points are the closest to [param to_position], the " "one with the smallest ID will be returned, ensuring a deterministic result." msgstr "" "返回距离 [param to_position] 最近的点的 ID,可以选择将禁用的点考虑在内。如果" "点池中没有点,则返回 [code]-1[/code]。\n" "[b]注意:[/b]如果有多个点距离 [param to_position] 最近,则返回 ID 最小的那个" "点,以保证结果的确定性。" #: doc/classes/AStar2D.xml msgid "" "Returns the closest position to [param to_position] that resides inside a " "segment between two connected points.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(0, 0))\n" "astar.add_point(2, Vector2(0, 5))\n" "astar.connect_points(1, 2)\n" "var res = astar.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, " "3)\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(0, 0));\n" "astar.AddPoint(2, new Vector2(0, 5));\n" "astar.ConnectPoints(1, 2);\n" "Vector2 res = astar.GetClosestPositionInSegment(new Vector2(3, 3)); // " "Returns (0, 3)\n" "[/csharp]\n" "[/codeblocks]\n" "The result is in the segment that goes from [code]y = 0[/code] to [code]y = " "5[/code]. It's the closest position in the segment to the given point." msgstr "" "返回最接近 [param to_position] 的位置,该位置位于两个连接点之间的线段内。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(0, 0))\n" "astar.add_point(2, Vector2(0, 5))\n" "astar.connect_points(1, 2)\n" "var res = astar.get_closest_position_in_segment(Vector2(3, 3)) # 返回 (0, " "3)\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(0, 0));\n" "astar.AddPoint(2, new Vector2(0, 5));\n" "astar.ConnectPoints(1, 2);\n" "Vector2 res = astar.GetClosestPositionInSegment(new Vector2(3, 3)); // 返回 " "(0, 3)\n" "[/csharp]\n" "[/codeblocks]\n" "结果位于从 [code]y = 0[/code] 到 [code]y = 5[/code] 的线段中。它是线段中距给" "定点最近的位置。" #: doc/classes/AStar2D.xml msgid "" "Returns an array with the IDs of the points that form the path found by " "AStar2D between the given points. The array is ordered from the starting " "point to the ending point of the path.\n" "If there is no valid path to the target, and [param allow_partial_path] is " "[code]true[/code], returns a path to the point closest to the target that " "can be reached.\n" "[b]Note:[/b] When [param allow_partial_path] is [code]true[/code] and [param " "to_id] is disabled the search may take an unusually long time to finish.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(0, 0))\n" "astar.add_point(2, Vector2(0, 1), 1) # Default weight is 1\n" "astar.add_point(3, Vector2(1, 1))\n" "astar.add_point(4, Vector2(2, 0))\n" "\n" "astar.connect_points(1, 2, false)\n" "astar.connect_points(2, 3, false)\n" "astar.connect_points(4, 3, false)\n" "astar.connect_points(1, 4, false)\n" "\n" "var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(0, 0));\n" "astar.AddPoint(2, new Vector2(0, 1), 1); // Default weight is 1\n" "astar.AddPoint(3, new Vector2(1, 1));\n" "astar.AddPoint(4, new Vector2(2, 0));\n" "\n" "astar.ConnectPoints(1, 2, false);\n" "astar.ConnectPoints(2, 3, false);\n" "astar.ConnectPoints(4, 3, false);\n" "astar.ConnectPoints(1, 4, false);\n" "long[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3]\n" "[/csharp]\n" "[/codeblocks]\n" "If you change the 2nd point's weight to 3, then the result will be [code][1, " "4, 3][/code] instead, because now even though the distance is longer, it's " "\"easier\" to get through point 4 than through point 2." msgstr "" "返回一个数组,其中包含构成由 AStar2D 在给定点之间找到的路径的点的 ID。数组从" "路径的起点到终点进行排序。\n" "如果没有能够到达目标的有效路径,并且 [param allow_partial_path] 为" "[code]true[/code],则返回能够到达的最接近目标点的路径。\n" "[b]注意:[/b]如果 [param allow_partial_path] 为 [code]true[/code] 并且 " "[param to_id] 处于禁用状态,搜索耗时可能异常地大。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(0, 0))\n" "astar.add_point(2, Vector2(0, 1), 1) # 默认权重为 1\n" "astar.add_point(3, Vector2(1, 1))\n" "astar.add_point(4, Vector2(2, 0))\n" "\n" "astar.connect_points(1, 2, false)\n" "astar.connect_points(2, 3, false)\n" "astar.connect_points(4, 3, false)\n" "astar.connect_points(1, 4, false)\n" "\n" "var res = astar.get_id_path(1, 3) # 返回 [1, 2, 3]\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(0, 0));\n" "astar.AddPoint(2, new Vector2(0, 1), 1); // 默认权重为 1\n" "astar.AddPoint(3, new Vector2(1, 1));\n" "astar.AddPoint(4, new Vector2(2, 0));\n" "\n" "astar.ConnectPoints(1, 2, false);\n" "astar.ConnectPoints(2, 3, false);\n" "astar.ConnectPoints(4, 3, false);\n" "astar.ConnectPoints(1, 4, false);\n" "long[] res = astar.GetIdPath(1, 3); // 返回 [1, 2, 3]\n" "[/csharp]\n" "[/codeblocks]\n" "如果将第 2 个点的权重更改为 3,则结果将改为 [code][1, 4, 3][/code],因为现在" "即使距离更长,通过第 4 点也比通过第 2 点“更容易”。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "" "Returns the capacity of the structure backing the points, useful in " "conjunction with [method reserve_space]." msgstr "" "该函数返回支持点的数据结构的容量,可以与 [method reserve_space] 方法一起使" "用。" #: doc/classes/AStar2D.xml msgid "" "Returns an array with the IDs of the points that form the connection with " "the given point.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(0, 0))\n" "astar.add_point(2, Vector2(0, 1))\n" "astar.add_point(3, Vector2(1, 1))\n" "astar.add_point(4, Vector2(2, 0))\n" "\n" "astar.connect_points(1, 2, true)\n" "astar.connect_points(1, 3, true)\n" "\n" "var neighbors = astar.get_point_connections(1) # Returns [2, 3]\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(0, 0));\n" "astar.AddPoint(2, new Vector2(0, 1));\n" "astar.AddPoint(3, new Vector2(1, 1));\n" "astar.AddPoint(4, new Vector2(2, 0));\n" "\n" "astar.ConnectPoints(1, 2, true);\n" "astar.ConnectPoints(1, 3, true);\n" "\n" "long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3]\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回一个数组,其中包含与给定点形成连接的点的 ID。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar2D.new()\n" "astar.add_point(1, Vector2(0, 0))\n" "astar.add_point(2, Vector2(0, 1))\n" "astar.add_point(3, Vector2(1, 1))\n" "astar.add_point(4, Vector2(2, 0))\n" "\n" "astar.connect_points(1, 2, true)\n" "astar.connect_points(1, 3, true)\n" "\n" "var neighbors = astar.get_point_connections(1) # 返回 [2, 3]\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar2D();\n" "astar.AddPoint(1, new Vector2(0, 0));\n" "astar.AddPoint(2, new Vector2(0, 1));\n" "astar.AddPoint(3, new Vector2(1, 1));\n" "astar.AddPoint(4, new Vector2(2, 0));\n" "\n" "astar.ConnectPoints(1, 2, true);\n" "astar.ConnectPoints(1, 3, true);\n" "\n" "long[] neighbors = astar.GetPointConnections(1); // 返回 [2, 3]\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "Returns the number of points currently in the points pool." msgstr "返回点池中当前的点数。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "Returns an array of all point IDs." msgstr "返回所有点 ID 的数组。" #: doc/classes/AStar2D.xml msgid "" "Returns an array with the points that are in the path found by AStar2D " "between the given points. The array is ordered from the starting point to " "the ending point of the path.\n" "If there is no valid path to the target, and [param allow_partial_path] is " "[code]true[/code], returns a path to the point closest to the target that " "can be reached.\n" "[b]Note:[/b] This method is not thread-safe; it can only be used from a " "single [Thread] at a given time. Consider using [Mutex] to ensure exclusive " "access to one thread to avoid race conditions.\n" "Additionally, when [param allow_partial_path] is [code]true[/code] and " "[param to_id] is disabled the search may take an unusually long time to " "finish." msgstr "" "返回一个数组,其中包含 AStar2D 在给定点之间找到的路径中的点。数组从路径的起点" "到终点进行排序。\n" "如果没有通往目标的有效路径并且 [param allow_partial_path] 为 [code]true[/" "code],则会返回通往距离目标最近的可达点的路径。\n" "[b]注意:[/b]该方法不是线程安全的,同一时间只能有一个 [Thread] 使用。请考虑使" "用 [Mutex] 来确保线程独占访问,避免竞态条件。\n" "另外,如果 [param allow_partial_path] 为 [code]true[/code] 并且 [param " "to_id] 处于禁用状态,搜索耗时可能异常地大。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml doc/classes/AStarGrid2D.xml msgid "Returns the position of the point associated with the given [param id]." msgstr "返回与给定 [param id] 相关联的点的位置。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml doc/classes/AStarGrid2D.xml msgid "" "Returns the weight scale of the point associated with the given [param id]." msgstr "返回与给定 [param id] 关联的点的权重比例。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "Returns whether a point associated with the given [param id] exists." msgstr "返回与给定 [param id] 相关联的点是否存在。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "" "Returns whether a point is disabled or not for pathfinding. By default, all " "points are enabled." msgstr "返回用于寻路时点是否被禁用。默认情况下,所有点均被启用。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "" "Removes the point associated with the given [param id] from the points pool." msgstr "从点池中移除与给定 [param id] 关联的点。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "" "Reserves space internally for [param num_nodes] points. Useful if you're " "adding a known large number of points at once, such as points on a grid." msgstr "" "在内部预留 [param num_nodes] 个点的空间。适用于需要一次性添加大量已知数量的点" "的情况,例如添加网格上的点。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "" "Disables or enables the specified point for pathfinding. Useful for making a " "temporary obstacle." msgstr "用于寻路时禁用或启用指定的点。适用于制作临时障碍物。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "Sets the [param position] for the point with the given [param id]." msgstr "为具有给定 [param id] 的点设置位置 [param position]。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "" "Sets the [param weight_scale] for the point with the given [param id]. The " "[param weight_scale] is multiplied by the result of [method _compute_cost] " "when determining the overall cost of traveling across a segment from a " "neighboring point to this point." msgstr "" "为给定的 [param id] 的点设置 [param weight_scale]。在确定从邻接点到这个点的一" "段路程的总成本时,[param weight_scale] 要乘以 [method _compute_cost] 的结果。" #: doc/classes/AStar2D.xml doc/classes/AStar3D.xml msgid "" "If [code]true[/code] enables the filtering of neighbors via [method " "_filter_neighbor]." msgstr "" "如果为 [code]true[/code],则启用通过 [method _filter_neighbor] 过滤邻接点。" #: doc/classes/AStar3D.xml msgid "" "An implementation of A* for finding the shortest path between two vertices " "on a connected graph in 3D space." msgstr "A* 的一种实现,用于寻找 3D 空间中连接图中的两个顶点之间的最短路径。" #: doc/classes/AStar3D.xml msgid "" "A* (A star) is a computer algorithm used in pathfinding and graph traversal, " "the process of plotting short paths among vertices (points), passing through " "a given set of edges (segments). It enjoys widespread use due to its " "performance and accuracy. Godot's A* implementation uses points in 3D space " "and Euclidean distances by default.\n" "You must add points manually with [method add_point] and create segments " "manually with [method connect_points]. Once done, you can test if there is a " "path between two points with the [method are_points_connected] function, get " "a path containing indices by [method get_id_path], or one containing actual " "coordinates with [method get_point_path].\n" "It is also possible to use non-Euclidean distances. To do so, create a " "script that extends [AStar3D] and override the methods [method " "_compute_cost] and [method _estimate_cost]. Both should take two point IDs " "and return the distance between the corresponding points.\n" "[b]Example:[/b] Use Manhattan distance instead of Euclidean distance:\n" "[codeblocks]\n" "[gdscript]\n" "class_name MyAStar3D\n" "extends AStar3D\n" "\n" "func _compute_cost(u, v):\n" "\tvar u_pos = get_point_position(u)\n" "\tvar v_pos = get_point_position(v)\n" "\treturn abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - " "v_pos.z)\n" "\n" "func _estimate_cost(u, v):\n" "\tvar u_pos = get_point_position(u)\n" "\tvar v_pos = get_point_position(v)\n" "\treturn abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - " "v_pos.z)\n" "[/gdscript]\n" "[csharp]\n" "using Godot;\n" "\n" "[GlobalClass]\n" "public partial class MyAStar3D : AStar3D\n" "{\n" "\tpublic override float _ComputeCost(long fromId, long toId)\n" "\t{\n" "\t\tVector3 fromPoint = GetPointPosition(fromId);\n" "\t\tVector3 toPoint = GetPointPosition(toId);\n" "\n" "\t\treturn Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - " "toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z);\n" "\t}\n" "\n" "\tpublic override float _EstimateCost(long fromId, long toId)\n" "\t{\n" "\t\tVector3 fromPoint = GetPointPosition(fromId);\n" "\t\tVector3 toPoint = GetPointPosition(toId);\n" "\t\treturn Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - " "toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z);\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "[method _estimate_cost] should return a lower bound of the distance, i.e. " "[code]_estimate_cost(u, v) <= _compute_cost(u, v)[/code]. This serves as a " "hint to the algorithm because the custom [method _compute_cost] might be " "computation-heavy. If this is not the case, make [method _estimate_cost] " "return the same value as [method _compute_cost] to provide the algorithm " "with the most accurate information.\n" "If the default [method _estimate_cost] and [method _compute_cost] methods " "are used, or if the supplied [method _estimate_cost] method returns a lower " "bound of the cost, then the paths returned by A* will be the lowest-cost " "paths. Here, the cost of a path equals the sum of the [method _compute_cost] " "results of all segments in the path multiplied by the [code]weight_scale[/" "code]s of the endpoints of the respective segments. If the default methods " "are used and the [code]weight_scale[/code]s of all points are set to " "[code]1.0[/code], then this equals the sum of Euclidean distances of all " "segments in the path." msgstr "" "A*(A 星)是一种用于寻路和图遍历的计算机算法,会根据一组给定的边(线段)测定" "顶点(点)之间的短路径。由于高性能和高准确度,A* 算法被广泛使用。Godot 的 A* " "实现默认使用 3D 空间中的点和欧几里德距离。\n" "你必须使用 [method add_point] 手动添加点,并使用 [method connect_points] 手动" "创建线段。完成后,就可以使用 [method are_points_connected] 函数测试两点之间是" "否存在路径,通过 [method get_id_path] 获取由索引组成的路径,或使用 [method " "get_point_path] 获取由实际坐标组成的路径。\n" "也可以使用非欧几里德距离。做法是创建一个扩展自 [AStar3D] 的类,然后覆盖 " "[method _compute_cost] 和 [method _estimate_cost] 方法。两者都接受两个点 ID " "并返回对应点之间的距离。\n" "[b]示例:[/b]用曼哈顿距离代替欧几里德距离:\n" "[codeblocks]\n" "[gdscript]\n" "class_name MyAStar3D\n" "extends AStar3D\n" "\n" "func _compute_cost(u, v):\n" "\tvar u_pos = get_point_position(u)\n" "\tvar v_pos = get_point_position(v)\n" "\treturn abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - " "v_pos.z)\n" "\n" "func _estimate_cost(u, v):\n" "\tvar u_pos = get_point_position(u)\n" "\tvar v_pos = get_point_position(v)\n" "\treturn abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - " "v_pos.z)\n" "[/gdscript]\n" "[csharp]\n" "using Godot;\n" "\n" "[GlobalClass]\n" "public partial class MyAStar3D : AStar3D\n" "{\n" "\tpublic override float _ComputeCost(long fromId, long toId)\n" "\t{\n" "\t\tVector3 fromPoint = GetPointPosition(fromId);\n" "\t\tVector3 toPoint = GetPointPosition(toId);\n" "\n" "\t\treturn Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - " "toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z);\n" "\t}\n" "\n" "\tpublic override float _EstimateCost(long fromId, long toId)\n" "\t{\n" "\t\tVector3 fromPoint = GetPointPosition(fromId);\n" "\t\tVector3 toPoint = GetPointPosition(toId);\n" "\t\treturn Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - " "toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z);\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "[method _estimate_cost] 应该返回距离的下限,即 [code]_estimate_cost(u, v) <= " "_compute_cost(u, v)[/code]。这一距离会用作算法的提示,因为自定义的 [method " "_compute_cost] 可能计算量很大。如果不是这种情况,请让 [method " "_estimate_cost] 返回与 [method _compute_cost] 相同的值,为算法提供最准确的信" "息。\n" "如果使用了默认的 [method _estimate_cost] 和 [method _compute_cost] 方法,或者" "提供的 [method _estimate_cost] 方法返回的是成本下限,那么 A* 返回的路径就是成" "本最低的路径。此处路径的成本等于路径中所有线段 [method _compute_cost] 的结果" "乘以该线段对应端点的 [code]weight_scale[/code] 之和。如果使用默认方法,并且所" "有点的 [code]weight_scale[/code] 都为 [code]1.0[/code],则成本等于路径中所有" "线段的欧几里德距离之和。" #: doc/classes/AStar3D.xml msgid "" "Called when computing the cost between two connected points.\n" "Note that this function is hidden in the default [AStar3D] class." msgstr "" "计算两个连接点之间的成本时调用。\n" "请注意,这个函数在默认的 [AStar3D] 类中是隐藏的。" #: doc/classes/AStar3D.xml msgid "" "Called when estimating the cost between a point and the path's ending " "point.\n" "Note that this function is hidden in the default [AStar3D] class." msgstr "" "估算某个点和路径终点之间的成本时调用。\n" "请注意,这个函数在默认的 [AStar3D] 类中是隐藏的。" #: doc/classes/AStar3D.xml msgid "" "Called when neighboring point enters processing and if [member " "neighbor_filter_enabled] is [code]true[/code]. If [code]true[/code] is " "returned the point will not be processed.\n" "Note that this function is hidden in the default [AStar3D] class." msgstr "" "进入邻接处理且 [member neighbor_filter_enabled] 为 [code]true[/code] 时调用。" "如果返回 [code]true[/code],则不会处理对应的点。\n" "请注意,这个函数在默认的 [AStar3D] 类中是隐藏的。" #: doc/classes/AStar3D.xml msgid "" "Adds a new point at the given position with the given identifier. The [param " "id] must be 0 or larger, and the [param weight_scale] must be 0.0 or " "greater.\n" "The [param weight_scale] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " "the algorithm prefers points with lower [param weight_scale]s to form a " "path.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with " "weight_scale 4 and id 1\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(1, 0, 0), 4); // Adds the point (1, 0, 0) with " "weight_scale 4 and id 1\n" "[/csharp]\n" "[/codeblocks]\n" "If there already exists a point for the given [param id], its position and " "weight scale are updated to the given values." msgstr "" "在给定的位置添加一个新的点,并使用给定的标识符。[param id] 必须大于等于 0," "[param weight_scale] 必须大于等于 0.0。\n" "在确定从邻点到此点的一段路程的总成本时,[param weight_scale] 要乘以 [method " "_compute_cost] 的结果。因此,在其他条件相同的情况下,算法优先选择 [param " "weight_scale] 较低的点来形成路径。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(1, 0, 0), 4) # 添加点 (1, 0, 0),其 weight_scale " "为 4 且 id 为 1\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(1, 0, 0), 4); // 添加点 (1, 0, 0),其 " "weight_scale 为 4 且 id 为 1\n" "[/csharp]\n" "[/codeblocks]\n" "如果对于给定的 [param id] 已经存在一个点,它的位置和权重将被更新为给定的值。" #: doc/classes/AStar3D.xml msgid "" "Returns whether the two given points are directly connected by a segment. If " "[param bidirectional] is [code]false[/code], returns whether movement from " "[param id] to [param to_id] is possible through this segment." msgstr "" "返回两个给定点是否通过线段直接连接。如果 [param bidirectional] 为 " "[code]false[/code],则返回是否可以通过该线段从 [param id] 移动到 [param " "to_id]。" #: doc/classes/AStar3D.xml msgid "" "Creates a segment between the given points. If [param bidirectional] is " "[code]false[/code], only movement from [param id] to [param to_id] is " "allowed, not the reverse direction.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(1, 1, 0))\n" "astar.add_point(2, Vector3(0, 5, 0))\n" "astar.connect_points(1, 2, false)\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(1, 1, 0));\n" "astar.AddPoint(2, new Vector3(0, 5, 0));\n" "astar.ConnectPoints(1, 2, false);\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "在给定的点之间创建一条线段。如果 [param bidirectional] 为 [code]false[/" "code],则只允许从 [param id] 到 [param to_id] 的移动,而不允许反向移动。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(1, 1, 0))\n" "astar.add_point(2, Vector3(0, 5, 0))\n" "astar.connect_points(1, 2, false)\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(1, 1, 0));\n" "astar.AddPoint(2, new Vector3(0, 5, 0));\n" "astar.ConnectPoints(1, 2, false);\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AStar3D.xml msgid "" "Returns the closest position to [param to_position] that resides inside a " "segment between two connected points.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(0, 0, 0))\n" "astar.add_point(2, Vector3(0, 5, 0))\n" "astar.connect_points(1, 2)\n" "var res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns " "(0, 3, 0)\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(0, 0, 0));\n" "astar.AddPoint(2, new Vector3(0, 5, 0));\n" "astar.ConnectPoints(1, 2);\n" "Vector3 res = astar.GetClosestPositionInSegment(new Vector3(3, 3, 0)); // " "Returns (0, 3, 0)\n" "[/csharp]\n" "[/codeblocks]\n" "The result is in the segment that goes from [code]y = 0[/code] to [code]y = " "5[/code]. It's the closest position in the segment to the given point." msgstr "" "返回位于两个连接点之间的线段中离 [param to_position] 最近的位置。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(0, 0, 0))\n" "astar.add_point(2, Vector3(0, 5, 0))\n" "astar.connect_points(1, 2)\n" "var res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # 返回 (0, " "3, 0)\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(0, 0, 0));\n" "astar.AddPoint(2, new Vector3(0, 5, 0));\n" "astar.ConnectPoints(1, 2);\n" "Vector3 res = astar.GetClosestPositionInSegment(new Vector3(3, 3, 0)); // 返" "回 (0, 3, 0)\n" "[/csharp]\n" "[/codeblocks]\n" "结果是在从 [code]y = 0[/code] 到 [code]y = 5[/code] 的线段中。它是线段中距离" "给定点最近的位置。" #: doc/classes/AStar3D.xml msgid "" "Returns an array with the IDs of the points that form the path found by " "AStar3D between the given points. The array is ordered from the starting " "point to the ending point of the path.\n" "If there is no valid path to the target, and [param allow_partial_path] is " "[code]true[/code], returns a path to the point closest to the target that " "can be reached.\n" "[b]Note:[/b] When [param allow_partial_path] is [code]true[/code] and [param " "to_id] is disabled the search may take an unusually long time to finish.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(0, 0, 0))\n" "astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1\n" "astar.add_point(3, Vector3(1, 1, 0))\n" "astar.add_point(4, Vector3(2, 0, 0))\n" "\n" "astar.connect_points(1, 2, false)\n" "astar.connect_points(2, 3, false)\n" "astar.connect_points(4, 3, false)\n" "astar.connect_points(1, 4, false)\n" "\n" "var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(0, 0, 0));\n" "astar.AddPoint(2, new Vector3(0, 1, 0), 1); // Default weight is 1\n" "astar.AddPoint(3, new Vector3(1, 1, 0));\n" "astar.AddPoint(4, new Vector3(2, 0, 0));\n" "astar.ConnectPoints(1, 2, false);\n" "astar.ConnectPoints(2, 3, false);\n" "astar.ConnectPoints(4, 3, false);\n" "astar.ConnectPoints(1, 4, false);\n" "long[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3]\n" "[/csharp]\n" "[/codeblocks]\n" "If you change the 2nd point's weight to 3, then the result will be [code][1, " "4, 3][/code] instead, because now even though the distance is longer, it's " "\"easier\" to get through point 4 than through point 2." msgstr "" "返回一个数组,其中包含构成 AStar3D 在给定点之间找到的路径中的点的 ID。数组从" "路径的起点到终点排序。\n" "如果没有能够到达目标的有效路径,并且 [param allow_partial_path] 为" "[code]true[/code],则返回能够到达的最接近目标点的路径。\n" "[b]注意:[/b]如果 [param allow_partial_path] 为 [code]true[/code] 并且 " "[param to_id] 处于禁用状态,搜索耗时可能异常地大。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(0, 0, 0))\n" "astar.add_point(2, Vector3(0, 1, 0), 1) # 默认权重为 1\n" "astar.add_point(3, Vector3(1, 1, 0))\n" "astar.add_point(4, Vector3(2, 0, 0))\n" "\n" "astar.connect_points(1, 2, false)\n" "astar.connect_points(2, 3, false)\n" "astar.connect_points(4, 3, false)\n" "astar.connect_points(1, 4, false)\n" "\n" "var res = astar.get_id_path(1, 3) # 返回 [1, 2, 3]\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(0, 0, 0));\n" "astar.AddPoint(2, new Vector3(0, 1, 0), 1); // 默认权重为 1\n" "astar.AddPoint(3, new Vector3(1, 1, 0));\n" "astar.AddPoint(4, new Vector3(2, 0, 0));\n" "astar.ConnectPoints(1, 2, false);\n" "astar.ConnectPoints(2, 3, false);\n" "astar.ConnectPoints(4, 3, false);\n" "astar.ConnectPoints(1, 4, false);\n" "long[] res = astar.GetIdPath(1, 3); // 返回 [1, 2, 3]\n" "[/csharp]\n" "[/codeblocks]\n" "如果将第 2 个点的权重更改为 3,则结果将改为 [code][1, 4, 3][/code],因为现在" "即使距离更长,但通过第 4 点也比通过第 2 点“更容易”。" #: doc/classes/AStar3D.xml msgid "" "Returns an array with the IDs of the points that form the connection with " "the given point.\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(0, 0, 0))\n" "astar.add_point(2, Vector3(0, 1, 0))\n" "astar.add_point(3, Vector3(1, 1, 0))\n" "astar.add_point(4, Vector3(2, 0, 0))\n" "\n" "astar.connect_points(1, 2, true)\n" "astar.connect_points(1, 3, true)\n" "\n" "var neighbors = astar.get_point_connections(1) # Returns [2, 3]\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(0, 0, 0));\n" "astar.AddPoint(2, new Vector3(0, 1, 0));\n" "astar.AddPoint(3, new Vector3(1, 1, 0));\n" "astar.AddPoint(4, new Vector3(2, 0, 0));\n" "astar.ConnectPoints(1, 2, true);\n" "astar.ConnectPoints(1, 3, true);\n" "\n" "long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3]\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回一个数组,其中包含与给定点形成连接的点的 ID。\n" "[codeblocks]\n" "[gdscript]\n" "var astar = AStar3D.new()\n" "astar.add_point(1, Vector3(0, 0, 0))\n" "astar.add_point(2, Vector3(0, 1, 0))\n" "astar.add_point(3, Vector3(1, 1, 0))\n" "astar.add_point(4, Vector3(2, 0, 0))\n" "\n" "astar.connect_points(1, 2, true)\n" "astar.connect_points(1, 3, true)\n" "\n" "var neighbors = astar.get_point_connections(1) # 返回 [2, 3]\n" "[/gdscript]\n" "[csharp]\n" "var astar = new AStar3D();\n" "astar.AddPoint(1, new Vector3(0, 0, 0));\n" "astar.AddPoint(2, new Vector3(0, 1, 0));\n" "astar.AddPoint(3, new Vector3(1, 1, 0));\n" "astar.AddPoint(4, new Vector3(2, 0, 0));\n" "astar.ConnectPoints(1, 2, true);\n" "astar.ConnectPoints(1, 3, true);\n" "\n" "long[] neighbors = astar.GetPointConnections(1); // 返回 [2, 3]\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/AStar3D.xml msgid "" "Returns an array with the points that are in the path found by AStar3D " "between the given points. The array is ordered from the starting point to " "the ending point of the path.\n" "If there is no valid path to the target, and [param allow_partial_path] is " "[code]true[/code], returns a path to the point closest to the target that " "can be reached.\n" "[b]Note:[/b] This method is not thread-safe; it can only be used from a " "single [Thread] at a given time. Consider using [Mutex] to ensure exclusive " "access to one thread to avoid race conditions.\n" "Additionally, when [param allow_partial_path] is [code]true[/code] and " "[param to_id] is disabled the search may take an unusually long time to " "finish." msgstr "" "返回一个数组,其中包含 AStar3D 在给定点之间找到的路径中的点。数组从路径的起点" "到终点进行排序。\n" "如果没有通往目标的有效路径并且 [param allow_partial_path] 为 [code]true[/" "code],则会返回通往距离目标最近的可达点的路径。\n" "[b]注意:[/b]该方法不是线程安全的,同一时间只能有一个 [Thread] 使用。请考虑使" "用 [Mutex] 来确保线程独占访问,避免竞态条件。\n" "另外,如果 [param allow_partial_path] 为 [code]true[/code] 并且 [param " "to_id] 处于禁用状态,搜索耗时可能异常地大。" #: doc/classes/AStarGrid2D.xml msgid "" "An implementation of A* for finding the shortest path between two points on " "a partial 2D grid." msgstr "A* 的一种实现,用于寻找疏松 2D 网格中两点之间的最短路径。" #: doc/classes/AStarGrid2D.xml msgid "" "[AStarGrid2D] is a variant of [AStar2D] that is specialized for partial 2D " "grids. It is simpler to use because it doesn't require you to manually " "create points and connect them together. This class also supports multiple " "types of heuristics, modes for diagonal movement, and a jumping mode to " "speed up calculations.\n" "To use [AStarGrid2D], you only need to set the [member region] of the grid, " "optionally set the [member cell_size], and then call the [method update] " "method:\n" "[codeblocks]\n" "[gdscript]\n" "var astar_grid = AStarGrid2D.new()\n" "astar_grid.region = Rect2i(0, 0, 32, 32)\n" "astar_grid.cell_size = Vector2(16, 16)\n" "astar_grid.update()\n" "print(astar_grid.get_id_path(Vector2i(0, 0), Vector2i(3, 4))) # Prints [(0, " "0), (1, 1), (2, 2), (3, 3), (3, 4)]\n" "print(astar_grid.get_point_path(Vector2i(0, 0), Vector2i(3, 4))) # Prints " "[(0, 0), (16, 16), (32, 32), (48, 48), (48, 64)]\n" "[/gdscript]\n" "[csharp]\n" "AStarGrid2D astarGrid = new AStarGrid2D();\n" "astarGrid.Region = new Rect2I(0, 0, 32, 32);\n" "astarGrid.CellSize = new Vector2I(16, 16);\n" "astarGrid.Update();\n" "GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // Prints " "[(0, 0), (1, 1), (2, 2), (3, 3), (3, 4)]\n" "GD.Print(astarGrid.GetPointPath(Vector2I.Zero, new Vector2I(3, 4))); // " "Prints [(0, 0), (16, 16), (32, 32), (48, 48), (48, 64)]\n" "[/csharp]\n" "[/codeblocks]\n" "To remove a point from the pathfinding grid, it must be set as \"solid\" " "with [method set_point_solid]." msgstr "" "[AStarGrid2D] 是 [AStar2D] 的变种,针对疏松 2D 网格进行了优化。因为不需要手动" "创建点并进行连接,所以用起来更加简单。这个类还支持使用不同的启发方法、斜向移" "动模式、跳跃模式,从而加速运算。\n" "要使用 [AStarGrid2D],你只需要设置网格的 [member region],[member cell_size] " "可以不设置,最后调用 [method update] 方法即可:\n" "[codeblocks]\n" "[gdscript]\n" "var astar_grid = AStarGrid2D.new()\n" "astar_grid.region = Rect2i(0, 0, 32, 32)\n" "astar_grid.cell_size = Vector2(16, 16)\n" "astar_grid.update()\n" "print(astar_grid.get_id_path(Vector2i(0, 0), Vector2i(3, 4))) # 输出 [(0, " "0), (1, 1), (2, 2), (3, 3), (3, 4)]\n" "print(astar_grid.get_point_path(Vector2i(0, 0), Vector2i(3, 4))) # 输出 [(0, " "0), (16, 16), (32, 32), (48, 48), (48, 64)]\n" "[/gdscript]\n" "[csharp]\n" "AStarGrid2D astarGrid = new AStarGrid2D();\n" "astarGrid.Region = new Rect2I(0, 0, 32, 32);\n" "astarGrid.CellSize = new Vector2I(16, 16);\n" "astarGrid.Update();\n" "GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // 输出 " "[(0, 0), (1, 1), (2, 2), (3, 3), (3, 4)]\n" "GD.Print(astarGrid.GetPointPath(Vector2I.Zero, new Vector2I(3, 4))); // 输出 " "[(0, 0), (16, 16), (32, 32), (48, 48), (48, 64)]\n" "[/csharp]\n" "[/codeblocks]\n" "要从寻路网格中移除某个点,必须使用 [method set_point_solid] 将其设置为“实" "心”。" #: doc/classes/AStarGrid2D.xml msgid "" "Called when computing the cost between two connected points.\n" "Note that this function is hidden in the default [AStarGrid2D] class." msgstr "" "计算两个连接点之间的成本时调用。\n" "请注意,这个函数在默认的 [AStarGrid2D] 类中是隐藏的。" #: doc/classes/AStarGrid2D.xml msgid "" "Called when estimating the cost between a point and the path's ending " "point.\n" "Note that this function is hidden in the default [AStarGrid2D] class." msgstr "" "估算某个点和路径终点之间的成本时调用。\n" "请注意,这个函数在默认的 [AStarGrid2D] 类中是隐藏的。" #: doc/classes/AStarGrid2D.xml msgid "" "Clears the grid and sets the [member region] to [code]Rect2i(0, 0, 0, 0)[/" "code]." msgstr "清空网格并将 [member region] 设置为 [code]Rect2i(0, 0, 0, 0)[/code]。" #: doc/classes/AStarGrid2D.xml msgid "" "Fills the given [param region] on the grid with the specified value for the " "solid flag.\n" "[b]Note:[/b] Calling [method update] is not needed after the call of this " "function." msgstr "" "使用指定的值填充网格上 [param region] 区域的实心标志。\n" "[b]注意:[/b]调用该函数后不需要调用 [method update]。" #: doc/classes/AStarGrid2D.xml msgid "" "Fills the given [param region] on the grid with the specified value for the " "weight scale.\n" "[b]Note:[/b] Calling [method update] is not needed after the call of this " "function." msgstr "" "使用指定的值填充网格上 [param region] 区域的权重缩放。\n" "[b]注意:[/b]调用该函数后不需要调用 [method update]。" #: doc/classes/AStarGrid2D.xml msgid "" "Returns an array with the IDs of the points that form the path found by " "AStar2D between the given points. The array is ordered from the starting " "point to the ending point of the path.\n" "If there is no valid path to the target, and [param allow_partial_path] is " "[code]true[/code], returns a path to the point closest to the target that " "can be reached.\n" "[b]Note:[/b] When [param allow_partial_path] is [code]true[/code] and [param " "to_id] is solid the search may take an unusually long time to finish." msgstr "" "返回一个数组,其中包含 AStar2D 在给定点之间找到的路径中的点。数组从路径的起点" "到终点进行排序。\n" "如果没有通往目标的有效路径并且 [param allow_partial_path] 为 [code]true[/" "code],则会返回通往距离目标最近的可达点的路径。\n" "[b]注意:[/b]如果 [param allow_partial_path] 为 [code]true[/code] 并且 " "[param to_id] 处于禁用状态,搜索耗时可能异常地大。" #: doc/classes/AStarGrid2D.xml msgid "" "Returns an array of dictionaries with point data ([code]id[/code]: " "[Vector2i], [code]position[/code]: [Vector2], [code]solid[/code]: [bool], " "[code]weight_scale[/code]: [float]) within a [param region]." msgstr "" "返回 [param region] 范围内点数据([code]id[/code]: [Vector2i], " "[code]position[/code]: [Vector2], [code]solid[/code]: [bool], " "[code]weight_scale[/code]: [float])的字典数组。" #: doc/classes/AStarGrid2D.xml msgid "" "Returns an array with the points that are in the path found by [AStarGrid2D] " "between the given points. The array is ordered from the starting point to " "the ending point of the path.\n" "If there is no valid path to the target, and [param allow_partial_path] is " "[code]true[/code], returns a path to the point closest to the target that " "can be reached.\n" "[b]Note:[/b] This method is not thread-safe; it can only be used from a " "single [Thread] at a given time. Consider using [Mutex] to ensure exclusive " "access to one thread to avoid race conditions.\n" "Additionally, when [param allow_partial_path] is [code]true[/code] and " "[param to_id] is solid the search may take an unusually long time to finish." msgstr "" "返回一个数组,其中包含 [AStarGrid2D] 在给定点之间找到的路径上的点。数组从路径" "的起点到终点排序。\n" "如果没有通往目标的有效路径并且 [param allow_partial_path] 为 [code]true[/" "code],则会返回通往距离目标最近的可达点的路径。\n" "[b]注意:[/b]该方法不是线程安全的,同一时间只能有一个 [Thread] 使用。请考虑使" "用 [Mutex] 来确保线程独占访问,避免竞态条件。\n" "另外,如果 [param allow_partial_path] 为 [code]true[/code] 并且 [param " "to_id] 处于禁用状态,搜索耗时可能异常地大。" #: doc/classes/AStarGrid2D.xml msgid "" "Indicates that the grid parameters were changed and [method update] needs to " "be called." msgstr "表示网格参数发生改变,需要调用 [method update]。" #: doc/classes/AStarGrid2D.xml msgid "" "Returns [code]true[/code] if the [param x] and [param y] is a valid grid " "coordinate (id), i.e. if it is inside [member region]. Equivalent to " "[code]region.has_point(Vector2i(x, y))[/code]." msgstr "" "如果 [param x] 和 [param y] 是有效的网格坐标(ID),即如果它位于 [member " "region] 内部,则返回 [code]true[/code]。相当于 " "[code]region.has_point(Vector2i(x, y))[/code]。" #: doc/classes/AStarGrid2D.xml msgid "" "Returns [code]true[/code] if the [param id] vector is a valid grid " "coordinate, i.e. if it is inside [member region]. Equivalent to " "[code]region.has_point(id)[/code]." msgstr "" "如果 [param id] 向量是有效的网格坐标,即如果它位于 [member region] 内部,则返" "回 [code]true[/code]。相当于 [code]region.has_point(id)[/code]。" #: doc/classes/AStarGrid2D.xml msgid "" "Returns [code]true[/code] if a point is disabled for pathfinding. By " "default, all points are enabled." msgstr "" "如果寻路时会禁用某个点,则返回 [code]true[/code]。默认情况下,所有点均处于启" "用状态。" #: doc/classes/AStarGrid2D.xml msgid "" "Disables or enables the specified point for pathfinding. Useful for making " "an obstacle. By default, all points are enabled.\n" "[b]Note:[/b] Calling [method update] is not needed after the call of this " "function." msgstr "" "禁用或启用指定的寻路点。用于制造障碍物。默认情况下,启用所有点。\n" "[b]注意:[/b]调用该函数后不需要调用 [method update]。" #: doc/classes/AStarGrid2D.xml msgid "" "Sets the [param weight_scale] for the point with the given [param id]. The " "[param weight_scale] is multiplied by the result of [method _compute_cost] " "when determining the overall cost of traveling across a segment from a " "neighboring point to this point.\n" "[b]Note:[/b] Calling [method update] is not needed after the call of this " "function." msgstr "" "为具有给定 [param id] 的点设置 [param weight_scale]。在确定从相邻点到该点穿越" "路段的总成本时,[param weight_scale] 要乘以 [method _compute_cost] 的结果。\n" "[b]注意:[/b]调用该函数后不需要调用 [method update]。" #: doc/classes/AStarGrid2D.xml msgid "" "Updates the internal state of the grid according to the parameters to " "prepare it to search the path. Needs to be called if parameters like [member " "region], [member cell_size] or [member offset] are changed. [method " "is_dirty] will return [code]true[/code] if this is the case and this needs " "to be called.\n" "[b]Note:[/b] All point data (solidity and weight scale) will be cleared." msgstr "" "根据参数更新网格的内部状态,以准备搜索路径。如果更改了 [member region]、" "[member cell_size] 或 [member offset] 等参数就需要调用它。如果是这种情况,则 " "[method is_dirty] 将返回 [code]true[/code],需要调用此方法。\n" "[b]注意:[/b]会清空所有点的数据(坚固以及权重比例)。" #: doc/classes/AStarGrid2D.xml msgid "" "The cell shape. Affects how the positions are placed in the grid. If " "changed, [method update] needs to be called before finding the next path." msgstr "" "单元格形状。影响位置在栅格中的放置方式。如果发生变化,需要在查找下一条路径之" "前调用 [method update]。" #: doc/classes/AStarGrid2D.xml msgid "" "The size of the point cell which will be applied to calculate the resulting " "point position returned by [method get_point_path]. If changed, [method " "update] needs to be called before finding the next path." msgstr "" "要用于计算由 [method get_point_path] 返回的结果点位置的点单元的大小。如果更改" "了这个值,在查找下一个路径之前需要调用 [method update]。" #: doc/classes/AStarGrid2D.xml msgid "" "The default [enum Heuristic] which will be used to calculate the cost " "between two points if [method _compute_cost] was not overridden." msgstr "" "默认 [enum Heuristic],用于在没有覆盖 [method _compute_cost] 时计算两点之间的" "消耗。" #: doc/classes/AStarGrid2D.xml msgid "" "The default [enum Heuristic] which will be used to calculate the cost " "between the point and the end point if [method _estimate_cost] was not " "overridden." msgstr "" "默认 [enum Heuristic],用于在没有覆盖 [method _estimate_cost] 时计算该点和终" "点之间的消耗。" #: doc/classes/AStarGrid2D.xml msgid "" "A specific [enum DiagonalMode] mode which will force the path to avoid or " "accept the specified diagonals." msgstr "特定的 [enum DiagonalMode],会强制路径避免或接受特定的对角线。" #: doc/classes/AStarGrid2D.xml msgid "" "Enables or disables jumping to skip up the intermediate points and speeds up " "the searching algorithm.\n" "[b]Note:[/b] Currently, toggling it on disables the consideration of weight " "scaling in pathfinding." msgstr "" "启用或禁用跳跃,以跳过中间点并加快搜索算法的速度。\n" "[b]注意:[/b]目前,打开它会在寻路过程中忽略权重缩放。" #: doc/classes/AStarGrid2D.xml msgid "" "The offset of the grid which will be applied to calculate the resulting " "point position returned by [method get_point_path]. If changed, [method " "update] needs to be called before finding the next path." msgstr "" "栅格的偏移量,将被应用以计算 [method get_point_path] 返回的结果点的位置。如果" "发生变化,需要在查找下一条路径之前调用 [method update]。" #: doc/classes/AStarGrid2D.xml msgid "" "The region of grid cells available for pathfinding. If changed, [method " "update] needs to be called before finding the next path." msgstr "" "栅格上用来寻路的区域。如果发生变化,需要在查找下一条路径之前调用 [method " "update]。" #: doc/classes/AStarGrid2D.xml msgid "Use [member region] instead." msgstr "请改用 [member region]。" #: doc/classes/AStarGrid2D.xml msgid "" "The size of the grid (number of cells of size [member cell_size] on each " "axis). If changed, [method update] needs to be called before finding the " "next path." msgstr "" "栅格的大小(每个轴上大小为 [member cell_size] 的单元格数)。如果发生变化,需" "要在查找下一条路径之前调用 [method update]。" #: doc/classes/AStarGrid2D.xml msgid "" "The [url=https://en.wikipedia.org/wiki/Euclidean_distance]Euclidean " "heuristic[/url] to be used for the pathfinding using the following formula:\n" "[codeblock]\n" "dx = abs(to_id.x - from_id.x)\n" "dy = abs(to_id.y - from_id.y)\n" "result = sqrt(dx * dx + dy * dy)\n" "[/codeblock]\n" "[b]Note:[/b] This is also the internal heuristic used in [AStar3D] and " "[AStar2D] by default (with the inclusion of possible z-axis coordinate)." msgstr "" "[url=https://zh.wikipedia.org/wiki/" "%E6%AC%A7%E5%87%A0%E9%87%8C%E5%BE%97%E8%B7%9D%E7%A6%BB]欧几里德启发式算法[/" "url]将被用于寻路,使用的公式如下:\n" "[codeblock]\n" "dx = abs(to_id.x - from_id.x)\n" "dy = abs(to_id.y - from_id.y)\n" "result = sqrt(dx * dx + dy * dy)\n" "[/codeblock]\n" "[b]注意:[/b]这也是 [AStar3D] 和 [AStar2D] 默认使用的内部启发式算法(包括可能" "的 z 轴坐标)。" #: doc/classes/AStarGrid2D.xml msgid "" "The [url=https://en.wikipedia.org/wiki/Taxicab_geometry]Manhattan heuristic[/" "url] to be used for the pathfinding using the following formula:\n" "[codeblock]\n" "dx = abs(to_id.x - from_id.x)\n" "dy = abs(to_id.y - from_id.y)\n" "result = dx + dy\n" "[/codeblock]\n" "[b]Note:[/b] This heuristic is intended to be used with 4-side orthogonal " "movements, provided by setting the [member diagonal_mode] to [constant " "DIAGONAL_MODE_NEVER]." msgstr "" "[url=https://zh.wikipedia.org/wiki/" "%E6%9B%BC%E5%93%88%E9%A0%93%E8%B7%9D%E9%9B%A2]曼哈顿启发式算法[/url]将被用于" "寻路,使用的公式如下:\n" "[codeblock]\n" "dx = abs(to_id.x - from_id.x)\n" "dy = abs(to_id.y - from_id.y)\n" "result = dx + dy\n" "[/codeblock]\n" "[b]注意:[/b]该启发式算法旨在与 4 边正交运动一起使用,4 边正交运动可通过将 " "[member diagonal_mode] 设置为 [constant DIAGONAL_MODE_NEVER] 来提供。" #: doc/classes/AStarGrid2D.xml msgid "" "The Octile heuristic to be used for the pathfinding using the following " "formula:\n" "[codeblock]\n" "dx = abs(to_id.x - from_id.x)\n" "dy = abs(to_id.y - from_id.y)\n" "f = sqrt(2) - 1\n" "result = (dx < dy) ? f * dx + dy : f * dy + dx;\n" "[/codeblock]" msgstr "" "Octile 启发式算法将被用于寻路,使用的公式如下:\n" "[codeblock]\n" "dx = abs(to_id.x - from_id.x)\n" "dy = abs(to_id.y - from_id.y)\n" "f = sqrt(2) - 1\n" "result = (dx < dy) ? f * dx + dy : f * dy + dx;\n" "[/codeblock]" #: doc/classes/AStarGrid2D.xml msgid "" "The [url=https://en.wikipedia.org/wiki/Chebyshev_distance]Chebyshev " "heuristic[/url] to be used for the pathfinding using the following formula:\n" "[codeblock]\n" "dx = abs(to_id.x - from_id.x)\n" "dy = abs(to_id.y - from_id.y)\n" "result = max(dx, dy)\n" "[/codeblock]" msgstr "" "[url=https://zh.wikipedia.org/wiki/" "%E5%88%87%E6%AF%94%E9%9B%AA%E5%A4%AB%E8%B7%9D%E7%A6%BB]切比雪夫启发式算法[/" "url]将被用于寻路,使用的公式如下:\n" "[codeblock]\n" "dx = abs(to_id.x - from_id.x)\n" "dy = abs(to_id.y - from_id.y)\n" "result = max(dx, dy)\n" "[/codeblock]" #: doc/classes/AStarGrid2D.xml msgid "Represents the size of the [enum Heuristic] enum." msgstr "代表 [enum Heuristic] 枚举的大小。" #: doc/classes/AStarGrid2D.xml msgid "" "The pathfinding algorithm will ignore solid neighbors around the target cell " "and allow passing using diagonals." msgstr "该寻路算法将忽略目标单元格周围的实体邻居,并允许沿对角线通过。" #: doc/classes/AStarGrid2D.xml msgid "" "The pathfinding algorithm will ignore all diagonals and the way will be " "always orthogonal." msgstr "该寻路算法将忽略所有对角线,并且路径始终是正交的。" #: doc/classes/AStarGrid2D.xml msgid "" "The pathfinding algorithm will avoid using diagonals if at least two " "obstacles have been placed around the neighboring cells of the specific path " "segment." msgstr "" "如果在特定路径段的相邻单元格周围放置了至少两个障碍物,则该寻路算法将避免使用" "对角线。" #: doc/classes/AStarGrid2D.xml msgid "" "The pathfinding algorithm will avoid using diagonals if any obstacle has " "been placed around the neighboring cells of the specific path segment." msgstr "" "如果在特定路径段的相邻单元格周围放置了任意障碍物,则该寻路算法将避免使用对角" "线。" #: doc/classes/AStarGrid2D.xml msgid "Represents the size of the [enum DiagonalMode] enum." msgstr "代表 [enum DiagonalMode] 枚举的大小。" #: doc/classes/AStarGrid2D.xml msgid "Rectangular cell shape." msgstr "矩形单元格形状。" #: doc/classes/AStarGrid2D.xml msgid "" "Diamond cell shape (for isometric look). Cell coordinates layout where the " "horizontal axis goes up-right, and the vertical one goes down-right." msgstr "" "菱形单元格形状(用于等轴外观)。单元格坐标布局,其中水平轴朝向右上方,垂直轴" "朝向右下方。" #: doc/classes/AStarGrid2D.xml msgid "" "Diamond cell shape (for isometric look). Cell coordinates layout where the " "horizontal axis goes down-right, and the vertical one goes down-left." msgstr "" "菱形单元格形状(用于等轴外观)。单元格坐标布局,其中水平轴朝向右下方,垂直轴" "朝向左下方。" #: doc/classes/AStarGrid2D.xml msgid "Represents the size of the [enum CellShape] enum." msgstr "代表 [enum CellShape] 枚举的大小。" #: doc/classes/AtlasTexture.xml msgid "A texture that crops out part of another Texture2D." msgstr "裁剪其他 Texture2D 的纹理。" #: doc/classes/AtlasTexture.xml msgid "" "[Texture2D] resource that draws only part of its [member atlas] texture, as " "defined by the [member region]. An additional [member margin] can also be " "set, which is useful for small adjustments.\n" "Multiple [AtlasTexture] resources can be cropped from the same [member " "atlas]. Packing many smaller textures into a singular large texture helps to " "optimize video memory costs and render calls.\n" "[b]Note:[/b] [AtlasTexture] cannot be used in an [AnimatedTexture], and will " "not tile properly in nodes such as [TextureRect] or [Sprite2D]. To tile an " "[AtlasTexture], modify its [member region] instead." msgstr "" "[Texture2D] 资源,只绘制 [member atlas] 纹理中由 [member region] 所定义的那部" "分区域。还可以设置额外的边距 [member margin],适用于进行较小的调整。\n" "可以从同一个 [member atlas] 中裁剪出多个 [AtlasTexture] 资源。将许多较小的纹" "理打包成一个单一的大纹理有助于优化视频内存成本和渲染调用。\n" "[b]注意:[/b][AtlasTexture] 不能在 [AnimatedTexture] 中使用,也无法在 " "[TextureRect]、[Sprite2D] 等节点中正确平铺。要平铺 [AtlasTexture] 请修改 " "[member region]。" #: doc/classes/AtlasTexture.xml msgid "" "The texture that contains the atlas. Can be any type inheriting from " "[Texture2D], including another [AtlasTexture]." msgstr "" "包含该图集的纹理。可以是任何继承自 [Texture2D] 的类型,包括其他 " "[AtlasTexture]。" #: doc/classes/AtlasTexture.xml msgid "" "If [code]true[/code], the area outside of the [member region] is clipped to " "avoid bleeding of the surrounding texture pixels." msgstr "" "如果为 [code]true[/code],则 [member region] 之外的区域将被裁剪以避免周围纹理" "像素的渗色。" #: doc/classes/AtlasTexture.xml msgid "" "The margin around the [member region]. Useful for small adjustments. If the " "[member Rect2.size] of this property (\"w\" and \"h\" in the editor) is set, " "the drawn texture is resized to fit within the margin." msgstr "" "围绕 [member region] 的边距。对小的调整很有用。如果设置了该属性(编辑器中" "的“w”和“h”)的 [member Rect2.size],则绘制的纹理将被调整大小以适合该边距。" #: doc/classes/AtlasTexture.xml #, fuzzy msgid "" "The region used to draw the [member atlas]. If either dimension of the " "region's size is [code]0[/code], the value from [member atlas] size will be " "used for that axis instead.\n" "[b]Note:[/b] The image size is always an integer, so the actual region size " "is rounded down." msgstr "" "绘制 [member atlas] 的区域。如果区域在某个方向上大小为 [code]0[/code],则该方" "向会使用 [member atlas] 的大小。" #: doc/classes/AudioBusLayout.xml msgid "Stores information about the audio buses." msgstr "存储有关音频总线的信息。" #: doc/classes/AudioBusLayout.xml msgid "" "Stores position, muting, solo, bypass, effects, effect position, volume, and " "the connections between buses. See [AudioServer] for usage." msgstr "" "存储位置、静音、独奏、旁通、效果、效果位置、音量以及总线之间的连接。使用方法" "见 [AudioServer] 。" #: doc/classes/AudioEffect.xml msgid "Base class for audio effect resources." msgstr "音频效果资源的基类。" #: doc/classes/AudioEffect.xml msgid "" "The base [Resource] for every audio effect. In the editor, an audio effect " "can be added to the current bus layout through the Audio panel. At run-time, " "it is also possible to manipulate audio effects through [method " "AudioServer.add_bus_effect], [method AudioServer.remove_bus_effect], and " "[method AudioServer.get_bus_effect].\n" "When applied on a bus, an audio effect creates a corresponding " "[AudioEffectInstance]. The instance is directly responsible for manipulating " "the sound, based on the original audio effect's properties." msgstr "" "音频效果的基础 [Resource]。在编辑器中,可以在“音频”面板中为当前的总线布局添加" "音频效果。在运行时,也可以通过 [method AudioServer.add_bus_effect]、[method " "AudioServer.remove_bus_effect]、[method AudioServer.get_bus_effect] 来操作音" "频效果。\n" "应用到总线时,音频效果会创建一个对应的 [AudioEffectInstance] 实例。由这个实例" "来负责根据原始音频效果的属性操作声音。" #: doc/classes/AudioEffect.xml doc/classes/AudioEffectAmplify.xml #: doc/classes/AudioEffectBandLimitFilter.xml #: doc/classes/AudioEffectBandPassFilter.xml doc/classes/AudioEffectCapture.xml #: doc/classes/AudioEffectChorus.xml doc/classes/AudioEffectCompressor.xml #: doc/classes/AudioEffectDelay.xml doc/classes/AudioEffectDistortion.xml #: doc/classes/AudioEffectEQ.xml doc/classes/AudioEffectEQ10.xml #: doc/classes/AudioEffectEQ21.xml doc/classes/AudioEffectEQ6.xml #: doc/classes/AudioEffectFilter.xml doc/classes/AudioEffectHardLimiter.xml #: doc/classes/AudioEffectHighPassFilter.xml #: doc/classes/AudioEffectHighShelfFilter.xml #: doc/classes/AudioEffectInstance.xml doc/classes/AudioEffectLimiter.xml #: doc/classes/AudioEffectLowPassFilter.xml #: doc/classes/AudioEffectLowShelfFilter.xml #: doc/classes/AudioEffectNotchFilter.xml doc/classes/AudioEffectPanner.xml #: doc/classes/AudioEffectPhaser.xml doc/classes/AudioEffectPitchShift.xml #: doc/classes/AudioEffectReverb.xml doc/classes/AudioEffectStereoEnhance.xml #: doc/classes/AudioServer.xml msgid "Audio buses" msgstr "音频总线" #: doc/classes/AudioEffect.xml doc/classes/AudioEffectRecord.xml #: doc/classes/AudioServer.xml doc/classes/AudioStream.xml #: doc/classes/AudioStreamPlayer.xml msgid "Audio Microphone Record Demo" msgstr "音频麦克风录音演示" #: doc/classes/AudioEffect.xml msgid "" "Override this method to customize the [AudioEffectInstance] created when " "this effect is applied on a bus in the editor's Audio panel, or through " "[method AudioServer.add_bus_effect].\n" "[codeblock]\n" "extends AudioEffect\n" "\n" "@export var strength = 4.0\n" "\n" "func _instantiate():\n" "\tvar effect = CustomAudioEffectInstance.new()\n" "\teffect.base = self\n" "\n" "\treturn effect\n" "[/codeblock]\n" "[b]Note:[/b] It is recommended to keep a reference to the original " "[AudioEffect] in the new instance. Depending on the implementation this " "allows the effect instance to listen for changes at run-time and be modified " "accordingly." msgstr "" "覆盖该方法以自定义新创建的 [AudioEffectInstance],它是在编辑器的音频面板中将" "该效果应用于总线时,或通过 [method AudioServer.add_bus_effect] 时创建的。\n" "[codeblock]\n" "extends AudioEffect\n" "\n" "@export var strength = 4.0\n" "\n" "func _instantiate():\n" "\tvar effect = CustomAudioEffectInstance.new()\n" "\teffect.base = self\n" "\n" "\treturn effect\n" "[/codeblock]\n" "[b]注意:[/b]建议在新实例中保留对原始 [AudioEffect] 的引用。根据实现,这允许" "效果实例在运行时监听更改并进行相应的修改。" #: doc/classes/AudioEffectAmplify.xml msgid "Adds an amplifying audio effect to an audio bus." msgstr "向音频总线添加一个放大的音频效果。" #: doc/classes/AudioEffectAmplify.xml msgid "Increases or decreases the volume being routed through the audio bus." msgstr "增加或减少通过音频总线传送的音量。" #: doc/classes/AudioEffectAmplify.xml msgid "" "Amount of amplification in decibels. Positive values make the sound louder, " "negative values make it quieter. Value can range from -80 to 24." msgstr "" "以分贝为单位的放大量。正值使声音更响亮,负值使声音更安静。数值范围从 -80 到 " "24。" #: doc/classes/AudioEffectAmplify.xml msgid "" "Amount of amplification as a linear value.\n" "[b]Note:[/b] This member modifies [member volume_db] for convenience. The " "returned value is equivalent to the result of [method " "@GlobalScope.db_to_linear] on [member volume_db]. Setting this member is " "equivalent to setting [member volume_db] to the result of [method " "@GlobalScope.linear_to_db] on a value." msgstr "" "作为线性值的扩增量。\n" "[b]注意:[/b]该成员会帮助修改 [member volume_db]。返回的值等价于使用 [member " "volume_db] 调用 [method @GlobalScope.db_to_linear] 的结果。设置该成员等价于" "将 [member volume_db] 设置为使用新值调用 [method @GlobalScope.linear_to_db] " "的结果。" #: doc/classes/AudioEffectBandLimitFilter.xml msgid "Adds a band limit filter to the audio bus." msgstr "为音频总线添加一个带限滤波器。" #: doc/classes/AudioEffectBandLimitFilter.xml msgid "" "Limits the frequencies in a range around the [member " "AudioEffectFilter.cutoff_hz] and allows frequencies outside of this range to " "pass." msgstr "" "限制 [member AudioEffectFilter.cutoff_hz] 周围范围内的频率,允许这个范围外的" "频率通过。" #: doc/classes/AudioEffectBandPassFilter.xml msgid "Adds a band pass filter to the audio bus." msgstr "为音频总线添加一个带通滤波器。" #: doc/classes/AudioEffectBandPassFilter.xml msgid "" "Attenuates the frequencies inside of a range around the [member " "AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this band." msgstr "" "衰减 [member AudioEffectFilter.cutoff_hz] 周围范围内的频率,并切断这个频段之" "外的频率。" #: doc/classes/AudioEffectCapture.xml msgid "Captures audio from an audio bus in real-time." msgstr "从音频总线上实时捕捉音频。" #: doc/classes/AudioEffectCapture.xml msgid "" "AudioEffectCapture is an AudioEffect which copies all audio frames from the " "attached audio effect bus into its internal ring buffer.\n" "Application code should consume these audio frames from this ring buffer " "using [method get_buffer] and process it as needed, for example to capture " "data from an [AudioStreamMicrophone], implement application-defined effects, " "or to transmit audio over the network. When capturing audio data from a " "microphone, the format of the samples will be stereo 32-bit floating-point " "PCM.\n" "Unlike [AudioEffectRecord], this effect only returns the raw audio samples " "instead of encoding them into an [AudioStream]." msgstr "" "AudioEffectCapture 是一种 AudioEffect,可将所有音频帧从附加的音频效果总线复制" "到其内部的环形缓冲区中。\n" "应用程序代码应使用 [method get_buffer] 从该环形缓冲区中消耗这些音频帧,并根据" "需要对其进行处理,例如从 [AudioStreamMicrophone] 捕获数据,实现应用程序定义的" "效果,或通过网络传输音频。从麦克风捕获音频数据时,样本格式将为立体声 32 位浮" "点 PCM。\n" "与 [AudioEffectRecord] 不同,该效果仅返回原始音频样本,而不是将它们编码到 " "[AudioStream] 中。" #: doc/classes/AudioEffectCapture.xml msgid "" "Returns [code]true[/code] if at least [param frames] audio frames are " "available to read in the internal ring buffer." msgstr "" "如果内部环形缓冲区中至少有 [param frames] 个音频帧可供读取,则返回 " "[code]true[/code]。" #: doc/classes/AudioEffectCapture.xml msgid "" "Clears the internal ring buffer.\n" "[b]Note:[/b] Calling this during a capture can cause the loss of samples " "which causes popping in the playback." msgstr "" "清空内部环形缓冲。\n" "[b]注意:[/b]捕获时调用这个方法可能造成样本的丢失,导致播放时产生噪音。" #: doc/classes/AudioEffectCapture.xml msgid "" "Gets the next [param frames] audio samples from the internal ring buffer.\n" "Returns a [PackedVector2Array] containing exactly [param frames] audio " "samples if available, or an empty [PackedVector2Array] if insufficient data " "was available.\n" "The samples are signed floating-point PCM between [code]-1[/code] and " "[code]1[/code]. You will have to scale them if you want to use them as 8 or " "16-bit integer samples. ([code]v = 0x7fff * samples[0].x[/code])" msgstr "" "从内部环形缓冲区获取后续 [param frames] 个音频样本。\n" "如果足够的话,则返回一个恰好包含 [param frames] 个音频样本的 " "[PackedVector2Array];如果可用数据不足,则返回一个空的 " "[PackedVector2Array]。\n" "样本是有符号浮点 PCM,在 [code]-1[/code] 和 [code]1[/code] 之间。如果想要作" "为 8 位或 16 位整型样本使用则需要进行缩放。([code]v = 0x7fff * " "samples[0].x[/code])" #: doc/classes/AudioEffectCapture.xml msgid "Returns the total size of the internal ring buffer in frames." msgstr "返回内部环形缓冲区的总大小,以帧为单位。" #: doc/classes/AudioEffectCapture.xml msgid "" "Returns the number of audio frames discarded from the audio bus due to full " "buffer." msgstr "返回由于缓冲区满而从音频总线上丢弃的音频帧的数量。" #: doc/classes/AudioEffectCapture.xml msgid "" "Returns the number of frames available to read using [method get_buffer]." msgstr "返回可使用 [method get_buffer] 读取的帧数。" #: doc/classes/AudioEffectCapture.xml msgid "Returns the number of audio frames inserted from the audio bus." msgstr "返回从音频总线插入的音频帧的数量。" #: doc/classes/AudioEffectCapture.xml msgid "" "Length of the internal ring buffer, in seconds. Setting the buffer length " "will have no effect if already initialized." msgstr "" "内部环形缓冲区的长度,单位为秒。如果已经初始化,设置缓冲区长度将没有效果。" #: doc/classes/AudioEffectChorus.xml msgid "Adds a chorus audio effect." msgstr "添加合唱音频效果。" #: doc/classes/AudioEffectChorus.xml msgid "" "Adds a chorus audio effect. The effect applies a filter with voices to " "duplicate the audio source and manipulate it through the filter." msgstr "添加一个合唱音频效果。该效果复制音频源,并应用声音滤波器进行操作。" #: doc/classes/AudioEffectChorus.xml msgid "The effect's raw signal." msgstr "效果的原始信号。" #: doc/classes/AudioEffectChorus.xml msgid "The voice's cutoff frequency." msgstr "声音的截止频率。" #: doc/classes/AudioEffectChorus.xml msgid "The voice's signal delay." msgstr "声音的信号延迟。" #: doc/classes/AudioEffectChorus.xml msgid "The voice filter's depth." msgstr "声音过滤器的深度。" #: doc/classes/AudioEffectChorus.xml msgid "The voice's volume." msgstr "声音的音量。" #: doc/classes/AudioEffectChorus.xml msgid "The voice's pan level." msgstr "声音的声像级别。" #: doc/classes/AudioEffectChorus.xml msgid "The voice's filter rate." msgstr "声音过滤比率。" #: doc/classes/AudioEffectChorus.xml msgid "The number of voices in the effect." msgstr "该效果中的声音数量。" #: doc/classes/AudioEffectChorus.xml msgid "The effect's processed signal." msgstr "效果的处理信号。" #: doc/classes/AudioEffectCompressor.xml msgid "" "Adds a compressor audio effect to an audio bus.\n" "Reduces sounds that exceed a certain threshold level, smooths out the " "dynamics and increases the overall volume." msgstr "" "为音频总线添加压缩音频效果。\n" "减少超过一定阈值水平的声音,平滑动态,增加整体音量。" #: doc/classes/AudioEffectCompressor.xml msgid "" "Dynamic range compressor reduces the level of the sound when the amplitude " "goes over a certain threshold in Decibels. One of the main uses of a " "compressor is to increase the dynamic range by clipping as little as " "possible (when sound goes over 0dB).\n" "Compressor has many uses in the mix:\n" "- In the Master bus to compress the whole output (although an " "[AudioEffectHardLimiter] is probably better).\n" "- In voice channels to ensure they sound as balanced as possible.\n" "- Sidechained. This can reduce the sound level sidechained with another " "audio bus for threshold detection. This technique is common in video game " "mixing to the level of music and SFX while voices are being heard.\n" "- Accentuates transients by using a wider attack, making effects sound more " "punchy." msgstr "" "动态范围压缩器在振幅超过一定的阈值(以分贝为单位)时,降低声音的电平。压缩器" "的主要用途之一是通过尽可能少的削波(当声音超过 0dB 时)来增加动态范围。\n" "压缩器在混音中的用途很多。\n" "- 在主总线上压缩整个输出(虽然 [AudioEffectHardLimiter] 可能更好些)。\n" "- 在声音通道中,以确保它们听起来尽可能的平衡。\n" "- 侧链。这可以降低与另一条音频总线侧链的声音级别,以进行阈值检测。这种技术在" "视频游戏混音中很常见,以音乐和SFX的级别,从而声音被听到。\n" "- 通过使用更宽的冲攻来突出瞬态,使效果听起来更有冲击力。" #: doc/classes/AudioEffectCompressor.xml msgid "" "Compressor's reaction time when the signal exceeds the threshold, in " "microseconds. Value can range from 20 to 2000." msgstr "" "当信号超过阈值时,压缩器的反应时间,以微秒为单位。数值范围从 20 到 2000。" #: doc/classes/AudioEffectCompressor.xml msgid "Gain applied to the output signal." msgstr "应用于输出信号的增益。" #: doc/classes/AudioEffectCompressor.xml msgid "" "Balance between original signal and effect signal. Value can range from 0 " "(totally dry) to 1 (totally wet)." msgstr "" "原始信号和效果信号之间的平衡。数值范围从 0(完全干燥)到 1(完全浸润)。" #: doc/classes/AudioEffectCompressor.xml msgid "" "Amount of compression applied to the audio once it passes the threshold " "level. The higher the ratio, the more the loud parts of the audio will be " "compressed. Value can range from 1 to 48." msgstr "" "音频通过阈值级别后,应用于音频的压缩量。比率越高,音频的大声部分将被压缩。数" "值范围从 1 到 48。" #: doc/classes/AudioEffectCompressor.xml msgid "" "Compressor's delay time to stop reducing the signal after the signal level " "falls below the threshold, in milliseconds. Value can range from 20 to 2000." msgstr "" "压缩器在信号电平低于阈值后,停止降低信号的延迟时间,以毫秒为单位。取值范围为 " "20 到 2000。" #: doc/classes/AudioEffectCompressor.xml msgid "Reduce the sound level using another audio bus for threshold detection." msgstr "使用另一条音频总线进行阈值检测,降低声音级别。" #: doc/classes/AudioEffectCompressor.xml msgid "" "The level above which compression is applied to the audio. Value can range " "from -60 to 0." msgstr "超过该电平,压缩将应用于音频。值的范围可以从 -60 到 0。" #: doc/classes/AudioEffectDelay.xml msgid "" "Adds a delay audio effect to an audio bus. Plays input signal back after a " "period of time.\n" "Two tap delay and feedback options." msgstr "" "为音频总线添加延迟音频效果。在一段时间后回放输入信号。\n" "两个节拍延迟和反馈选项。" #: doc/classes/AudioEffectDelay.xml msgid "" "Plays input signal back after a period of time. The delayed signal may be " "played back multiple times to create the sound of a repeating, decaying " "echo. Delay effects range from a subtle echo effect to a pronounced blending " "of previous sounds with new sounds." msgstr "" "在一段时间后回放输入信号。延迟的信号可以多次回放,以产生重复、衰减的回声。延" "迟效果的范围是从微弱回声效果到明显的以前声音和新声音的混合。" #: doc/classes/AudioEffectDelay.xml msgid "" "Output percent of original sound. At 0, only delayed sounds are output. " "Value can range from 0 to 1." msgstr "原始声音的输出百分比。为 0 时,只输出延迟的声音。取值范围为 0 到 1。" #: doc/classes/AudioEffectDelay.xml msgid "If [code]true[/code], feedback is enabled." msgstr "如果为 [code]true[/code],则启用反馈。" #: doc/classes/AudioEffectDelay.xml msgid "Feedback delay time in milliseconds." msgstr "反馈延迟时间,单位为毫秒。" #: doc/classes/AudioEffectDelay.xml msgid "Sound level for feedback." msgstr "反馈的声级。" #: doc/classes/AudioEffectDelay.xml msgid "" "Low-pass filter for feedback, in Hz. Frequencies below this value are " "filtered out of the source signal." msgstr "反馈的低通滤波器,单位为 Hz。低于此值的频率会被源信号过滤掉。" #: doc/classes/AudioEffectDelay.xml msgid "If [code]true[/code], the first tap will be enabled." msgstr "如果为 [code]true[/code],将启用第一拍。" #: doc/classes/AudioEffectDelay.xml msgid "First tap delay time in milliseconds." msgstr "第一拍延迟时间,单位为毫秒。" #: doc/classes/AudioEffectDelay.xml msgid "Sound level for the first tap." msgstr "第一拍的声级。" #: doc/classes/AudioEffectDelay.xml msgid "" "Pan position for the first tap. Value can range from -1 (fully left) to 1 " "(fully right)." msgstr "第一拍的声像位置。取值范围为 -1(完全向左)到 1(完全向右)。" #: doc/classes/AudioEffectDelay.xml msgid "If [code]true[/code], the second tap will be enabled." msgstr "如果为 [code]true[/code],将启用第二拍。" #: doc/classes/AudioEffectDelay.xml msgid "Second tap delay time in milliseconds." msgstr "第二拍的延迟时间,单位为毫秒。" #: doc/classes/AudioEffectDelay.xml msgid "Sound level for the second tap." msgstr "第二拍的声级。" #: doc/classes/AudioEffectDelay.xml msgid "" "Pan position for the second tap. Value can range from -1 (fully left) to 1 " "(fully right)." msgstr "第二拍的声像位置。取值范围为 -1(完全向左)到 1(完全向右)。" #: doc/classes/AudioEffectDistortion.xml msgid "" "Adds a distortion audio effect to an Audio bus.\n" "Modifies the sound to make it distorted." msgstr "" "为音频总线添加失真音频效果。\n" "修改声音,使其失真。" #: doc/classes/AudioEffectDistortion.xml msgid "" "Different types are available: clip, tan, lo-fi (bit crushing), overdrive, " "or waveshape.\n" "By distorting the waveform the frequency content changes, which will often " "make the sound \"crunchy\" or \"abrasive\". For games, it can simulate sound " "coming from some saturated device or speaker very efficiently." msgstr "" "可以使用不同的类型:削波、正切、低保真(位破碎)、过载、波形。\n" "通过扭曲波形,频率内容会发生变化,这通常会使声音“清脆”或“粗糙”。对于游戏,它" "可以非常有效地模拟来自某些饱和设备或扬声器的声音。" #: doc/classes/AudioEffectDistortion.xml msgid "Distortion power. Value can range from 0 to 1." msgstr "失真度。值的范围可在 0 到 1 之间。" #: doc/classes/AudioEffectDistortion.xml msgid "" "High-pass filter, in Hz. Frequencies higher than this value will not be " "affected by the distortion. Value can range from 1 to 20000." msgstr "" "高通滤波器,单位为 Hz。高于此值的频率不会受到失真的影响。该值的范围为 1 至 " "20000。" #: doc/classes/AudioEffectDistortion.xml msgid "Distortion type." msgstr "失真类型。" #: doc/classes/AudioEffectDistortion.xml msgid "" "Increases or decreases the volume after the effect, in decibels. Value can " "range from -80 to 24." msgstr "在效果后增加或减少的音量,单位为分贝。取值范围从 -80 到 24。" #: doc/classes/AudioEffectDistortion.xml msgid "" "Increases or decreases the volume before the effect, in decibels. Value can " "range from -60 to 60." msgstr "在效果前增加或减少的音量,单位为分贝。取值范围从 -60 到 60。" #: doc/classes/AudioEffectDistortion.xml msgid "" "Digital distortion effect which cuts off peaks at the top and bottom of the " "waveform." msgstr "数字失真效果,可以切断波形顶部和底部的峰值。" #: doc/classes/AudioEffectDistortion.xml msgid "" "Low-resolution digital distortion effect (bit depth reduction). You can use " "it to emulate the sound of early digital audio devices." msgstr "" "低分辨率的数字失真效果(位深度减少)。可以使用它来模拟早期数字音频设备的声" "音。" #: doc/classes/AudioEffectDistortion.xml msgid "" "Emulates the warm distortion produced by a field effect transistor, which is " "commonly used in solid-state musical instrument amplifiers. The [member " "drive] property has no effect in this mode." msgstr "" "模拟通常用于固态乐器放大器的场效应晶体管产生的暖失真。[member drive] 属性在该" "模式下无效。" #: doc/classes/AudioEffectDistortion.xml msgid "" "Waveshaper distortions are used mainly by electronic musicians to achieve an " "extra-abrasive sound." msgstr "波形变形失真主要是电子音乐人为了获得格外粗糙的声音而使用的。" #: doc/classes/AudioEffectEQ.xml msgid "" "Base class for audio equalizers. Gives you control over frequencies.\n" "Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] " "or [AudioEffectEQ21] don't fit your needs." msgstr "" "音频均衡器的基类。让你可以控制频率。\n" "如果 [AudioEffectEQ6]、[AudioEffectEQ10] 或 [AudioEffectEQ21] 不符合你的需" "求,请用它来创建自定义均衡器。" #: doc/classes/AudioEffectEQ.xml msgid "" "AudioEffectEQ gives you control over frequencies. Use it to compensate for " "existing deficiencies in audio. AudioEffectEQs are useful on the Master bus " "to completely master a mix and give it more character. They are also useful " "when a game is run on a mobile device, to adjust the mix to that kind of " "speakers (it can be added but disabled when headphones are plugged)." msgstr "" "AudioEffectEQ 可用于频率控制。用它来弥补音频中不足之处。AudioEffectEQ 在 " "Master 总线上很有用,可以完全掌控一个混音,并赋予它更多的特性。当游戏在移动设" "备上运行时,它们也很有用,可以根据那种扬声器来调整混音(可以被添加,但在插入" "耳机时禁用)。" #: doc/classes/AudioEffectEQ.xml msgid "Returns the number of bands of the equalizer." msgstr "返回均衡器的频段数。" #: doc/classes/AudioEffectEQ.xml msgid "Returns the band's gain at the specified index, in dB." msgstr "返回指定索引处的波段增益,单位为 dB。" #: doc/classes/AudioEffectEQ.xml msgid "Sets band's gain at the specified index, in dB." msgstr "设置指定索引处的波段增益,单位为 dB。" #: doc/classes/AudioEffectEQ10.xml msgid "" "Adds a 10-band equalizer audio effect to an Audio bus. Gives you control " "over frequencies from 31 Hz to 16000 Hz.\n" "Each frequency can be modulated between -60/+24 dB." msgstr "" "为音频总线添加 10 段均衡器音频效果。让你控制 31Hz 到 16000Hz 的频率。\n" "每个频率可以在 -60/+24 dB 之间进行调制。" #: doc/classes/AudioEffectEQ10.xml msgid "" "Frequency bands:\n" "Band 1: 31 Hz\n" "Band 2: 62 Hz\n" "Band 3: 125 Hz\n" "Band 4: 250 Hz\n" "Band 5: 500 Hz\n" "Band 6: 1000 Hz\n" "Band 7: 2000 Hz\n" "Band 8: 4000 Hz\n" "Band 9: 8000 Hz\n" "Band 10: 16000 Hz\n" "See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ21]." msgstr "" "频段:\n" "频段 1:31 Hz\n" "频段 2:62 Hz\n" "频段 3:125 Hz\n" "频段 4:250 Hz\n" "频段 5:500 Hz\n" "频段 6:1000 Hz\n" "频段 7:2000 Hz\n" "频段 8:4000 Hz\n" "频段 9:8000 Hz\n" "频段 10:16000 Hz\n" "另见 [AudioEffectEQ]、[AudioEffectEQ6]、[AudioEffectEQ21]。" #: doc/classes/AudioEffectEQ21.xml msgid "" "Adds a 21-band equalizer audio effect to an Audio bus. Gives you control " "over frequencies from 22 Hz to 22000 Hz.\n" "Each frequency can be modulated between -60/+24 dB." msgstr "" "向音频总线添加一个 21 频段均衡器音频效果。可以控制从 22 Hz 到 22000 Hz 的频" "率。\n" "每个频率都可以在 -60/+24 dB 之间进行调制。" #: doc/classes/AudioEffectEQ21.xml msgid "" "Frequency bands:\n" "Band 1: 22 Hz\n" "Band 2: 32 Hz\n" "Band 3: 44 Hz\n" "Band 4: 63 Hz\n" "Band 5: 90 Hz\n" "Band 6: 125 Hz\n" "Band 7: 175 Hz\n" "Band 8: 250 Hz\n" "Band 9: 350 Hz\n" "Band 10: 500 Hz\n" "Band 11: 700 Hz\n" "Band 12: 1000 Hz\n" "Band 13: 1400 Hz\n" "Band 14: 2000 Hz\n" "Band 15: 2800 Hz\n" "Band 16: 4000 Hz\n" "Band 17: 5600 Hz\n" "Band 18: 8000 Hz\n" "Band 19: 11000 Hz\n" "Band 20: 16000 Hz\n" "Band 21: 22000 Hz\n" "See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ10]." msgstr "" "频段:\n" "频段 1:22 Hz\n" "频段 2:32 Hz\n" "频段 3:44 Hz\n" "频段 4:63 Hz\n" "频段 5:90 Hz\n" "频段 6:125 Hz\n" "频段 7:175 Hz\n" "频段 8:250 Hz\n" "频段 9:350 Hz\n" "频段 10:500 Hz\n" "频段 11:700 Hz\n" "频段 12:1000 Hz\n" "频段 13:1400 Hz\n" "频段 14:2000 Hz\n" "频段 15:2800 Hz\n" "频段 16:4000 Hz\n" "频段 17:5600 Hz\n" "频段 18:8000 Hz\n" "频段 19:11000 Hz\n" "频段 20:16000 Hz\n" "频段 21:22000 Hz\n" "另见 [AudioEffectEQ]、[AudioEffectEQ6]、[AudioEffectEQ10]。" #: doc/classes/AudioEffectEQ6.xml msgid "" "Adds a 6-band equalizer audio effect to an audio bus. Gives you control over " "frequencies from 32 Hz to 10000 Hz.\n" "Each frequency can be modulated between -60/+24 dB." msgstr "" "向音频总线添加一个 6 频段均衡器音频效果。可以控制从 32 Hz 到 10000 Hz 的频" "率。\n" "每个频率都可以在 -60/+24 dB 之间进行调制。" #: doc/classes/AudioEffectEQ6.xml msgid "" "Frequency bands:\n" "Band 1: 32 Hz\n" "Band 2: 100 Hz\n" "Band 3: 320 Hz\n" "Band 4: 1000 Hz\n" "Band 5: 3200 Hz\n" "Band 6: 10000 Hz\n" "See also [AudioEffectEQ], [AudioEffectEQ10], [AudioEffectEQ21]." msgstr "" "频段:\n" "频段 1:32 Hz\n" "频段 2:100 Hz\n" "频段 3:320 Hz\n" "频段 4:1000 Hz\n" "频段 5:3200 Hz\n" "频段 6:10000 Hz\n" "另见 [AudioEffectEQ]、[AudioEffectEQ10]、[AudioEffectEQ21]。" #: doc/classes/AudioEffectFilter.xml msgid "Adds a filter to the audio bus." msgstr "为音频总线添加一个滤波器。" #: doc/classes/AudioEffectFilter.xml msgid "Allows frequencies other than the [member cutoff_hz] to pass." msgstr "允许通过 [member cutoff_hz] 以外的频率。" #: doc/classes/AudioEffectFilter.xml msgid "Threshold frequency for the filter, in Hz." msgstr "滤波器的阈值频率,单位为 Hz。" #: doc/classes/AudioEffectFilter.xml msgid "" "Steepness of the cutoff curve in dB per octave, also known as the order of " "the filter. Higher orders have a more aggressive cutoff." msgstr "" "截止曲线的陡峭程度,以每倍频程 dB 为单位,也称为滤波器的阶数。阶数越高,截止" "程度越激进。" #: doc/classes/AudioEffectFilter.xml msgid "Gain amount of the frequencies after the filter." msgstr "滤波后频率的增益量。" #: doc/classes/AudioEffectFilter.xml msgid "Amount of boost in the frequency range near the cutoff frequency." msgstr "在截断频率附近的频率范围内的提升量。" #: doc/classes/AudioEffectFilter.xml msgid "Cutting off at 6dB per octave." msgstr "以每倍频程6dB的斜率进行衰减。" #: doc/classes/AudioEffectFilter.xml msgid "Cutting off at 12dB per octave." msgstr "以每倍频程12dB的斜率进行衰减。" #: doc/classes/AudioEffectFilter.xml msgid "Cutting off at 18dB per octave." msgstr "以每倍频程18dB的斜率进行衰减。" #: doc/classes/AudioEffectFilter.xml msgid "Cutting off at 24dB per octave." msgstr "以每倍频程24dB的斜率进行衰减。" #: doc/classes/AudioEffectHardLimiter.xml msgid "Adds a hard limiter audio effect to an Audio bus." msgstr "为音频总线添加一个硬限制器音频效果。" #: doc/classes/AudioEffectHardLimiter.xml msgid "" "A limiter is an effect designed to disallow sound from going over a given dB " "threshold. Hard limiters predict volume peaks, and will smoothly apply gain " "reduction when a peak crosses the ceiling threshold to prevent clipping and " "distortion. It preserves the waveform and prevents it from crossing the " "ceiling threshold. Adding one in the Master bus is recommended as a safety " "measure to prevent sudden volume peaks from occurring, and to prevent " "distortion caused by clipping." msgstr "" "限制器是一种旨在阻止声音超过给定dB阈值的效果。硬限幅器预测音量峰值,并将在峰" "值超过上限阈值时平滑地应用增益降低,以防止削波和失真。它保留了波形并防止其越" "过上限阈值。建议在主总线中添加一个作为安全措施,以防止出现突然的音量峰值,并" "防止由削波引起的失真。" #: doc/classes/AudioEffectHardLimiter.xml msgid "" "The waveform's maximum allowed value, in decibels. This value can range from " "[code]-24.0[/code] to [code]0.0[/code].\n" "The default value of [code]-0.3[/code] prevents potential inter-sample peaks " "(ISP) from crossing over 0 dB, which can cause slight distortion on some " "older hardware." msgstr "" "波形的最大允许值,单位为分贝。此值的范围可以是 [code]-24.0[/code] 到 " "[code]0.0[/code]。\n" "默认值为 [code]-0.3[/code],可防止潜在的采样间峰值(ISP)跨越 0 dB,这种情况" "可能会在一些较旧的硬件上造成轻微失真。" #: doc/classes/AudioEffectHardLimiter.xml msgid "Gain to apply before limiting, in decibels." msgstr "限制前应用的增益,单位为分贝。" #: doc/classes/AudioEffectHardLimiter.xml msgid "Time it takes in seconds for the gain reduction to fully release." msgstr "增益降低完全释放所需的时间(以秒为单位)。" #: doc/classes/AudioEffectHighPassFilter.xml msgid "Adds a high-pass filter to the audio bus." msgstr "向音频总线添加一个高通滤波器。" #: doc/classes/AudioEffectHighPassFilter.xml msgid "" "Cuts frequencies lower than the [member AudioEffectFilter.cutoff_hz] and " "allows higher frequencies to pass." msgstr "" "削减比 [member AudioEffectFilter.cutoff_hz] 更低的频率,允许更高的频率通过。" #: doc/classes/AudioEffectHighShelfFilter.xml msgid "Adds a high-shelf filter to the audio bus." msgstr "向音频总线添加一个高架滤波器。" #: doc/classes/AudioEffectHighShelfFilter.xml msgid "Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz]." msgstr "降低所有高于 [member AudioEffectFilter.cutoff_hz] 的频率。" #: doc/classes/AudioEffectInstance.xml msgid "Manipulates the audio it receives for a given effect." msgstr "操纵它接收到的音频以获得给定的效果。" #: doc/classes/AudioEffectInstance.xml msgid "" "An audio effect instance manipulates the audio it receives for a given " "effect. This instance is automatically created by an [AudioEffect] when it " "is added to a bus, and should usually not be created directly. If necessary, " "it can be fetched at run-time with [method " "AudioServer.get_bus_effect_instance]." msgstr "" "音频效果实例操纵它接收到的音频以获得给定的效果。该实例在添加到总线时由 " "[AudioEffect] 自动创建,通常不应直接创建。如果需要,可以在运行时使用 [method " "AudioServer.get_bus_effect_instance] 获取它。" #: doc/classes/AudioEffectInstance.xml msgid "" "Called by the [AudioServer] to process this effect. When [method " "_process_silence] is not overridden or it returns [code]false[/code], this " "method is called only when the bus is active.\n" "[b]Note:[/b] It is not useful to override this method in GDScript or C#. " "Only GDExtension can take advantage of it." msgstr "" "由 [AudioServer] 调用来处理该效果。当 [method _process_silence] 未被覆盖或返" "回 [code]false[/code] 时,该方法仅在总线处于活动状态时调用。\n" "[b]注意:[/b]在 GDScript 或 C# 中覆盖该方法没有用。只有 GDExtension 可以利用" "它。" #: doc/classes/AudioEffectInstance.xml msgid "" "Override this method to customize the processing behavior of this effect " "instance.\n" "Should return [code]true[/code] to force the [AudioServer] to always call " "[method _process], even if the bus has been muted or cannot otherwise be " "heard." msgstr "" "覆盖该方法以自定义该效果实例的处理行为。\n" "应返回 [code]true[/code] 以强制 [AudioServer] 始终调用 [method _process],即" "使总线已静音或无法听到。" #: doc/classes/AudioEffectLimiter.xml msgid "Use [AudioEffectHardLimiter] instead." msgstr "请改用 [AudioEffectHardLimiter]。" #: doc/classes/AudioEffectLimiter.xml msgid "Adds a soft-clip limiter audio effect to an Audio bus." msgstr "为音频总线添加一个软剪辑限制器音频效果。" #: doc/classes/AudioEffectLimiter.xml msgid "" "A limiter is similar to a compressor, but it's less flexible and designed to " "disallow sound going over a given dB threshold. Adding one in the Master bus " "is always recommended to reduce the effects of clipping.\n" "Soft clipping starts to reduce the peaks a little below the threshold level " "and progressively increases its effect as the input level increases such " "that the threshold is never exceeded." msgstr "" "限制器类似于压缩器,但灵活性较差,并且设计为不允许声音超过给定的 dB 阈值。始" "终建议在主总线中添加一个以减少削波的影响。\n" "软削波开始将峰值降低到略低于阈值水平,并随着输入水平的增加而逐渐增强其效果," "从而永不超过阈值。" #: doc/classes/AudioEffectLimiter.xml msgid "" "The waveform's maximum allowed value, in decibels. Value can range from -20 " "to -0.1." msgstr "波形的最大允许值,单位是分贝。数值范围从 -20 到 -0.1。" #: doc/classes/AudioEffectLimiter.xml msgid "" "Applies a gain to the limited waves, in decibels. Value can range from 0 to " "6." msgstr "将增益应用于被限制的波,以分贝为单位。取值范围是 0 到 6。" #: doc/classes/AudioEffectLimiter.xml msgid "" "Threshold from which the limiter begins to be active, in decibels. Value can " "range from -30 to 0." msgstr "限制器开始生效的阈值,以分贝为单位。值的范围可以从 -30 到 0。" #: doc/classes/AudioEffectLowPassFilter.xml msgid "Adds a low-pass filter to the audio bus." msgstr "向音频总线添加一个低通滤波器。" #: doc/classes/AudioEffectLowPassFilter.xml msgid "" "Cuts frequencies higher than the [member AudioEffectFilter.cutoff_hz] and " "allows lower frequencies to pass." msgstr "" "削减比 [member AudioEffectFilter.cutoff_hz] 更低的频率,允许更高的频率通过。" #: doc/classes/AudioEffectLowShelfFilter.xml msgid "Adds a low-shelf filter to the audio bus." msgstr "向音频总线添加一个低架滤波器。" #: doc/classes/AudioEffectLowShelfFilter.xml msgid "Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz]." msgstr "降低 [member AudioEffectFilter.cutoff_hz] 以下的所有频率。" #: doc/classes/AudioEffectNotchFilter.xml msgid "Adds a notch filter to the Audio bus." msgstr "在音频总线上添加一个陷波滤波器。" #: doc/classes/AudioEffectNotchFilter.xml msgid "" "Attenuates frequencies in a narrow band around the [member " "AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this range." msgstr "" "衰减 [member AudioEffectFilter.cutoff_hz] 周围窄带的频率,并切断这个范围以外" "的频率。" #: doc/classes/AudioEffectPanner.xml msgid "Adds a panner audio effect to an audio bus. Pans sound left or right." msgstr "向音频总线添加一个声像器音频效果。向左或向右声像移动声音。" #: doc/classes/AudioEffectPanner.xml msgid "" "Determines how much of an audio signal is sent to the left and right buses." msgstr "决定向左右总线发送的音频信号量。" #: doc/classes/AudioEffectPanner.xml msgid "Pan position. Value can range from -1 (fully left) to 1 (fully right)." msgstr "声像位置。值的范围可以从 -1(完全左)到1(完全右)。" #: doc/classes/AudioEffectPhaser.xml msgid "" "Adds a phaser audio effect to an audio bus.\n" "Combines the original signal with a copy that is slightly out of phase with " "the original." msgstr "" "向音频总线添加一个移相器音频效果。\n" "将原始信号和与原始信号稍有相位偏差的副本组合在一起。" #: doc/classes/AudioEffectPhaser.xml msgid "" "Combines phase-shifted signals with the original signal. The movement of the " "phase-shifted signals is controlled using a low-frequency oscillator." msgstr "将相移信号与原始信号相结合。使用低频振荡器控制相移信号的移动。" #: doc/classes/AudioEffectPhaser.xml msgid "" "Determines how high the filter frequencies sweep. Low value will primarily " "affect bass frequencies. High value can sweep high into the treble. Value " "can range from [code]0.1[/code] to [code]4.0[/code]." msgstr "" "控制滤波器频率扫描的高度。较低的值主要影响低音频率。较高的值可以推高高音。取" "值范围为 [code]0.1[/code] 到 [code]4.0[/code]。" #: doc/classes/AudioEffectPhaser.xml msgid "Output percent of modified sound. Value can range from 0.1 to 0.9." msgstr "修改后声音的输出百分比。数值范围从 0.1 到 0.9。" #: doc/classes/AudioEffectPhaser.xml msgid "" "Determines the maximum frequency affected by the LFO modulations, in Hz. " "Value can range from 10 to 10000." msgstr "决定受 LFO 调制影响的最大频率,单位为 Hz。数值范围为 10-10000。" #: doc/classes/AudioEffectPhaser.xml msgid "" "Determines the minimum frequency affected by the LFO modulations, in Hz. " "Value can range from 10 to 10000." msgstr "决定受 LFO 调制影响的最小频率,单位为 Hz。数值范围为 10-10000。" #: doc/classes/AudioEffectPhaser.xml msgid "" "Adjusts the rate in Hz at which the effect sweeps up and down across the " "frequency range." msgstr "以 Hz 为单位调整效果在整个频率范围内上下扫描的速度。" #: doc/classes/AudioEffectPitchShift.xml msgid "" "Adds a pitch-shifting audio effect to an audio bus.\n" "Raises or lowers the pitch of original sound." msgstr "" "为音频总线添加音高变换的音频效果。\n" "升高或降低原始声音的音高。" #: doc/classes/AudioEffectPitchShift.xml msgid "" "Allows modulation of pitch independently of tempo. All frequencies can be " "increased/decreased with minimal effect on transients." msgstr "允许独立于速度调制音高。所有频率都可以增加或减少,而对瞬态的影响最小。" #: doc/classes/AudioEffectPitchShift.xml msgid "" "The size of the [url=https://en.wikipedia.org/wiki/" "Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values " "smooth out the effect over time, but have greater latency. The effects of " "this higher latency are especially noticeable on sounds that have sudden " "amplitude changes." msgstr "" "[url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]快速傅里叶变换[/" "url]缓冲区的大小。较高的数值可以使效果随时间平滑,但有较大的延迟。这种较高的" "延迟对有突然幅度变化的声音的影响特别明显。" #: doc/classes/AudioEffectPitchShift.xml msgid "" "The oversampling factor to use. Higher values result in better quality, but " "are more demanding on the CPU and may cause audio cracking if the CPU can't " "keep up." msgstr "" "要使用的过采样系数。更高的值会带来更好的质量,但对 CPU 的要求更高,如果 CPU " "跟不上,可能会导致音频破裂。" #: doc/classes/AudioEffectPitchShift.xml msgid "" "The pitch scale to use. [code]1.0[/code] is the default pitch and plays " "sounds unaffected. [member pitch_scale] can range from [code]0.0[/code] " "(infinitely low pitch, inaudible) to [code]16[/code] (16 times higher than " "the initial pitch)." msgstr "" "要使用的音高缩放。[code]1.0[/code] 是默认的音高,声音会按原样播放。[member " "pitch_scale] 的范围从 [code]0.0[/code](无限低的音高,听不见)到 [code]16[/" "code](比初始音高要高 16 倍)。" #: doc/classes/AudioEffectPitchShift.xml #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "" "Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, " "but least stable over time." msgstr "" "使用 256 个样本的缓冲器进行快速傅里叶变换。最低延迟,但随着时间的推移最不稳" "定。" #: doc/classes/AudioEffectPitchShift.xml #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "" "Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but " "less stable over time." msgstr "" "使用 512 个样本的缓冲器进行快速傅里叶变换。低延迟,但随着时间的推移不太稳定。" #: doc/classes/AudioEffectPitchShift.xml #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "" "Use a buffer of 1024 samples for the Fast Fourier transform. This is a " "compromise between latency and stability over time." msgstr "" "使用 1024 个样本的缓冲器进行快速傅里叶变换。这是延迟和随着时间的推移的稳定性" "之间的折衷。" #: doc/classes/AudioEffectPitchShift.xml #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "" "Use a buffer of 2048 samples for the Fast Fourier transform. High latency, " "but stable over time." msgstr "" "使用 2048 个样本的缓冲器进行快速傅里叶变换。高延迟,但随着时间的推移稳定。" #: doc/classes/AudioEffectPitchShift.xml #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "" "Use a buffer of 4096 samples for the Fast Fourier transform. Highest " "latency, but most stable over time." msgstr "" "使用 4096 个样本的缓冲器进行快速傅里叶变换。延迟最高,但随着时间的推移最稳" "定。" #: doc/classes/AudioEffectPitchShift.xml #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "Represents the size of the [enum FFTSize] enum." msgstr "代表 [enum FFTSize] 枚举的大小。" #: doc/classes/AudioEffectRecord.xml msgid "Audio effect used for recording the sound from an audio bus." msgstr "用于录制来自音频总线的声音的音频效果。" #: doc/classes/AudioEffectRecord.xml msgid "" "Allows the user to record the sound from an audio bus into an " "[AudioStreamWAV]. When used on the \"Master\" audio bus, this includes all " "audio output by Godot.\n" "Unlike [AudioEffectCapture], this effect encodes the recording with the " "given format (8-bit, 16-bit, or compressed) instead of giving access to the " "raw audio samples.\n" "Can be used (with an [AudioStreamMicrophone]) to record from a microphone.\n" "[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be " "[code]true[/code] for audio input to work. See also that setting's " "description for caveats related to permissions and operating system privacy " "settings." msgstr "" "允许用户将音频总线的声音录制到 [AudioStreamWAV] 中。当在“主”音频总线上使用" "时,这包括 Godot 的所有音频输出。\n" "与 [AudioEffectCapture] 不同,该效果以给定格式(8 位、16 位或压缩)对录音进行" "编码,而不是提供对原始音频样本的访问。\n" "可被用于(与 [AudioStreamMicrophone] 一起)从麦克风进行录音。\n" "[b]注意:[/b][member ProjectSettings.audio/driver/enable_input] 必须为 " "[code]true[/code] 音频输入才能正常工作。另见该设置的说明,了解与权限和操作系" "统隐私设置相关的注意事项。" #: doc/classes/AudioEffectRecord.xml doc/classes/AudioStreamMicrophone.xml msgid "Recording with microphone" msgstr "使用麦克风录音" #: doc/classes/AudioEffectRecord.xml msgid "Returns the recorded sample." msgstr "返回录音的样本。" #: doc/classes/AudioEffectRecord.xml msgid "Returns whether the recording is active or not." msgstr "返回录音是否处于激活状态。" #: doc/classes/AudioEffectRecord.xml msgid "" "If [code]true[/code], the sound will be recorded. Note that restarting the " "recording will remove the previously recorded sample." msgstr "" "如果为 [code]true[/code],将录制声音。请注意,重新开始录音将移除先前录音的样" "本。" #: doc/classes/AudioEffectRecord.xml msgid "Specifies the format in which the sample will be recorded." msgstr "指定样本的记录格式。" #: doc/classes/AudioEffectReverb.xml msgid "Adds a reverberation audio effect to an Audio bus." msgstr "向音频总线添加一个混响音频效果。" #: doc/classes/AudioEffectReverb.xml msgid "" "Simulates the sound of acoustic environments such as rooms, concert halls, " "caverns, or an open spaces." msgstr "模拟房间、音乐厅、洞穴或开放空间等声学环境的声音。" #: doc/classes/AudioEffectReverb.xml msgid "" "Defines how reflective the imaginary room's walls are. Value can range from " "0 to 1." msgstr "定义虚拟房间墙壁的反射程度。值的范围是 0 到 1。" #: doc/classes/AudioEffectReverb.xml msgid "" "Output percent of original sound. At 0, only modified sound is outputted. " "Value can range from 0 to 1." msgstr "原始声音的输出百分比。为 0 时,只输出修改后的声音。取值范围是 0 到 1。" #: doc/classes/AudioEffectReverb.xml msgid "" "High-pass filter passes signals with a frequency higher than a certain " "cutoff frequency and attenuates signals with frequencies lower than the " "cutoff frequency. Value can range from 0 to 1." msgstr "" "高通滤波器通过频率高于某一截止频率的信号,衰减频率低于截止频率的信号。数值范" "围为 0 到 1。" #: doc/classes/AudioEffectReverb.xml msgid "Output percent of predelay. Value can range from 0 to 1." msgstr "预延迟的输出百分比。数值范围为 0 到 1。" #: doc/classes/AudioEffectReverb.xml msgid "" "Time between the original signal and the early reflections of the reverb " "signal, in milliseconds." msgstr "原始信号与混响信号早期反射之间的时间,以毫秒为单位。" #: doc/classes/AudioEffectReverb.xml msgid "" "Dimensions of simulated room. Bigger means more echoes. Value can range from " "0 to 1." msgstr "模拟房间的尺寸。越大表示回声越多。值的范围可以从 0 到 1。" #: doc/classes/AudioEffectReverb.xml msgid "" "Widens or narrows the stereo image of the reverb tail. 1 means fully widens. " "Value can range from 0 to 1." msgstr "扩大或缩小混响尾音的立体声图像。1 表示完全扩大。值的范围是 0 到 1。" #: doc/classes/AudioEffectReverb.xml msgid "" "Output percent of modified sound. At 0, only original sound is outputted. " "Value can range from 0 to 1." msgstr "修改后声音的输出百分比。为 0 时,只输出原始声音。取值范围是 0 到 1。" #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "Audio effect that can be used for real-time audio visualizations." msgstr "可用于实时音频可视化的音频效果。" #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "" "This audio effect does not affect sound output, but can be used for real-" "time audio visualizations.\n" "This resource configures an [AudioEffectSpectrumAnalyzerInstance], which " "performs the actual analysis at runtime. An instance can be obtained with " "[method AudioServer.get_bus_effect_instance].\n" "See also [AudioStreamGenerator] for procedurally generating sounds." msgstr "" "这种音频效果不影响声音输出,但可以用于实时音频可视化。\n" "该资源配置了一个 [AudioEffectSpectrumAnalyzerInstance],会在运行时执行实际的" "分析工作。可以使用 [method AudioServer.get_bus_effect_instance] 获取实例。\n" "另见用于程序式声音生成的 [AudioStreamGenerator]。" #: doc/classes/AudioEffectSpectrumAnalyzer.xml #: doc/classes/AudioEffectSpectrumAnalyzerInstance.xml #: doc/classes/AudioServer.xml doc/classes/AudioStream.xml #: doc/classes/AudioStreamPlayer.xml doc/classes/CanvasItem.xml msgid "Audio Spectrum Visualizer Demo" msgstr "音频频谱可视化演示" #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "" "The length of the buffer to keep (in seconds). Higher values keep data " "around for longer, but require more memory." msgstr "" "要保留的缓冲区长度(以秒为单位)。较高的值将数据保存的时间更长,但需要更多的" "内存。" #: doc/classes/AudioEffectSpectrumAnalyzer.xml msgid "" "The size of the [url=https://en.wikipedia.org/wiki/" "Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values " "smooth out the spectrum analysis over time, but have greater latency. The " "effects of this higher latency are especially noticeable with sudden " "amplitude changes." msgstr "" "[url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]快速傅里叶变换[/" "url]缓冲区的大小。较高的值可以使频谱分析随时间的推移而平滑,但有较大的延迟。" "这种较高延迟的影响在突然的振幅变化中特别明显。" #: doc/classes/AudioEffectSpectrumAnalyzerInstance.xml msgid "Queryable instance of an [AudioEffectSpectrumAnalyzer]." msgstr "[AudioEffectSpectrumAnalyzer] 的可查询实例。" #: doc/classes/AudioEffectSpectrumAnalyzerInstance.xml msgid "" "The runtime part of an [AudioEffectSpectrumAnalyzer], which can be used to " "query the magnitude of a frequency range on its host bus.\n" "An instance of this class can be obtained with [method " "AudioServer.get_bus_effect_instance]." msgstr "" "[AudioEffectSpectrumAnalyzer] 的运行时部分,可以用来查询宿主总线上某个频率范" "围内的幅度。\n" "可以使用 [method AudioServer.get_bus_effect_instance] 获取该类的实例。" #: doc/classes/AudioEffectSpectrumAnalyzerInstance.xml msgid "" "Returns the magnitude of the frequencies from [param from_hz] to [param " "to_hz] in linear energy as a Vector2. The [code]x[/code] component of the " "return value represents the left stereo channel, and [code]y[/code] " "represents the right channel.\n" "[param mode] determines how the frequency range will be processed." msgstr "" "返回从 [param from_hz] 到 [param to_hz] 频率范围内的幅度,使用线性能量单位," "返回的是 Vector2。返回值的 [code]x[/code] 分量代表左声道、[code]y[/code] 分量" "代表右声道。\n" "[param mode] 决定的是频率范围的处理方式。" #: doc/classes/AudioEffectSpectrumAnalyzerInstance.xml msgid "Use the average value across the frequency range as magnitude." msgstr "使用频率范围内的平均值作为幅度。" #: doc/classes/AudioEffectSpectrumAnalyzerInstance.xml msgid "Use the maximum value of the frequency range as magnitude." msgstr "使用频率范围内的最大值作为幅度。" #: doc/classes/AudioEffectStereoEnhance.xml msgid "" "An audio effect that can be used to adjust the intensity of stereo panning." msgstr "一种可用于调整立体声声像强度的音频效果。" #: doc/classes/AudioEffectStereoEnhance.xml msgid "" "Amplifies the difference between stereo channels, increasing or decreasing " "existing panning. A value of 0.0 will downmix stereo to mono. Does not " "affect a mono signal." msgstr "" "放大立体声道之间的差异,提升或降低存在的声像定位。取值为0.0将把立体声混缩为单" "声道。对单声道信号没有影响。" #: doc/classes/AudioEffectStereoEnhance.xml msgid "" "Widens sound stage through phase shifting in conjunction with [member " "time_pullout_ms]. Just pans sound to the left channel if [member " "time_pullout_ms] is 0." msgstr "" "通过在偏移相位时结合[member time_pullout_ms]来拓宽声场。若[member " "time_pullout_ms]为0,则仅将声像定位到左声道。" #: doc/classes/AudioEffectStereoEnhance.xml msgid "" "Widens sound stage through phase shifting in conjunction with [member " "surround]. Just delays the right channel if [member surround] is 0." msgstr "" "通过在偏移相位时结合[member surround]来拓宽声场。若[member surround]为0,则仅" "延迟右声道。" #: doc/classes/AudioListener2D.xml doc/classes/AudioListener3D.xml msgid "Overrides the location sounds are heard from." msgstr "覆盖听到声音的位置。" #: doc/classes/AudioListener2D.xml msgid "" "Once added to the scene tree and enabled using [method make_current], this " "node will override the location sounds are heard from. Only one " "[AudioListener2D] can be current. Using [method make_current] will disable " "the previous [AudioListener2D].\n" "If there is no active [AudioListener2D] in the current [Viewport], center of " "the screen will be used as a hearing point for the audio. [AudioListener2D] " "needs to be inside [SceneTree] to function." msgstr "" "一旦被添加到场景树并使用 [method make_current] 启用,此节点将覆盖听到声音的位" "置。只有一个 [AudioListener2D] 可以是当前的。使用 [method make_current] 将禁" "用之前的 [AudioListener2D]。\n" "如果当前 [Viewport] 中没有活动的 [AudioListener2D],则屏幕中心将用作音频的聆" "听点。[AudioListener2D] 需要在 [SceneTree] 内才能起作用。" #: doc/classes/AudioListener2D.xml msgid "" "Disables the [AudioListener2D]. If it's not set as current, this method will " "have no effect." msgstr "禁用 [AudioListener2D]。如果未设置为当前,则此方法无效。" #: doc/classes/AudioListener2D.xml msgid "" "Returns [code]true[/code] if this [AudioListener2D] is currently active." msgstr "如果该 [AudioListener2D] 当前处于激活状态,则返回 [code]true[/code]。" #: doc/classes/AudioListener2D.xml msgid "" "Makes the [AudioListener2D] active, setting it as the hearing point for the " "sounds. If there is already another active [AudioListener2D], it will be " "disabled.\n" "This method will have no effect if the [AudioListener2D] is not added to " "[SceneTree]." msgstr "" "激活该 [AudioListener2D],将其设置为声音的聆听点。如果已经有另一个激活的 " "[AudioListener2D],它将被禁用。\n" "如果 [AudioListener2D] 未添加到 [SceneTree],则该方法无效。" #: doc/classes/AudioListener3D.xml msgid "" "Once added to the scene tree and enabled using [method make_current], this " "node will override the location sounds are heard from. This can be used to " "listen from a location different from the [Camera3D]." msgstr "" "一旦添加到场景树并使用 [method make_current] 启用,该节点将覆盖听到声音的位" "置。这可用于从与 [Camera3D] 不同的位置聆听。" #: doc/classes/AudioListener3D.xml msgid "Disables the listener to use the current camera's listener instead." msgstr "禁用该监听器,用当前相机的监听器代替。" #: doc/classes/AudioListener3D.xml msgid "Returns the listener's global orthonormalized [Transform3D]." msgstr "返回该监听器的全局正交归一化 [Transform3D]。" #: doc/classes/AudioListener3D.xml msgid "" "Returns [code]true[/code] if the listener was made current using [method " "make_current], [code]false[/code] otherwise.\n" "[b]Note:[/b] There may be more than one AudioListener3D marked as " "\"current\" in the scene tree, but only the one that was made current last " "will be used." msgstr "" "如果使用 [method make_current] 将监听器设为当前,则返回 [code]true[/code],否" "则返回 [code]false[/code]。\n" "[b]注意:[/b]场景树中标记为“当前”的 AudioListener3D 可能不止一个,但只会使用" "最后被设置为当前的那个。" #: doc/classes/AudioListener3D.xml msgid "Enables the listener. This will override the current camera's listener." msgstr "启用该监听器。将覆盖当前相机的监听器。" #: doc/classes/AudioListener3D.xml msgid "" "If not [constant DOPPLER_TRACKING_DISABLED], this listener will simulate the " "[url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for " "objects changed in particular [code]_process[/code] methods.\n" "[b]Note:[/b] The Doppler effect will only be heard on [AudioStreamPlayer3D]s " "if [member AudioStreamPlayer3D.doppler_tracking] is not set to [constant " "AudioStreamPlayer3D.DOPPLER_TRACKING_DISABLED]." msgstr "" "如果不是 [constant DOPPLER_TRACKING_DISABLED],则该监听器将在特定的 " "[code]_process[/code] 方法中,为变化的对象模拟[url=https://zh.wikipedia.org/" "wiki/%E5%A4%9A%E6%99%AE%E5%8B%92%E6%95%88%E5%BA%94]多普勒效应[/url]。\n" "[b]注意:[/b]多普勒效应仅在 [member AudioStreamPlayer3D.doppler_tracking] 未" "设置为 [constant AudioStreamPlayer3D.DOPPLER_TRACKING_DISABLED] 时才会在 " "[AudioStreamPlayer3D] 上听到。" #: doc/classes/AudioListener3D.xml doc/classes/Camera3D.xml msgid "" "Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/" "url] simulation (default)." msgstr "" "禁用[url=https://en.wikipedia.org/wiki/Doppler_effect]多普勒效应[/url]模拟" "(默认)。" #: doc/classes/AudioListener3D.xml msgid "" "Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/" "url] by tracking positions of objects that are changed in [code]_process[/" "code]. Changes in the relative velocity of this listener compared to those " "objects affect how audio is perceived (changing the audio's [member " "AudioStreamPlayer3D.pitch_scale])." msgstr "" "通过跟踪在 [code]_process[/code] 中改变的物体位置来模拟[url=https://" "zh.wikipedia.org/wiki/%E5%A4%9A%E6%99%AE%E5%8B%92%E6%95%88%E5%BA%94]多普勒效" "应[/url]。该监听器相对于这些物体的相对速度的变化会影响音频的感知方式(改变音" "频的 [member AudioStreamPlayer3D.pitch_scale])。" #: doc/classes/AudioListener3D.xml msgid "" "Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/" "url] by tracking positions of objects that are changed in " "[code]_physics_process[/code]. Changes in the relative velocity of this " "listener compared to those objects affect how audio is perceived (changing " "the audio's [member AudioStreamPlayer3D.pitch_scale])." msgstr "" "通过跟踪在 [code]_process[/code] 中改变的物体位置来模拟[url=https://" "zh.wikipedia.org/wiki/%E5%A4%9A%E6%99%AE%E5%8B%92%E6%95%88%E5%BA%94]多普勒效" "应[/url]。该监听器相对于这些物体的相对速度的变化会影响音频的感知方式(改变音" "频的 [member AudioStreamPlayer3D.pitch_scale])。" #: doc/classes/AudioSample.xml msgid "Base class for audio samples." msgstr "音频样本的基类。" #: doc/classes/AudioSamplePlayback.xml msgid "Meta class for playing back audio samples." msgstr "用于播放音频样本的元类。" #: doc/classes/AudioServer.xml msgid "Server interface for low-level audio access." msgstr "低级音频访问的服务器接口。" #: doc/classes/AudioServer.xml msgid "" "[AudioServer] is a low-level server interface for audio access. It is in " "charge of creating sample data (playable audio) as well as its playback via " "a voice interface." msgstr "" "[AudioServer] 是用于音频访问的底层服务器接口。它负责创建样本数据(可播放的音" "频)以及通过语音接口进行播放。" #: doc/classes/AudioServer.xml doc/classes/AudioStreamPlayer.xml msgid "Audio Device Changer Demo" msgstr "音频设备切换演示" #: doc/classes/AudioServer.xml msgid "Adds a bus at [param at_position]." msgstr "在 [param at_position] 处添加一条总线。" #: doc/classes/AudioServer.xml msgid "" "Adds an [AudioEffect] effect to the bus [param bus_idx] at [param " "at_position]." msgstr "" "为在 [param at_position] 处索引为 [param bus_idx] 的总线添加 [AudioEffect] 效" "果。" #: doc/classes/AudioServer.xml msgid "Generates an [AudioBusLayout] using the available buses and effects." msgstr "使用可用的总线和效果来生成 [AudioBusLayout]。" #: doc/classes/AudioServer.xml msgid "Returns the number of channels of the bus at index [param bus_idx]." msgstr "返回索引为 [param bus_idx] 的总线的通道数。" #: doc/classes/AudioServer.xml msgid "" "Returns the [AudioEffect] at position [param effect_idx] in bus [param " "bus_idx]." msgstr "" "返回索引为 [param bus_idx] 的总线中位于 [param effect_idx] 的 [AudioEffect]。" #: doc/classes/AudioServer.xml msgid "Returns the number of effects on the bus at [param bus_idx]." msgstr "返回索引为 [param bus_idx] 的总线上的效果数。" #: doc/classes/AudioServer.xml msgid "" "Returns the [AudioEffectInstance] assigned to the given bus and effect " "indices (and optionally channel)." msgstr "" "返回分配给给定总线和效果索引(以及可选的通道)的[AudioEffectInstance]。" #: doc/classes/AudioServer.xml msgid "" "Returns the index of the bus with the name [param bus_name]. Returns " "[code]-1[/code] if no bus with the specified name exist." msgstr "" "返回名称为 [param bus_name] 的总线的索引。如果不存在指定名称的总线,则返回 " "[code]-1[/code]。" #: doc/classes/AudioServer.xml msgid "Returns the name of the bus with the index [param bus_idx]." msgstr "返回索引为 [param bus_idx] 的总线的名称。" #: doc/classes/AudioServer.xml msgid "" "Returns the peak volume of the left speaker at bus index [param bus_idx] and " "channel index [param channel]." msgstr "" "返回总线索引为 [param bus_idx] 且通道索引为 [param channel] 处的左扬声器的峰" "值音量。" #: doc/classes/AudioServer.xml msgid "" "Returns the peak volume of the right speaker at bus index [param bus_idx] " "and channel index [param channel]." msgstr "" "返回总线索引为 [param bus_idx] 且通道索引为 [param channel] 处的右扬声器的峰" "值音量。" #: doc/classes/AudioServer.xml msgid "" "Returns the name of the bus that the bus at index [param bus_idx] sends to." msgstr "返回索引为 [param bus_idx] 的总线的发送目标总线的名称。" #: doc/classes/AudioServer.xml msgid "Returns the volume of the bus at index [param bus_idx] in dB." msgstr "返回索引为 [param bus_idx] 的总线的音量,单位为 dB。" #: doc/classes/AudioServer.xml msgid "" "Returns the volume of the bus at index [param bus_idx] as a linear value.\n" "[b]Note:[/b] The returned value is equivalent to the result of [method " "@GlobalScope.db_to_linear] on the result of [method get_bus_volume_db]." msgstr "" "返回索引为 [param bus_idx] 处的总线音量对应的线性值。\n" "[b]注意:[/b]返回的值等价于使用 [method get_bus_volume_db] 的结果调用 " "[method @GlobalScope.db_to_linear] 的结果。" #: doc/classes/AudioServer.xml msgid "" "Returns the name of the current audio driver. The default usually depends on " "the operating system, but may be overridden via the [code]--audio-driver[/" "code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command " "line argument[/url]. [code]--headless[/code] also automatically sets the " "audio driver to [code]Dummy[/code]. See also [member ProjectSettings.audio/" "driver/driver]." msgstr "" "返回当前音频驱动的名称。默认值通常与操作系统相关,但可以被 [code]--audio-" "driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]命令" "行参数[/url]覆盖。[code]--headless[/code] 也会自动将音频驱动设置为 " "[code]Dummy[/code]。另见 [member ProjectSettings.audio/driver/driver]。" #: doc/classes/AudioServer.xml msgid "" "Returns the absolute size of the microphone input buffer. This is set to a " "multiple of the audio latency and can be used to estimate the minimum rate " "at which the frames need to be fetched." msgstr "" #: doc/classes/AudioServer.xml msgid "" "Returns the names of all audio input devices detected on the system.\n" "[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be " "[code]true[/code] for audio input to work. See also that setting's " "description for caveats related to permissions and operating system privacy " "settings." msgstr "" "返回系统中检测到的所有音频输入设备的名称。\n" "[b]注意:[/b][member ProjectSettings.audio/driver/enable_input] 必须为 " "[code]true[/code] 音频输入才能正常工作。另见该设置的说明,了解与权限和操作系" "统隐私设置相关的注意事项。" #: doc/classes/AudioServer.xml msgid "" "Returns a [PackedVector2Array] containing exactly [param frames] audio " "samples from the internal microphone buffer if available, otherwise returns " "an empty [PackedVector2Array].\n" "The buffer is filled at the rate of [method get_input_mix_rate] frames per " "second when [method set_input_device_active] has successfully been set to " "[code]true[/code].\n" "The samples are signed floating-point PCM values between [code]-1[/code] and " "[code]1[/code]." msgstr "" #: doc/classes/AudioServer.xml #, fuzzy msgid "" "Returns the number of frames available to read using [method " "get_input_frames]." msgstr "返回可使用 [method get_buffer] 读取的帧数。" #: doc/classes/AudioServer.xml msgid "Returns the sample rate at the input of the [AudioServer]." msgstr "返回 [AudioServer] 输入的采样率。" #: doc/classes/AudioServer.xml msgid "Returns the sample rate at the output of the [AudioServer]." msgstr "返回 [AudioServer] 输出的采样率。" #: doc/classes/AudioServer.xml msgid "Returns the names of all audio output devices detected on the system." msgstr "返回系统中检测到的所有音频输出设备的名称。" #: doc/classes/AudioServer.xml msgid "" "Returns the audio driver's effective output latency. This is based on " "[member ProjectSettings.audio/driver/output_latency], but the exact returned " "value will differ depending on the operating system and audio driver.\n" "[b]Note:[/b] This can be expensive; it is not recommended to call [method " "get_output_latency] every frame." msgstr "" "返回音频驱动的实际输出延迟。基于 [member ProjectSettings.audio/driver/" "output_latency],但实际的返回值取决于操作系统和音频驱动。\n" "[b]注意:[/b]可能开销较大;不建议每帧都调用 [method get_output_latency]。" #: doc/classes/AudioServer.xml msgid "Returns the speaker configuration." msgstr "返回扬声器的配置。" #: doc/classes/AudioServer.xml msgid "Returns the relative time since the last mix occurred." msgstr "返回自上次混合以来的相对时间。" #: doc/classes/AudioServer.xml msgid "Returns the relative time until the next mix occurs." msgstr "返回下一次混合之前的相对时间。" #: doc/classes/AudioServer.xml msgid "" "If [code]true[/code], the bus at index [param bus_idx] is bypassing effects." msgstr "如果为 [code]true[/code],则索引为 [param bus_idx] 的总线会绕过效果。" #: doc/classes/AudioServer.xml msgid "" "If [code]true[/code], the effect at index [param effect_idx] on the bus at " "index [param bus_idx] is enabled." msgstr "" "如果为 [code]true[/code],则索引为 [param bus_idx] 的总线上启用了索引为 " "[param effect_idx] 的效果。" #: doc/classes/AudioServer.xml msgid "If [code]true[/code], the bus at index [param bus_idx] is muted." msgstr "如果为 [code]true[/code],则索引为 [param bus_idx] 的总线已静音。" #: doc/classes/AudioServer.xml msgid "If [code]true[/code], the bus at index [param bus_idx] is in solo mode." msgstr "" "如果为 [code]true[/code],则索引为 [param bus_idx] 的总线处于独奏模式。" #: doc/classes/AudioServer.xml msgid "" "If [code]true[/code], the stream is registered as a sample. The engine will " "not have to register it before playing the sample.\n" "If [code]false[/code], the stream will have to be registered before playing " "it. To prevent lag spikes, register the stream as sample with [method " "register_stream_as_sample]." msgstr "" "如果为 [code]true[/code],则该流已被注册为样本。引擎无需在播放样本之前对其进" "行注册。\n" "如果为 [code]false[/code],则必须在播放之前注册该流。为防止延迟峰值,请使用 " "[method register_stream_as_sample] 将流注册为样本。" #: doc/classes/AudioServer.xml msgid "" "Locks the audio driver's main loop.\n" "[b]Note:[/b] Remember to unlock it afterwards." msgstr "" "锁定音频驱动程序的主循环。\n" "[b]注意:[/b]之后记得解锁。" #: doc/classes/AudioServer.xml msgid "Moves the bus from index [param index] to index [param to_index]." msgstr "将总线从索引 [param index] 移动到索引 [param to_index]。" #: doc/classes/AudioServer.xml msgid "" "Forces the registration of a stream as a sample.\n" "[b]Note:[/b] Lag spikes may occur when calling this method, especially on " "single-threaded builds. It is suggested to call this method while loading " "assets, where the lag spike could be masked, instead of registering the " "sample right before it needs to be played." msgstr "" "强制将流注册为样本。\n" "[b]注意:[/b]调用该方法时可能会出现延迟峰值,尤其是在单线程构建中。建议在加载" "资产时调用该方法,这样可以掩盖延迟峰值,而不是在需要播放样本之前才注册样本。" #: doc/classes/AudioServer.xml msgid "Removes the bus at index [param index]." msgstr "移除索引 [param index] 处的总线。" #: doc/classes/AudioServer.xml msgid "" "Removes the effect at index [param effect_idx] from the bus at index [param " "bus_idx]." msgstr "将索引 [param effect_idx] 的效果从索引 [param bus_idx] 的总线上移除。" #: doc/classes/AudioServer.xml msgid "Overwrites the currently used [AudioBusLayout]." msgstr "覆盖当前使用的 [AudioBusLayout]。" #: doc/classes/AudioServer.xml msgid "Sets the name of the bus at index [param bus_idx] to [param name]." msgstr "将索引为 [param bus_idx] 的总线的名称设为 [param name]。" #: doc/classes/AudioServer.xml msgid "" "Connects the output of the bus at [param bus_idx] to the bus named [param " "send]." msgstr "将索引为 [param bus_idx] 处的总线输出连接到名为 [param send] 的总线。" #: doc/classes/AudioServer.xml msgid "" "Sets the volume in decibels of the bus at index [param bus_idx] to [param " "volume_db]." msgstr "" "将索引为 [param bus_idx] 的总线的音量设为 [param volume_db],单位为分贝。" #: doc/classes/AudioServer.xml msgid "" "Sets the volume as a linear value of the bus at index [param bus_idx] to " "[param volume_linear].\n" "[b]Note:[/b] Using this method is equivalent to calling [method " "set_bus_volume_db] with the result of [method @GlobalScope.linear_to_db] on " "a value." msgstr "" "将索引[param bus_idx]处的总线容量线性值设置为[param volume_linear]。\n" "[b]注意:[/b]使用该方法,与对某个值执行[method @GlobalScope.linear_to_db]并基" "于所得结果调用[method set_bus_volume_db],是等价的。" #: doc/classes/AudioServer.xml msgid "" "If set to [code]true[/code], all instances of [AudioStreamPlayback] will " "call [method AudioStreamPlayback._tag_used_streams] every mix step.\n" "[b]Note:[/b] This is enabled by default in the editor, as it is used by " "editor plugins for the audio stream previews." msgstr "" "如果设置为 [code]true[/code],[AudioStreamPlayback] 的所有实例将在每个混音步" "骤调用 [method AudioStreamPlayback._tag_used_streams]。\n" "[b]注意:[/b]这在编辑器中默认启用,因为编辑器插件将其用于音频流预览。" #: doc/classes/AudioServer.xml msgid "" "If [param active] is [code]true[/code], starts the microphone input stream " "specified by [member input_device] or returns an error if it failed.\n" "If [param active] is [code]false[/code], stops the input stream if it is " "running." msgstr "" #: doc/classes/AudioServer.xml msgid "Swaps the position of two effects in bus [param bus_idx]." msgstr "在索引为 [param bus_idx] 的总线中交换两个效果的位置。" #: doc/classes/AudioServer.xml msgid "" "Unlocks the audio driver's main loop. (After locking it, you should always " "unlock it.)" msgstr "解锁音频驱动程序的主循环。(锁定后,你始终需要手动解锁它。)" #: doc/classes/AudioServer.xml msgid "Number of available audio buses." msgstr "可用音频总线的数量。" #: doc/classes/AudioServer.xml msgid "" "Name of the current device for audio input (see [method " "get_input_device_list]). On systems with multiple audio inputs (such as " "analog, USB and HDMI audio), this can be used to select the audio input " "device. The value [code]\"Default\"[/code] will record audio on the system-" "wide default audio input. If an invalid device name is set, the value will " "be reverted back to [code]\"Default\"[/code].\n" "[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be " "[code]true[/code] for audio input to work. See also that setting's " "description for caveats related to permissions and operating system privacy " "settings." msgstr "" "当前音频输入设备的名称(见 [method get_input_device_list])。在具有多个音频输" "入(例如模拟、USB、HDMI 音频)的系统中,可用于选择音频输入设备。为 [code]" "\"Default\"[/code] 时会从系统默认的音频输入录制音频。如果设置了无效的设备名" "称,该值会被恢复为 [code]\"Default\"[/code]。\n" "[b]注意:[/b][member ProjectSettings.audio/driver/enable_input] 必须为 " "[code]true[/code] 音频输入才能正常工作。另见该设置项的描述,了解权限和操作系" "统隐私设置相关的说明。" #: doc/classes/AudioServer.xml msgid "" "Name of the current device for audio output (see [method " "get_output_device_list]). On systems with multiple audio outputs (such as " "analog, USB and HDMI audio), this can be used to select the audio output " "device. The value [code]\"Default\"[/code] will play audio on the system-" "wide default audio output. If an invalid device name is set, the value will " "be reverted back to [code]\"Default\"[/code]." msgstr "" "当前音频输出设备的名称(见 [method get_output_device_list])。在具有多个音频" "输出(例如模拟、USB、HDMI 音频)的系统中,可用于选择音频输出设备。为 [code]" "\"Default\"[/code] 时会从系统默认的音频输出播放音频。如果设置了无效的设备名" "称,该值会被恢复为 [code]\"Default\"[/code]。" #: doc/classes/AudioServer.xml msgid "" "Scales the rate at which audio is played (i.e. setting it to [code]0.5[/" "code] will make the audio be played at half its speed). See also [member " "Engine.time_scale] to affect the general simulation speed, which is " "independent from [member AudioServer.playback_speed_scale]." msgstr "" "音频播放的缩放速率(即将其设置为 [code]0.5[/code] 将使音频以其一半的速度播" "放)。另见 [member Engine.time_scale] 影响一般模拟速度,它独立于 [member " "AudioServer.playback_speed_scale]。" #: doc/classes/AudioServer.xml msgid "Emitted when an audio bus is added, deleted, or moved." msgstr "添加、修改、删除音频总线时发出。" #: doc/classes/AudioServer.xml msgid "" "Emitted when the audio bus at [param bus_index] is renamed from [param " "old_name] to [param new_name]." msgstr "" "当索引为 [param bus_index] 的音频总线的名称从 [param old_name] 更改为 [param " "new_name] 时发出。" #: doc/classes/AudioServer.xml msgid "Two or fewer speakers were detected." msgstr "检测到两个或更少的扬声器。" #: doc/classes/AudioServer.xml msgid "A 3.1 channel surround setup was detected." msgstr "检测到 3.1 声道环绕声设置。" #: doc/classes/AudioServer.xml msgid "A 5.1 channel surround setup was detected." msgstr "检测到 5.1 声道环绕声设置。" #: doc/classes/AudioServer.xml msgid "A 7.1 channel surround setup was detected." msgstr "检测到 7.1 声道环绕声设置。" #: doc/classes/AudioServer.xml msgid "" "The playback will be considered of the type declared at [member " "ProjectSettings.audio/general/default_playback_type]." msgstr "" "播放将被视为在 [member ProjectSettings.audio/general/default_playback_type] " "处声明的类型。" #: doc/classes/AudioServer.xml msgid "Force the playback to be considered as a stream." msgstr "强制将播放视为流。" #: doc/classes/AudioServer.xml msgid "" "Force the playback to be considered as a sample. This can provide lower " "latency and more stable playback (with less risk of audio crackling), at the " "cost of having less flexibility.\n" "[b]Note:[/b] Only currently supported on the web platform.\n" "[b]Note:[/b] [AudioEffect]s are not supported when playback is considered as " "a sample." msgstr "" "强制将播放视为样本。这可以提供更低的延迟和更稳定的播放(音频噼啪声的风险更" "小),但代价是灵活性较低。\n" "[b]注意:[/b]目前仅支持 Web 平台。\n" "[b]注意:[/b]将播放视为样本时不支持 [AudioEffect]。" #: doc/classes/AudioServer.xml msgid "Represents the size of the [enum PlaybackType] enum." msgstr "代表 [enum PlaybackType] 枚举的大小。" #: doc/classes/AudioStream.xml msgid "Base class for audio streams." msgstr "音频流的基类。" #: doc/classes/AudioStream.xml msgid "" "Base class for audio streams. Audio streams are used for sound effects and " "music playback, and support WAV (via [AudioStreamWAV]) and Ogg (via " "[AudioStreamOggVorbis]) file formats." msgstr "" "音频流的基类。音频流用于播放音效和音乐,支持 WAV(通过 [AudioStreamWAV])和 " "Ogg(通过 [AudioStreamOggVorbis])文件格式。" #: doc/classes/AudioStream.xml doc/classes/AudioStreamPlayer.xml #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "Audio streams" msgstr "音频流" #: doc/classes/AudioStream.xml doc/classes/AudioStreamGenerator.xml #: doc/classes/AudioStreamGeneratorPlayback.xml #: doc/classes/AudioStreamPlayback.xml doc/classes/AudioStreamPlayer.xml msgid "Audio Generator Demo" msgstr "音频生成器演示" #: doc/classes/AudioStream.xml msgid "Override this method to return the bar beats of this stream." msgstr "覆盖该方法,返回音频流的节拍数。" #: doc/classes/AudioStream.xml msgid "" "Overridable method. Should return the total number of beats of this audio " "stream. Used by the engine to determine the position of every beat.\n" "Ideally, the returned value should be based off the stream's sample rate " "([member AudioStreamWAV.mix_rate], for example)." msgstr "" "可覆盖的方法。应返回该音频流的总节拍数。由引擎用来确定每个节拍的位置。\n" "理想情况下,返回值应基于流的采样率(例如,[member " "AudioStreamWAV.mix_rate])。" #: doc/classes/AudioStream.xml msgid "" "Overridable method. Should return the tempo of this audio stream, in beats " "per minute (BPM). Used by the engine to determine the position of every " "beat.\n" "Ideally, the returned value should be based off the stream's sample rate " "([member AudioStreamWAV.mix_rate], for example)." msgstr "" "可覆盖的方法。应返回该音频流的节奏,以每分钟节拍数(BPM)为单位。由引擎用来确" "定每个节拍的位置。\n" "理想情况下,返回值应基于流的采样率(例如,[member " "AudioStreamWAV.mix_rate])。" #: doc/classes/AudioStream.xml msgid "" "Override this method to customize the returned value of [method get_length]. " "Should return the length of this audio stream, in seconds." msgstr "" "覆盖此方法以自定义 [method get_length] 所返回的值,应该返回这个音频流的长度," "单位为秒。" #: doc/classes/AudioStream.xml msgid "" "Return the controllable parameters of this stream. This array contains " "dictionaries with a property info description format (see [method " "Object.get_property_list]). Additionally, the default value for this " "parameter must be added tho each dictionary in \"default_value\" field." msgstr "" "返回该流的可控制参数。该数组包含具有属性信息描述格式的字典(请参阅 [method " "Object.get_property_list])。此外,必须将该参数的默认值添加到 " "“default_value” 字段中的每个字典中。" #: doc/classes/AudioStream.xml msgid "" "Override this method to customize the name assigned to this audio stream. " "Unused by the engine." msgstr "覆盖该方法,以自定义分配给该音频流的名称。未被引擎使用。" #: doc/classes/AudioStream.xml msgid "" "Override this method to customize the tags for this audio stream. Should " "return a [Dictionary] of strings with the tag as the key and its content as " "the value.\n" "Commonly used tags include [code]title[/code], [code]artist[/code], " "[code]album[/code], [code]tracknumber[/code], and [code]date[/code]." msgstr "" "覆盖该方法,自定义音频流的标签。应当返回字符串构成的 [Dictionary],标签为键," "对应的内容为值。\n" "常用标签包括标题 [code]title[/code]、艺术家 [code]artist[/code]、专辑 " "[code]album[/code]、音轨号 [code]tracknumber[/code]、日期 [code]date[/code]。" #: doc/classes/AudioStream.xml msgid "" "Override this method to return [code]true[/code] if this stream has a loop." msgstr "覆盖该方法,如果音频流中存在循环,则返回 [code]true[/code]。" #: doc/classes/AudioStream.xml msgid "" "Override this method to customize the returned value of [method " "instantiate_playback]. Should return a new [AudioStreamPlayback] created " "when the stream is played (such as by an [AudioStreamPlayer])." msgstr "" "覆盖该方法可以自定义 [method instantiate_playback] 的返回值。应该返回一个在播" "放流(例如通过 [AudioStreamPlayer])时创建的新的 [AudioStreamPlayback]。" #: doc/classes/AudioStream.xml msgid "" "Override this method to customize the returned value of [method " "is_monophonic]. Should return [code]true[/code] if this audio stream only " "supports one channel." msgstr "" "覆盖该方法以自定义 [method is_monophonic] 的返回值。如果该音频流仅支持一个通" "道,则应返回 [code]true[/code]。" #: doc/classes/AudioStream.xml msgid "" "Returns if the current [AudioStream] can be used as a sample. Only static " "streams can be sampled." msgstr "返回当前 [AudioStream] 是否可以用作样本。仅可对静态流进行采样。" #: doc/classes/AudioStream.xml msgid "Generates an [AudioSample] based on the current stream." msgstr "根据当前流生成 [AudioSample]。" #: doc/classes/AudioStream.xml msgid "" "Returns the length of the audio stream in seconds. If this stream is an " "[AudioStreamRandomizer], returns the length of the last played stream. If " "this stream has an indefinite length (such as for [AudioStreamGenerator] and " "[AudioStreamMicrophone]), returns [code]0.0[/code]." msgstr "" "返回音频流的长度,单位为秒。如果是 [AudioStreamRandomizer],则返回最近一次播" "放的音频流的长度。如果音频流的长度无限(如 [AudioStreamGenerator] 和 " "[AudioStreamMicrophone])则返回 [code]0.0[/code]。" #: doc/classes/AudioStream.xml msgid "" "Returns a newly created [AudioStreamPlayback] intended to play this audio " "stream. Useful for when you want to extend [method _instantiate_playback] " "but call [method instantiate_playback] from an internally held AudioStream " "subresource. An example of this can be found in the source code for " "[code]AudioStreamRandomPitch::instantiate_playback[/code]." msgstr "" "返回一个新创建的 [AudioStreamPlayback],用于播放该音频流。当想要扩展 [method " "_instantiate_playback],但从一个内部持有的 AudioStream 子资源调用 [method " "instantiate_playback] 时很有用。在 " "[code]AudioStreamRandomPitch::instantiate_playback[/code] 的源代码中可以找到" "这方面的示例。" #: doc/classes/AudioStream.xml msgid "" "Returns [code]true[/code] if the stream is a collection of other streams, " "[code]false[/code] otherwise." msgstr "" "如果该流是其他流的集合,则返回 [code]true[/code],否则返回 [code]false[/" "code]。" #: doc/classes/AudioStream.xml msgid "" "Returns [code]true[/code] if this audio stream only supports one channel " "([i]monophony[/i]), or [code]false[/code] if the audio stream supports two " "or more channels ([i]polyphony[/i])." msgstr "" "如果该音频流仅支持一个通道([i]单声道[/i]),则返回 [code]true[/code];如果音" "频流支持两个或多个通道([i]复调[/i]),则返回 [code]false[/code]。" #: doc/classes/AudioStream.xml msgid "Signal to be emitted to notify when the parameter list changed." msgstr "当参数列表改变时被发出以通知的信号。" #: doc/classes/AudioStreamGenerator.xml msgid "An audio stream with utilities for procedural sound generation." msgstr "提供程序式声音生成工具的音频流。" #: doc/classes/AudioStreamGenerator.xml msgid "" "[AudioStreamGenerator] is a type of audio stream that does not play back " "sounds on its own; instead, it expects a script to generate audio data for " "it. See also [AudioStreamGeneratorPlayback].\n" "Here's a sample on how to use it to generate a sine wave:\n" "[codeblocks]\n" "[gdscript]\n" "var playback # Will hold the AudioStreamGeneratorPlayback.\n" "@onready var sample_hz = $AudioStreamPlayer.stream.mix_rate\n" "var pulse_hz = 440.0 # The frequency of the sound wave.\n" "var phase = 0.0\n" "\n" "func _ready():\n" "\t$AudioStreamPlayer.play()\n" "\tplayback = $AudioStreamPlayer.get_stream_playback()\n" "\tfill_buffer()\n" "\n" "func fill_buffer():\n" "\tvar increment = pulse_hz / sample_hz\n" "\tvar frames_available = playback.get_frames_available()\n" "\n" "\tfor i in range(frames_available):\n" "\t\tplayback.push_frame(Vector2.ONE * sin(phase * TAU))\n" "\t\tphase = fmod(phase + increment, 1.0)\n" "[/gdscript]\n" "[csharp]\n" "[Export] public AudioStreamPlayer Player { get; set; }\n" "\n" "private AudioStreamGeneratorPlayback _playback; // Will hold the " "AudioStreamGeneratorPlayback.\n" "private float _sampleHz;\n" "private float _pulseHz = 440.0f; // The frequency of the sound wave.\n" "private double phase = 0.0;\n" "\n" "public override void _Ready()\n" "{\n" "\tif (Player.Stream is AudioStreamGenerator generator) // Type as a " "generator to access MixRate.\n" "\t{\n" "\t\t_sampleHz = generator.MixRate;\n" "\t\tPlayer.Play();\n" "\t\t_playback = (AudioStreamGeneratorPlayback)Player.GetStreamPlayback();\n" "\t\tFillBuffer();\n" "\t}\n" "}\n" "\n" "public void FillBuffer()\n" "{\n" "\tfloat increment = _pulseHz / _sampleHz;\n" "\tint framesAvailable = _playback.GetFramesAvailable();\n" "\n" "\tfor (int i = 0; i < framesAvailable; i++)\n" "\t{\n" "\t\t_playback.PushFrame(Vector2.One * (float)Mathf.Sin(phase * Mathf.Tau));\n" "\t\tphase = Mathf.PosMod(phase + increment, 1.0);\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "In the example above, the \"AudioStreamPlayer\" node must use an " "[AudioStreamGenerator] as its stream. The [code]fill_buffer[/code] function " "provides audio data for approximating a sine wave.\n" "See also [AudioEffectSpectrumAnalyzer] for performing real-time audio " "spectrum analysis.\n" "[b]Note:[/b] Due to performance constraints, this class is best used from C# " "or from a compiled language via GDExtension. If you still want to use this " "class from GDScript, consider using a lower [member mix_rate] such as 11,025 " "Hz or 22,050 Hz." msgstr "" "[AudioStreamGenerator] 是一种音频流,它自己并不播放声音,而是要用脚本来为它生" "成音频数据。另见 [AudioStreamGeneratorPlayback]。\n" "以下是用它来生成正弦波的例子:\n" "[codeblocks]\n" "[gdscript]\n" "var playback # 存放 AudioStreamGeneratorPlayback。\n" "@onready var sample_hz = $AudioStreamPlayer.stream.mix_rate\n" "var pulse_hz = 440.0 # 声音波形的频率。\n" "var phase = 0.0\n" "\n" "func _ready():\n" "\t$AudioStreamPlayer.play()\n" "\tplayback = $AudioStreamPlayer.get_stream_playback()\n" "\tfill_buffer()\n" "\n" "func fill_buffer():\n" "\tvar increment = pulse_hz / sample_hz\n" "\tvar frames_available = playback.get_frames_available()\n" "\n" "\tfor i in range(frames_available):\n" "\t\tplayback.push_frame(Vector2.ONE * sin(phase * TAU))\n" "\t\tphase = fmod(phase + increment, 1.0)\n" "[/gdscript]\n" "[csharp]\n" "[Export] public AudioStreamPlayer Player { get; set; }\n" "\n" "private AudioStreamGeneratorPlayback _playback; // 存放 " "AudioStreamGeneratorPlayback。\n" "private float _sampleHz;\n" "private float _pulseHz = 440.0f; // 音频波形的频率。\n" "private double phase = 0.0;\n" "\n" "public override void _Ready()\n" "{\n" "\tif (Player.Stream is AudioStreamGenerator generator) // Type as a " "generator to access MixRate.\n" "\t{\n" "\t\t_sampleHz = generator.MixRate;\n" "\t\tPlayer.Play();\n" "\t\t_playback = (AudioStreamGeneratorPlayback)Player.GetStreamPlayback();\n" "\t\tFillBuffer();\n" "\t}\n" "}\n" "\n" "public void FillBuffer()\n" "{\n" "\tfloat increment = _pulseHz / _sampleHz;\n" "\tint framesAvailable = _playback.GetFramesAvailable();\n" "\n" "\tfor (int i = 0; i < framesAvailable; i++)\n" "\t{\n" "\t\t_playback.PushFrame(Vector2.One * (float)Mathf.Sin(phase * Mathf.Tau));\n" "\t\tphase = Mathf.PosMod(phase + increment, 1.0);\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "上面的例子中,“AudioStreamPlayer”节点必须使用 [AudioStreamGenerator] 作为其" "流。[code]fill_buffer[/code] 函数负责提供模拟正弦波的音频数据。\n" "要执行实时音频频谱分析,见 [AudioEffectSpectrumAnalyzer]。\n" "[b]注意:[/b]由于性能的限制,这个类最好在 C# 或者在利用 GDExtension 的编译语" "言中使用。如果你仍然想要在 GDScript 中使用这个类,请考虑使用 11,025 Hz 或 " "22,050 Hz 等较低的 [member mix_rate]。" #: doc/classes/AudioStreamGenerator.xml msgid "" "The length of the buffer to generate (in seconds). Lower values result in " "less latency, but require the script to generate audio data faster, " "resulting in increased CPU usage and more risk for audio cracking if the CPU " "can't keep up." msgstr "" "要生成的缓冲区的长度,以秒为单位。较低的值会带来更少的延迟,但需要脚本更快地" "生成音频数据,从而导致 CPU 使用率增加,如果 CPU 跟不上,则音频破裂的风险更" "大。" #: doc/classes/AudioStreamGenerator.xml msgid "" "The sample rate to use (in Hz). Higher values are more demanding for the CPU " "to generate, but result in better quality.\n" "In games, common sample rates in use are [code]11025[/code], [code]16000[/" "code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and " "[code]48000[/code].\n" "According to the [url=https://en.wikipedia.org/wiki/" "Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/" "url], there is no quality difference to human hearing when going past 40,000 " "Hz (since most humans can only hear up to ~20,000 Hz, often less). If you " "are generating lower-pitched sounds such as voices, lower sample rates such " "as [code]32000[/code] or [code]22050[/code] may be usable with no loss in " "quality.\n" "[b]Note:[/b] [AudioStreamGenerator] is not automatically resampling input " "data, to produce expected result [member mix_rate_mode] should match the " "sampling rate of input data.\n" "[b]Note:[/b] If you are using [AudioEffectCapture] as the source of your " "data, set [member mix_rate_mode] to [constant MIX_RATE_INPUT] or [constant " "MIX_RATE_OUTPUT] to automatically match current [AudioServer] mixing rate." msgstr "" "使用的采样率(单位:Hz)。更高的值对 CPU 要求更高,但会带来更好的质量。\n" "在游戏中,常用的采样率有 [code]11025[/code]、[code]16000[/code]、" "[code]22050[/code]、[code]32000[/code]、[code]44100[/code]、[code]48000[/" "code]。\n" "根据[url=https://zh.wikipedia.org/wiki/%E9%87%87%E6%A0%B7%E5%AE%9A%E7%90%86]" "奈奎斯特–香农采样定理[/url],当超过 40000 赫兹时,人类的听觉没有质量上的差别" "(因为大多数人最多只能听到 ~20000 赫兹,往往更少)。如果你要生成语音等音高较" "低的声音,则可以使用 [code]32000[/code] 或 [code]22050[/code] 等较低的采样" "率,不会降低质量。\n" "[b]注意:[/b][AudioStreamGenerator] 不会自动对输入数据进行重新采样,[member " "mix_rate_mode] 与输入数据的采样率相匹配才能生成预期的结果。\n" "[b]注意:[/b]如果使用 [AudioEffectCapture] 作为数据源,请将 [member " "mix_rate_mode] 设置为 [constant MIX_RATE_INPUT] 或 [constant " "MIX_RATE_OUTPUT],自动匹配当前 [AudioServer] 的混音率。" #: doc/classes/AudioStreamGenerator.xml msgid "" "Mixing rate mode. If set to [constant MIX_RATE_CUSTOM], [member mix_rate] is " "used, otherwise current [AudioServer] mixing rate is used." msgstr "" "混音率模式。如果设为 [constant MIX_RATE_CUSTOM] 则会使用 [member mix_rate]," "否则会使用 [AudioServer] 的混音率。" #: doc/classes/AudioStreamGenerator.xml msgid "Current [AudioServer] output mixing rate." msgstr "当前 [AudioServer] 的输出混音率。" #: doc/classes/AudioStreamGenerator.xml msgid "Current [AudioServer] input mixing rate." msgstr "当前 [AudioServer] 的输入混音率。" #: doc/classes/AudioStreamGenerator.xml msgid "Custom mixing rate, specified by [member mix_rate]." msgstr "自定义混音率,由 [member mix_rate] 指定。" #: doc/classes/AudioStreamGenerator.xml msgid "Maximum value for the mixing rate mode enum." msgstr "混音率模式枚举的最大值。" #: doc/classes/AudioStreamGeneratorPlayback.xml msgid "Plays back audio generated using [AudioStreamGenerator]." msgstr "播放使用 [AudioStreamGenerator] 生成的音频。" #: doc/classes/AudioStreamGeneratorPlayback.xml msgid "" "This class is meant to be used with [AudioStreamGenerator] to play back the " "generated audio in real-time." msgstr "此类旨在与 [AudioStreamGenerator] 一起使用以实时播放生成的音频。" #: doc/classes/AudioStreamGeneratorPlayback.xml msgid "Godot 3.2 will get new audio features" msgstr "Godot 3.2 将获得新的音频功能" #: doc/classes/AudioStreamGeneratorPlayback.xml msgid "" "Returns [code]true[/code] if a buffer of the size [param amount] can be " "pushed to the audio sample data buffer without overflowing it, [code]false[/" "code] otherwise." msgstr "" "如果可以将大小为 [param amount] 的缓冲区推送到音频采样数据缓冲区而不会使其溢" "出,则返回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/AudioStreamGeneratorPlayback.xml msgid "Clears the audio sample data buffer." msgstr "清除音频样本数据缓冲区。" #: doc/classes/AudioStreamGeneratorPlayback.xml msgid "" "Returns the number of frames that can be pushed to the audio sample data " "buffer without overflowing it. If the result is [code]0[/code], the buffer " "is full." msgstr "" "返回能够推送到音频采样数据缓冲区而不使其溢出的帧数。如果结果为 [code]0[/" "code],则缓冲区已满。" #: doc/classes/AudioStreamGeneratorPlayback.xml msgid "" "Returns the number of times the playback skipped due to a buffer underrun in " "the audio sample data. This value is reset at the start of the playback." msgstr "" "返回由于音频样本数据中缓冲区不足而导致播放跳过的次数。该值在播放开始时重置。" #: doc/classes/AudioStreamGeneratorPlayback.xml msgid "" "Pushes several audio data frames to the buffer. This is usually more " "efficient than [method push_frame] in C# and compiled languages via " "GDExtension, but [method push_buffer] may be [i]less[/i] efficient in " "GDScript." msgstr "" "将多个音频数据帧推送到缓冲区。这通常比 C# 中的以及通过 GDExtension 编译的语言" "中的 [method push_frame] 效率更高,但在 GDScript 中的 [method push_buffer] 的" "效率可能[i]更低[/i]。" #: doc/classes/AudioStreamGeneratorPlayback.xml msgid "" "Pushes a single audio data frame to the buffer. This is usually less " "efficient than [method push_buffer] in C# and compiled languages via " "GDExtension, but [method push_frame] may be [i]more[/i] efficient in " "GDScript." msgstr "" "将单个音频数据帧推送到缓冲区。这通常比 C# 中的以及通过 GDExtension 编译的语言" "中的 [method push_buffer] 效率更低,但在 GDScript 中的 [method push_frame] 的" "效率可能[i]更高[/i]。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Audio stream that can playback music interactively, combining clips and a " "transition table." msgstr "以可交互的形式播放音乐的音频流,包含若干剪辑和一张过渡表。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "This is an audio stream that can playback music interactively, combining " "clips and a transition table. Clips must be added first, and then the " "transition rules via the [method add_transition]. Additionally, this stream " "exports a property parameter to control the playback via " "[AudioStreamPlayer], [AudioStreamPlayer2D], or [AudioStreamPlayer3D].\n" "The way this is used is by filling a number of clips, then configuring the " "transition table. From there, clips are selected for playback and the music " "will smoothly go from the current to the new one while using the " "corresponding transition rule defined in the transition table." msgstr "" "这是一种能够以可交互的形式播放音乐的音频流,包含若干剪辑和一张过渡表。必须先" "添加剪辑,再使用 [method add_transition] 添加过渡规则。这种音频流还导出了一个" "用于控制 [AudioStreamPlayer]、[AudioStreamPlayer2D]、[AudioStreamPlayer3D] 播" "放的属性参数。\n" "用法是先填充一些剪辑,然后配置过渡表。音频流会根据过渡表选择要播放的剪辑,并" "根据表中定义的对应过渡规则平滑地将当前音乐过渡到新的剪辑。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Add a transition between two clips. Provide the indices of the source and " "destination clips, or use the [constant CLIP_ANY] constant to indicate that " "transition happens to/from any clip to this one.\n" "* [param from_time] indicates the moment in the current clip the transition " "will begin after triggered.\n" "* [param to_time] indicates the time in the next clip that the playback will " "start from.\n" "* [param fade_mode] indicates how the fade will happen between clips. If " "unsure, just use [constant FADE_AUTOMATIC] which uses the most common type " "of fade for each situation.\n" "* [param fade_beats] indicates how many beats the fade will take. Using " "decimals is allowed.\n" "* [param use_filler_clip] indicates that there will be a filler clip used " "between the source and destination clips.\n" "* [param filler_clip] the index of the filler clip.\n" "* If [param hold_previous] is used, then this clip will be remembered. This " "can be used together with [constant AUTO_ADVANCE_RETURN_TO_HOLD] to return " "to this clip after another is done playing." msgstr "" "添加两个剪辑之间的过渡。请提供来源剪辑和目标剪辑的索引号,或者使用 [constant " "CLIP_ANY] 常量表示过渡自/至任意剪辑。\n" "* [param from_time] 表示触发后当前剪辑开始过渡的时机。\n" "* [param to_time] 表示下一剪辑开始播放的时间。\n" "* [param fade_mode] 表示两个剪辑之间的过渡方式。如果不确定,请使用 [constant " "FADE_AUTOMATIC],会根据实际情况使用最常见的渐隐类型。\n" "* [param fade_beats] 表示过渡所需的节拍数。可以使用小数。\n" "* [param use_filler_clip] 表示来源和目标剪辑之间会使用填充剪辑。\n" "* [param filler_clip] 为填充剪辑的索引号。\n" "* 如果使用了 [param hold_previous],则会记住该剪辑。配合 [constant " "AUTO_ADVANCE_RETURN_TO_HOLD] 使用可以在另一个剪辑播放完成后回到该剪辑。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Erase a transition by providing [param from_clip] and [param to_clip] clip " "indices. [constant CLIP_ANY] can be used for either argument or both." msgstr "" "擦除过渡,需要提供剪辑索引号 [param from_clip] 和 [param to_clip]。两者均可使" "用 [constant CLIP_ANY]。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Return whether a clip has auto-advance enabled. See [method " "set_clip_auto_advance]." msgstr "返回剪辑是否启用了自动推进。见 [method set_clip_auto_advance]。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Return the clip towards which the clip referenced by [param clip_index] will " "auto-advance to." msgstr "返回 [param clip_index] 所引用的剪辑会自动推进至哪个剪辑。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Return the name of a clip." msgstr "返回剪辑的名称。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Return the [AudioStream] associated with a clip." msgstr "返回与剪辑关联的 [AudioStream]。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Return the time (in beats) for a transition (see [method add_transition])." msgstr "返回过渡的时间,单位为拍(见 [method add_transition])。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Return the mode for a transition (see [method add_transition])." msgstr "返回过渡的模式(见 [method add_transition])。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Return the filler clip for a transition (see [method add_transition])." msgstr "返回过渡的填充剪辑(见 [method add_transition])。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Return the source time position for a transition (see [method " "add_transition])." msgstr "返回过渡的来源时间位置(见 [method add_transition])。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Return the list of transitions (from, to interleaved)." msgstr "返回过渡列表(来源、目标互相穿插)。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Return the destination time position for a transition (see [method " "add_transition])." msgstr "返回过渡的目标时间位置(见 [method add_transition])。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Returns [code]true[/code] if a given transition exists (was added via " "[method add_transition])." msgstr "" "如果存在给定的过渡则返回 [code]true[/code](通过 [method add_transition] 添" "加)。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Return whether a transition uses the [i]hold previous[/i] functionality (see " "[method add_transition])." msgstr "" "返回过渡是否使用了[i]保持上一个[/i]功能(见 [method add_transition])。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Return whether a transition uses the [i]filler clip[/i] functionality (see " "[method add_transition])." msgstr "返回过渡是否使用了[i]填充剪辑[/i]功能(见 [method add_transition])。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Set whether a clip will auto-advance by changing the auto-advance mode." msgstr "通过更改自动前进模式来设置剪辑是否自动前进。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Set the index of the next clip towards which this clip will auto advance to " "when finished. If the clip being played loops, then auto-advance will be " "ignored." msgstr "" "设置下一个剪辑的索引,此剪辑完成后将自动前进到该索引。如果正在播放的剪辑循环" "播放,则自动前进将被忽略。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Set the name of the current clip (for easier identification)." msgstr "设置当前剪辑的名称(方便识别)。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Set the [AudioStream] associated with the current clip." msgstr "设置与当前剪辑关联的 [AudioStream]。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Amount of clips contained in this interactive player." msgstr "该交互式播放器中包含的剪辑数量。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Index of the initial clip, which will be played first when this stream is " "played." msgstr "初始剪辑的索引号,播放该音频流时会首先播放该剪辑。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Start transition as soon as possible, don't wait for any specific time " "position." msgstr "尽快开始过渡,不等待任何特定的时间位置。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Transition when the clip playback position reaches the next beat." msgstr "剪辑播放至下一拍时过渡。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Transition when the clip playback position reaches the next bar." msgstr "剪辑播放至下一节时过渡。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Transition when the current clip finished playing." msgstr "剪辑播放完成时过渡。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Transition to the same position in the destination clip. This is useful when " "both clips have exactly the same length and the music should fade between " "them." msgstr "" "过渡至目标剪辑中的相同位置。适用于两个剪辑长度一致、需要进行过渡的场合。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Transition to the start of the destination clip." msgstr "过渡至目标剪辑的开头。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Do not use fade for the transition. This is useful when transitioning from a " "clip-end to clip-beginning, and each clip has their begin/end." msgstr "" "过渡时不使用淡入淡出。适用于从剪辑结尾过渡至剪辑开头,双方均有开头/结尾的情" "况。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Use a fade-in in the next clip, let the current clip finish." msgstr "在下一剪辑中使用淡入,播放完当前剪辑。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Use a fade-out in the current clip, the next clip will start by itself." msgstr "在当前剪辑中使用淡出,下一剪辑自行开始。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Use a cross-fade between clips." msgstr "在剪辑之间使用交叉渐变。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Use automatic fade logic depending on the transition from/to. It is " "recommended to use this by default." msgstr "使用根据过渡来源和目标决定的过渡逻辑。建议默认使用这个选项。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Disable auto-advance (default)." msgstr "禁用自动推进(默认)。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "Enable auto-advance, a clip must be specified." msgstr "启用自动推进,必须指定剪辑。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "Enable auto-advance, but instead of specifying a clip, the playback will " "return to hold (see [method add_transition])." msgstr "" "启用自动推进,不指定剪辑,而是恢复播放保持的剪辑(见 [method " "add_transition])。" #: modules/interactive_music/doc_classes/AudioStreamInteractive.xml msgid "" "This constant describes that any clip is valid for a specific transition as " "either source or destination." msgstr "该常量表示过渡对来源或目标是任何剪辑的情况均适用。" #: doc/classes/AudioStreamMicrophone.xml msgid "Plays real-time audio input data." msgstr "播放实时音频输入数据。" #: doc/classes/AudioStreamMicrophone.xml msgid "" "When used directly in an [AudioStreamPlayer] node, [AudioStreamMicrophone] " "plays back microphone input in real-time. This can be used in conjunction " "with [AudioEffectCapture] to process the data or save it.\n" "[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be " "[code]true[/code] for audio input to work. See also that setting's " "description for caveats related to permissions and operating system privacy " "settings." msgstr "" "当直接在 [AudioStreamPlayer] 节点中使用时,[AudioStreamMicrophone] 会实时播放" "麦克风的输入。这可以配合 [AudioEffectCapture] 使用,以处理数据或保存数据。\n" "[b]注意:[/b][member ProjectSettings.audio/driver/enable_input] 必须为 " "[code]true[/code] 音频输入才能正常工作。另见该设置的说明,了解与权限和操作系" "统隐私设置相关的注意事项。" #: doc/classes/AudioStreamMicrophone.xml msgid "Audio Mic Record Demo" msgstr "音频麦克风录音演示" #: modules/mp3/doc_classes/AudioStreamMP3.xml msgid "MP3 audio stream driver." msgstr "MP3 音频流驱动程序。" #: modules/mp3/doc_classes/AudioStreamMP3.xml msgid "" "MP3 audio stream driver. See [member data] if you want to load an MP3 file " "at run-time.\n" "[b]Note:[/b] This class can optionally support legacy MP1 and MP2 formats, " "provided that the engine is compiled with the " "[code]minimp3_extra_formats=yes[/code] SCons option. These extra formats are " "not enabled by default." msgstr "" "MP3 音频流驱动。如果你想要在运行时加载 MP3 文件,请参阅 [member data]。\n" "[b]注意:[/b]如果引擎编译时使用了 SCons 选项 " "[code]minimp3_extra_formats=yes[/code],则该类能够可选地支持历史遗留的 MP1 " "和 MP2 格式。默认不启用此类额外格式。" #: modules/mp3/doc_classes/AudioStreamMP3.xml msgid "" "Creates a new [AudioStreamMP3] instance from the given buffer. The buffer " "must contain MP3 data." msgstr "从给定缓冲区新建 [AudioStreamMP3] 实例。缓冲区中必须包含 MP3 数据。" #: modules/mp3/doc_classes/AudioStreamMP3.xml msgid "" "Creates a new [AudioStreamMP3] instance from the given file path. The file " "must be in MP3 format." msgstr "从给定的文件路径新建 [AudioStreamMP3] 实例。文件必须为 MP3 格式。" #: modules/mp3/doc_classes/AudioStreamMP3.xml msgid "" "Contains the audio data in bytes.\n" "You can load a file without having to import it beforehand using the code " "snippet below. Keep in mind that this snippet loads the whole file into " "memory and may not be ideal for huge files (hundreds of megabytes or more).\n" "[codeblocks]\n" "[gdscript]\n" "func load_mp3(path):\n" "\tvar file = FileAccess.open(path, FileAccess.READ)\n" "\tvar sound = AudioStreamMP3.new()\n" "\tsound.data = file.get_buffer(file.get_length())\n" "\treturn sound\n" "[/gdscript]\n" "[csharp]\n" "public AudioStreamMP3 LoadMP3(string path)\n" "{\n" "\tusing var file = FileAccess.Open(path, FileAccess.ModeFlags.Read);\n" "\tvar sound = new AudioStreamMP3();\n" "\tsound.Data = file.GetBuffer(file.GetLength());\n" "\treturn sound;\n" "}\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "包含以字节为单位的音频数据。\n" "你可以使用下面的代码片段,加载文件而无需事先导入它。请记住,此代码段将整个文" "件加载到内存中,对于大文件(数百兆字节或更多)可能并不理想。\n" "[codeblocks]\n" "[gdscript]\n" "func load_mp3(path):\n" "\tvar file = FileAccess.open(path, FileAccess.READ)\n" "\tvar sound = AudioStreamMP3.new()\n" "\tsound.data = file.get_buffer(file.get_length())\n" "\treturn sound\n" "[/gdscript]\n" "[csharp]\n" "public AudioStreamMP3 LoadMP3(string path)\n" "{\n" "\tusing var file = FileAccess.Open(path, FileAccess.ModeFlags.Read);\n" "\tvar sound = new AudioStreamMP3();\n" "\tsound.Data = file.GetBuffer(file.GetLength());\n" "\treturn sound;\n" "}\n" "[/csharp]\n" "[/codeblocks]" #: modules/mp3/doc_classes/AudioStreamMP3.xml msgid "" "If [code]true[/code], the stream will automatically loop when it reaches the " "end." msgstr "如果为 [code]true[/code],当流到达末尾时将自动循环。" #: modules/mp3/doc_classes/AudioStreamMP3.xml #: modules/vorbis/doc_classes/AudioStreamOggVorbis.xml msgid "Time in seconds at which the stream starts after being looped." msgstr "循环时,流开始的时间,单位为秒。" #: modules/vorbis/doc_classes/AudioStreamOggVorbis.xml msgid "A class representing an Ogg Vorbis audio stream." msgstr "代表 Ogg Vorbis 音频流的类。" #: modules/vorbis/doc_classes/AudioStreamOggVorbis.xml msgid "" "The AudioStreamOggVorbis class is a specialized [AudioStream] for handling " "Ogg Vorbis file formats. It offers functionality for loading and playing " "back Ogg Vorbis files, as well as managing looping and other playback " "properties. This class is part of the audio stream system, which also " "supports WAV files through the [AudioStreamWAV] class." msgstr "" "AudioStreamOggVorbis 类是专用于处理 Ogg Vorbis 文件格式的 [AudioStream] 类。" "它提供加载和播放 Ogg Vorbis 文件以及管理循环和其他播放属性的功能。该类是音频" "流系统的一部分,该系统还通过 [AudioStreamWAV] 类支持 WAV 系统。" #: modules/vorbis/doc_classes/AudioStreamOggVorbis.xml #: doc/classes/AudioStreamWAV.xml doc/classes/FileAccess.xml #: doc/classes/FontFile.xml modules/gltf/doc_classes/GLTFAccessor.xml #: modules/gltf/doc_classes/GLTFAnimation.xml #: modules/gltf/doc_classes/GLTFBufferView.xml #: modules/gltf/doc_classes/GLTFCamera.xml #: modules/gltf/doc_classes/GLTFDocument.xml #: modules/gltf/doc_classes/GLTFDocumentExtension.xml #: modules/gltf/doc_classes/GLTFDocumentExtensionConvertImporterMesh.xml #: modules/gltf/doc_classes/GLTFLight.xml modules/gltf/doc_classes/GLTFMesh.xml #: modules/gltf/doc_classes/GLTFNode.xml #: modules/gltf/doc_classes/GLTFPhysicsBody.xml #: modules/gltf/doc_classes/GLTFPhysicsShape.xml #: modules/gltf/doc_classes/GLTFSkeleton.xml #: modules/gltf/doc_classes/GLTFSkin.xml #: modules/gltf/doc_classes/GLTFSpecGloss.xml #: modules/gltf/doc_classes/GLTFState.xml #: modules/gltf/doc_classes/GLTFTexture.xml #: modules/gltf/doc_classes/GLTFTextureSampler.xml doc/classes/Image.xml #: doc/classes/VideoStream.xml msgid "Runtime file loading and saving" msgstr "运行时文件加载与保存" #: modules/vorbis/doc_classes/AudioStreamOggVorbis.xml #: modules/vorbis/doc_classes/ResourceImporterOggVorbis.xml msgid "" "Creates a new [AudioStreamOggVorbis] instance from the given buffer. The " "buffer must contain Ogg Vorbis data." msgstr "" "从给定缓冲区新建 [AudioStreamOggVorbis] 实例。缓冲区中必须包含 Ogg Vorbis 数" "据。" #: modules/vorbis/doc_classes/AudioStreamOggVorbis.xml #: modules/vorbis/doc_classes/ResourceImporterOggVorbis.xml msgid "" "Creates a new [AudioStreamOggVorbis] instance from the given file path. The " "file must be in Ogg Vorbis format." msgstr "" "从给定的文件路径新建 [AudioStreamOggVorbis] 实例。文件必须为 Ogg Vorbis 格" "式。" #: modules/vorbis/doc_classes/AudioStreamOggVorbis.xml msgid "" "If [code]true[/code], the audio will play again from the specified [member " "loop_offset] once it is done playing. Useful for ambient sounds and " "background music." msgstr "" "如果为 [code]true[/code],则音频播放完成后将从 [member loop_offset] 指定的位" "置再次播放。可用于环境声音和背景音乐。" #: modules/vorbis/doc_classes/AudioStreamOggVorbis.xml msgid "Contains the raw Ogg data for this stream." msgstr "包含用于这个流的原始 Ogg 数据。" #: modules/vorbis/doc_classes/AudioStreamOggVorbis.xml msgid "" "Contains user-defined tags if found in the Ogg Vorbis data.\n" "Commonly used tags include [code]title[/code], [code]artist[/code], " "[code]album[/code], [code]tracknumber[/code], and [code]date[/code] " "([code]date[/code] does not have a standard date format).\n" "[b]Note:[/b] No tag is [i]guaranteed[/i] to be present in every file, so " "make sure to account for the keys not always existing." msgstr "" "如果在 Ogg Vorbis 数据中存在标签,则包含用户定义的标签。\n" "常用标签包括标题 [code]title[/code]、艺术家 [code]artist[/code]、专辑 " "[code]album[/code]、音轨号 [code]tracknumber[/code]、日期 [code]date[/code]" "([code]date[/code] 没有标准日期格式)。\n" "[b]注意:[/b]无法[i]保证[/i]每个文件中都有某个标签,因此请考虑键可能不是始终" "存在。" #: doc/classes/AudioStreamPlayback.xml msgid "Meta class for playing back audio." msgstr "播放音频的元类。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Can play, loop, pause a scroll through audio. See [AudioStream] and " "[AudioStreamOggVorbis] for usage." msgstr "" "可以播放、循环播放、暂停滚动播放音频。有关用法,请参阅 [AudioStream] 和 " "[AudioStreamOggVorbis]。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Overridable method. Should return how many times this audio stream has " "looped. Most built-in playbacks always return [code]0[/code]." msgstr "" "可覆盖的方法。应该返回该音频流已经循环了多少次。大多数内置播放始终返回 " "[code]0[/code]。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Return the current value of a playback parameter by name (see [method " "AudioStream._get_parameter_list])." msgstr "" "按名称返回播放参数的当前值(请参阅 [method " "AudioStream._get_parameter_list])。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Overridable method. Should return the current progress along the audio " "stream, in seconds." msgstr "可覆盖的方法。应返回音频流的当前进度,单位为秒。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Overridable method. Should return [code]true[/code] if this playback is " "active and playing its audio stream." msgstr "" "可覆盖的方法。如果该播放处于活动状态并正在播放其音频流,则应返回 [code]true[/" "code]。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Override this method to customize how the audio stream is mixed. This method " "is called even if the playback is not active.\n" "[b]Note:[/b] It is not useful to override this method in GDScript or C#. " "Only GDExtension can take advantage of it." msgstr "" "覆盖该方法以自定义音频流的混合方式。即使播放未激活,也会调用该方法。\n" "[b]注意:[/b]在 GDScript 或 C# 中覆盖该方法没有用。只有 GDExtension 可以利用" "它。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Override this method to customize what happens when seeking this audio " "stream at the given [param position], such as by calling [method " "AudioStreamPlayer.seek]." msgstr "" "覆盖该方法以自定义在给定的 [param position] 处查找该音频流时发生的情况,例如" "通过调用 [method AudioStreamPlayer.seek]。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Set the current value of a playback parameter by name (see [method " "AudioStream._get_parameter_list])." msgstr "" "按名称设置播放参数的当前值(请参阅 [method " "AudioStream._get_parameter_list])。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Override this method to customize what happens when the playback starts at " "the given position, such as by calling [method AudioStreamPlayer.play]." msgstr "" "覆盖该方法以自定义在给定位置开始播放时发生的情况,例如通过调用 [method " "AudioStreamPlayer.play] 覆盖。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Override this method to customize what happens when the playback is stopped, " "such as by calling [method AudioStreamPlayer.stop]." msgstr "" "覆盖该方法以自定义播放停止时发生的情况,例如通过调用 [method " "AudioStreamPlayer.stop] 覆盖。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Overridable method. Called whenever the audio stream is mixed if the " "playback is active and [method " "AudioServer.set_enable_tagging_used_audio_streams] has been set to " "[code]true[/code]. Editor plugins may use this method to \"tag\" the current " "position along the audio stream and display it in a preview." msgstr "" "可覆盖的方法。如果播放处于活动状态并且 [method " "AudioServer.set_enable_tagging_used_audio_streams] 已被设置为 [code]true[/" "code],则每当混合音频流时调用。编辑器插件可以使用该方法以“标记”音频流中的当前" "位置并将其显示在预览中。" #: doc/classes/AudioStreamPlayback.xml msgid "Returns the number of times the stream has looped." msgstr "返回音频流已循环的次数。" #: doc/classes/AudioStreamPlayback.xml msgid "Returns the current position in the stream, in seconds." msgstr "返回音频流中的当前位置,单位为秒。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Returns the [AudioSamplePlayback] associated with this [AudioStreamPlayback] " "for playing back the audio sample of this stream." msgstr "" "返回与该 [AudioStreamPlayback] 相关联的、用于播放该流的音频样本的 " "[AudioSamplePlayback],。" #: doc/classes/AudioStreamPlayback.xml msgid "Returns [code]true[/code] if the stream is playing." msgstr "音频流正在播放时,返回 [code]true[/code]。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Mixes up to [param frames] of audio from the stream from the current " "position, at a rate of [param rate_scale], advancing the stream.\n" "Returns a [PackedVector2Array] where each element holds the left and right " "channel volume levels of each frame.\n" "[b]Note:[/b] Can return fewer frames than requested, make sure to use the " "size of the return value." msgstr "" "从当前位置开始,以 [param rate_scale] 的速率混合音频流中最多 [param frames] " "帧音频,并推进流的位置。\n" "返回一个[PackedVector2Array],其中每个元素对应包含每个帧的左右声道音量。\n" "[b]注意:[/b]可能返回少于请求的帧数,请确定使用返回值的size。" #: doc/classes/AudioStreamPlayback.xml msgid "Seeks the stream at the given [param time], in seconds." msgstr "跳转到音频流中给定的时间点 [param time],单位为秒。" #: doc/classes/AudioStreamPlayback.xml msgid "" "Associates [AudioSamplePlayback] to this [AudioStreamPlayback] for playing " "back the audio sample of this stream." msgstr "" "将 [AudioSamplePlayback] 与该 [AudioStreamPlayback] 关联以播放该流的音频样" "本。" #: doc/classes/AudioStreamPlayback.xml msgid "Starts the stream from the given [param from_pos], in seconds." msgstr "从给定的位置 [param from_pos] 开始播放音频流,单位为秒。" #: doc/classes/AudioStreamPlayback.xml msgid "Stops the stream." msgstr "停止音频流。" #: modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml msgid "Playback component of [AudioStreamInteractive]." msgstr "[AudioStreamInteractive] 的播放组件。" #: modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml msgid "" "Playback component of [AudioStreamInteractive]. Contains functions to change " "the currently played clip." msgstr "[AudioStreamInteractive] 的播放组件。包含更改当前播放剪辑的函数。" #: modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml msgid "" "Return the index of the currently playing clip. You can use this to get the " "name of the currently playing clip with [method " "AudioStreamInteractive.get_clip_name].\n" "[b]Example:[/b] Get the currently playing clip name from inside an " "[AudioStreamPlayer] node.\n" "[codeblocks]\n" "[gdscript]\n" "var playing_clip_name = " "stream.get_clip_name(get_stream_playback().get_current_clip_index())\n" "[/gdscript]\n" "[/codeblocks]" msgstr "" "返回当前正在播放的剪辑的索引。可以通过 [method " "AudioStreamInteractive.get_clip_name] 用该索引获取当前正在播放的剪辑的名" "称。\n" "[b]示例:[/b]在 [AudioStreamPlayer] 节点中获取当前正在播放的剪辑的名称。\n" "[codeblocks]\n" "[gdscript]\n" "var playing_clip_name = " "stream.get_clip_name(get_stream_playback().get_current_clip_index())\n" "[/gdscript]\n" "[/codeblocks]" #: modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml msgid "Switch to a clip (by index)." msgstr "切换到剪辑(根据索引)。" #: modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml msgid "Switch to a clip (by name)." msgstr "切换到剪辑(根据名称)。" #: modules/interactive_music/doc_classes/AudioStreamPlaybackPlaylist.xml msgid "Playback class used for [AudioStreamPlaylist]." msgstr "[AudioStreamPlaylist] 使用的播放类。" #: doc/classes/AudioStreamPlaybackPolyphonic.xml msgid "Playback instance for [AudioStreamPolyphonic]." msgstr "[AudioStreamPolyphonic] 的播放实例。" #: doc/classes/AudioStreamPlaybackPolyphonic.xml msgid "" "Playback instance for [AudioStreamPolyphonic]. After setting the " "[code]stream[/code] property of [AudioStreamPlayer], [AudioStreamPlayer2D], " "or [AudioStreamPlayer3D], the playback instance can be obtained by calling " "[method AudioStreamPlayer.get_stream_playback], [method " "AudioStreamPlayer2D.get_stream_playback] or [method " "AudioStreamPlayer3D.get_stream_playback] methods." msgstr "" "[AudioStreamPolyphonic] 的播放实例。设置 [AudioStreamPlayer]、" "[AudioStreamPlayer2D] 或 [AudioStreamPlayer3D] 的 [code]stream[/code] 属性" "后,可以通过调用 [method AudioStreamPlayer.get_stream_playback]、[method " "AudioStreamPlayer2D.get_stream_playback] 或 [method " "AudioStreamPlayer3D.get_stream_playback] 方法获取播放实例。" #: doc/classes/AudioStreamPlaybackPolyphonic.xml msgid "" "Returns [code]true[/code] if the stream associated with the given integer ID " "is still playing. Check [method play_stream] for information on when this ID " "becomes invalid." msgstr "" "如果与给定的整数 ID 所关联的音频流仍在播放,则返回 [code]true[/code]。与 ID " "何时失效相关的信息请查看 [method play_stream]。" #: doc/classes/AudioStreamPlaybackPolyphonic.xml msgid "" "Play an [AudioStream] at a given offset, volume, pitch scale, playback type, " "and bus. Playback starts immediately.\n" "The return value is a unique integer ID that is associated to this playback " "stream and which can be used to control it.\n" "This ID becomes invalid when the stream ends (if it does not loop), when the " "[AudioStreamPlaybackPolyphonic] is stopped, or when [method stop_stream] is " "called.\n" "This function returns [constant INVALID_ID] if the amount of streams " "currently playing equals [member AudioStreamPolyphonic.polyphony]. If you " "need a higher amount of maximum polyphony, raise this value." msgstr "" "以给定的偏移量、音量、音高比例、播放类型、和总线播放 [AudioStream]。播放立即" "开始。\n" "返回值是与该播放流关联的唯一整数 ID,可用于控制该播放流。\n" "当流结束(不循环)、[AudioStreamPlaybackPolyphonic] 停止或 [method " "stop_stream] 被调用时,该 ID 将失效。\n" "如果当前播放的流的数量等于 [member AudioStreamPolyphonic.polyphony],则该函数" "将返回 [constant INVALID_ID]。如果需要更大的最大复音数,请提高该值。" #: doc/classes/AudioStreamPlaybackPolyphonic.xml msgid "" "Change the stream pitch scale. The [param stream] argument is an integer ID " "returned by [method play_stream]." msgstr "" "改变流的音阶。[param stream] 参数是一个由 [method play_stream] 返回的整数 " "ID。" #: doc/classes/AudioStreamPlaybackPolyphonic.xml msgid "" "Change the stream volume (in db). The [param stream] argument is an integer " "ID returned by [method play_stream]." msgstr "" "改变流的音量(单位:db)。[param stream] 参数是一个由 [method play_stream] 返" "回的整数 ID。" #: doc/classes/AudioStreamPlaybackPolyphonic.xml msgid "" "Stop a stream. The [param stream] argument is an integer ID returned by " "[method play_stream], which becomes invalid after calling this function." msgstr "" "停止某个流。[param stream] 参数是由 [method play_stream] 返回的整数 ID,在调" "用这个函数后失效。" #: doc/classes/AudioStreamPlaybackPolyphonic.xml msgid "" "Returned by [method play_stream] in case it could not allocate a stream for " "playback." msgstr "无法为播放分配一个流时由 [method play_stream] 返回。" #: doc/classes/AudioStreamPlayer.xml msgid "A node for audio playback." msgstr "用于播放音频的节点。" #: doc/classes/AudioStreamPlayer.xml msgid "" "The [AudioStreamPlayer] node plays an audio stream non-positionally. It is " "ideal for user interfaces, menus, or background music.\n" "To use this node, [member stream] needs to be set to a valid [AudioStream] " "resource. Playing more than one sound at the same time is also supported, " "see [member max_polyphony].\n" "If you need to play audio at a specific position, use [AudioStreamPlayer2D] " "or [AudioStreamPlayer3D] instead." msgstr "" "[AudioStreamPlayer] 节点能够播放音频流,播放的效果与位置无关,是用户界面、菜" "单、背景音乐的理想选择。\n" "使用该节点时,需要将 [member stream] 设为有效的 [AudioStream] 资源。此外,还" "支持同时播放多个声音,见 [member max_polyphony]。\n" "如果你需要在特定的位置播放音频,请改用 [AudioStreamPlayer2D] 或 " "[AudioStreamPlayer3D]。" #: doc/classes/AudioStreamPlayer.xml msgid "" "Returns the position in the [AudioStream] of the latest sound, in seconds. " "Returns [code]0.0[/code] if no sounds are playing.\n" "[b]Note:[/b] The position is not always accurate, as the [AudioServer] does " "not mix audio every processed frame. To get more accurate results, add " "[method AudioServer.get_time_since_last_mix] to the returned position.\n" "[b]Note:[/b] This method always returns [code]0.0[/code] if the [member " "stream] is an [AudioStreamInteractive], since it can have multiple clips " "playing at once." msgstr "" "返回最近播放的 [AudioStream] 声音中的位置,单位为秒。如果没有正在播放的声音," "则返回 [code]0.0[/code]。\n" "[b]注意:[/b]返回的位置不一定精准,因为 [AudioServer] 不会在每个处理的帧中混" "合音频。要想得到更多准确的结果,请将 [method " "AudioServer.get_time_since_last_mix] 添加到返回的位置。\n" "[b]注意:[/b]如果 [member stream] 是 [AudioStreamInteractive],则始终返回 " "[code]0.0[/code],因为这种音频流可以同时播放多个剪辑。" #: doc/classes/AudioStreamPlayer.xml msgid "" "Returns the latest [AudioStreamPlayback] of this node, usually the most " "recently created by [method play]. If no sounds are playing, this method " "fails and returns an empty playback." msgstr "" "返回该节点最近的 [AudioStreamPlayback],通常是最近由 [method play] 创建的对" "象。如果当前没有在播放任何声音,则这个方法会失败并返回空的回放对象。" #: doc/classes/AudioStreamPlayer.xml msgid "" "Returns [code]true[/code] if any sound is active, even if [member " "stream_paused] is set to [code]true[/code]. See also [member playing] and " "[method get_stream_playback]." msgstr "" "如果有活动的声音则返回 [code]true[/code],即便 [member stream_paused] 为 " "[code]true[/code]。另见 [member playing] 和 [method get_stream_playback]。" #: doc/classes/AudioStreamPlayer.xml msgid "" "Plays a sound from the beginning, or the given [param from_position] in " "seconds." msgstr "" "从开头或给定的位置 [param from_position] 开始播放声音,位置的单位为秒。" #: doc/classes/AudioStreamPlayer.xml msgid "" "Restarts all sounds to be played from the given [param to_position], in " "seconds. Does nothing if no sounds are playing." msgstr "" "从给定的位置 [param to_position] 开始重新播放所有声音,位置的单位为秒。如果当" "前没有在播放任何声音,则无事发生。" #: doc/classes/AudioStreamPlayer.xml msgid "Stops all sounds from this node." msgstr "停止该节点发出的所有声音。" #: doc/classes/AudioStreamPlayer.xml msgid "" "If [code]true[/code], this node calls [method play] when entering the tree." msgstr "如果为 [code]true[/code],则该节点会在进入场景树时调用 [method play]。" #: doc/classes/AudioStreamPlayer.xml msgid "" "The target bus name. All sounds from this node will be playing on this bus.\n" "[b]Note:[/b] At runtime, if no bus with the given name exists, all sounds " "will fall back on [code]\"Master\"[/code]. See also [method " "AudioServer.get_bus_name]." msgstr "" "目标总线的名称。该节点的所有声音都会在这条总线上播放。\n" "[b]注意:[/b]在运行时,如果不存在该名称的总线,那么所有声音都会回退至 [code]" "\"Master\"[/code] 总线。另见 [method AudioServer.get_bus_name]。" #: doc/classes/AudioStreamPlayer.xml msgid "" "The maximum number of sounds this node can play at the same time. Calling " "[method play] after this value is reached will cut off the oldest sounds." msgstr "" "该节点可以同时播放的声音的最大数量。达到此值后再调用 [method play] 将切断最早" "播放的声音。" #: doc/classes/AudioStreamPlayer.xml msgid "" "The mix target channels. Has no effect when two speakers or less are " "detected (see [enum AudioServer.SpeakerMode])." msgstr "" "混合目标声道。检测到小于等于两个扬声器时无效(见 [enum " "AudioServer.SpeakerMode])。" #: doc/classes/AudioStreamPlayer.xml msgid "" "The audio's pitch and tempo, as a multiplier of the [member stream]'s sample " "rate. A value of [code]2.0[/code] doubles the audio's pitch, while a value " "of [code]0.5[/code] halves the pitch." msgstr "" "音频的音高和速度,是 [member stream] 采样率的乘数。取值为 [code]2.0[/code] 时" "音频的音高翻倍,为 [code]0.5[/code] 时音高减半。" #: doc/classes/AudioStreamPlayer.xml doc/classes/AudioStreamPlayer2D.xml #: doc/classes/AudioStreamPlayer3D.xml msgid "" "The playback type of the stream player. If set other than to the default " "value, it will force that playback type." msgstr "流播放器的播放类型。如果设置为非默认值,则将强制使用该播放类型。" #: doc/classes/AudioStreamPlayer.xml msgid "" "If [code]true[/code], this node is playing sounds. Setting this property has " "the same effect as [method play] and [method stop]." msgstr "" "如果为 [code]true[/code],则该节点正在播放声音。设置该属性与 [method play] " "和 [method stop] 等效。" #: doc/classes/AudioStreamPlayer.xml msgid "" "The [AudioStream] resource to be played. Setting this property stops all " "currently playing sounds. If left empty, the [AudioStreamPlayer] does not " "work." msgstr "" "要播放的 [AudioStream] 资源。设置该属性会停止所有正在播放的声音。如果留空," "则 [AudioStreamPlayer] 不工作。" #: doc/classes/AudioStreamPlayer.xml msgid "" "If [code]true[/code], the sounds are paused. Setting [member stream_paused] " "to [code]false[/code] resumes all sounds.\n" "[b]Note:[/b] This property is automatically changed when exiting or entering " "the tree, or this node is paused (see [member Node.process_mode])." msgstr "" "如果为 [code]true[/code],则声音暂停。将 [member stream_paused] 设置为 " "[code]false[/code] 会恢复所有声音。\n" "[b]注意:[/b]进入和退出场景树以及节点暂停时均会自动修改该属性(见 [member " "Node.process_mode])。" #: doc/classes/AudioStreamPlayer.xml msgid "" "Volume of sound, in decibels. This is an offset of the [member stream]'s " "volume.\n" "[b]Note:[/b] To convert between decibel and linear energy (like most volume " "sliders do), use [member volume_linear], or [method " "@GlobalScope.db_to_linear] and [method @GlobalScope.linear_to_db]." msgstr "" "音量,单位为分贝。这是相对于 [member stream] 音量的偏移。\n" "[b]注意:[/b]如需在分贝和线性能量间进行转换(常见于音量滑块),请使用 " "[member volume_linear]、[method @GlobalScope.db_to_linear] 和 [method " "@GlobalScope.linear_to_db]。" #: doc/classes/AudioStreamPlayer.xml msgid "" "Volume of sound, as a linear value.\n" "[b]Note:[/b] This member modifies [member volume_db] for convenience. The " "returned value is equivalent to the result of [method " "@GlobalScope.db_to_linear] on [member volume_db]. Setting this member is " "equivalent to setting [member volume_db] to the result of [method " "@GlobalScope.linear_to_db] on a value." msgstr "" "线性形式的音量。\n" "[b]注意:[/b]该成员会帮助修改 [member volume_db]。返回的值等价于使用 [member " "volume_db] 调用 [method @GlobalScope.db_to_linear] 的结果。设置该成员等价于" "将 [member volume_db] 设置为使用新值调用 [method @GlobalScope.linear_to_db] " "的结果。" #: doc/classes/AudioStreamPlayer.xml msgid "" "Emitted when a sound finishes playing without interruptions. This signal is " "[i]not[/i] emitted when calling [method stop], or when exiting the tree " "while sounds are playing." msgstr "" "当声音不受打断完成播放时发出。调用 [method stop] 时[i]不会[/i]发出该信号,播" "放声音时退出场景树也不会。" #: doc/classes/AudioStreamPlayer.xml msgid "" "The audio will be played only on the first channel. This is the default." msgstr "音频将只在第一个声道中播放。这是默认行为。" #: doc/classes/AudioStreamPlayer.xml msgid "The audio will be played on all surround channels." msgstr "音频将在所有环绕声声道中播放。" #: doc/classes/AudioStreamPlayer.xml msgid "" "The audio will be played on the second channel, which is usually the center." msgstr "音频将在第二个声道中播放,通常位于中央。" #: doc/classes/AudioStreamPlayer2D.xml msgid "Plays positional sound in 2D space." msgstr "在 2D 空间中播放与位置相关的声音。" #: doc/classes/AudioStreamPlayer2D.xml msgid "" "Plays audio that is attenuated with distance to the listener.\n" "By default, audio is heard from the screen center. This can be changed by " "adding an [AudioListener2D] node to the scene and enabling it by calling " "[method AudioListener2D.make_current] on it.\n" "See also [AudioStreamPlayer] to play a sound non-positionally.\n" "[b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio " "output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set " "[member volume_db] to a very low value like [code]-100[/code] (which isn't " "audible to human hearing)." msgstr "" "播放随与监听者的距离增大而衰减的音频。\n" "默认情况下,音频是从屏幕中心收听的。要修改这个位置,可以在场景中添加一个 " "[AudioListener2D] 节点,并通过调用 [method AudioListener2D.make_current] 将其" "启用。\n" "另见 [AudioStreamPlayer] 以非定位的方式播放声音。\n" "[b]注意:[/b]隐藏 [AudioStreamPlayer2D] 节点并不能禁用其音频输出。要暂时禁用 " "[AudioStreamPlayer2D] 的音频输出,请将 [member volume_db] 设置为非常低的值," "如 [code]-100[/code](人的听觉听不到)。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "Returns the position in the [AudioStream]." msgstr "返回 [AudioStream] 中的位置。" #: doc/classes/AudioStreamPlayer2D.xml msgid "" "Returns the [AudioStreamPlayback] object associated with this " "[AudioStreamPlayer2D]." msgstr "返回与该 [AudioStreamPlayer2D] 相关联的 [AudioStreamPlayback] 对象。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "" "Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] " "object or not." msgstr "返回该 [AudioStreamPlayer] 是否能够返回 [AudioStreamPlayback] 对象。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "" "Queues the audio to play on the next physics frame, from the given position " "[param from_position], in seconds." msgstr "" "将要播放的音频入队,将在下一物理帧从给定的位置 [param from_position] 开始播" "放,单位为秒。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "Sets the position from which audio will be played, in seconds." msgstr "设置音频的播放位置,以秒为单位。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "Stops the audio." msgstr "停止音频。" #: doc/classes/AudioStreamPlayer2D.xml msgid "" "Determines which [Area2D] layers affect the sound for reverb and audio bus " "effects. Areas can be used to redirect [AudioStream]s so that they play in a " "certain audio bus. An example of how you might use this is making a " "\"water\" area so that sounds played in the water are redirected through an " "audio bus to make them sound like they are being played underwater." msgstr "" "决定对混响及音频总线效果有影响的 [Area2D] 层。可使用区域对 [AudioStream] 进行" "重定向,使其在特定的音频总线中播放。一个例子是可以用来制作“水域”,将水中播放" "的声音重定向至单独的音频总线,让声音听起来像是在水下播放。" #: doc/classes/AudioStreamPlayer2D.xml msgid "The volume is attenuated over distance with this as an exponent." msgstr "以该属性为指数,将音量随着距离的增加而衰减。" #: doc/classes/AudioStreamPlayer2D.xml msgid "If [code]true[/code], audio plays when added to scene tree." msgstr "如果为 [code]true[/code],在添加到场景树时将播放音频。" #: doc/classes/AudioStreamPlayer2D.xml msgid "" "Bus on which this audio is playing.\n" "[b]Note:[/b] When setting this property, keep in mind that no validation is " "performed to see if the given name matches an existing bus. This is because " "audio bus layouts might be loaded after this property is set. If this given " "name can't be resolved at runtime, it will fall back to [code]\"Master\"[/" "code]." msgstr "" "这个音频在哪个总线上播放。\n" "[b]注意:[/b]设置这个属性时,请记住它并不会对给定的名称是否与现有总线匹配进行" "校验。这是因为音频总线布局可以在设置这个属性后再加载。如果这个给定的名称在运" "行时无法解析,就会回退到 [code]\"Master\"[/code]。" #: doc/classes/AudioStreamPlayer2D.xml msgid "Maximum distance from which audio is still hearable." msgstr "音频仍可听到的最大距离。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "" "The maximum number of sounds this node can play at the same time. Playing " "additional sounds after this value is reached will cut off the oldest sounds." msgstr "" "该节点可以同时播放的最大声音数。达到此值后,播放额外的声音将切断最旧的声音。" #: doc/classes/AudioStreamPlayer2D.xml msgid "" "Scales the panning strength for this node by multiplying the base [member " "ProjectSettings.audio/general/2d_panning_strength] with this factor. Higher " "values will pan audio from left to right more dramatically than lower values." msgstr "" "通过将基础 [member ProjectSettings.audio/general/2d_panning_strength] 乘以该" "因子,来缩放该节点的声像强度。与较低的值相比,较高的值将从左到右更显著地声像" "移动音频。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "" "The pitch and the tempo of the audio, as a multiplier of the audio sample's " "sample rate." msgstr "音频的音高和节奏,作为音频样本的采样率的倍数。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "" "If [code]true[/code], audio is playing or is queued to be played (see " "[method play])." msgstr "" "如果为 [code]true[/code],则音频正在播放,或者已加入播放队列(见 [method " "play])。" #: doc/classes/AudioStreamPlayer2D.xml msgid "The [AudioStream] object to be played." msgstr "要播放的 [AudioStream] 对象。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "" "If [code]true[/code], the playback is paused. You can resume it by setting " "[member stream_paused] to [code]false[/code]." msgstr "" "如果为 [code]true[/code],则播放会暂停。你可以通过将 [member stream_paused] " "设置为 [code]false[/code]来恢复它。" #: doc/classes/AudioStreamPlayer2D.xml msgid "Base volume before attenuation, in decibels." msgstr "衰减前的基础音量,单位为分贝。" #: doc/classes/AudioStreamPlayer2D.xml msgid "" "Base volume before attenuation, as a linear value.\n" "[b]Note:[/b] This member modifies [member volume_db] for convenience. The " "returned value is equivalent to the result of [method " "@GlobalScope.db_to_linear] on [member volume_db]. Setting this member is " "equivalent to setting [member volume_db] to the result of [method " "@GlobalScope.linear_to_db] on a value." msgstr "" "线性形式的衰减前的基础音量。\n" "[b]注意:[/b]该成员会帮助修改 [member volume_db]。返回的值等价于使用 [member " "volume_db] 调用 [method @GlobalScope.db_to_linear] 的结果。设置该成员等价于" "将 [member volume_db] 设置为使用新值调用 [method @GlobalScope.linear_to_db] " "的结果。" #: doc/classes/AudioStreamPlayer2D.xml doc/classes/AudioStreamPlayer3D.xml msgid "Emitted when the audio stops playing." msgstr "当音频停止播放时发出。" #: doc/classes/AudioStreamPlayer3D.xml msgid "Plays positional sound in 3D space." msgstr "在 3D 空间中播放与位置相关的声音。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "Plays audio with positional sound effects, based on the relative position of " "the audio listener. Positional effects include distance attenuation, " "directionality, and the Doppler effect. For greater realism, a low-pass " "filter is applied to distant sounds. This can be disabled by setting [member " "attenuation_filter_cutoff_hz] to [code]20500[/code].\n" "By default, audio is heard from the camera position. This can be changed by " "adding an [AudioListener3D] node to the scene and enabling it by calling " "[method AudioListener3D.make_current] on it.\n" "See also [AudioStreamPlayer] to play a sound non-positionally.\n" "[b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio " "output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set " "[member volume_db] to a very low value like [code]-100[/code] (which isn't " "audible to human hearing)." msgstr "" "根据音频收听者的相对位置播放具有位置音效的音频。位置效应包括距离衰减、方向性" "和多普勒效应。为了更逼真,低通滤波器会自动应用于远处的声音。这可以通过将 " "[member attenuation_filter_cutoff_hz] 设置为 [code]20500[/code] 来禁用。\n" "默认情况下,音频是从相机的位置听到的,这可以通过在场景中添加一个 " "[AudioListener3D] 节点,并通过对其调用 [method AudioListener3D.make_current] " "来启用该节点来改变。\n" "参阅 [AudioStreamPlayer] 来播放非位置的声音。\n" "[b]注意:[/b]隐藏一个 [AudioStreamPlayer3D] 节点并不能禁用其音频输出。要暂时" "禁用 [AudioStreamPlayer3D] 的音频输出,请将 [member volume_db] 设置为一个非常" "低的值,如 [code]-100[/code](人的听觉听不到)。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "Returns the [AudioStreamPlayback] object associated with this " "[AudioStreamPlayer3D]." msgstr "返回与这个 [AudioStreamPlayer3D] 相关联的 [AudioStreamPlayback] 对象。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "Determines which [Area3D] layers affect the sound for reverb and audio bus " "effects. Areas can be used to redirect [AudioStream]s so that they play in a " "certain audio bus. An example of how you might use this is making a " "\"water\" area so that sounds played in the water are redirected through an " "audio bus to make them sound like they are being played underwater." msgstr "" "确定哪些 [Area3D] 层影响混响和音频总线效果的声音。区域可用于重定向 " "[AudioStream],以便它们在特定音频总线中播放。可以如何使用它的一个示例是制作一" "个“水”区域,以便在水中播放的声音通过音频总线重定向,使它们听起来像是在水下播" "放的。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "The cutoff frequency of the attenuation low-pass filter, in Hz. A sound " "above this frequency is attenuated more than a sound below this frequency. " "To disable this effect, set this to [code]20500[/code] as this frequency is " "above the human hearing limit." msgstr "" "衰减低通滤波器的截止频率,单位为 Hz。高于该频率的声音比低于此频率的声音衰减得" "更多。要禁用该效果,请将其设置为 [code]20500[/code],因为该频率高于人类听力极" "限。" #: doc/classes/AudioStreamPlayer3D.xml msgid "Amount how much the filter affects the loudness, in decibels." msgstr "滤波器对响度的影响程度,以分贝为单位。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "Decides if audio should get quieter with distance linearly, quadratically, " "logarithmically, or not be affected by distance, effectively disabling " "attenuation." msgstr "" "决定音频是否应该随着距离,以线性、二次、对数的方式变得更安静,或者不受距离影" "响,有效地禁用衰减。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "If [code]true[/code], audio plays when the AudioStreamPlayer3D node is added " "to scene tree." msgstr "" "如果为 [code]true[/code],则在将 AudioStreamPlayer3D 节点添加到场景树时播放音" "频。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "The bus on which this audio is playing.\n" "[b]Note:[/b] When setting this property, keep in mind that no validation is " "performed to see if the given name matches an existing bus. This is because " "audio bus layouts might be loaded after this property is set. If this given " "name can't be resolved at runtime, it will fall back to [code]\"Master\"[/" "code]." msgstr "" "播放音频的总线。\n" "[b]注意:[/b]设置这个属性时,请记住它并不会对给定的名称是否与现有总线匹配进行" "校验。这是因为音频总线布局可以在设置这个属性后再加载。如果这个给定的名称在运" "行时无法解析,就会回退到 [code]\"Master\"[/code]。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "Decides in which step the Doppler effect should be calculated.\n" "[b]Note:[/b] If [member doppler_tracking] is not [constant " "DOPPLER_TRACKING_DISABLED] but the current [Camera3D]/[AudioListener3D] has " "doppler tracking disabled, the Doppler effect will be heard but will not " "take the movement of the current listener into account. If accurate Doppler " "effect is desired, doppler tracking should be enabled on both the " "[AudioStreamPlayer3D] and the current [Camera3D]/[AudioListener3D]." msgstr "" "决定在哪一步计算多普勒效应。\n" "[b]注意:[/b]如果 [member doppler_tracking] 的值不是 [constant " "DOPPLER_TRACKING_DISABLED],且当前 [Camera3D]/[AudioListener3D] 禁用了多普勒" "跟踪,则多普勒效应会被听到,但不会考虑当前监听器的移动。如果需要精确的多普勒" "效应,则应在 [AudioStreamPlayer3D] 和当前 [Camera3D]/[AudioListener3D] 上同时" "启用多普勒跟踪。" #: doc/classes/AudioStreamPlayer3D.xml msgid "The angle in which the audio reaches a listener unattenuated." msgstr "音频到达听者而不衰减的角度。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "If [code]true[/code], the audio should be attenuated according to the " "direction of the sound." msgstr "如果为 [code]true[/code],则音频应该根据声音的方向衰减。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "Attenuation factor used if listener is outside of [member " "emission_angle_degrees] and [member emission_angle_enabled] is set, in " "decibels." msgstr "" "听者在 [member emission_angle_degrees] 之外且 [member " "emission_angle_enabled] 被设置时使用的衰减系数,单位是分贝。" #: doc/classes/AudioStreamPlayer3D.xml msgid "Sets the absolute maximum of the sound level, in decibels." msgstr "设置声级的绝对最大值,以分贝为单位。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "The distance past which the sound can no longer be heard at all. Only has an " "effect if set to a value greater than [code]0.0[/code]. [member " "max_distance] works in tandem with [member unit_size]. However, unlike " "[member unit_size] whose behavior depends on the [member attenuation_model], " "[member max_distance] always works in a linear fashion. This can be used to " "prevent the [AudioStreamPlayer3D] from requiring audio mixing when the " "listener is far away, which saves CPU resources." msgstr "" "完全听不到声音的距离。仅当设置为大于 [code]0.0[/code] 的值时才有效。[member " "max_distance] 与 [member unit_size] 协同工作。但是,与 [member unit_size] 的" "行为取决于 [member attenuation_model] 不同,[member max_distance] 始终以线性" "方式工作。这可用于防止 [AudioStreamPlayer3D] 在听者较远时需要混音,从而节省 " "CPU 资源。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "Scales the panning strength for this node by multiplying the base [member " "ProjectSettings.audio/general/3d_panning_strength] by this factor. If the " "product is [code]0.0[/code] then stereo panning is disabled and the volume " "is the same for all channels. If the product is [code]1.0[/code] then one of " "the channels will be muted when the sound is located exactly to the left (or " "right) of the listener.\n" "Two speaker stereo arrangements implement the [url=https://" "webaudio.github.io/web-audio-api/#stereopanner-algorithm]WebAudio standard " "for StereoPannerNode Panning[/url] where the volume is cosine of half the " "azimuth angle to the ear.\n" "For other speaker arrangements such as the 5.1 and 7.1 the SPCAP (Speaker-" "Placement Correction Amplitude) algorithm is implemented." msgstr "" "该系数会与基础的 [member ProjectSettings.audio/general/3d_panning_strength] " "相乘,缩放节点的声像强度。如果乘积为 [code]0.0[/code] 则禁用立体声声像,所有" "声道的音量相同。如果乘积为 [code]1.0[/code] 则当声音位于听者的正左(或正右)" "时,有一个通道将被静音。\n" "两个扬声器的立体声配置实现了 [url=https://webaudio.github.io/web-audio-api/" "#stereopanner-algorithm]WebAudio 标准的 StereoPannerNode 声像[/url],音量为到" "耳朵的半方位角的余弦值。\n" "5.1 和 7.1 等其他扬声器配置则实现了 SPCAP(扬声器放置校正幅度)算法。" #: doc/classes/AudioStreamPlayer3D.xml msgid "The [AudioStream] resource to be played." msgstr "要播放的 [AudioStream] 资源。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "The factor for the attenuation effect. Higher values make the sound audible " "over a larger distance." msgstr "衰减效果的系数。更高的值使声音在更远的距离可以听到。" #: doc/classes/AudioStreamPlayer3D.xml msgid "The base sound level before attenuation, in decibels." msgstr "不受衰减影响的基础声级,单位为分贝。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "The base sound level before attenuation, as a linear value.\n" "[b]Note:[/b] This member modifies [member volume_db] for convenience. The " "returned value is equivalent to the result of [method " "@GlobalScope.db_to_linear] on [member volume_db]. Setting this member is " "equivalent to setting [member volume_db] to the result of [method " "@GlobalScope.linear_to_db] on a value." msgstr "" "线性形式的不受衰减影响的基础声级。\n" "[b]注意:[/b]该成员会帮助修改 [member volume_db]。返回的值等价于使用 [member " "volume_db] 调用 [method @GlobalScope.db_to_linear] 的结果。设置该成员等价于" "将 [member volume_db] 设置为使用新值调用 [method @GlobalScope.linear_to_db] " "的结果。" #: doc/classes/AudioStreamPlayer3D.xml msgid "Attenuation of loudness according to linear distance." msgstr "根据距离对响度进行线性衰减。" #: doc/classes/AudioStreamPlayer3D.xml msgid "Attenuation of loudness according to squared distance." msgstr "根据距离对响度进行平方衰减。" #: doc/classes/AudioStreamPlayer3D.xml msgid "Attenuation of loudness according to logarithmic distance." msgstr "根据距离对响度进行对数衰减。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "No attenuation of loudness according to distance. The sound will still be " "heard positionally, unlike an [AudioStreamPlayer]. [constant " "ATTENUATION_DISABLED] can be combined with a [member max_distance] value " "greater than [code]0.0[/code] to achieve linear attenuation clamped to a " "sphere of a defined size." msgstr "" "不根据距离衰减响度。与 [AudioStreamPlayer] 不同,声音仍会在位置上被听到。" "[constant ATTENUATION_DISABLED] 可以与大于 [code]0.0[/code] 的 [member " "max_distance] 值结合使用,以实现线性衰减,限制在定义的球体大小。" #: doc/classes/AudioStreamPlayer3D.xml msgid "Disables doppler tracking." msgstr "禁用多普勒跟踪。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "Executes doppler tracking during process frames (see [constant " "Node.NOTIFICATION_INTERNAL_PROCESS])." msgstr "" "在过程帧期间执行多普勒跟踪(请参阅 [constant " "Node.NOTIFICATION_INTERNAL_PROCESS])。" #: doc/classes/AudioStreamPlayer3D.xml msgid "" "Executes doppler tracking during physics frames (see [constant " "Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS])." msgstr "" "在物理帧期间执行多普勒跟踪(请参阅 [constant " "Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS])。" #: modules/interactive_music/doc_classes/AudioStreamPlaylist.xml msgid "" "[AudioStream] that includes sub-streams and plays them back like a playlist." msgstr "[AudioStream] 包含子音频流并像播放列表一样播放它们。" #: modules/interactive_music/doc_classes/AudioStreamPlaylist.xml msgid "" "Returns the BPM of the playlist, which can vary depending on the clip being " "played." msgstr "返回播放列表的 BPM(每分钟节拍数),该值可能根据正在播放的剪辑而变化。" #: modules/interactive_music/doc_classes/AudioStreamPlaylist.xml msgid "Returns the stream at playback position index." msgstr "返回播放位置索引处的音频流。" #: modules/interactive_music/doc_classes/AudioStreamPlaylist.xml msgid "Sets the stream at playback position index." msgstr "设置播放位置索引处的音频流。" #: modules/interactive_music/doc_classes/AudioStreamPlaylist.xml msgid "" "Fade time used when a stream ends, when going to the next one. Streams are " "expected to have an extra bit of audio after the end to help with fading." msgstr "" "音频流结束、切换到下一个音频流时,淡入淡出的时间。音频流的最后应该留有一些额" "外的音频,便于淡入淡出。" #: modules/interactive_music/doc_classes/AudioStreamPlaylist.xml msgid "" "If [code]true[/code], the playlist will loop, otherwise the playlist will " "end when the last stream is finished." msgstr "" "如果为 [code]true[/code],则播放列表将循环播放,否则播放列表将在播放完最后一" "个音频流时结束。" #: modules/interactive_music/doc_classes/AudioStreamPlaylist.xml msgid "" "If [code]true[/code], the playlist will shuffle each time playback starts " "and each time it loops." msgstr "" "如果为 [code]true[/code],则每次播放开始和循环时,播放列表都会随机播放。" #: modules/interactive_music/doc_classes/AudioStreamPlaylist.xml msgid "Amount of streams in the playlist." msgstr "播放列表中音频流的数量。" #: modules/interactive_music/doc_classes/AudioStreamPlaylist.xml msgid "Maximum amount of streams supported in the playlist." msgstr "播放列表中支持的音频流的最大数量。" #: doc/classes/AudioStreamPolyphonic.xml msgid "" "AudioStream that lets the user play custom streams at any time from code, " "simultaneously using a single player." msgstr "" "音频流 AudioStream,允许用户从代码中随时播放自定义流,可以使用单个播放器同时" "播放。" #: doc/classes/AudioStreamPolyphonic.xml msgid "" "AudioStream that lets the user play custom streams at any time from code, " "simultaneously using a single player.\n" "Playback control is done via the [AudioStreamPlaybackPolyphonic] instance " "set inside the player, which can be obtained via [method " "AudioStreamPlayer.get_stream_playback], [method " "AudioStreamPlayer2D.get_stream_playback] or [method " "AudioStreamPlayer3D.get_stream_playback] methods. Obtaining the playback " "instance is only valid after the [code]stream[/code] property is set as an " "[AudioStreamPolyphonic] in those players." msgstr "" "AudioStream 允许用户随时通过代码,同时使用单个播放器播放自定义流。\n" "播放控制是通过播放器内部设置的 [AudioStreamPlaybackPolyphonic] 实例完成的,可" "以通过 [method AudioStreamPlayer.get_stream_playback]、[method " "AudioStreamPlayer2D.get_stream_playback] 或 [method " "AudioStreamPlayer3D.get_stream_playback] 方法获取该实例。只有在这些播放器中" "将 [code]stream[/code] 属性设置为 [AudioStreamPolyphonic] 后,才能获取该播放" "实例。" #: doc/classes/AudioStreamPolyphonic.xml msgid "Maximum amount of simultaneous streams that can be played." msgstr "可以同时播放的流的最大数量。" #: doc/classes/AudioStreamRandomizer.xml msgid "Wraps a pool of audio streams with pitch and volume shifting." msgstr "用音高和音量偏移,包装一个音频流池。" #: doc/classes/AudioStreamRandomizer.xml msgid "" "Picks a random AudioStream from the pool, depending on the playback mode, " "and applies random pitch shifting and volume shifting during playback." msgstr "" "根据播放模式,从池中随机选择一个 AudioStream,并在播放期间应用随机音高偏移和" "音量偏移。" #: doc/classes/AudioStreamRandomizer.xml msgid "" "Insert a stream at the specified index. If the index is less than zero, the " "insertion occurs at the end of the underlying pool." msgstr "在指定索引处插入一个流。如果索引小于零,则插入发生在底层池的末尾。" #: doc/classes/AudioStreamRandomizer.xml msgid "Returns the stream at the specified index." msgstr "返回指定索引处的流。" #: doc/classes/AudioStreamRandomizer.xml msgid "" "Returns the probability weight associated with the stream at the given index." msgstr "返回与给定索引处的流关联的概率权重。" #: doc/classes/AudioStreamRandomizer.xml msgid "Move a stream from one index to another." msgstr "将流从一个索引移动到另一个索引。" #: doc/classes/AudioStreamRandomizer.xml msgid "Remove the stream at the specified index." msgstr "移除指定索引处的流。" #: doc/classes/AudioStreamRandomizer.xml msgid "Set the AudioStream at the specified index." msgstr "设置指定索引处的 AudioStream。" #: doc/classes/AudioStreamRandomizer.xml msgid "" "Set the probability weight of the stream at the specified index. The higher " "this value, the more likely that the randomizer will choose this stream " "during random playback modes." msgstr "" "设置流在指定索引处的概率权重。该值越高,随机化器在随机播放模式下选择该流的可" "能性就越大。" #: doc/classes/AudioStreamRandomizer.xml msgid "" "Controls how this AudioStreamRandomizer picks which AudioStream to play next." msgstr "控制该 AudioStreamRandomizer 如何选择下一个要播放的 AudioStream。" #: doc/classes/AudioStreamRandomizer.xml msgid "" "The largest possible frequency multiplier of the random pitch variation. " "Pitch will be randomly chosen within a range of [code skip-lint]1.0 / " "random_pitch[/code] and [code skip-lint]random_pitch[/code]. A value of " "[code]1.0[/code] means no variation. A value of [code]2.0[/code] means pitch " "will be randomized between double and half.\n" "[b]Note:[/b] Setting this property also sets [member random_pitch_semitones]." msgstr "" #: doc/classes/AudioStreamRandomizer.xml msgid "" "The largest possible distance, in semitones, of the random pitch variation. " "A value of [code]0.0[/code] means no variation.\n" "[b]Note:[/b] Setting this property also sets [member random_pitch]." msgstr "" #: doc/classes/AudioStreamRandomizer.xml msgid "" "The intensity of random volume variation. Volume will be increased or " "decreased by a random value up to [code skip-lint]random_volume_offset_db[/" "code]. A value of [code]0.0[/code] means no variation. A value of [code]3.0[/" "code] means volume will be randomized between [code]-3.0 dB[/code] and [code]" "+3.0 dB[/code]." msgstr "" #: doc/classes/AudioStreamRandomizer.xml msgid "The number of streams in the stream pool." msgstr "流池中流的数量。" #: doc/classes/AudioStreamRandomizer.xml msgid "" "Pick a stream at random according to the probability weights chosen for each " "stream, but avoid playing the same stream twice in a row whenever possible. " "If only 1 sound is present in the pool, the same sound will always play, " "effectively allowing repeats to occur." msgstr "" "根据为每个流选择的概率权重随机挑选一个流,但尽可能避免连续两次播放同一个流。" "如果池中只有 1 个声音,则将始终播放同一个声音,从而有效地允许重复发生。" #: doc/classes/AudioStreamRandomizer.xml msgid "" "Pick a stream at random according to the probability weights chosen for each " "stream. If only 1 sound is present in the pool, the same sound will always " "play." msgstr "" "根据为每个流选择的概率权重随机挑选一个流。如果池中只有 1 个声音,则将始终播放" "同一个声音。" #: doc/classes/AudioStreamRandomizer.xml msgid "" "Play streams in the order they appear in the stream pool. If only 1 sound is " "present in the pool, the same sound will always play." msgstr "" "按照流池中出现的顺序播放流。如果池中只有 1 个声音,则将始终播放同一个声音。" #: modules/interactive_music/doc_classes/AudioStreamSynchronized.xml msgid "" "Stream that can be fitted with sub-streams, which will be played in-sync." msgstr "能够适配子音频流的音频流,子音频流会同步播放。" #: modules/interactive_music/doc_classes/AudioStreamSynchronized.xml msgid "" "This is a stream that can be fitted with sub-streams, which will be played " "in-sync. The streams begin at exactly the same time when play is pressed, " "and will end when the last of them ends. If one of the sub-streams loops, " "then playback will continue." msgstr "" "这是一种能够适配子音频流的音频流,子音频流会同步播放。按下播放时,各条音频流" "会同时开始播放,最后一条音频流结束播放后该音频流才会结束。如果存在循环的子音" "频流,那么播放就会继续。" #: modules/interactive_music/doc_classes/AudioStreamSynchronized.xml msgid "Get one of the synchronized streams, by index." msgstr "获取同步的音频流,使用索引号指定。" #: modules/interactive_music/doc_classes/AudioStreamSynchronized.xml msgid "Get the volume of one of the synchronized streams, by index." msgstr "获取同步音频流的音量,使用索引号指定。" #: modules/interactive_music/doc_classes/AudioStreamSynchronized.xml msgid "Set one of the synchronized streams, by index." msgstr "设置同步的音频流,使用索引号指定。" #: modules/interactive_music/doc_classes/AudioStreamSynchronized.xml msgid "Set the volume of one of the synchronized streams, by index." msgstr "设置同步音频流的音量,使用索引号指定。" #: modules/interactive_music/doc_classes/AudioStreamSynchronized.xml msgid "Set the total amount of streams that will be played back synchronized." msgstr "设置同步播放的音频流的总数。" #: modules/interactive_music/doc_classes/AudioStreamSynchronized.xml msgid "Maximum amount of streams that can be synchronized." msgstr "可以同步播放的音频流的最大数量。" #: doc/classes/AudioStreamWAV.xml msgid "Stores audio data loaded from WAV files." msgstr "存储从 WAV 文件加载的音频数据。" #: doc/classes/AudioStreamWAV.xml msgid "" "AudioStreamWAV stores sound samples loaded from WAV files. To play the " "stored sound, use an [AudioStreamPlayer] (for non-positional audio) or " "[AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The " "sound can be looped.\n" "This class can also be used to store dynamically-generated PCM audio data. " "See also [AudioStreamGenerator] for procedural audio generation." msgstr "" "AudioStreamWAV 存储从 WAV 文件加载的声音样本。要播放存储的声音,请使用 " "[AudioStreamPlayer](用于非空间定位音频)或 [AudioStreamPlayer2D]/" "[AudioStreamPlayer3D](用于空间定位音频)。声音可以循环播放。\n" "这个类还可用于存储动态生成的 PCM 音频数据。另见 [AudioStreamGenerator] 以了解" "程序化音频生成。" #: doc/classes/AudioStreamWAV.xml msgid "" "Creates a new [AudioStreamWAV] instance from the given buffer. The buffer " "must contain WAV data.\n" "The keys and values of [param options] match the properties of " "[ResourceImporterWAV]. The usage of [param options] is identical to [method " "AudioStreamWAV.load_from_file]." msgstr "" "从给定缓冲区新建 [AudioStreamWAV] 实例。缓冲区中必须包含 WAV 数据。\n" "[param options] 中的键值对与 [ResourceImporterWAV] 的属性对应。[param " "options] 的用法与 [method AudioStreamWAV.load_from_file] 一致。" #: doc/classes/AudioStreamWAV.xml msgid "" "Creates a new [AudioStreamWAV] instance from the given file path. The file " "must be in WAV format.\n" "The keys and values of [param options] match the properties of " "[ResourceImporterWAV].\n" "[b]Example:[/b] Load the first file dropped as a WAV and play it:\n" "[codeblock]\n" "@onready var audio_player = $AudioStreamPlayer\n" "\n" "func _ready():\n" "\tget_window().files_dropped.connect(_on_files_dropped)\n" "\n" "func _on_files_dropped(files):\n" "\tif files[0].get_extension() == \"wav\":\n" "\t\taudio_player.stream = AudioStreamWAV.load_from_file(files[0], {\n" "\t\t\t\t\"force/max_rate\": true,\n" "\t\t\t\t\"force/max_rate_hz\": 11025\n" "\t\t\t})\n" "\t\taudio_player.play()\n" "[/codeblock]" msgstr "" "从给定的文件路径新建 [AudioStreamWAV] 实例。文件必须为 WAV 格式。\n" "[param options] 中的键值对与 [ResourceImporterWAV] 的属性对应。\n" "[b]示例:[/b]将拖放的第一个文件作为 WAV 加载并播放:\n" "[codeblock]\n" "@onready var audio_player = $AudioStreamPlayer\n" "\n" "func _ready():\n" "\tget_window().files_dropped.connect(_on_files_dropped)\n" "\n" "func _on_files_dropped(files):\n" "\tif files[0].get_extension() == \"wav\":\n" "\t\taudio_player.stream = AudioStreamWAV.load_from_file(files[0], {\n" "\t\t\t\t\"force/max_rate\": true,\n" "\t\t\t\t\"force/max_rate_hz\": 11025\n" "\t\t\t})\n" "\t\taudio_player.play()\n" "[/codeblock]" #: doc/classes/AudioStreamWAV.xml msgid "" "Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA " "ADPCM or Quite OK Audio formats can't be saved.\n" "[b]Note:[/b] A [code].wav[/code] extension is automatically appended to " "[param path] if it is missing." msgstr "" "将 AudioStreamWAV 作为 WAV 文件保存到 [param path]。无法保存 IMA ADPCM 或 " "Quite OK Audio 格式的样本。\n" "[b]注意:[/b]如果缺少 [code].wav[/code] 扩展名,则会自动将其追加到 [param " "path]。" #: doc/classes/AudioStreamWAV.xml msgid "" "Contains the audio data in bytes.\n" "[b]Note:[/b] If [member format] is set to [constant FORMAT_8_BITS], this " "property expects signed 8-bit PCM data. To convert from unsigned 8-bit PCM, " "subtract 128 from each byte.\n" "[b]Note:[/b] If [member format] is set to [constant FORMAT_QOA], this " "property expects data from a full QOA file." msgstr "" "包含音频的字节数据。\n" "[b]注意:[/b]如果 [member format] 为 [constant FORMAT_8_BITS],该属性应为带符" "号 8 位 PCM 数据。从无符号 8 位 PCM 数据转换时,请将每个字节减去 128。\n" "[b]注意:[/b]如果 [member format] 为 [constant FORMAT_QOA],该属性应为完整 " "QOA 文件的数据。" #: doc/classes/AudioStreamWAV.xml msgid "Audio format." msgstr "音频格式。" #: doc/classes/AudioStreamWAV.xml msgid "" "The loop start point (in number of samples, relative to the beginning of the " "stream)." msgstr "循环起始点(单位为采样数,相对于该流开头)。" #: doc/classes/AudioStreamWAV.xml msgid "" "The loop end point (in number of samples, relative to the beginning of the " "stream)." msgstr "循环结束点(单位为采样数,相对于该流开头)。" #: doc/classes/AudioStreamWAV.xml msgid "The loop mode." msgstr "循环模式。" #: doc/classes/AudioStreamWAV.xml msgid "" "The sample rate for mixing this audio. Higher values require more storage " "space, but result in better quality.\n" "In games, common sample rates in use are [code]11025[/code], [code]16000[/" "code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and " "[code]48000[/code].\n" "According to the [url=https://en.wikipedia.org/wiki/" "Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/" "url], there is no quality difference to human hearing when going past 40,000 " "Hz (since most humans can only hear up to ~20,000 Hz, often less). If you " "are using lower-pitched sounds such as voices, lower sample rates such as " "[code]32000[/code] or [code]22050[/code] may be usable with no loss in " "quality." msgstr "" "混合这个音频的采样率。更高的数值需要更多的存储空间,但会带来更好的质量。\n" "在游戏中,常用的采样率有 [code]11025[/code]、[code]16000[/code]、" "[code]22050[/code]、[code]32000[/code]、[code]44100[/code]、[code]48000[/" "code]。\n" "根据[url=https://zh.wikipedia.org/wiki/%E9%87%87%E6%A0%B7%E5%AE%9A%E7%90%86]" "奈奎斯特–香农采样定理[/url],当超过 40000 赫兹时,人类的听觉没有质量上的差别" "(因为大多数人只能听到 ~20000 赫兹,往往更少)。如果你要使用语音等音高较低的" "声音,则可以使用 [code]32000[/code] 或 [code]22050[/code] 等较低的采样率,不" "会降低质量。" #: doc/classes/AudioStreamWAV.xml msgid "If [code]true[/code], audio is stereo." msgstr "如果为 [code]true[/code],则音频为立体声。" #: doc/classes/AudioStreamWAV.xml msgid "" "Contains user-defined tags if found in the WAV data.\n" "Commonly used tags include [code]title[/code], [code]artist[/code], " "[code]album[/code], [code]tracknumber[/code], and [code]date[/code] " "([code]date[/code] does not have a standard date format).\n" "[b]Note:[/b] No tag is [i]guaranteed[/i] to be present in every file, so " "make sure to account for the keys not always existing.\n" "[b]Note:[/b] Only WAV files using a [code]LIST[/code] chunk with an " "identifier of [code]INFO[/code] to encode the tags are currently supported." msgstr "" "如果在 WAV 数据中存在标签,则包含用户定义的标签。\n" "常用标签包括标题 [code]title[/code]、艺术家 [code]artist[/code]、专辑 " "[code]album[/code]、音轨号 [code]tracknumber[/code]、日期 [code]date[/code]" "([code]date[/code] 没有标准日期格式)。\n" "[b]注意:[/b]无法[i]保证[/i]每个文件中都有某个标签,因此请考虑键可能不是始终" "存在。\n" "[b]注意:[/b]目前仅支持使用 [code]LIST[/code] 块并且标识符为 [code]INFO[/" "code] 的 WAV 文件编码标签。" #: doc/classes/AudioStreamWAV.xml msgid "8-bit PCM audio codec." msgstr "8 位 PCM 音频编解码器。" #: doc/classes/AudioStreamWAV.xml msgid "16-bit PCM audio codec." msgstr "16 位 PCM 音频编解码器。" #: doc/classes/AudioStreamWAV.xml msgid "Audio is lossily compressed as IMA ADPCM." msgstr "音频按照 IMA ADPCM 进行有损压缩。" #: doc/classes/AudioStreamWAV.xml msgid "" "Audio is lossily compressed as [url=https://qoaformat.org/]Quite OK Audio[/" "url]." msgstr "" "音频按照 [url=https://qoaformat.org/]Quite OK Audio[/url] 进行有损压缩。" #: doc/classes/AudioStreamWAV.xml msgid "Audio does not loop." msgstr "音频不循环。" #: doc/classes/AudioStreamWAV.xml msgid "" "Audio loops the data between [member loop_begin] and [member loop_end], " "playing forward only." msgstr "" "音频在 [member loop_begin] 和 [member loop_end] 之间循环数据,仅向前播放。" #: doc/classes/AudioStreamWAV.xml msgid "" "Audio loops the data between [member loop_begin] and [member loop_end], " "playing back and forth." msgstr "" "音频在 [member loop_begin] 和 [member loop_end] 之间循环数据,来回播放。" #: doc/classes/AudioStreamWAV.xml msgid "" "Audio loops the data between [member loop_begin] and [member loop_end], " "playing backward only." msgstr "" "音频在 [member loop_begin] 和 [member loop_end] 之间循环数据,仅向后播放。" #: doc/classes/BackBufferCopy.xml msgid "" "A node that copies a region of the screen to a buffer for access in shader " "code." msgstr "这种节点能够将屏幕中的某个区域复制到缓冲中,方便从着色器代码中访问。" #: doc/classes/BackBufferCopy.xml msgid "" "Node for back-buffering the currently-displayed screen. The region defined " "in the [BackBufferCopy] node is buffered with the content of the screen it " "covers, or the entire screen according to the [member copy_mode]. It can be " "accessed in shader scripts using the screen texture (i.e. a uniform sampler " "with [code]hint_screen_texture[/code]).\n" "[b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), " "anchors and margins won't apply to child [Control]-derived nodes. This can " "be problematic when resizing the window. To avoid this, add [Control]-" "derived nodes as [i]siblings[/i] to the [BackBufferCopy] node instead of " "adding them as children." msgstr "" "用于后台缓冲当前显示屏幕的节点。会根据 [member copy_mode] 对 " "[BackBufferCopy] 节点中定义的区域所覆盖的屏幕内容或整个屏幕进行缓冲。可以在着" "色器脚本中使用屏幕纹理来访问(即带有 [code]hint_screen_texture[/code] 的 " "uniform 采样器)。\n" "[b]注意:[/b]由于该节点继承自 [Node2D](而非 [Control]),因此锚点和边距不适" "用于子 [Control] 派生节点。这在调整窗口大小时可能会出现问题。为避免这种情况," "请将 [Control] 派生节点添加为 [BackBufferCopy] 节点的[i]同级[/i]节点,而不是" "将它们添加为子节点。" #: doc/classes/BackBufferCopy.xml msgid "Screen-reading shaders" msgstr "读屏着色器" #: doc/classes/BackBufferCopy.xml msgid "Buffer mode." msgstr "缓冲模式。" #: doc/classes/BackBufferCopy.xml msgid "" "The area covered by the [BackBufferCopy]. Only used if [member copy_mode] is " "[constant COPY_MODE_RECT]." msgstr "" "该 [BackBufferCopy] 所覆盖的区域。只有当 [member copy_mode] 为 [constant " "COPY_MODE_RECT] 时才使用。" #: doc/classes/BackBufferCopy.xml msgid "" "Disables the buffering mode. This means the [BackBufferCopy] node will " "directly use the portion of screen it covers." msgstr "" "禁用缓冲模式。这意味着该 [BackBufferCopy] 节点将直接使用它所覆盖的屏幕部分。" #: doc/classes/BackBufferCopy.xml msgid "[BackBufferCopy] buffers a rectangular region." msgstr "[BackBufferCopy] 缓冲一个矩形区域。" #: doc/classes/BackBufferCopy.xml msgid "[BackBufferCopy] buffers the entire screen." msgstr "[BackBufferCopy] 缓冲整个屏幕。" #: doc/classes/BaseButton.xml msgid "Abstract base class for GUI buttons." msgstr "GUI 按钮的抽象基类。" #: doc/classes/BaseButton.xml msgid "" "[BaseButton] is an abstract base class for GUI buttons. It doesn't display " "anything by itself." msgstr "[BaseButton] 是 GUI 按钮的抽象基类。本身不显示任何东西。" #: doc/classes/BaseButton.xml msgid "" "Called when the button is pressed. If you need to know the button's pressed " "state (and [member toggle_mode] is active), use [method _toggled] instead." msgstr "" "当按钮被按下时调用。如果你需要知道按钮被按下的状态(并且 [member toggle_mode] " "is active]是活动状态),请使用[method _toggled]代替。" #: doc/classes/BaseButton.xml msgid "" "Called when the button is toggled (only if [member toggle_mode] is active)." msgstr "当按钮被切换时调用(仅当 [member toggle_mode] 处于活动状态时)。" #: doc/classes/BaseButton.xml msgid "" "Returns the visual state used to draw the button. This is useful mainly when " "implementing your own draw code by either overriding _draw() or connecting " "to \"draw\" signal. The visual state of the button is defined by the [enum " "DrawMode] enum." msgstr "" "返回用于绘制按钮的视觉状态。主要可以通过覆盖 _draw() 或连接到“draw”信号来实现" "你自己的绘制代码。按钮的视觉状态由 [enum DrawMode] 枚举定义。" #: doc/classes/BaseButton.xml msgid "" "Returns [code]true[/code] if the mouse has entered the button and has not " "left it yet." msgstr "如果鼠标已进入按钮,且尚未离开,则返回 [code]true[/code]。" #: doc/classes/BaseButton.xml msgid "" "Changes the [member button_pressed] state of the button, without emitting " "[signal toggled]. Use when you just want to change the state of the button " "without sending the pressed event (e.g. when initializing scene). Only works " "if [member toggle_mode] is [code]true[/code].\n" "[b]Note:[/b] This method doesn't unpress other buttons in [member " "button_group]." msgstr "" "更改按钮的 [member button_pressed] 状态,而不发出 [signal toggled]。当只想更" "改按钮的状态而不发送按下的事件时使用(例如,在初始化场景时)。仅当 [member " "toggle_mode] 为 [code]true[/code] 时才有效。\n" "[b]注意:[/b]该方法不会取消按下 [member button_group] 中的其他按钮。" #: doc/classes/BaseButton.xml msgid "Determines when the button is considered clicked." msgstr "认定按钮被点击的时机。" #: doc/classes/BaseButton.xml msgid "" "The [ButtonGroup] associated with the button. Not to be confused with node " "groups.\n" "[b]Note:[/b] The button will be configured as a radio button if a " "[ButtonGroup] is assigned to it." msgstr "" "与按钮关联的 [ButtonGroup]。不要与节点组混淆。\n" "[b]注意:[/b]如果按钮被分配了 [ButtonGroup],则它将被配置为单选按钮。" #: doc/classes/BaseButton.xml msgid "" "Binary mask to choose which mouse buttons this button will respond to.\n" "To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | " "MOUSE_BUTTON_MASK_RIGHT[/code]." msgstr "" "二进制掩码,用于选择该按钮将响应哪些鼠标按钮。\n" "要同时允许左键单击和右键单击,请使用 [code]MOUSE_BUTTON_MASK_LEFT | " "MOUSE_BUTTON_MASK_RIGHT[/code]。" #: doc/classes/BaseButton.xml msgid "" "If [code]true[/code], the button's state is pressed. Means the button is " "pressed down or toggled (if [member toggle_mode] is active). Only works if " "[member toggle_mode] is [code]true[/code].\n" "[b]Note:[/b] Changing the value of [member button_pressed] will result in " "[signal toggled] to be emitted. If you want to change the pressed state " "without emitting that signal, use [method set_pressed_no_signal]." msgstr "" "如果为 [code]true[/code],则该按钮的状态为被按下。表示按钮被按下或被切换(如" "果 [member toggle_mode] 处于活动状态)。仅当 [member toggle_mode] 为 " "[code]true[/code] 时才有效。\n" "[b]注意:[/b]修改 [member button_pressed] 会发出 [signal toggled] 信号。如果" "想在不发出该信号的情况下更改按下状态,请使用 [method set_pressed_no_signal]。" #: doc/classes/BaseButton.xml msgid "" "If [code]true[/code], the button is in disabled state and can't be clicked " "or toggled.\n" "[b]Note:[/b] If the button is disabled while held down, [signal button_up] " "will be emitted." msgstr "" "如果为 [code]true[/code],则该按钮处于禁用状态,无法点击或切换。\n" "[b]注意:[/b]如果在处于按下状态时禁用按钮,则会发出 [signal button_up] 信号。" #: doc/classes/BaseButton.xml msgid "" "If [code]true[/code], the button stays pressed when moving the cursor " "outside the button while pressing it.\n" "[b]Note:[/b] This property only affects the button's visual appearance. " "Signals will be emitted at the same moment regardless of this property's " "value." msgstr "" "如果为 [code]true[/code],当按下按钮时将光标移到按钮外时,按钮会保持按下状" "态。\n" "[b]注意:[/b]该属性只影响按钮的视觉表现。无论该属性的值是多少,信号都会在同一" "时刻发出。" #: doc/classes/BaseButton.xml msgid "[Shortcut] associated to the button." msgstr "与该按钮关联的 [Shortcut]。" #: doc/classes/BaseButton.xml msgid "" "If [code]true[/code], the button will highlight for a short amount of time " "when its shortcut is activated. If [code]false[/code] and [member " "toggle_mode] is [code]false[/code], the shortcut will activate without any " "visual feedback." msgstr "" "如果为 [code]true[/code] ,则当其快捷方式被激活时,该按钮将高亮一小段时间。如" "果为 [code]false[/code] 且 [member toggle_mode] 为 [code]false[/code],则该快" "捷方式将在没有任何视觉反馈的情况下激活。" #: doc/classes/BaseButton.xml msgid "" "If [code]true[/code], the button will add information about its shortcut in " "the tooltip.\n" "[b]Note:[/b] This property does nothing when the tooltip control is " "customized using [method Control._make_custom_tooltip]." msgstr "" "如果为 [code]true[/code],该按钮将在工具提示中加入快捷键信息。\n" "[b]注意:[/b]使用 [method Control._make_custom_tooltip] 方法自定义工具提示控" "件时,该属性无效。" #: doc/classes/BaseButton.xml msgid "" "If [code]true[/code], the button is in toggle mode. Makes the button flip " "state between pressed and unpressed each time its area is clicked." msgstr "" "如果为 [code]true[/code],则按钮处于切换模式。使按钮在每次点击其区域时,在按" "下和未按下之间转换状态。" #: doc/classes/BaseButton.xml msgid "Emitted when the button starts being held down." msgstr "当按钮开始被按下时发出。" #: doc/classes/BaseButton.xml msgid "Emitted when the button stops being held down." msgstr "当按钮停止按下时发出。" #: doc/classes/BaseButton.xml msgid "" "Emitted when the button is toggled or pressed. This is on [signal " "button_down] if [member action_mode] is [constant ACTION_MODE_BUTTON_PRESS] " "and on [signal button_up] otherwise.\n" "If you need to know the button's pressed state (and [member toggle_mode] is " "active), use [signal toggled] instead." msgstr "" "当按钮被切换或按下时发出。如果 [member action_mode] 为 [constant " "ACTION_MODE_BUTTON_PRESS],则在 [signal button_down] 时发出,否则当 [signal " "button_up] 时发出。\n" "如果需要知道按钮的按下状态(并且 [member toggle_mode] 处于活动状态),请改用 " "[signal toggled]。" #: doc/classes/BaseButton.xml msgid "" "Emitted when the button was just toggled between pressed and normal states " "(only if [member toggle_mode] is active). The new state is contained in the " "[param toggled_on] argument." msgstr "" "当按钮刚刚在按下和正常状态之间切换时发出(仅当 [member toggle_mode] 处于活动" "状态时)。新状态包含在 [param toggled_on] 参数中。" #: doc/classes/BaseButton.xml msgid "" "The normal state (i.e. not pressed, not hovered, not toggled and enabled) of " "buttons." msgstr "按钮的正常状态(即未按下、未悬停、未切换和启用)。" #: doc/classes/BaseButton.xml msgid "The state of buttons are pressed." msgstr "按钮被按下的状态。" #: doc/classes/BaseButton.xml msgid "The state of buttons are hovered." msgstr "按钮的状态为悬停。" #: doc/classes/BaseButton.xml msgid "The state of buttons are disabled." msgstr "按钮的状态为禁用。" #: doc/classes/BaseButton.xml msgid "The state of buttons are both hovered and pressed." msgstr "按钮的状态既是悬停的,也是按下的。" #: doc/classes/BaseButton.xml msgid "Require just a press to consider the button clicked." msgstr "只需要按一下就可以认为按钮被点击了。" #: doc/classes/BaseButton.xml msgid "" "Require a press and a subsequent release before considering the button " "clicked." msgstr "要求按下后再释放,才算点击了按钮。" #: doc/classes/BaseMaterial3D.xml msgid "Abstract base class for defining the 3D rendering properties of meshes." msgstr "用于定义网格 3D 渲染属性的抽象基类。" #: doc/classes/BaseMaterial3D.xml msgid "" "This class serves as a default material with a wide variety of rendering " "features and properties without the need to write shader code. See the " "tutorial below for details." msgstr "" "这个类提供了默认的材质,具有多种渲染功能和属性,无需编写着色器代码。详见下面" "的教程。" #: doc/classes/BaseMaterial3D.xml doc/classes/ORMMaterial3D.xml #: doc/classes/StandardMaterial3D.xml msgid "Standard Material 3D and ORM Material 3D" msgstr "标准 3D 材质与 ORM 3D 材质" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "Returns [code]true[/code] if the specified [param feature] is enabled." msgstr "如果指定的 [param region] 已启用,则返回 [code]true[/code]。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "Returns [code]true[/code] if the specified [param flag] is enabled." msgstr "如果指定的 [param link] 已启用,则返回 [code]true[/code]。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "" "Returns the [Texture2D] associated with the specified texture [param param]." msgstr "返回与指定 [enum TextureParam] 关联的 [Texture2D]。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "" "If [param enable] is [code]true[/code], enables the specified [param " "feature]. Many features that are available in [BaseMaterial3D] need to be " "enabled before use. This way, the cost for using the feature is only " "incurred when specified. Features can also be enabled by setting their " "corresponding property to [code]true[/code]." msgstr "" "如果为 [code]true[/code],则启用指定的 [enum Feature]。[BaseMaterial3D] 中的" "许多功能都需要在使用前启用。这样,仅在指定时才会产生使用该功能的成本。也可以" "通过将相应的成员设置为 [code]true[/code] 来启用功能。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "" "If [param enable] is [code]true[/code], enables the specified [param flag]. " "Flags are optional behavior that can be turned on and off. Only one flag can " "be enabled at a time with this function, the flag enumerators cannot be bit-" "masked together to enable or disable multiple flags at once. Flags can also " "be enabled by setting their corresponding property to [code]true[/code]." msgstr "" "如果为 [code]true[/code],则启用指定的标志。标志是可以打开和关闭的可选行为。" "使用该函数一次只能启用一个标志,不能将标志枚举值像位掩码一样进行合并,一次启" "用或禁用多个标志。也可以通过将相应成员设置为 [code]true[/code] 来启用标志。" #: doc/classes/BaseMaterial3D.xml msgid "Sets the texture for the slot specified by [param param]." msgstr "设置 [param param] 对应槽位的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "" "The material's base color.\n" "[b]Note:[/b] If [member detail_enabled] is [code]true[/code] and a [member " "detail_albedo] texture is specified, [member albedo_color] will [i]not[/i] " "modulate the detail texture. This can be used to color partial areas of a " "material by not specifying an albedo texture and using a transparent [member " "detail_albedo] texture instead." msgstr "" "材质的基础颜色。\n" "[b]注意:[/b]如果 [member detail_enabled] 为 [code]true[/code] 并且指定了 " "[member detail_albedo] 纹理,则 [member albedo_color] [i]不会[/i]对细节纹理调" "色。可用于通过不指定反照率纹理并使用透明 [member detail_albedo] 纹理,来为材" "质的部分区域着色。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture to multiply by [member albedo_color]. Used for basic texturing of " "objects.\n" "If the texture appears unexpectedly too dark or too bright, check [member " "albedo_texture_force_srgb]." msgstr "" "要乘以 [member albedo_color] 的纹理。用于对象的基本纹理。\n" "如果纹理意外地显得太暗或太亮,请检查 [member albedo_texture_force_srgb]。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "" "If [code]true[/code], forces a conversion of the [member albedo_texture] " "from nonlinear sRGB encoding to linear encoding. See also [member " "vertex_color_is_srgb].\n" "This should only be enabled when needed (typically when using a " "[ViewportTexture] as [member albedo_texture]). If [member " "albedo_texture_force_srgb] is [code]true[/code] when it shouldn't be, the " "texture will appear to be too dark. If [member albedo_texture_force_srgb] is " "[code]false[/code] when it shouldn't be, the texture will appear to be too " "bright." msgstr "" "如果为 [code]true[/code],则强制将 [member albedo_texture] 从 sRGB 颜色空间转" "换为线性颜色空间。另见 [member vertex_color_is_srgb]。\n" "该属性应该只在需要时启用(通常在使用 [ViewportTexture] 作为 [member " "albedo_texture] 时)。如果 [member albedo_texture_force_srgb] 在不应该的情况" "下为 [code]true[/code],则纹理会显得太暗。如果 [member " "albedo_texture_force_srgb] 在不应该的情况下为 [code]false[/code],则纹理会显" "得太亮。" #: doc/classes/BaseMaterial3D.xml msgid "" "Enables multichannel signed distance field rendering shader. Use [member " "msdf_pixel_range] and [member msdf_outline_size] to configure MSDF " "parameters." msgstr "" "启用多通道有符号距离场渲染着色器。使用 [member msdf_pixel_range] 和 [member " "msdf_outline_size] 配置 MSDF 参数。" #: doc/classes/BaseMaterial3D.xml doc/classes/Label3D.xml #: doc/classes/SpriteBase3D.xml msgid "Threshold at which antialiasing will be applied on the alpha channel." msgstr "将在 Alpha 通道上应用抗锯齿的阈值。" #: doc/classes/BaseMaterial3D.xml doc/classes/Label3D.xml #: doc/classes/SpriteBase3D.xml msgid "The type of alpha antialiasing to apply." msgstr "要应用的 Alpha 抗锯齿类型。" #: doc/classes/BaseMaterial3D.xml doc/classes/Label3D.xml #: doc/classes/SpriteBase3D.xml msgid "" "The hashing scale for Alpha Hash. Recommended values between [code]0[/code] " "and [code]2[/code]." msgstr "" "Alpha Hash 的哈希比例。推荐 [code]0[/code] 和 [code]2[/code] 之间的值。" #: doc/classes/BaseMaterial3D.xml msgid "" "Threshold at which the alpha scissor will discard values. Higher values will " "result in more pixels being discarded. If the material becomes too opaque at " "a distance, try increasing [member alpha_scissor_threshold]. If the material " "disappears at a distance, try decreasing [member alpha_scissor_threshold]." msgstr "" "Alpha 剪刀将丢弃值的阈值。较高的值将导致更多像素被丢弃。如果材质在远处变得太" "不透明,请尝试增加 [member alpha_scissor_threshold]。如果材质在远处消失,请尝" "试降低 [member alpha_scissor_threshold]。" #: doc/classes/BaseMaterial3D.xml msgid "" "The strength of the anisotropy effect. This is multiplied by [member " "anisotropy_flowmap]'s alpha channel if a texture is defined there and the " "texture contains an alpha channel." msgstr "" "各向异性效果的强度。如果 [member anisotropy_flowmap] 是一张带有 Alpha 通道的" "纹理,那么这个值会与其 Alpha 通道相乘。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], anisotropy is enabled. Anisotropy changes the shape of " "the specular blob and aligns it to tangent space. This is useful for brushed " "aluminum and hair reflections.\n" "[b]Note:[/b] Mesh tangents are needed for anisotropy to work. If the mesh " "does not contain tangents, the anisotropy effect will appear broken.\n" "[b]Note:[/b] Material anisotropy should not to be confused with anisotropic " "texture filtering, which can be enabled by setting [member texture_filter] " "to [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC]." msgstr "" "如果为 [code]true[/code],则启用各向异性。各向异性会改变镜面反射斑点的形状并" "将其与切线空间对齐。可用于拉丝铝材和毛发反射。\n" "[b]注意:[/b]各向异性需要网格切线才能正常工作。如果网格中不包含切线,则各向异" "性效果会显得破碎。\n" "[b]注意:[/b]材质的各向异性不应与各向异性纹理过滤相混淆,后者可以通过将 " "[member texture_filter] 设置为 [constant " "TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC] 来启用。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture that offsets the tangent map for anisotropy calculations and " "optionally controls the anisotropy effect (if an alpha channel is present). " "The flowmap texture is expected to be a derivative map, with the red channel " "representing distortion on the X axis and green channel representing " "distortion on the Y axis. Values below 0.5 will result in negative " "distortion, whereas values above 0.5 will result in positive distortion.\n" "If present, the texture's alpha channel will be used to multiply the " "strength of the [member anisotropy] effect. Fully opaque pixels will keep " "the anisotropy effect's original strength while fully transparent pixels " "will disable the anisotropy effect entirely. The flowmap texture's blue " "channel is ignored." msgstr "" "用于对切线图进行偏移的纹理,用于各向异性的计算,(如果存在 Alpha 通道)还可以" "控制各向异性的效果。Flowmap 方向图纹理应该是一张派生图,红色通道表示 X 轴上的" "变形、绿色通道表示 Y 轴上的变形。小于 0.5 的值会朝负方向进行变形,而大于 0.5 " "的值则朝正方向变形。\n" "纹理的 Alpha 通道如果存在,则会用于与 [member anisotropy] 效果的强度相乘。完" "全不透明的像素会保持原始强度,而完全透明的像素则会完全禁用各向异性效果。方向" "图纹理的蓝色通道会被忽略。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], ambient occlusion is enabled. Ambient occlusion " "darkens areas based on the [member ao_texture]." msgstr "" "如果为 [code]true[/code],启用环境遮挡。环境遮挡根据 [member ao_texture] 使区" "域变暗。" #: doc/classes/BaseMaterial3D.xml msgid "" "Amount that ambient occlusion affects lighting from lights. If [code]0[/" "code], ambient occlusion only affects ambient light. If [code]1[/code], " "ambient occlusion affects lights just as much as it affects ambient light. " "This can be used to impact the strength of the ambient occlusion effect, but " "typically looks unrealistic." msgstr "" "环境遮挡对灯光照明的影响程度。如果 [code]0[/code],环境遮挡只影响环境光。如" "果 [code]1[/code],环境遮挡对灯光的影响和对环境光的影响一样大。这可以用来影响" "环境遮挡效果的强度,但通常看起来不真实。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], use [code]UV2[/code] coordinates to look up from the " "[member ao_texture]." msgstr "" "如果为 [code]true[/code],请使用 [code]UV2[/code] 坐标从 [member ao_texture] " "中查找。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture that defines the amount of ambient occlusion for a given point on " "the object." msgstr "定义物体上给定点的环境遮挡量的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "" "Specifies the channel of the [member ao_texture] in which the ambient " "occlusion information is stored. This is useful when you store the " "information for multiple effects in a single texture. For example if you " "stored metallic in the red channel, roughness in the blue, and ambient " "occlusion in the green you could reduce the number of textures you use." msgstr "" "指定 [member ao_texture] 的通道,其中存储环境遮挡信息。可以用来在一个纹理中存" "储多个效果的信息。例如,如果你将金属效果存储在 R 通道中,将粗糙度存储在 B 通" "道中,将环境遮挡存储在 G 通道中,就可以减少你使用的纹理数量。" #: doc/classes/BaseMaterial3D.xml msgid "" "The color used by the backlight effect. Represents the light passing through " "an object." msgstr "背光效果使用的颜色。表示穿过物体的光。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the backlight effect is enabled. See also [member " "subsurf_scatter_transmittance_enabled]." msgstr "" "如果为 [code]true[/code],则启用背光效果。另见 [member " "subsurf_scatter_transmittance_enabled]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture used to control the backlight effect per-pixel. Added to [member " "backlight]." msgstr "用于控制每像素背光效果的纹理。与 [member backlight] 相加。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the bent normal map is enabled. This allows for more " "accurate indirect lighting and specular occlusion." msgstr "" "如果为 [code]true[/code],则启用弯曲法线映射。可以实现更准确的间接光照和镜面" "反射遮蔽效果。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture that specifies the average direction of incoming ambient light at a " "given pixel. The [member bent_normal_texture] only uses the red and green " "channels; the blue and alpha channels are ignored. The normal read from " "[member bent_normal_texture] is oriented around the surface normal provided " "by the [Mesh].\n" "[b]Note:[/b] A bent normal map is different from a regular normal map. When " "baking a bent normal map make sure to use [b]a cosine distribution[/b] for " "the bent normal map to work correctly.\n" "[b]Note:[/b] The mesh must have both normals and tangents defined in its " "vertex data. Otherwise, the shading produced by the bent normal map will not " "look correct. If creating geometry with [SurfaceTool], you can use [method " "SurfaceTool.generate_normals] and [method SurfaceTool.generate_tangents] to " "automatically generate normals and tangents respectively.\n" "[b]Note:[/b] Godot expects the bent normal map to use X+, Y+, and Z+ " "coordinates. See [url=http://wiki.polycount.com/wiki/" "Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for " "a comparison of normal map coordinates expected by popular engines." msgstr "" "用于指定给定像素的入射环境光平均方向的纹理。[member bent_normal_texture] 只使" "用红色和绿色通道;会忽略蓝色和 alpha 通道。从 [member bent_normal_texture] 读" "取的法线是围绕 [Mesh] 所提供的表面法线的进行朝向的。\n" "[b]注意:[/b]弯曲法线贴图与常规法线贴图不同。烘焙弯曲法线贴图时,请确保使用" "[b]余弦分布[/b],弯曲法线贴图才能正常工作。\n" "[b]注意:[/b]该网格必须在其顶点数据中同时定义法线和切线。否则法线贴图将无法正" "确渲染,只会使整个表面变暗。如果使用 [SurfaceTool] 创建几何体,可以使用 " "[method SurfaceTool.generate_normals] 和 [method " "SurfaceTool.generate_tangents] 分别自动生成法线和切线。\n" "[b]注意:[/b]Godot 期望弯曲法线贴图使用 X+、Y+、Z+ 坐标系。比较流行的引擎所期" "望的法线贴图坐标系见[url=http://wiki.polycount.com/wiki/" "Normal_Map_Technical_Details#Common_Swizzle_Coordinates]这个页面[/url]。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the shader will keep the scale set for the mesh. " "Otherwise, the scale is lost when billboarding. Only applies when [member " "billboard_mode] is not [constant BILLBOARD_DISABLED]." msgstr "" "如果为 [code]true[/code],则着色器将保持为网格设置的缩放。否则,在做公告板时" "会丢失缩放。仅在 [member billboard_mode] 不为 [constant BILLBOARD_DISABLED] " "时适用。" #: doc/classes/BaseMaterial3D.xml msgid "" "Controls how the object faces the camera.\n" "[b]Note:[/b] Billboard mode is not suitable for VR because the left-right " "vector of the camera is not horizontal when the screen is attached to your " "head instead of on the table. See [url=https://github.com/godotengine/godot/" "issues/41567]GitHub issue #41567[/url] for details." msgstr "" "控制该对象如何面对相机。\n" "[b]注意:[/b]公告板模式不适合 VR,因为当屏幕贴在你的头上而不是在桌子上时,相" "机的左右向量不是水平的。详见 [url=https://github.com/godotengine/godot/" "issues/41567]GitHub issue #41567[/url]。" #: doc/classes/BaseMaterial3D.xml msgid "" "The material's blend mode.\n" "[b]Note:[/b] Values other than [code]Mix[/code] force the object into the " "transparent pipeline." msgstr "" "材质的混合模式。\n" "[b]注意:[/b]除 [code]Mix[/code] 以外的值会强制对象进入透明管道。" #: doc/classes/BaseMaterial3D.xml msgid "" "Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks " "the same as disabling the clearcoat effect." msgstr "设置清漆效果的强度。设置为 [code]0[/code] 看起来与禁用清漆效果相同。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], clearcoat rendering is enabled. Adds a secondary " "transparent pass to the lighting calculation resulting in an added specular " "blob. This makes materials appear as if they have a clear layer on them that " "can be either glossy or rough.\n" "[b]Note:[/b] Clearcoat rendering is not visible if the material's [member " "shading_mode] is [constant SHADING_MODE_UNSHADED]." msgstr "" "如果为 [code]true[/code],则启用清漆渲染。将辅助透明通道添加到照明计算中,从" "而产生一个添加的镜面反射斑点。这使得材质看起来好像它们表面上有一层透明层,该" "透明层可以是有光泽的也可以是粗糙的。\n" "[b]注意:[/b]如果材质的 [member shading_mode] 为 [constant " "SHADING_MODE_UNSHADED],则清漆渲染不可见。" #: doc/classes/BaseMaterial3D.xml msgid "" "Sets the roughness of the clearcoat pass. A higher value results in a " "rougher clearcoat while a lower value results in a smoother clearcoat." msgstr "" "设置清漆通道的粗糙度。较高的值会产生较粗糙的清漆,而较低的值会产生更光滑的清" "漆。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture that defines the strength of the clearcoat effect and the glossiness " "of the clearcoat. Strength is specified in the red channel while glossiness " "is specified in the green channel." msgstr "" "定义清漆效果的强度和清漆的光泽度的纹理。强度在红色通道中指定,光泽度在绿色通" "道中指定。" #: doc/classes/BaseMaterial3D.xml msgid "" "Determines which side of the triangle to cull depending on whether the " "triangle faces towards or away from the camera." msgstr "根据三角形是朝向还是背离相机,来确定要剔除三角形的哪一侧。" #: doc/classes/BaseMaterial3D.xml msgid "" "Determines when depth rendering takes place. See also [member transparency]." msgstr "确定深度渲染发生的时间。另见 [member transparency]。" #: doc/classes/BaseMaterial3D.xml msgid "May be affected by future rendering pipeline changes." msgstr "可能受到后续渲染管线调整的影响。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "" "Determines which comparison operator is used when testing depth.\n" "[b]Note:[/b] Changing [member depth_test] to a non-default value only has a " "visible effect when used on a transparent material, or a material that has " "[member depth_draw_mode] set to [constant DEPTH_DRAW_DISABLED]." msgstr "" "决定深度测试时使用的比较运算符。见 [enum DepthTest]。\n" "[b]注意:[/b]将 [member depth_test] 设为非默认值只有用于透明材质、[member " "depth_draw_mode] 为 [constant DEPTH_DRAW_DISABLED] 的材质时才有可见的效果。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture that specifies the color of the detail overlay. [member " "detail_albedo]'s alpha channel is used as a mask, even when the material is " "opaque. To use a dedicated texture as a mask, see [member detail_mask].\n" "[b]Note:[/b] [member detail_albedo] is [i]not[/i] modulated by [member " "albedo_color]." msgstr "" "用于指定细节覆盖层颜色的纹理。[member detail_albedo] 的 alpha 通道会被用作遮" "罩,即使该材质不透明。将专用纹理用作遮罩见 [member detail_mask]。\n" "[b]注意:[/b][member detail_albedo] [i]不会[/i]被 [member albedo_color] 调" "色。" #: doc/classes/BaseMaterial3D.xml msgid "" "Specifies how the [member detail_albedo] should blend with the current " "[code]ALBEDO[/code]." msgstr "指定 [member detail_albedo] 应如何与当前 [code]ALBEDO[/code] 混合。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], enables the detail overlay. Detail is a second texture " "that gets mixed over the surface of the object based on [member detail_mask] " "and [member detail_albedo]'s alpha channel. This can be used to add " "variation to objects, or to blend between two different albedo/normal " "textures." msgstr "" "如果为 [code]true[/code],启用细节叠加。细节是基于 [member detail_mask] 和 " "[member detail_albedo] 的 Alpha 通道,在对象表面上混合的第二个纹理。这可用于" "为对象添加变化,或混合两种不同的反照率/法线纹理。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture used to specify how the detail textures get blended with the base " "textures. [member detail_mask] can be used together with [member " "detail_albedo]'s alpha channel (if any)." msgstr "" "纹理用于指定细节纹理如何与基础纹理混合。[member detail_mask] 可以与 [member " "detail_albedo] 的 Alpha 通道(如果有)一起使用。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture that specifies the per-pixel normal of the detail overlay. The " "[member detail_normal] texture only uses the red and green channels; the " "blue and alpha channels are ignored. The normal read from [member " "detail_normal] is oriented around the surface normal provided by the " "[Mesh].\n" "[b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. " "See [url=http://wiki.polycount.com/wiki/" "Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for " "a comparison of normal map coordinates expected by popular engines." msgstr "" "用于指定细节覆盖层逐像素法线的纹理。[member detail_normal] 纹理只使用红色和绿" "色通道;会忽略蓝色和 alpha 通道。从 [member detail_normal] 读取的法线是围绕 " "[Mesh] 所提供的表面法线的进行朝向的。\n" "[b]注意:[/b]Godot 期望法线贴图使用 X+、Y+、Z+ 坐标系。比较流行的引擎所期望的" "法线贴图坐标系见[url=http://wiki.polycount.com/wiki/" "Normal_Map_Technical_Details#Common_Swizzle_Coordinates]这个页面[/url]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail " "layer." msgstr "指定细节层是使用 [code]UV[/code] 还是 [code]UV2[/code]。" #: doc/classes/BaseMaterial3D.xml msgid "The algorithm used for diffuse light scattering." msgstr "用于漫反射光散射的算法。" #: doc/classes/BaseMaterial3D.xml msgid "If [code]true[/code], the object receives no ambient light." msgstr "如果为 [code]true[/code],则对象不接收环境光。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the object will not be affected by fog (neither " "volumetric nor depth fog). This is useful for unshaded or transparent " "materials (e.g. particles), which without this setting will be affected even " "if fully transparent." msgstr "" "如果为 [code]true[/code],则对象不会受到雾的影响(包括体积雾和深度雾)。可用" "于不着色材质和透明材质(例如例子),不开启时即便完全透明也会受到影响。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the object receives no shadow that would otherwise be " "cast onto it." msgstr "如果为 [code]true[/code],则对象不会收到投射到其上的阴影。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], disables specular occlusion even if [member " "ProjectSettings.rendering/reflections/specular_occlusion/enabled] is " "[code]false[/code]." msgstr "" "如果为 [code]true[/code] 则禁用镜面反射遮蔽,即便 [member " "ProjectSettings.rendering/reflections/specular_occlusion/enabled] 为 " "[code]false[/code]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Distance at which the object appears fully opaque.\n" "[b]Note:[/b] If [member distance_fade_max_distance] is less than [member " "distance_fade_min_distance], the behavior will be reversed. The object will " "start to fade away at [member distance_fade_max_distance] and will fully " "disappear once it reaches [member distance_fade_min_distance]." msgstr "" "物体看起来完全不透明的距离。\n" "[b]注意:[/b]如果 [member distance_fade_max_distance] 小于 [member " "distance_fade_min_distance],则行为相反。物体将在 [member " "distance_fade_max_distance] 处开始逐渐消失,并在到达 [member " "distance_fade_min_distance] 时完全消失。" #: doc/classes/BaseMaterial3D.xml msgid "" "Distance at which the object starts to become visible. If the object is less " "than this distance away, it will be invisible.\n" "[b]Note:[/b] If [member distance_fade_min_distance] is greater than [member " "distance_fade_max_distance], the behavior will be reversed. The object will " "start to fade away at [member distance_fade_max_distance] and will fully " "disappear once it reaches [member distance_fade_min_distance]." msgstr "" "物体开始变得可见的距离。如果物体的距离小于这个距离,它将是不可见的。\n" "[b]注意:[/b]如果 [member distance_fade_min_distance] 大于 [member " "distance_fade_max_distance],则行为将相反。物体将在 [member " "distance_fade_max_distance] 处开始逐渐消失,并在到达 [member " "distance_fade_min_distance] 时完全消失。" #: doc/classes/BaseMaterial3D.xml msgid "" "Specifies which type of fade to use. Can be any of the [enum " "DistanceFadeMode]s." msgstr "指定要使用的淡入淡出类型。可以是任何一个 [enum DistanceFadeMode]。" #: doc/classes/BaseMaterial3D.xml msgid "The emitted light's color. See [member emission_enabled]." msgstr "发出的光的颜色。见 [member emission_enabled]。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the body emits light. Emitting light makes the object " "appear brighter. The object can also cast light on other objects if a " "[VoxelGI], SDFGI, or [LightmapGI] is used and this object is used in baked " "lighting." msgstr "" "如果为 [code]true[/code],则实体会发光。发光会使物体看起来更亮。如果使用 " "[VoxelGI]、SDFGI 或 [LightmapGI],并且该对象用于烘焙光照,则该对象还可以将光" "投射到其他对象上。" #: doc/classes/BaseMaterial3D.xml msgid "Multiplier for emitted light. See [member emission_enabled]." msgstr "发出的光的乘数。请参阅 [member emission_enabled]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Luminance of emitted light, measured in nits (candela per square meter). " "Only available when [member ProjectSettings.rendering/lights_and_shadows/" "use_physical_light_units] is enabled. The default is roughly equivalent to " "an indoor lightbulb." msgstr "" "发出的光的亮度,单位是尼特(坎德拉/平方米)。仅在启用 [member " "ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] 时可" "用。默认值大致相当于一个室内灯泡。" #: doc/classes/BaseMaterial3D.xml msgid "Use [code]UV2[/code] to read from the [member emission_texture]." msgstr "使用 [code]UV2[/code] 从 [member emission_texture] 中读取。" #: doc/classes/BaseMaterial3D.xml msgid "" "Sets how [member emission] interacts with [member emission_texture]. Can " "either add or multiply." msgstr "" "设置 [member emission] 与 [member emission_texture] 的交互方式。可以是加法或" "乘法。" #: doc/classes/BaseMaterial3D.xml msgid "Texture that specifies how much surface emits light at a given point." msgstr "纹理,指定某点的表面发光的程度。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the object is rendered at the same size regardless of " "distance. The object's size on screen is the same as if the camera was " "[code]1.0[/code] units away from the object's origin, regardless of the " "actual distance from the camera. The [Camera3D]'s field of view (or [member " "Camera3D.size] when in orthogonal/frustum mode) still affects the size the " "object is drawn at." msgstr "" "如果为 [code]true[/code],则对象始终以相同的大小渲染,忽略距离。对象在屏幕上" "的大小与相机距离对象原点 [code]1.0[/code] 单位时相同,忽略与相机的实际距离。" "[Camera3D] 的视野(使用正交/视锥模式时则为 [member Camera3D.size])仍然会影响" "对象绘制的大小。" #: doc/classes/BaseMaterial3D.xml msgid "" "Overrides the [Camera3D]'s field of view angle (in degrees).\n" "[b]Note:[/b] This behaves as if the field of view is set on a [Camera3D] " "with [member Camera3D.keep_aspect] set to [constant Camera3D.KEEP_HEIGHT]. " "Additionally, it may not look correct on a non-perspective camera where the " "field of view setting is ignored." msgstr "" "覆盖 [Camera3D] 的视场角(单位为度)。\n" "[b]注意:[/b]行为与对 [member Camera3D.keep_aspect] 为 [constant " "Camera3D.KEEP_HEIGHT] 的 [Camera3D] 设置视场角一致。此外,非透视相机会忽略视" "场角的设置,因此效果可能不正确。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], enables the vertex grow setting. This can be used to " "create mesh-based outlines using a second material pass and its [member " "cull_mode] set to [constant CULL_FRONT]. See also [member grow_amount].\n" "[b]Note:[/b] Vertex growth cannot create new vertices, which means that " "visible gaps may occur in sharp corners. This can be alleviated by designing " "the mesh to use smooth normals exclusively using [url=http://" "wiki.polycount.com/wiki/Face_weighted_normals]face weighted normals[/url] in " "the 3D authoring software. In this case, grow will be able to join every " "outline together, just like in the original mesh." msgstr "" "如果为 [code]true[/code],则启用顶点增长设置。可用于创建基于网格的轮廓,请在" "第二个材质阶段中使用,并将 [member cull_mode] 设置为 [constant CULL_FRONT]。" "另见 [member grow_amount]。\n" "[b]注意:[/b]顶点增长无法新建顶点,这意味着锐角可能会造成可见的缺口。缓解方法" "是在设计网格时就只用平滑的法线,在 3D 创作软件中使用 [url=http://" "wiki.polycount.com/wiki/Face_weighted_normals]面加权法线[/url]。这样增长就能" "够将所有轮廓连接到一起,和原始网格一致。" #: doc/classes/BaseMaterial3D.xml msgid "" "Grows object vertices in the direction of their normals. Only effective if " "[member grow] is [code]true[/code]." msgstr "" "将对象的顶点沿着对应的法线方向生长。仅在 [member grow] 为 [code]true[/code] " "时有效。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], uses parallax occlusion mapping to represent depth in " "the material instead of simple offset mapping (see [member " "heightmap_enabled]). This results in a more convincing depth effect, but is " "much more expensive on the GPU. Only enable this on materials where it makes " "a significant visual difference." msgstr "" "如果为 [code]true[/code],则使用视差遮挡贴图来表示材质中的深度,而不是简单的" "偏移贴图(参见 [member heightmap_enabled])。这会产生更令人信服的深度效果,但" "在 GPU 上的成本要高得多。仅在具有显著视觉差异的材质上启用该功能。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], height mapping is enabled (also called \"parallax " "mapping\" or \"depth mapping\"). See also [member normal_enabled]. Height " "mapping is a demanding feature on the GPU, so it should only be used on " "materials where it makes a significant visual difference.\n" "[b]Note:[/b] Height mapping is not supported if triplanar mapping is used on " "the same material. The value of [member heightmap_enabled] will be ignored " "if [member uv1_triplanar] is enabled." msgstr "" "如果为 [code]true[/code],则启用高度映射(也称为“视差映射”或“深度映射”)。另" "见 [member normal_enabled]。高度映射是 GPU 上的一项要求很高的功能,因此它只能" "用于具有显著视觉差异的材质。\n" "[b]注意:[/b]如果在同一材质上使用三平面贴图,则不支持高度图。如果 [member " "uv1_triplanar] 被启用,则 [member heightmap_enabled] 的值将被忽略。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], flips the mesh's binormal vectors when interpreting " "the height map. If the heightmap effect looks strange when the camera moves " "(even with a reasonable [member heightmap_scale]), try setting this to " "[code]true[/code]." msgstr "" "如果为 [code]true[/code],则在解释高度图时翻转网格的副法线向量。如果相机移动" "时高度图效果看起来很奇怪(即使使用合理的 [member heightmap_scale]),请尝试将" "该属性设置为 [code]true[/code]。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], flips the mesh's tangent vectors when interpreting the " "height map. If the heightmap effect looks strange when the camera moves " "(even with a reasonable [member heightmap_scale]), try setting this to " "[code]true[/code]." msgstr "" "如果为 [code]true[/code],则在解释高度图时翻转网格的切线向量。如果相机移动时" "高度图效果看起来很奇怪(即使使用合理的 [member heightmap_scale]),请尝试将该" "属性设置为 [code]true[/code]。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], interprets the height map texture as a depth map, with " "brighter values appearing to be \"lower\" in altitude compared to darker " "values.\n" "This can be enabled for compatibility with some materials authored for Godot " "3.x. This is not necessary if the Invert import option was used to invert " "the depth map in Godot 3.x, in which case [member heightmap_flip_texture] " "should remain [code]false[/code]." msgstr "" "如果为 [code]true[/code],则将高度图纹理解释为深度图,与较暗的值相比,较亮的" "值在高度上显得“更低”。\n" "可以启用该功能以与为 Godot 3.x 编写的某些材质兼容。如果在 Godot 3.x 中使用反" "转导入选项来反转深度图,则不需要这样做,在这种情况下,[member " "heightmap_flip_texture] 应该保持为 [code]false[/code]。" #: doc/classes/BaseMaterial3D.xml msgid "" "The number of layers to use for parallax occlusion mapping when the camera " "is up close to the material. Higher values result in a more convincing depth " "effect, especially in materials that have steep height changes. Higher " "values have a significant cost on the GPU, so it should only be increased on " "materials where it makes a significant visual difference.\n" "[b]Note:[/b] Only effective if [member heightmap_deep_parallax] is " "[code]true[/code]." msgstr "" "当相机靠近材质时用于视差遮挡贴图的层数。较高的值会产生更令人信服的深度效果," "尤其是在具有陡峭高度变化的材质中。较高的值会显著地增加 GPU 的成本,因此只能在" "会产生显著视觉差异的材质上增加它。\n" "[b]注意:[/b]仅当 [member heightmap_deep_parallax] 为 [code]true[/code] 时有" "效。" #: doc/classes/BaseMaterial3D.xml msgid "" "The number of layers to use for parallax occlusion mapping when the camera " "is far away from the material. Higher values result in a more convincing " "depth effect, especially in materials that have steep height changes. Higher " "values have a significant cost on the GPU, so it should only be increased on " "materials where it makes a significant visual difference.\n" "[b]Note:[/b] Only effective if [member heightmap_deep_parallax] is " "[code]true[/code]." msgstr "" "当相机远离材质时用于视差遮挡贴图的层数。较高的值会产生更令人信服的深度效果," "尤其是在具有陡峭高度变化的材质中。较高的值会显著地增加 GPU 的成本,因此只能在" "会产生显著视觉差异的材质上增加它。\n" "[b]注意:[/b]仅当 [member heightmap_deep_parallax] 为 [code]true[/code] 时有" "效。" #: doc/classes/BaseMaterial3D.xml msgid "" "The heightmap scale to use for the parallax effect (see [member " "heightmap_enabled]). The default value is tuned so that the highest point " "(value = 255) appears to be 5 cm higher than the lowest point (value = 0). " "Higher values result in a deeper appearance, but may result in artifacts " "appearing when looking at the material from oblique angles, especially when " "the camera moves. Negative values can be used to invert the parallax effect, " "but this is different from inverting the texture using [member " "heightmap_flip_texture] as the material will also appear to be \"closer\" to " "the camera. In most cases, [member heightmap_scale] should be kept to a " "positive value.\n" "[b]Note:[/b] If the height map effect looks strange regardless of this " "value, try adjusting [member heightmap_flip_binormal] and [member " "heightmap_flip_tangent]. See also [member heightmap_texture] for " "recommendations on authoring heightmap textures, as the way the heightmap " "texture is authored affects how [member heightmap_scale] behaves." msgstr "" "用于视差效果的高度图缩放(参见 [member heightmap_enabled])。调整默认值,使最" "高点(值 = 255)看起来比最低点(值 = 0)高 5 厘米。较高的值会导致更深的外观," "但可能会导致从倾斜角度查看材质时出现伪影,尤其是在相机移动时。负值可用于反转" "视差效果,但这与使用 [member heightmap_flip_texture] 反转纹理不同,因为材质也" "会看起来“更接近”相机。在大多数情况下,[member heightmap_scale] 应保持为正" "值。\n" "[b]注意:[/b]如果忽略这个值后高度图效果看起来很奇怪,请尝试调整 [member " "heightmap_flip_binormal] 和 [member heightmap_flip_tangent]。另见 [member " "heightmap_texture] 以获取有关创作高度图纹理的建议,因为创作高度图纹理的方式会" "影响 [member heightmap_scale] 的行为方式。" #: doc/classes/BaseMaterial3D.xml msgid "" "The texture to use as a height map. See also [member heightmap_enabled].\n" "For best results, the texture should be normalized (with [member " "heightmap_scale] reduced to compensate). In [url=https://gimp.org]GIMP[/" "url], this can be done using [b]Colors > Auto > Equalize[/b]. If the texture " "only uses a small part of its available range, the parallax effect may look " "strange, especially when the camera moves.\n" "[b]Note:[/b] To reduce memory usage and improve loading times, you may be " "able to use a lower-resolution heightmap texture as most heightmaps are only " "comprised of low-frequency data." msgstr "" "用作高度图的纹理。另见 [member heightmap_enabled]。\n" "为获得最佳效果,应将纹理归一化(减少 [member heightmap_scale] 以进行补偿)。" "在 [url=https://gimp.org]GIMP[/url] 中,这可以使用[b]颜色(Colors) > 自动" "(Auto) > 均衡(Equalize)[/b]来完成。如果纹理只使用其可用范围的一小部分,则" "视差效果可能看起来很奇怪,尤其是当相机移动时。\n" "[b]注意:[/b]为了减少内存使用和缩短加载时间,可以使用分辨率较低的高度图纹理," "因为大多数高度图仅包含低频数据。" #: doc/classes/BaseMaterial3D.xml msgid "" "A high value makes the material appear more like a metal. Non-metals use " "their albedo as the diffuse color and add diffuse to the specular " "reflection. With non-metals, the reflection appears on top of the albedo " "color. Metals use their albedo as a multiplier to the specular reflection " "and set the diffuse color to black resulting in a tinted reflection. " "Materials work better when fully metal or fully non-metal, values between " "[code]0[/code] and [code]1[/code] should only be used for blending between " "metal and non-metal sections. To alter the amount of reflection use [member " "roughness]." msgstr "" "高值使材质看起来更像金属。非金属使用其反射率作为漫射色,并在镜面反射上添加漫" "射。对于非金属,反射出现在反照率颜色之上。金属使用其反射率作为镜面反射的倍" "数,并将漫射色设置为黑色,从而产生有色反射。材质在全金属或全非金属时效果更" "好,介于 [code]0[/code] 和 [code]1[/code] 之间的值只能用于金属和非金属部分之" "间的混合。要改变反射量,请使用[member roughness]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Adjusts the strength of specular reflections. Specular reflections are " "composed of scene reflections and the specular lobe which is the bright spot " "that is reflected from light sources. When set to [code]0.0[/code], no " "specular reflections will be visible. This differs from the [constant " "SPECULAR_DISABLED] [enum SpecularMode] as [constant SPECULAR_DISABLED] only " "applies to the specular lobe from the light source.\n" "[b]Note:[/b] Unlike [member metallic], this is not energy-conserving, so it " "should be left at [code]0.5[/code] in most cases. See also [member " "roughness]." msgstr "" "调整镜面反射的强度。镜面反射由场景反射和镜面波瓣组成,镜面波瓣是从光源反射的" "亮点。当设置为 [code]0.0[/code] 时,镜面反射将不可见。这与 [constant " "SPECULAR_DISABLED] [enum SpecularMode] 不同,因为 [constant " "SPECULAR_DISABLED] 仅适用于来自光源的镜面反射波瓣。\n" "[b]注意:[/b]与 [member metallic] 不同,这不是节能的,所以在大多数情况下应将" "其保留在 [code]0.5[/code]。另见 [member roughness]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture used to specify metallic for an object. This is multiplied by " "[member metallic]." msgstr "用于指定对象的金属质感。这个值会与 [member metallic] 相乘。" #: doc/classes/BaseMaterial3D.xml msgid "" "Specifies the channel of the [member metallic_texture] in which the metallic " "information is stored. This is useful when you store the information for " "multiple effects in a single texture. For example if you stored metallic in " "the red channel, roughness in the blue, and ambient occlusion in the green " "you could reduce the number of textures you use." msgstr "" "指定存储金属度信息的 [member metallic_texture] 的通道。当将多个效果的信息存储" "在单个纹理中时,这很有用。例如,如果在红色通道中存储金属度,在蓝色通道中存储" "粗糙度,在绿色通道中存储环境遮挡,则可以减少使用的纹理数量。" #: doc/classes/BaseMaterial3D.xml msgid "The width of the shape outline." msgstr "形状轮廓的宽度。" #: doc/classes/BaseMaterial3D.xml msgid "" "The width of the range around the shape between the minimum and maximum " "representable signed distance." msgstr "围绕最小和最大可表示有符号距离之间的形状的范围的宽度。" #: doc/classes/BaseMaterial3D.xml doc/classes/Label3D.xml #: doc/classes/SpriteBase3D.xml msgid "" "If [code]true[/code], depth testing is disabled and the object will be drawn " "in render order." msgstr "如果为 [code]true[/code],深度测试被禁用,对象将按渲染顺序绘制。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], normal mapping is enabled. This has a slight " "performance cost, especially on mobile GPUs." msgstr "" "如果为 [code]true[/code],则启用法线映射。略微影响性能,尤其在移动 GPU 上。" #: doc/classes/BaseMaterial3D.xml msgid "The strength of the normal map's effect." msgstr "法线贴图的效果强度。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture used to specify the normal at a given pixel. The [member " "normal_texture] only uses the red and green channels; the blue and alpha " "channels are ignored. The normal read from [member normal_texture] is " "oriented around the surface normal provided by the [Mesh].\n" "[b]Note:[/b] The mesh must have both normals and tangents defined in its " "vertex data. Otherwise, the normal map won't render correctly and will only " "appear to darken the whole surface. If creating geometry with [SurfaceTool], " "you can use [method SurfaceTool.generate_normals] and [method " "SurfaceTool.generate_tangents] to automatically generate normals and " "tangents respectively.\n" "[b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. " "See [url=http://wiki.polycount.com/wiki/" "Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for " "a comparison of normal map coordinates expected by popular engines.\n" "[b]Note:[/b] If [member detail_enabled] is [code]true[/code], the [member " "detail_albedo] texture is drawn [i]below[/i] the [member normal_texture]. To " "display a normal map [i]above[/i] the [member detail_albedo] texture, use " "[member detail_normal] instead." msgstr "" "用于指定给定像素的法线的纹理。[member normal_texture] 只使用红色和绿色通道;" "会忽略蓝色和 alpha 通道。从 [member normal_texture] 读取的法线是围绕 [Mesh] " "所提供的表面法线的进行朝向的。\n" "[b]注意:[/b]该网格必须在其顶点数据中同时定义法线和切线。否则法线贴图将无法正" "确渲染,只会使整个表面变暗。如果使用 [SurfaceTool] 创建几何体,可以使用 " "[method SurfaceTool.generate_normals] 和 [method " "SurfaceTool.generate_tangents] 分别自动生成法线和切线。\n" "[b]注意:[/b]Godot 期望法线贴图使用 X+、Y+、Z+ 坐标系。比较流行的引擎所期望的" "法线贴图坐标系见[url=http://wiki.polycount.com/wiki/" "Normal_Map_Technical_Details#Common_Swizzle_Coordinates]这个页面[/url]。\n" "[b]注意:[/b]如果 [member detail_enabled] 为 [code]true[/code],则 [member " "detail_albedo] 纹理将在 [member normal_texture] [i]下方[/i]绘制。要在 " "[member detail_albedo] 纹理[i]之上[/i]显示法线贴图,请改用 [member " "detail_normal]。" #: doc/classes/BaseMaterial3D.xml msgid "" "The Occlusion/Roughness/Metallic texture to use. This is a more efficient " "replacement of [member ao_texture], [member roughness_texture] and [member " "metallic_texture] in [ORMMaterial3D]. Ambient occlusion is stored in the red " "channel. Roughness map is stored in the green channel. Metallic map is " "stored in the blue channel. The alpha channel is ignored." msgstr "" "要使用的遮挡/粗糙度/金属纹理。这是对 [ORMMaterial3D] 中 [member ao_texture]、" "[member roughness_texture] 和 [member metallic_texture] 的更有效替代。环境遮" "挡被存储在红色通道中。粗糙度贴图被存储在绿色通道中。金属度贴图被存储在蓝色通" "道中。Alpha 通道将被忽略。" #: doc/classes/BaseMaterial3D.xml msgid "" "The number of horizontal frames in the particle sprite sheet. Only enabled " "when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]." msgstr "" "粒子精灵表中的水平帧数。仅在使用 [constant BILLBOARD_PARTICLES] 时启用。见 " "[member billboard_mode]。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], particle animations are looped. Only enabled when " "using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]." msgstr "" "如果为 [code]true[/code],则循环粒子动画。仅在使用 [constant " "BILLBOARD_PARTICLES] 时启用。见 [member billboard_mode]。" #: doc/classes/BaseMaterial3D.xml msgid "" "The number of vertical frames in the particle sprite sheet. Only enabled " "when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]." msgstr "" "粒子精灵表中的垂直帧数。仅在使用 [constant BILLBOARD_PARTICLES] 时启用。见 " "[member billboard_mode]。" #: doc/classes/BaseMaterial3D.xml msgid "The point size in pixels. See [member use_point_size]." msgstr "点大小,单位为像素。见 [member use_point_size]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Distance over which the fade effect takes place. The larger the distance the " "longer it takes for an object to fade." msgstr "渐变效果发生的距离。距离越大,物体褪色的时间越长。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the proximity fade effect is enabled. The proximity " "fade effect fades out each pixel based on its distance to another object." msgstr "" "如果为 [code]true[/code],则启用接近淡出效果。邻近淡出效果会根据每个像素与另" "一个对象的距离淡出。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the refraction effect is enabled. Distorts " "transparency based on light from behind the object.\n" "[b]Note:[/b] Refraction is implemented using the screen texture. Only opaque " "materials will appear in the refraction, since transparent materials do not " "appear in the screen texture." msgstr "" "如果为 [code]true[/code],则启用折射效果,会根据后方物体的光照产生扭曲的透明" "效果。\n" "[b]注意:[/b]折射是通过屏幕纹理实现的,折射中只会出现非透明材质,因为透明材质" "不会在屏幕纹理中出现。" #: doc/classes/BaseMaterial3D.xml msgid "The strength of the refraction effect." msgstr "折射效果的强度。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture that controls the strength of the refraction per-pixel. Multiplied " "by [member refraction_scale]." msgstr "控制每个像素折射强度的纹理。会与 [member refraction_scale] 相乘。" #: doc/classes/BaseMaterial3D.xml msgid "" "Specifies the channel of the [member refraction_texture] in which the " "refraction information is stored. This is useful when you store the " "information for multiple effects in a single texture. For example if you " "stored refraction in the red channel, roughness in the blue, and ambient " "occlusion in the green you could reduce the number of textures you use." msgstr "" "指定存储折射信息的 [member refraction_texture] 的通道。当将多个效果的信息存储" "在单个纹理中时,这很有用。例如,如果在红色通道中存储折射,在蓝色通道中存储粗" "糙度,在绿色通道中存储环境遮挡,则可以减少使用的纹理数量。" #: doc/classes/BaseMaterial3D.xml msgid "Sets the strength of the rim lighting effect." msgstr "设置边缘照明效果的强度。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], rim effect is enabled. Rim lighting increases the " "brightness at glancing angles on an object.\n" "[b]Note:[/b] Rim lighting is not visible if the material's [member " "shading_mode] is [constant SHADING_MODE_UNSHADED]." msgstr "" "如果为 [code]true[/code],则启用边缘效果。边缘照明会增加物体上掠射角度的亮" "度。\n" "[b]注意:[/b]如果材质的 [member shading_mode] 为 [constant " "SHADING_MODE_UNSHADED],则边缘照明不可见。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture used to set the strength of the rim lighting effect per-pixel. " "Multiplied by [member rim]." msgstr "纹理用于设置每个像素的边缘光照效果的强度。会与 [member rim] 相乘。" #: doc/classes/BaseMaterial3D.xml msgid "" "The amount of to blend light and albedo color when rendering rim effect. If " "[code]0[/code] the light color is used, while [code]1[/code] means albedo " "color is used. An intermediate value generally works best." msgstr "" "渲染边缘效果时,混合光照色和反射色的数量。如果 [code]0[/code] 表示使用光色," "[code]1[/code] 表示使用反照色。一般来说,中间值的效果最好。" #: doc/classes/BaseMaterial3D.xml msgid "" "Surface reflection. A value of [code]0[/code] represents a perfect mirror " "while a value of [code]1[/code] completely blurs the reflection. See also " "[member metallic]." msgstr "" "表面反射。[code]0[/code] 值表示一面完美的镜像,而 [code]1[/code] 值则完全模糊" "了反射。另见 [member metallic]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture used to control the roughness per-pixel. Multiplied by [member " "roughness]." msgstr "用于控制每个像素粗糙度的纹理。会与 [member roughness] 相乘。" #: doc/classes/BaseMaterial3D.xml msgid "" "Specifies the channel of the [member roughness_texture] in which the " "roughness information is stored. This is useful when you store the " "information for multiple effects in a single texture. For example if you " "stored metallic in the red channel, roughness in the blue, and ambient " "occlusion in the green you could reduce the number of textures you use." msgstr "" "指定存储粗糙度信息的[member roughness_texture]的通道。当将多个效果的信息存储" "在单个纹理中时,这很有用。例如,如果在红色通道中存储金属度,在蓝色通道中存储" "粗糙度,在绿色通道中存储环境遮挡,则可以减少使用的纹理数量。" #: doc/classes/BaseMaterial3D.xml msgid "" "Sets whether the shading takes place, per-pixel, per-vertex or unshaded. Per-" "vertex lighting is faster, making it the best choice for mobile " "applications, however it looks considerably worse than per-pixel. Unshaded " "rendering is the fastest, but disables all interactions with lights." msgstr "" "设置是否发生着色,逐像素、逐顶点或无阴影。逐顶点时照明速度更快,使其成为移动" "应用程序的最佳选择,但它看起来比逐像素时差很多。无阴影渲染是最快的,但会禁用" "与灯光的所有交互。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], enables the \"shadow to opacity\" render mode where " "lighting modifies the alpha so shadowed areas are opaque and non-shadowed " "areas are transparent. Useful for overlaying shadows onto a camera feed in " "AR." msgstr "" "如果为 [code]true[/code],启用“阴影到不透明度”的渲染模式,在该模式下,光照会" "修改 Alpha,使阴影区域不透明,非阴影区域透明。对于在 AR 中把阴影叠加到相机画" "面上很有用。" #: doc/classes/BaseMaterial3D.xml msgid "" "The method for rendering the specular blob.\n" "[b]Note:[/b] [member specular_mode] only applies to the specular blob. It " "does not affect specular reflections from the sky, screen-space reflections, " "[VoxelGI], SDFGI or [ReflectionProbe]s. To disable reflections from these " "sources as well, set [member metallic_specular] to [code]0.0[/code] instead." msgstr "" "渲染镜面反射斑点的方法。\n" "[b]注意:[/b][member specular_mode] 仅适用于镜面反射斑点。它不影响来自天空的" "镜面反射、屏幕空间反射、[VoxelGI]、SDFGI 或 [ReflectionProbe]。要同时禁用来自" "这些源的反射,请将 [member metallic_specular] 设置为 [code]0.0[/code]。" #: doc/classes/BaseMaterial3D.xml msgid "The primary color of the stencil effect." msgstr "模板效果的主颜色。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "The comparison operator to use for stencil masking operations." msgstr "模板遮罩运算所使用的比较运算符。见 [enum StencilCompare]。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "The flags dictating how the stencil operation behaves." msgstr "控制模板运算行为的标志。见 [enum StencilFlags]。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "The stencil effect mode." msgstr "模板效果模式。见 [enum StencilMode]。" #: doc/classes/BaseMaterial3D.xml msgid "The outline thickness for [constant STENCIL_MODE_OUTLINE]." msgstr "[constant STENCIL_MODE_OUTLINE] 的轮廓粗细。" #: doc/classes/BaseMaterial3D.xml msgid "The stencil reference value (0-255). Typically a power of 2." msgstr "模板参考值(0-255)。通常是 2 的幂。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], subsurface scattering is enabled. Emulates light that " "penetrates an object's surface, is scattered, and then emerges. Subsurface " "scattering quality is controlled by [member ProjectSettings.rendering/" "environment/subsurface_scattering/subsurface_scattering_quality].\n" "[b]Note:[/b] Subsurface scattering is not supported on viewports that have a " "transparent background (where [member Viewport.transparent_bg] is " "[code]true[/code])." msgstr "" "如果为 [code]true[/code],则启用次表面散射。模拟光线先穿透物体表面、被散射、" "然后出现。次表面散射质量由 [member ProjectSettings.rendering/environment/" "subsurface_scattering/subsurface_scattering_quality] 控制。\n" "[b]注意:[/b]透明背景的的视口不支持次表面散射([member " "Viewport.transparent_bg] 为 [code]true[/code])。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], subsurface scattering will use a special mode " "optimized for the color and density of human skin, such as boosting the " "intensity of the red channel in subsurface scattering." msgstr "" "如果为 [code]true[/code],则次表面散射将使用针对人类皮肤的颜色和密度进行优化" "的特殊模式,例如提升次表面散射中红色通道的强度。" #: doc/classes/BaseMaterial3D.xml msgid "" "The strength of the subsurface scattering effect. The depth of the effect is " "also controlled by [member ProjectSettings.rendering/environment/" "subsurface_scattering/subsurface_scattering_scale], which is set globally." msgstr "" "次表面散射效果的强度。效果的深度也受到全局的 [member " "ProjectSettings.rendering/environment/subsurface_scattering/" "subsurface_scattering_scale] 的控制。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture used to control the subsurface scattering strength. Stored in the " "red texture channel. Multiplied by [member subsurf_scatter_strength]." msgstr "" "用于控制次表面散射强度的纹理。存储在红色纹理通道中。会与 [member " "subsurf_scatter_strength] 相乘。" #: doc/classes/BaseMaterial3D.xml msgid "The intensity of the subsurface scattering transmittance effect." msgstr "次表面散射透射率效果的强度。" #: doc/classes/BaseMaterial3D.xml msgid "" "The color to multiply the subsurface scattering transmittance effect with. " "Ignored if [member subsurf_scatter_skin_mode] is [code]true[/code]." msgstr "" "与次表面散射透射率效果相乘的颜色。[member subsurf_scatter_skin_mode] 为 " "[code]true[/code] 时忽略。" #: doc/classes/BaseMaterial3D.xml msgid "The depth of the subsurface scattering transmittance effect." msgstr "次表面散射透射率效果的深度。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], enables subsurface scattering transmittance. Only " "effective if [member subsurf_scatter_enabled] is [code]true[/code]. See also " "[member backlight_enabled]." msgstr "" "如果为 [code]true[/code],则启用次表面散射透射率。仅当 [member " "subsurf_scatter_enabled] 为 [code]true[/code] 时有效。另请参见 [member " "backlight_enabled]。" #: doc/classes/BaseMaterial3D.xml msgid "" "The texture to use for multiplying the intensity of the subsurface " "scattering transmittance intensity. See also [member " "subsurf_scatter_texture]. Ignored if [member subsurf_scatter_skin_mode] is " "[code]true[/code]." msgstr "" "用于乘以次表面散射透射率强度的纹理。另请参见 [member " "subsurf_scatter_texture]。[member subsurf_scatter_skin_mode] 为 [code]true[/" "code] 时忽略。" #: doc/classes/BaseMaterial3D.xml msgid "" "Filter flags for the texture.\n" "[b]Note:[/b] [member heightmap_texture] is always sampled with linear " "filtering, even if nearest-neighbor filtering is selected here. This is to " "ensure the heightmap effect looks as intended. If you need sharper height " "transitions between pixels, resize the heightmap texture in an image editor " "with nearest-neighbor filtering." msgstr "" "纹理的过滤标志。\n" "[b]注意:[/b]即便这里选择了最近邻过滤,[member heightmap_texture] 也始终使用" "线性过滤采样。这是为了确保高度图效果看起来符合预期。如果需要像素之间的高度过" "渡更加清晰,请在图像编辑器中使用最近邻过滤调整高度图纹理的大小。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], the texture repeats when exceeding the texture's size. " "See [constant FLAG_USE_TEXTURE_REPEAT]." msgstr "" "如果为 [code]true[/code],则纹理会在超出纹理大小后重复。见 [constant " "FLAG_USE_TEXTURE_REPEAT]。" #: doc/classes/BaseMaterial3D.xml msgid "" "The material's transparency mode. Some transparency modes will disable " "shadow casting. Any transparency mode other than [constant " "TRANSPARENCY_DISABLED] has a greater performance impact compared to opaque " "rendering. See also [member blend_mode]." msgstr "" "该材质的透明模式。一些透明模式将禁用阴影投射。除了 [constant " "TRANSPARENCY_DISABLED] 以外的任何透明模式都会对性能产生较大的影响。另见 " "[member blend_mode]。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code] use [member fov_override] to override the [Camera3D]'s " "field of view angle." msgstr "" "如果为 [code]true[/code],则使用 [member fov_override] 来覆盖 [Camera3D] 的视" "场角。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], enables parts of the shader required for " "[GPUParticles3D] trails to function. This also requires using a mesh with " "appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling " "this feature outside of materials used in [GPUParticles3D] meshes will break " "material rendering." msgstr "" "如果为 [code]true[/code],则启用 [GPUParticles3D] 尾迹所需的部分着色器以发挥" "作用。这也需要使用具有适当蒙皮的网格,例如 [RibbonTrailMesh] 或 " "[TubeTrailMesh]。在 [GPUParticles3D] 网格中使用的材质之外启用该功能将破坏材质" "渲染。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], render point size can be changed.\n" "[b]Note:[/b] This is only effective for objects whose geometry is point-" "based rather than triangle-based. See also [member point_size]." msgstr "" "如果为 [code]true[/code],可以改变渲染点大小。\n" "[b]注意:[/b]这仅对几何形状基于点而非基于三角形的对象有效。另见 [member " "point_size]。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code] use [member z_clip_scale] to scale the object being " "rendered towards the camera to avoid clipping into things like walls." msgstr "" "如果为 [code]true[/code],则会使用 [member z_clip_scale] 将渲染的对象朝相机方" "向进行缩放,从而避免与墙壁等物体发生裁剪。" #: doc/classes/BaseMaterial3D.xml msgid "" "How much to offset the [code]UV[/code] coordinates. This amount will be " "added to [code]UV[/code] in the vertex function. This can be used to offset " "a texture. The Z component is used when [member uv1_triplanar] is enabled, " "but it is not used anywhere else." msgstr "" "[code]UV[/code] 坐标的偏移量。这个量将被添加到顶点函数中的 [code]UV[/code] " "中。可以用来偏移纹理。Z 分量在启用 [member uv1_triplanar] 时使用,在其他任何" "地方都不会被使用。" #: doc/classes/BaseMaterial3D.xml msgid "" "How much to scale the [code]UV[/code] coordinates. This is multiplied by " "[code]UV[/code] in the vertex function. The Z component is used when [member " "uv1_triplanar] is enabled, but it is not used anywhere else." msgstr "" "[code]UV[/code] 坐标的缩放值。将与顶点函数中的 [code]UV[/code] 相乘。Z 分量在" "启用 [member uv1_triplanar] 时使用,在其他任何地方都不会被使用。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], instead of using [code]UV[/code] textures will use a " "triplanar texture lookup to determine how to apply textures. Triplanar uses " "the orientation of the object's surface to blend between texture " "coordinates. It reads from the source texture 3 times, once for each axis " "and then blends between the results based on how closely the pixel aligns " "with each axis. This is often used for natural features to get a realistic " "blend of materials. Because triplanar texturing requires many more texture " "reads per-pixel it is much slower than normal UV texturing. Additionally, " "because it is blending the texture between the three axes, it is unsuitable " "when you are trying to achieve crisp texturing." msgstr "" "如果为 [code]true[/code],纹理将不使用 [code]UV[/code],而是使用三平面纹理查" "找来确定如何应用纹理。三平面纹理使用对象表面的方向来混合纹理坐标之间。它从源" "纹理中读取3次,每个轴一次,然后根据像素与每个轴的紧密程度在结果之间进行混合。" "这通常用于自然特征,以获得真实的材质混合。由于三平面纹理处理每一个像素需要更" "多的纹理读取,所以它比普通的UV纹理处理要慢得多。此外,由于它是在三个轴之间混" "合纹理,所以当你试图实现清晰的纹理时,它是不合适的。" #: doc/classes/BaseMaterial3D.xml msgid "" "A lower number blends the texture more softly while a higher number blends " "the texture more sharply.\n" "[b]Note:[/b] [member uv1_triplanar_sharpness] is clamped between [code]0.0[/" "code] and [code]150.0[/code] (inclusive) as values outside that range can " "look broken depending on the mesh." msgstr "" "数字越小使纹理混合得越柔和,数字越大使纹理混合得越锐利。\n" "[b]注意:[/b][member uv1_triplanar_sharpness] 被钳制在 [code]0.0[/code] 和 " "[code]150.0[/code](包括)之间,因为超出该范围的值可能看起来会破损,具体取决" "于网格。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], triplanar mapping for [code]UV[/code] is calculated in " "world space rather than object local space. See also [member uv1_triplanar]." msgstr "" "如果为 [code]true[/code],则 [code]UV[/code] 的三平面映射是在世界空间而不是对" "象局部空间中计算的。另见 [member uv1_triplanar]。" #: doc/classes/BaseMaterial3D.xml msgid "" "How much to offset the [code]UV2[/code] coordinates. This amount will be " "added to [code]UV2[/code] in the vertex function. This can be used to offset " "a texture. The Z component is used when [member uv2_triplanar] is enabled, " "but it is not used anywhere else." msgstr "" "[code]UV2[/code] 坐标的偏移量。在顶点函数中这个量将被加到 [code]UV2[/code] " "中。这可以用来偏移纹理。Z 分量仅在启用 [member uv2_triplanar] 时使用,在其他" "任何地方不会被使用。" #: doc/classes/BaseMaterial3D.xml msgid "" "How much to scale the [code]UV2[/code] coordinates. This is multiplied by " "[code]UV2[/code] in the vertex function. The Z component is used when " "[member uv2_triplanar] is enabled, but it is not used anywhere else." msgstr "" "[code]UV2[/code] 坐标的缩放比例。在顶点函数中该属性乘以 [code]UV2[/code]。Z " "分量仅在启用 [member uv2_triplanar] 时使用,在其他任何地方不会被使用。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], instead of using [code]UV2[/code] textures will use a " "triplanar texture lookup to determine how to apply textures. Triplanar uses " "the orientation of the object's surface to blend between texture " "coordinates. It reads from the source texture 3 times, once for each axis " "and then blends between the results based on how closely the pixel aligns " "with each axis. This is often used for natural features to get a realistic " "blend of materials. Because triplanar texturing requires many more texture " "reads per-pixel it is much slower than normal UV texturing. Additionally, " "because it is blending the texture between the three axes, it is unsuitable " "when you are trying to achieve crisp texturing." msgstr "" "如果为 [code]true[/code],纹理将不使用 [code]UV[/code],而是使用三平面纹理查" "找来确定如何应用纹理。三平面纹理使用对象表面的方向来混合纹理坐标之间。它从源" "纹理中读取 3 次,每个轴一次,然后根据像素与每个轴的紧密程度在结果之间进行混" "合。这通常用于自然特征,以获得真实的材质混合。由于三平面纹理处理每一个像素需" "要更多的纹理读取,所以它比普通的 UV 纹理处理要慢得多。此外,由于它是在三个轴" "之间混合纹理,所以当你试图实现清晰的纹理时,它是不合适的。" #: doc/classes/BaseMaterial3D.xml msgid "" "A lower number blends the texture more softly while a higher number blends " "the texture more sharply.\n" "[b]Note:[/b] [member uv2_triplanar_sharpness] is clamped between [code]0.0[/" "code] and [code]150.0[/code] (inclusive) as values outside that range can " "look broken depending on the mesh." msgstr "" "数字越小使纹理混合得越柔和,数字越大使纹理混合得越锐利。\n" "[b]注意:[/b][member uv2_triplanar_sharpness] 被钳制在 [code]0.0[/code] 和 " "[code]150.0[/code](包括)之间,因为超出该范围的值可能看起来会破损,具体取决" "于网格。" #: doc/classes/BaseMaterial3D.xml msgid "" "If [code]true[/code], triplanar mapping for [code]UV2[/code] is calculated " "in world space rather than object local space. See also [member " "uv2_triplanar]." msgstr "" "如果为 [code]true[/code],则 [code]UV2[/code] 的三平面映射是在世界空间而不是" "对象局部空间中计算的。另见 [member uv2_triplanar]。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "" "If [code]true[/code], vertex colors are considered to be stored in nonlinear " "sRGB encoding and are converted to linear encoding during rendering. If " "[code]false[/code], vertex colors are considered to be stored in linear " "encoding and are rendered as-is. See also [member " "albedo_texture_force_srgb].\n" "[b]Note:[/b] Only effective when using the Forward+ and Mobile rendering " "methods, not Compatibility." msgstr "" "如果为 [code]true[/code],则顶点颜色被认为使用 sRGB 颜色空间存储,并在渲染期" "间被转换为线性颜色空间。如果为 [code]false[/code],则顶点颜色被认为使用线性颜" "色空间存储并按原样渲染。另见 [member albedo_texture_force_srgb]。\n" "[b]注意:[/b]仅在使用 Forward+ 和移动渲染方式时有效,不支持兼容模式。" #: doc/classes/BaseMaterial3D.xml msgid "If [code]true[/code], the vertex color is used as albedo color." msgstr "如果为 [code]true[/code],则使用顶点颜色作为反射率颜色。" #: doc/classes/BaseMaterial3D.xml msgid "" "Scales the object being rendered towards the camera to avoid clipping into " "things like walls. This is intended to be used for objects that are fixed " "with respect to the camera like player arms, tools, etc. Lighting and " "shadows will continue to work correctly when this setting is adjusted, but " "screen-space effects like SSAO and SSR may break with lower scales. " "Therefore, try to keep this setting as close to [code]1.0[/code] as possible." msgstr "" "将渲染的对象朝相机方向进行缩放,从而避免与墙壁等物体发生裁剪。主要用于相对于" "相机固定的对象,如玩家的手臂、工具等。调整该设置时,光照和阴影仍会正常工作," "但 SSAO 和 SSR 等屏幕空间效果在较低的缩放值下可能会出现问题。因此,请尽量将其" "保持在尽可能接近 [code]1.0[/code] 的位置。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel color." msgstr "指定每个像素颜色的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel metallic value." msgstr "指定每个像素金属度值的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel roughness value." msgstr "指定每个像素粗糙度值的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel emission color." msgstr "指定每个像素自发光颜色的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel normal vector." msgstr "指定每个像素法向量的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel bent normal vector." msgstr "指定每个像素弯曲法向量的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel rim value." msgstr "指定每个像素边缘值的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel clearcoat value." msgstr "指定每个像素清漆值的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "" "Texture specifying per-pixel flowmap direction for use with [member " "anisotropy]." msgstr "指定每个像素流图方向的纹理,用于 [member anisotropy]。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel ambient occlusion value." msgstr "指定每个像素环境光遮蔽的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel height." msgstr "指定每个像素高度的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel subsurface scattering." msgstr "指定每个像素次表面散射的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel transmittance for subsurface scattering." msgstr "指定每个像素用于次表面散射的透射率的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel backlight color." msgstr "指定每个像素背光颜色的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel refraction strength." msgstr "指定每个像素折射强度的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel detail mask blending value." msgstr "指定每个像素细节蒙版混合值的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel detail color." msgstr "指定每个像素细节颜色的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture specifying per-pixel detail normal." msgstr "指定每个像素细节法线的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Texture holding ambient occlusion, roughness, and metallic." msgstr "保存环境光遮蔽、粗糙度和金属度信息的纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Represents the size of the [enum TextureParam] enum." msgstr "代表 [enum TextureParam] 枚举的大小。" #: doc/classes/BaseMaterial3D.xml doc/classes/CanvasItem.xml #: doc/classes/RenderingServer.xml doc/classes/Viewport.xml #: doc/classes/VisualShaderNodeTextureParameter.xml msgid "" "The texture filter reads from the nearest pixel only. This makes the texture " "look pixelated from up close, and grainy from a distance (due to mipmaps not " "being sampled)." msgstr "" "纹理过滤仅从最近的像素读取。这使得纹理从近距离看是像素化的,从远处看是颗粒状" "的(由于多级渐远纹理没有被采样)。" #: doc/classes/BaseMaterial3D.xml doc/classes/CanvasItem.xml #: doc/classes/RenderingServer.xml doc/classes/Viewport.xml #: doc/classes/VisualShaderNodeTextureParameter.xml msgid "" "The texture filter blends between the nearest 4 pixels. This makes the " "texture look smooth from up close, and grainy from a distance (due to " "mipmaps not being sampled)." msgstr "" "纹理过滤在最近的 4 个像素之间进行混合。这使得纹理从近处看起来很平滑,从远处看" "起来却有颗粒感(由于多级渐远纹理没有被采样)。" #: doc/classes/BaseMaterial3D.xml msgid "" "The texture filter reads from the nearest pixel and blends between the " "nearest 2 mipmaps (or uses the nearest mipmap if [member " "ProjectSettings.rendering/textures/default_filters/" "use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture " "look pixelated from up close, and smooth from a distance." msgstr "" "纹理过滤从最近的像素读取并在最近的 2 个多级渐远纹理之间进行混合(或者如果 " "[member ProjectSettings.rendering/textures/default_filters/" "use_nearest_mipmap_filter] 为 [code]true[/code],则使用最近的多级渐远纹理)。" "这使得纹理从近处看起来像素化,从远处看起来平滑。" #: doc/classes/BaseMaterial3D.xml msgid "" "The texture filter blends between the nearest 4 pixels and between the " "nearest 2 mipmaps (or uses the nearest mipmap if [member " "ProjectSettings.rendering/textures/default_filters/" "use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture " "look smooth from up close, and smooth from a distance." msgstr "" "纹理过滤在最近的 4 个像素和最近的 2 个多级渐远纹理之间进行混合(或者如果 " "[member ProjectSettings.rendering/textures/default_filters/" "use_nearest_mipmap_filter] 为 [code]true[/code],则使用最近的多级渐远纹理)。" "这使得纹理从近处看起来平滑,从远处看起来也平滑。" #: doc/classes/BaseMaterial3D.xml msgid "" "The texture filter reads from the nearest pixel and blends between 2 mipmaps " "(or uses the nearest mipmap if [member ProjectSettings.rendering/textures/" "default_filters/use_nearest_mipmap_filter] is [code]true[/code]) based on " "the angle between the surface and the camera view. This makes the texture " "look pixelated from up close, and smooth from a distance. Anisotropic " "filtering improves texture quality on surfaces that are almost in line with " "the camera, but is slightly slower. The anisotropic filtering level can be " "changed by adjusting [member ProjectSettings.rendering/textures/" "default_filters/anisotropic_filtering_level]." msgstr "" "纹理过滤从最近的像素读取并根据表面和相机视图之间的角度在 2 个多级渐远纹理之间" "进行混合(或者如果 [member ProjectSettings.rendering/textures/" "default_filters/use_nearest_mipmap_filter] 为 [code]true[/code],则使用最近的" "多级渐远纹理)。这使得纹理从近处看起来像素化,从远处看起来平滑。各向异性过滤" "提高了几乎与相机位于一条线上的表面上的纹理质量,但速度稍慢。各向异性过滤级别" "可以通过调整 [member ProjectSettings.rendering/textures/default_filters/" "anisotropic_filtering_level] 来改变。" #: doc/classes/BaseMaterial3D.xml msgid "" "The texture filter blends between the nearest 4 pixels and blends between 2 " "mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/" "textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) " "based on the angle between the surface and the camera view. This makes the " "texture look smooth from up close, and smooth from a distance. Anisotropic " "filtering improves texture quality on surfaces that are almost in line with " "the camera, but is slightly slower. The anisotropic filtering level can be " "changed by adjusting [member ProjectSettings.rendering/textures/" "default_filters/anisotropic_filtering_level]." msgstr "" "纹理过滤在最近的 4 个像素之间进行混合,并基于表面与相机视图之间的角度在 2 个" "多级渐远纹理之间进行混合 (或者如果 [member ProjectSettings.rendering/" "textures/default_filters/use_nearest_mipmap_filter] 为 [code]true[/code],则" "使用最近的多级渐远纹理)。这使得纹理从近处看起来平滑,从远处看起来也平滑。各" "向异性过滤提高了几乎与相机位于一条线的表面上的纹理质量,但速度稍慢。各向异性" "过滤级别可以通过调整 [member ProjectSettings.rendering/textures/" "default_filters/anisotropic_filtering_level] 来改变。" #: doc/classes/BaseMaterial3D.xml doc/classes/CanvasItem.xml #: doc/classes/VisualShaderNodeTextureParameter.xml msgid "Represents the size of the [enum TextureFilter] enum." msgstr "代表 [enum TextureFilter] 枚举的大小。" #: doc/classes/BaseMaterial3D.xml msgid "Use [code]UV[/code] with the detail texture." msgstr "使用 [code]UV[/code] 与细节纹理。" #: doc/classes/BaseMaterial3D.xml msgid "Use [code]UV2[/code] with the detail texture." msgstr "使用 [code]UV2[/code] 与细节纹理。" #: doc/classes/BaseMaterial3D.xml msgid "The material will not use transparency. This is the fastest to render." msgstr "该材质将不使用透明度。渲染最快。" #: doc/classes/BaseMaterial3D.xml msgid "" "The material will use the texture's alpha values for transparency. This is " "the slowest to render, and disables shadow casting." msgstr "该材质将使用纹理的 Alpha 值作为透明度。渲染最慢,且会禁用阴影投射。" #: doc/classes/BaseMaterial3D.xml msgid "" "The material will cut off all values below a threshold, the rest will remain " "opaque. The opaque portions will be rendered in the depth prepass. This is " "faster to render than alpha blending, but slower than opaque rendering. This " "also supports casting shadows." msgstr "" "该材质会将所有低于阈值的值截断,其余部分将保持不透明。不透明部分将在深度预通" "道中渲染。这比 Alpha 混合的渲染速度更快,但比不透明渲染慢。支持投射阴影。" #: doc/classes/BaseMaterial3D.xml msgid "" "The material will cut off all values below a spatially-deterministic " "threshold, the rest will remain opaque. This is faster to render than alpha " "blending, but slower than opaque rendering. This also supports casting " "shadows. Alpha hashing is suited for hair rendering." msgstr "" "该材质会将所有低于空间确定性阈值的值截断,其余部分将保持不透明。这比 Alpha 混" "合的渲染速度更快,但比不透明渲染慢。支持投射阴影。Alpha 哈希适合毛发渲染。" #: doc/classes/BaseMaterial3D.xml msgid "" "The material will use the texture's alpha value for transparency, but will " "discard fragments with an alpha of less than 0.99 during the depth prepass " "and fragments with an alpha less than 0.1 during the shadow pass. This also " "supports casting shadows." msgstr "" "该材质将使用纹理的 Alpha 值作为透明度,但会在深度预通道阶段丢弃 Alpha 小于 " "0.99 的片段,并在阴影通道期间丢弃 Alpha 小于 0.1 的片段。支持投射阴影。" #: doc/classes/BaseMaterial3D.xml msgid "Represents the size of the [enum Transparency] enum." msgstr "代表 [enum Transparency] 枚举的大小。" #: doc/classes/BaseMaterial3D.xml msgid "" "The object will not receive shadows. This is the fastest to render, but it " "disables all interactions with lights." msgstr "该对象不会接受阴影。渲染速度最快,但会禁用与灯光的所有交互。" #: doc/classes/BaseMaterial3D.xml msgid "" "The object will be shaded per pixel. Useful for realistic shading effects." msgstr "对象将逐像素进行着色。对于逼真的阴影效果很有用。" #: doc/classes/BaseMaterial3D.xml msgid "" "The object will be shaded per vertex. Useful when you want cheaper shaders " "and do not care about visual quality." msgstr "" "对象将逐顶点进行着色。适用于想要更便宜的着色器并且不关心视觉质量的场合。" #: doc/classes/BaseMaterial3D.xml msgid "Represents the size of the [enum ShadingMode] enum." msgstr "代表 [enum ShadingMode] 枚举的大小。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member emission_enabled]." msgstr "用于设置 [member emission_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member normal_enabled]." msgstr "用于设置 [member normal_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member rim_enabled]." msgstr "用于设置 [member rim_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member clearcoat_enabled]." msgstr "用于设置 [member clearcoat_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member anisotropy_enabled]." msgstr "用于设置 [member anisotropy_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member ao_enabled]." msgstr "用于设置 [member ao_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member heightmap_enabled]." msgstr "用于设置 [member heightmap_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member subsurf_scatter_enabled]." msgstr "用于设置 [member subsurf_scatter_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member subsurf_scatter_transmittance_enabled]." msgstr "用于设置 [member subsurf_scatter_transmittance_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member backlight_enabled]." msgstr "用于设置 [member backlight_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member refraction_enabled]." msgstr "用于设置 [member refraction_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member detail_enabled]." msgstr "用于设置 [member detail_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml msgid "Constant for setting [member bent_normal_enabled]." msgstr "用于设置 [member bent_normal_enabled] 的常量。" #: doc/classes/BaseMaterial3D.xml doc/classes/EditorFeatureProfile.xml msgid "Represents the size of the [enum Feature] enum." msgstr "代表 [enum Feature] 枚举的大小。" #: doc/classes/BaseMaterial3D.xml msgid "" "Default blend mode. The color of the object is blended over the background " "based on the object's alpha value." msgstr "默认的混合模式。根据对象的 Alpha 值,将对象的颜色混合到背景上。" #: doc/classes/BaseMaterial3D.xml msgid "The color of the object is added to the background." msgstr "对象的颜色被加到背景中。" #: doc/classes/BaseMaterial3D.xml msgid "The color of the object is subtracted from the background." msgstr "从背景中减去对象的颜色。" #: doc/classes/BaseMaterial3D.xml msgid "The color of the object is multiplied by the background." msgstr "对象的颜色与背景相乘。" #: doc/classes/BaseMaterial3D.xml msgid "" "The color of the object is added to the background and the alpha channel is " "used to mask out the background. This is effectively a hybrid of the blend " "mix and add modes, useful for effects like fire where you want the flame to " "add but the smoke to mix. By default, this works with unshaded materials " "using premultiplied textures. For shaded materials, use the " "[code]PREMUL_ALPHA_FACTOR[/code] built-in so that lighting can be modulated " "as well." msgstr "" "对象的颜色被添加到背景中,而 alpha 通道用于遮盖背景。这实际上是混合模式和添加" "模式的混合,对于类似希望添加火焰但混合烟雾的火焰效果很有用。默认情况下,这适" "用于使用预乘纹理的未着色材质。对于着色材质,请使用内置的 " "[code]PREMUL_ALPHA_FACTOR[/code],以便也可以调节照明。" #: doc/classes/BaseMaterial3D.xml msgid "Disables Alpha AntiAliasing for the material." msgstr "禁用该材质的 Alpha 抗锯齿。" #: doc/classes/BaseMaterial3D.xml msgid "" "Enables AlphaToCoverage. Alpha values in the material are passed to the " "AntiAliasing sample mask." msgstr "" "启用 AlphaToCoverage。材质中的 Alpha 值会被传递到 AntiAliasing 采样遮罩。" #: doc/classes/BaseMaterial3D.xml msgid "" "Enables AlphaToCoverage and forces all non-zero alpha values to [code]1[/" "code]. Alpha values in the material are passed to the AntiAliasing sample " "mask." msgstr "" "启用 AlphaToCoverage 并将所有非零的 alpha 值强制设为 [code]1[/code]。材质中" "的 Alpha 值会被传递到 AntiAliasing 采样遮罩。" #: doc/classes/BaseMaterial3D.xml msgid "" "Default depth draw mode. Depth is drawn only for opaque objects during the " "opaque prepass (if any) and during the opaque pass." msgstr "" "默认的深度绘制模式。在不透明预通道(如果有)和不透明通道期间,仅为不透明对象" "绘制深度。" #: doc/classes/BaseMaterial3D.xml msgid "" "Objects will write to depth during the opaque and the transparent passes. " "Transparent objects that are close to the camera may obscure other " "transparent objects behind them.\n" "[b]Note:[/b] This does not influence whether transparent objects are " "included in the depth prepass or not. For that, see [enum Transparency]." msgstr "" "在不透明和透明通道期间,对象将写入深度。靠近相机的透明物体可能会遮挡它们后面" "的其他透明物体。\n" "[b]注意:[/b]这不影响透明对象是否包含在深度预通道中。为此,请参阅 [enum " "Transparency]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Objects will not write their depth to the depth buffer, even during the " "depth prepass (if enabled)." msgstr "" "对象不会将其深度写入深度缓冲区,即使在深度预通道期间(如果启用)也是如此。" #: doc/classes/BaseMaterial3D.xml msgid "Depth test will discard the pixel if it is behind other pixels." msgstr "深度测试会丢弃位于其他像素后面的像素。" #: doc/classes/BaseMaterial3D.xml msgid "" "Depth test will discard the pixel if it is in front of other pixels. Useful " "for stencil effects." msgstr "深度测试会丢弃位于其他像素前面的像素。适用于模板效果。" #: doc/classes/BaseMaterial3D.xml msgid "" "Default cull mode. The back of the object is culled when not visible. Back " "face triangles will be culled when facing the camera. This results in only " "the front side of triangles being drawn. For closed-surface meshes, this " "means that only the exterior of the mesh will be visible." msgstr "" "默认剔除模式。对象的背面在不可见时被剔除。面对相机时,背面三角形将被剔除。这" "导致仅绘制三角形的正面。对于封闭表面网格,这意味着只有网格的外部可见。" #: doc/classes/BaseMaterial3D.xml msgid "" "Front face triangles will be culled when facing the camera. This results in " "only the back side of triangles being drawn. For closed-surface meshes, this " "means that the interior of the mesh will be drawn instead of the exterior." msgstr "" "面对相机时,正面三角形将被剔除。这导致仅绘制三角形的背面。对于封闭表面网格," "这意味着将绘制网格的内部而不是外部。" #: doc/classes/BaseMaterial3D.xml msgid "" "No face culling is performed; both the front face and back face will be " "visible." msgstr "不执行面剔除;正反面均可见。" #: doc/classes/BaseMaterial3D.xml msgid "" "Disables the depth test, so this object is drawn on top of all others drawn " "before it. This puts the object in the transparent draw pass where it is " "sorted based on distance to camera. Objects drawn after it in the draw order " "may cover it. This also disables writing to depth." msgstr "" "禁用深度测试,所以这个对象将被绘制到在它之前绘制的所有其他对象之上。这会将对" "象置于透明绘制通道中,并根据到相机的距离对其进行排序。按照绘制顺序在它之后绘" "制的对象可能会覆盖它。会禁用深度写入。" #: doc/classes/BaseMaterial3D.xml msgid "Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh." msgstr "将 [code]ALBEDO[/code] 设置为网格中指定的每顶点颜色。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "" "Vertex colors are considered to be stored in nonlinear sRGB encoding and are " "converted to linear encoding during rendering. See also [member " "vertex_color_is_srgb].\n" "[b]Note:[/b] Only effective when using the Forward+ and Mobile rendering " "methods." msgstr "" "顶点颜色被认为使用 sRGB 颜色空间存储,并在渲染期间转换为线性颜色空间。另见 " "[member vertex_color_is_srgb]。\n" "[b]注意:[/b]仅在使用 Forward+ 和移动渲染方式时有效。" #: doc/classes/BaseMaterial3D.xml msgid "" "Uses point size to alter the size of primitive points. Also changes the " "albedo texture lookup to use [code]POINT_COORD[/code] instead of [code]UV[/" "code]." msgstr "" "使用点大小来改变图元点的大小。同时改变反射率纹理查找,使用 " "[code]POINT_COORD[/code] 而不是 [code]UV[/code]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Object is scaled by depth so that it always appears the same size on screen." msgstr "按深度缩放对象,使其在屏幕上显示的大小始终相同。" #: doc/classes/BaseMaterial3D.xml msgid "" "Shader will keep the scale set for the mesh. Otherwise the scale is lost " "when billboarding. Only applies when [member billboard_mode] is [constant " "BILLBOARD_ENABLED]." msgstr "" "着色器将保持网格的缩放设置。否则,在用作公告板时会丢失缩放。仅在 [member " "billboard_mode] 为 [constant BILLBOARD_ENABLED] 时适用。" #: doc/classes/BaseMaterial3D.xml msgid "" "Use triplanar texture lookup for all texture lookups that would normally use " "[code]UV[/code]." msgstr "对所有通常会使用 [code]UV[/code] 的纹理查找使用三平面纹理查找。" #: doc/classes/BaseMaterial3D.xml msgid "" "Use triplanar texture lookup for all texture lookups that would normally use " "[code]UV2[/code]." msgstr "对所有通常会使用 [code]UV2[/code] 的纹理查找使用三平面纹理查找。" #: doc/classes/BaseMaterial3D.xml msgid "" "Use [code]UV2[/code] coordinates to look up from the [member ao_texture]." msgstr "使用 [code]UV2[/code] 坐标从 [member ao_texture] 中查找。" #: doc/classes/BaseMaterial3D.xml msgid "" "Use [code]UV2[/code] coordinates to look up from the [member " "emission_texture]." msgstr "使用 [code]UV2[/code] 坐标从 [member emission_texture] 中查找。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "" "Forces the shader to convert albedo from nonlinear sRGB encoding to linear " "encoding. See also [member albedo_texture_force_srgb]." msgstr "" "强制着色器将反照率从 sRGB 空间转换为线性空间。另见 [member " "albedo_texture_force_srgb]。" #: doc/classes/BaseMaterial3D.xml msgid "Disables receiving shadows from other objects." msgstr "禁用从其他对象接收阴影。" #: doc/classes/BaseMaterial3D.xml msgid "Disables receiving ambient light." msgstr "禁用接收环境光。" #: doc/classes/BaseMaterial3D.xml msgid "Enables the shadow to opacity feature." msgstr "启用阴影到不透明度功能。" #: doc/classes/BaseMaterial3D.xml doc/classes/RenderingServer.xml #: doc/classes/Viewport.xml msgid "" "Enables the texture to repeat when UV coordinates are outside the 0-1 range. " "If using one of the linear filtering modes, this can result in artifacts at " "the edges of a texture when the sampler filters across the edges of the " "texture." msgstr "" "当 UV 坐标超出 0-1 范围时,使纹理能够重复。如果使用其中一种线性过滤模式,则当" "采样器过滤纹理边缘时,这可能会导致纹理边缘出现伪影。" #: doc/classes/BaseMaterial3D.xml msgid "" "Invert values read from a depth texture to convert them to height values " "(heightmap)." msgstr "反转从深度纹理读取的值以将它们转换为高度值(高度图)。" #: doc/classes/BaseMaterial3D.xml msgid "" "Enables the skin mode for subsurface scattering which is used to improve the " "look of subsurface scattering when used for human skin." msgstr "" "启用用于次表面散射的皮肤模式,该模式用于改善被用于人体皮肤时的次表面散射的外" "观。" #: doc/classes/BaseMaterial3D.xml msgid "" "Enables parts of the shader required for [GPUParticles3D] trails to " "function. This also requires using a mesh with appropriate skinning, such as " "[RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of " "materials used in [GPUParticles3D] meshes will break material rendering." msgstr "" "启用使 [GPUParticles3D] 尾迹生效所需的部分着色器。这也需要使用具有适当蒙皮的" "网格,例如 [RibbonTrailMesh] 或 [TubeTrailMesh]。在 [GPUParticles3D] 网格中使" "用的材质之外启用该功能将破坏材质的渲染。" #: doc/classes/BaseMaterial3D.xml msgid "Enables multichannel signed distance field rendering shader." msgstr "启用多通道有符号距离场渲染着色器。" #: doc/classes/BaseMaterial3D.xml msgid "Disables receiving depth-based or volumetric fog." msgstr "禁用接收基于深度或体积雾。" #: doc/classes/BaseMaterial3D.xml msgid "Disables specular occlusion." msgstr "禁用镜面反射遮蔽。" #: doc/classes/BaseMaterial3D.xml msgid "Enables using [member z_clip_scale]." msgstr "启用 [member z_clip_scale]。" #: doc/classes/BaseMaterial3D.xml msgid "Enables using [member fov_override]." msgstr "启用 [member fov_override]。" #: doc/classes/BaseMaterial3D.xml msgid "Represents the size of the [enum Flags] enum." msgstr "代表 [enum Flags] 枚举的大小。" #: doc/classes/BaseMaterial3D.xml msgid "Default diffuse scattering algorithm." msgstr "默认的漫反射散射算法。" #: doc/classes/BaseMaterial3D.xml msgid "Diffuse scattering ignores roughness." msgstr "漫散射忽略了粗糙度。" #: doc/classes/BaseMaterial3D.xml msgid "Extends Lambert to cover more than 90 degrees when roughness increases." msgstr "当粗糙度增加时,将 Lambert 延伸到 90 度以上。" #: doc/classes/BaseMaterial3D.xml msgid "Uses a hard cut for lighting, with smoothing affected by roughness." msgstr "使用硬切口进行照明,平滑度受粗糙度影响。" #: doc/classes/BaseMaterial3D.xml msgid "" "Default specular blob.\n" "[b]Note:[/b] Forward+ uses multiscattering for more accurate reflections, " "although the impact of multiscattering is more noticeable on rough metallic " "surfaces than on smooth, non-metallic surfaces.\n" "[b]Note:[/b] Mobile and Compatibility don't perform multiscattering for " "performance reasons. Instead, they perform single scattering, which means " "rough metallic surfaces may look slightly darker than intended." msgstr "" "默认镜面反射斑点。\n" "[b]注意:[/b]Forward+ 使用多重散射实现更精确的反射,不过多重散射带来的影响在" "粗糙金属表面上比在平滑非金属表面上更明显。\n" "[b]注意:[/b]Mobile 和 Compatibility 由于性能原因执行的不是多重散射而是单散" "射,因此粗糙金属表面可能比预期的要暗一些。" #: doc/classes/BaseMaterial3D.xml msgid "Toon blob which changes size based on roughness." msgstr "基于粗糙度更改大小的 Toon 斑点。" #: doc/classes/BaseMaterial3D.xml msgid "" "No specular blob. This is slightly faster to render than other specular " "modes." msgstr "没有镜面反射斑点。这比其他镜面反射模式渲染速度稍快。" #: doc/classes/BaseMaterial3D.xml msgid "Billboard mode is disabled." msgstr "公告板模式已禁用。" #: doc/classes/BaseMaterial3D.xml msgid "The object's Z axis will always face the camera." msgstr "对象的 Z 轴将始终面向相机。" #: doc/classes/BaseMaterial3D.xml msgid "The object's X axis will always face the camera." msgstr "对象的 X 轴将始终面向相机。" #: doc/classes/BaseMaterial3D.xml msgid "" "Used for particle systems when assigned to [GPUParticles3D] and " "[CPUParticles3D] nodes (flipbook animation). Enables [code]particles_anim_*[/" "code] properties.\n" "The [member ParticleProcessMaterial.anim_speed_min] or [member " "CPUParticles3D.anim_speed_min] should also be set to a value bigger than " "zero for the animation to play." msgstr "" "分配给 [GPUParticles3D] 和 [CPUParticles3D] 节点时被用于粒子系统(翻页动" "画)。启用 [code]particles_anim_*[/code] 属性。\n" "[member ParticleProcessMaterial.anim_speed_min] 或 [member " "CPUParticles3D.anim_speed_min] 也应设置为大于零的值,以便播放动画。" #: doc/classes/BaseMaterial3D.xml msgid "Used to read from the red channel of a texture." msgstr "用来读取纹理的红色通道。" #: doc/classes/BaseMaterial3D.xml msgid "Used to read from the green channel of a texture." msgstr "用来读取纹理的绿色通道。" #: doc/classes/BaseMaterial3D.xml msgid "Used to read from the blue channel of a texture." msgstr "用来读取纹理的蓝色通道。" #: doc/classes/BaseMaterial3D.xml msgid "Used to read from the alpha channel of a texture." msgstr "用来读取纹理的 Alpha 通道。" #: doc/classes/BaseMaterial3D.xml msgid "" "Used to read from the linear (non-perceptual) average of the red, green and " "blue channels of a texture." msgstr "用于读取纹理的红色、绿色和蓝色通道的线性(非感知)平均值。" #: doc/classes/BaseMaterial3D.xml msgid "Adds the emission color to the color from the emission texture." msgstr "将自发光颜色加到自发光纹理的颜色上。" #: doc/classes/BaseMaterial3D.xml msgid "Multiplies the emission color by the color from the emission texture." msgstr "将自发光颜色乘以自发光纹理的颜色。" #: doc/classes/BaseMaterial3D.xml msgid "Do not use distance fade." msgstr "不使用距离淡化。" #: doc/classes/BaseMaterial3D.xml msgid "" "Smoothly fades the object out based on each pixel's distance from the camera " "using the alpha channel." msgstr "根据每个像素与相机的距离,使用 Alpha 通道平滑地淡出对象。" #: doc/classes/BaseMaterial3D.xml msgid "" "Smoothly fades the object out based on each pixel's distance from the camera " "using a dithering approach. Dithering discards pixels based on a set pattern " "to smoothly fade without enabling transparency. On certain hardware, this " "can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA]." msgstr "" "根据每个像素与相机的距离,使用一种抖动方法平滑地淡出对象。抖动会根据设定的模" "式丢弃像素,在不启用透明的情况下平滑淡化。在某些硬件上,该选项可能比 " "[constant DISTANCE_FADE_PIXEL_ALPHA] 更快。" #: doc/classes/BaseMaterial3D.xml msgid "" "Smoothly fades the object out based on the object's distance from the camera " "using a dithering approach. Dithering discards pixels based on a set pattern " "to smoothly fade without enabling transparency. On certain hardware, this " "can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA] and [constant " "DISTANCE_FADE_PIXEL_DITHER]." msgstr "" "根据对象与相机的距离,使用一种抖动方法平滑淡出对象。抖动根据设定的模式丢弃像" "素,在不启用透明的情况下平滑淡化。在某些硬件上,该选项可能比 [constant " "DISTANCE_FADE_PIXEL_ALPHA] 和 [constant DISTANCE_FADE_PIXEL_DITHER] 更快。" #: doc/classes/BaseMaterial3D.xml msgid "Disables stencil operations." msgstr "禁用模板运算。" #: doc/classes/BaseMaterial3D.xml msgid "" "Stencil preset which applies an outline to the object.\n" "[b]Note:[/b] Requires a [member Material.next_pass] material which will be " "automatically applied. Any manual changes made to [member " "Material.next_pass] will be lost when the stencil properties are modified or " "the scene is reloaded. To safely apply a [member Material.next_pass] " "material on a material that uses stencil presets, use [member " "GeometryInstance3D.material_overlay] instead." msgstr "" "模板预设,为物体添加轮廓。\n" "[b]注意:[/b]需要自动应用 [member Material.next_pass] 材质。修改模板属性或重" "新加载场景时,对 [member Material.next_pass] 的手动更改会丢失。要安全地对使用" "模板预设的材质应用 [member Material.next_pass] 材质,请改用 [member " "GeometryInstance3D.material_overlay]。" #: doc/classes/BaseMaterial3D.xml msgid "" "Stencil preset which shows a silhouette of the object behind walls.\n" "[b]Note:[/b] Requires a [member Material.next_pass] material which will be " "automatically applied. Any manual changes made to [member " "Material.next_pass] will be lost when the stencil properties are modified or " "the scene is reloaded. To safely apply a [member Material.next_pass] " "material on a material that uses stencil presets, use [member " "GeometryInstance3D.material_overlay] instead." msgstr "" "模板预设,为墙后的物体显示剪影。\n" "[b]注意:[/b]需要自动应用 [member Material.next_pass] 材质。修改模板属性或重" "新加载场景时,对 [member Material.next_pass] 的手动更改会丢失。要安全地对使用" "模板预设的材质应用 [member Material.next_pass] 材质,请改用 [member " "GeometryInstance3D.material_overlay]。" #: doc/classes/BaseMaterial3D.xml msgid "Enables stencil operations without a preset." msgstr "启用模板运算,但不使用预设。" #: doc/classes/BaseMaterial3D.xml #, fuzzy msgid "" "The material will only be rendered where it passes a stencil comparison with " "existing stencil buffer values." msgstr "" "材质仅当其通过与现有模板缓冲区值的模板比较时才会被渲染。请参阅 [enum " "StencilCompare]。" #: doc/classes/BaseMaterial3D.xml msgid "" "The material will write the reference value to the stencil buffer where it " "passes the depth test." msgstr "材质通过深度测试时会将参考值写入模板缓冲区。" #: doc/classes/BaseMaterial3D.xml msgid "" "The material will write the reference value to the stencil buffer where it " "fails the depth test." msgstr "材质未通过深度测试时会将参考值写入模板缓冲区。" #: doc/classes/BaseMaterial3D.xml msgid "Always passes the stencil test." msgstr "始终通过模板测试。" #: doc/classes/BaseMaterial3D.xml msgid "" "Passes the stencil test when the reference value is less than the existing " "stencil value." msgstr "当参考值小于现有模板值时,通过模板测试。" #: doc/classes/BaseMaterial3D.xml msgid "" "Passes the stencil test when the reference value is equal to the existing " "stencil value." msgstr "当参考值等于现有模板值时,通过模板测试。" #: doc/classes/BaseMaterial3D.xml msgid "" "Passes the stencil test when the reference value is less than or equal to " "the existing stencil value." msgstr "当参考值小于或等于现有模板值时,通过模板测试。" #: doc/classes/BaseMaterial3D.xml msgid "" "Passes the stencil test when the reference value is greater than the " "existing stencil value." msgstr "当参考值大于现有模板值时,通过模板测试。" #: doc/classes/BaseMaterial3D.xml msgid "" "Passes the stencil test when the reference value is not equal to the " "existing stencil value." msgstr "当参考值不等于现有模板值时,通过模板测试。" #: doc/classes/BaseMaterial3D.xml msgid "" "Passes the stencil test when the reference value is greater than or equal to " "the existing stencil value." msgstr "当参考值大于或等于现有模板值时,通过模板测试。" #: doc/classes/Basis.xml msgid "A 3×3 matrix for representing 3D rotation and scale." msgstr "用于表示 3D 旋转和缩放的 3×3 矩阵。" #: doc/classes/Basis.xml msgid "" "The [Basis] built-in [Variant] type is a 3×3 [url=https://en.wikipedia.org/" "wiki/Matrix_(mathematics)]matrix[/url] used to represent 3D rotation, scale, " "and shear. It is frequently used within a [Transform3D].\n" "A [Basis] is composed by 3 axis vectors, each representing a column of the " "matrix: [member x], [member y], and [member z]. The length of each axis " "([method Vector3.length]) influences the basis's scale, while the direction " "of all axes influence the rotation. Usually, these axes are perpendicular to " "one another. However, when you rotate any axis individually, the basis " "becomes sheared. Applying a sheared basis to a 3D model will make the model " "appear distorted.\n" "A [Basis] is:\n" "- [b]Orthogonal[/b] if its axes are perpendicular to each other.\n" "- [b]Normalized[/b] if the length of every axis is [code]1.0[/code].\n" "- [b]Uniform[/b] if all axes share the same length (see [method " "get_scale]).\n" "- [b]Orthonormal[/b] if it is both orthogonal and normalized, which allows " "it to only represent rotations (see [method orthonormalized]).\n" "- [b]Conformal[/b] if it is both orthogonal and uniform, which ensures it is " "not distorted.\n" "For a general introduction, see the [url=$DOCS_URL/tutorials/math/" "matrices_and_transforms.html]Matrices and transforms[/url] tutorial.\n" "[b]Note:[/b] Godot uses a [url=https://en.wikipedia.org/wiki/Right-" "hand_rule]right-handed coordinate system[/url], which is a common standard. " "For directions, the convention for built-in types like [Camera3D] is for -Z " "to point forward (+X is right, +Y is up, and +Z is back). Other objects may " "use different direction conventions. For more information, see the " "[url=$DOCS_URL/tutorials/assets_pipeline/importing_3d_scenes/" "model_export_considerations.html#d-asset-direction-conventions]3D asset " "direction conventions[/url] tutorial.\n" "[b]Note:[/b] The basis matrices are exposed as [url=https://" "www.mindcontrol.org/~hplus/graphics/matrix-layout.html]column-major[/url] " "order, which is the same as OpenGL. However, they are stored internally in " "row-major order, which is the same as DirectX." msgstr "" "[Basis] 内置 [Variant] 类型是一种 3×3 [url=https://zh.wikipedia.org/zh-cn/" "%E7%9F%A9%E9%98%B5]矩阵[/url],用于表示 3D 旋转、缩放和倾斜。常用于 " "[Transform3D]。\n" "[Basis] 由 3 个轴向量组成,每个轴向量代表矩阵的一列:[member x]、[member y] " "和 [member z]。每个轴的长度([method Vector3.length])都会影响该基的缩放,而" "所有轴的方向将影响旋转。通常,这些轴彼此垂直。但是,当你单独旋转任意轴时,该" "基会产生倾斜。对 3D 模型应用倾斜后的基会使模型发生变形。\n" "特殊形式的 [Basis] 有:\n" "- [b]正交[/b]:轴相互垂直。\n" "- [b]归一化[/b]:轴的长度都是 [code]1.0[/code]。\n" "- [b]均匀[/b]:轴的长度相等(见 [method get_scale])。\n" "- [b]正交归一[/b]:既正交又归一化,只能表示旋转。\n" "- [b]共形[/b]:既正交又均匀,保证不扭曲。\n" "通用介绍见教程[url=$DOCS_URL/tutorials/math/matrices_and_transforms.html]《矩" "阵与变换》[/url]。\n" "[b]注意:[/b]Godot 使用[url=https://zh.wikipedia.org/zh-cn/" "%E5%8F%B3%E6%89%8B%E5%AE%9A%E5%89%87]右手坐标系[/url],这是一种普遍标准。方向" "方面,[Camera3D] 等内置类型的约定是 -Z 指向前方(+X 为右、+Y 为上、+Z 为" "后)。其他对象可能使用不同的方向约定。更多信息见教程[url=$DOCS_URL/tutorials/" "assets_pipeline/importing_3d_scenes/model_export_considerations.html#d-asset-" "direction-conventions]《3D 资产方向惯例》[/url] 。\n" "[b]注意:[/b]基矩阵按[url=https://www.mindcontrol.org/~hplus/graphics/matrix-" "layout.html]列为主[/url]的顺序公开,这与 OpenGL 一致。但是内部使用行为主的顺" "序存储,这与 DirectX 一致。" #: doc/classes/Basis.xml doc/classes/Transform2D.xml #: doc/classes/Transform3D.xml msgid "Matrices and transforms" msgstr "矩阵与变换" #: doc/classes/Basis.xml doc/classes/Quaternion.xml doc/classes/Transform3D.xml msgid "Using 3D transforms" msgstr "使用 3D 变换" #: doc/classes/Basis.xml doc/classes/Line2D.xml doc/classes/Transform2D.xml #: doc/classes/Transform3D.xml doc/classes/Vector2.xml doc/classes/Vector3.xml msgid "Matrix Transform Demo" msgstr "矩阵变换演示" #: doc/classes/Basis.xml doc/classes/Line2D.xml doc/classes/Transform2D.xml #: doc/classes/Transform3D.xml msgid "2.5D Game Demo" msgstr "2.5D 游戏演示" #: doc/classes/Basis.xml msgid "" "Constructs a [Basis] identical to [constant IDENTITY].\n" "[b]Note:[/b] In C#, this constructs a [Basis] with all of its components set " "to [constant Vector3.ZERO]." msgstr "" "构造与 [constant IDENTITY] 相同的 [Basis]。\n" "[b]注意:[/b]在 C# 中构造的 [Basis] 的所有分量都为 [constant Vector3.ZERO]。" #: doc/classes/Basis.xml msgid "Constructs a [Basis] as a copy of the given [Basis]." msgstr "构造给定 [Basis] 的副本。" #: doc/classes/Basis.xml msgid "" "Constructs a [Basis] that only represents rotation, rotated around the " "[param axis] by the given [param angle], in radians. The axis must be a " "normalized vector.\n" "[b]Note:[/b] This is the same as using [method rotated] on the [constant " "IDENTITY] basis. With more than one angle consider using [method " "from_euler], instead." msgstr "" "构造仅表示旋转的 [Basis],给定的 [param angle] 以弧度为单位,表示围绕 [param " "axis] 轴的旋转量。这个轴必须是归一化的向量。\n" "[b]注意:[/b]与对 [constant IDENTITY] 基使用 [method rotated] 一致。多角度旋" "转请改用 [method from_euler]。" #: doc/classes/Basis.xml msgid "" "Constructs a [Basis] that only represents rotation from the given " "[Quaternion].\n" "[b]Note:[/b] Quaternions [i]only[/i] store rotation, not scale. Because of " "this, conversions from [Basis] to [Quaternion] cannot always be reversed." msgstr "" "根据给定的 [Quaternion] 构造仅表示旋转的 [Basis]。\n" "[b]注意:[/b]四元数[i]仅[/i]存储旋转,不会存储缩放。因此,[Basis] 到 " "[Quaternion] 的转换并不一定可逆。" #: doc/classes/Basis.xml msgid "" "Constructs a [Basis] from 3 axis vectors. These are the columns of the basis " "matrix." msgstr "根据 3 个轴向量构造 [Basis]。这些是基矩阵的列向量。" #: doc/classes/Basis.xml msgid "" "Returns the [url=https://en.wikipedia.org/wiki/Determinant]determinant[/url] " "of this basis's matrix. For advanced math, this number can be used to " "determine a few attributes:\n" "- If the determinant is exactly [code]0.0[/code], the basis is not " "invertible (see [method inverse]).\n" "- If the determinant is a negative number, the basis represents a negative " "scale.\n" "[b]Note:[/b] If the basis's scale is the same for every axis, its " "determinant is always that scale by the power of 3." msgstr "" "返回基矩阵的[url=https://zh.wikipedia.org/wiki/%E8%A1%8C%E5%88%97%E5%BC%8F]行" "列式[/url]。在高等数学中,这个数可以用来确定一些性质:\n" "- 如果行列式为 [code]0.0[/code],则基不可逆(见 [method inverse])。\n" "- 如果行列式为负数,则基表示负缩放。\n" "[b]注意:[/b]如果基的每个轴缩放都相同,那么这个行列式始终为 3 的该缩放次幂。" #: doc/classes/Basis.xml msgid "" "Constructs a new [Basis] that only represents rotation from the given " "[Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/" "url], in radians.\n" "- The [member Vector3.x] should contain the angle around the [member x] axis " "(pitch);\n" "- The [member Vector3.y] should contain the angle around the [member y] axis " "(yaw);\n" "- The [member Vector3.z] should contain the angle around the [member z] axis " "(roll).\n" "[codeblocks]\n" "[gdscript]\n" "# Creates a Basis whose z axis points down.\n" "var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0))\n" "\n" "print(my_basis.z) # Prints (0.0, -1.0, 0.0)\n" "[/gdscript]\n" "[csharp]\n" "// Creates a Basis whose z axis points down.\n" "var myBasis = Basis.FromEuler(new Vector3(Mathf.Tau / 4.0f, 0.0f, 0.0f));\n" "\n" "GD.Print(myBasis.Z); // Prints (0, -1, 0)\n" "[/csharp]\n" "[/codeblocks]\n" "The order of each consecutive rotation can be changed with [param order] " "(see [enum EulerOrder] constants). By default, the YXZ convention is used " "([constant EULER_ORDER_YXZ]): the basis rotates first around the Y axis " "(yaw), then X (pitch), and lastly Z (roll). When using the opposite method " "[method get_euler], this order is reversed." msgstr "" "根据给定的 [Vector3] 构造 [Basis],这个向量为 [url=https://zh.wikipedia.org/" "zh-cn/%E6%AC%A7%E6%8B%89%E8%A7%92]欧拉角[/url],单位为弧度。\n" "- [member Vector3.x] 应包含围绕 [member x] 轴的角度(俯仰);\n" "- [member Vector3.y] 应包含围绕 [member y] 轴的角度(偏摆);\n" "- [member Vector3.z] 应包含围绕 [member z] 轴的角度(翻滚)。\n" "[codeblocks]\n" "[gdscript]\n" "# 创建 Z 轴向下的 Basis。\n" "var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0))\n" "\n" "print(my_basis.z) # 输出 (0.0, -1.0, 0.0)\n" "[/gdscript]\n" "[csharp]\n" "// 创建 Z 轴向下的 Basis。\n" "var myBasis = Basis.FromEuler(new Vector3(Mathf.Tau / 4.0f, 0.0f, 0.0f));\n" "\n" "GD.Print(myBasis.Z); // 输出 (0.0, -1.0, 0.0)\n" "[/csharp]\n" "[/codeblocks]\n" "连续旋转的顺序可以通过 [param order] 修改(见 [enum EulerOrder] 常量)。默认" "使用 YXZ 约定([constant EULER_ORDER_YXZ]):基首先围绕 Y 轴旋转(偏摆),然" "后围绕 X 轴旋转(俯仰),最后围绕 Z 轴旋转(翻滚)。这个顺序在相对的函数 " "[method get_euler] 中是相反的。" #: doc/classes/Basis.xml msgid "" "Constructs a new [Basis] that only represents scale, with no rotation or " "shear, from the given [param scale] vector.\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis.from_scale(Vector3(2, 4, 8))\n" "\n" "print(my_basis.x) # Prints (2.0, 0.0, 0.0)\n" "print(my_basis.y) # Prints (0.0, 4.0, 0.0)\n" "print(my_basis.z) # Prints (0.0, 0.0, 8.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f));\n" "\n" "GD.Print(myBasis.X); // Prints (2, 0, 0)\n" "GD.Print(myBasis.Y); // Prints (0, 4, 0)\n" "GD.Print(myBasis.Z); // Prints (0, 0, 8)\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] In linear algebra, the matrix of this basis is also known as a " "[url=https://en.wikipedia.org/wiki/Diagonal_matrix]diagonal matrix[/url]." msgstr "" "根据给定的 [param scale] 向量构造仅表示缩放的 [Basis],不包含旋转和倾斜。\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis.from_scale(Vector3(2, 4, 8))\n" "\n" "print(my_basis.x) # 输出 (2.0, 0.0, 0.0)\n" "print(my_basis.y) # 输出 (0.0, 4.0, 0.0)\n" "print(my_basis.z) # 输出 (0.0, 0.0, 8.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f));\n" "\n" "GD.Print(myBasis.X); // 输出 (2.0, 0.0, 0.0)\n" "GD.Print(myBasis.Y); // 输出 (0.0, 4.0, 0.0)\n" "GD.Print(myBasis.Z); // 输出 (0.0, 0.0, 8.0)\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]在线性代数中,这种基矩阵也被称作[url=https://zh.wikipedia.org/" "zh-cn/%E5%B0%8D%E8%A7%92%E7%9F%A9%E9%99%A3]对角矩阵[/url]。" #: doc/classes/Basis.xml msgid "" "Returns this basis's rotation as a [Vector3] of [url=https://" "en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians. For the " "returned value:\n" "- The [member Vector3.x] contains the angle around the [member x] axis " "(pitch);\n" "- The [member Vector3.y] contains the angle around the [member y] axis " "(yaw);\n" "- The [member Vector3.z] contains the angle around the [member z] axis " "(roll).\n" "The order of each consecutive rotation can be changed with [param order] " "(see [enum EulerOrder] constants). By default, the YXZ convention is used " "([constant EULER_ORDER_YXZ]): Z (roll) is calculated first, then X (pitch), " "and lastly Y (yaw). When using the opposite method [method from_euler], this " "order is reversed.\n" "[b]Note:[/b] For this method to return correctly, the basis needs to be " "[i]orthonormal[/i] (see [method orthonormalized]).\n" "[b]Note:[/b] Euler angles are much more intuitive but are not suitable for " "3D math. Because of this, consider using the [method " "get_rotation_quaternion] method instead, which returns a [Quaternion].\n" "[b]Note:[/b] In the Inspector dock, a basis's rotation is often displayed in " "Euler angles (in degrees), as is the case with the [member Node3D.rotation] " "property." msgstr "" "以 [Vector3] 的形式返回基的旋转向量,这个向量为 [url=https://" "zh.wikipedia.org/zh-cn/%E6%AC%A7%E6%8B%89%E8%A7%92]欧拉角[/url],单位为弧度。" "返回值中:\n" "- [member Vector3.x] 包含围绕 [member x] 轴的角度(俯仰)。\n" "- [member Vector3.y] 包含围绕 [member y] 轴的角度(偏摆)。\n" "- [member Vector3.z] 包含围绕 [member z] 轴的角度(翻滚)。\n" "连续旋转的顺序可以通过 [param order] 修改(见 [enum EulerOrder] 常量)。默认" "使用 YXZ 约定([constant EULER_ORDER_YXZ]):首先计算围绕 Z 轴的旋转(翻" "滚),然后计算围绕 X 轴的旋转(俯仰),最后计算围绕 Y 轴旋转(偏摆)。这个顺" "序在相对的函数 [method from_euler] 中是相反的。\n" "[b]注意:[/b]该方法只对[i]标准正交基[/i]返回正确的值(见 [method " "orthonormalized])。\n" "[b]注意:[/b]欧拉角更符合直觉,但是并不适合 3D 数学。因此请考虑改用返回 " "[Quaternion] 的 [method get_rotation_quaternion]。\n" "[b]注意:[/b]在检查器面板中,基的旋转通常是以欧拉角的形式显示的(单位为度)," "与 [member Node3D.rotation] 属性相同。" #: doc/classes/Basis.xml msgid "" "Returns this basis's rotation as a [Quaternion].\n" "[b]Note:[/b] Quaternions are much more suitable for 3D math but are less " "intuitive. For user interfaces, consider using the [method get_euler] " "method, which returns Euler angles." msgstr "" "以 [Quaternion] 的形式返回基的旋转。\n" "[b]注意:[/b]四元数更适合 3D 数学,但是并不那么符合直觉。用户界面相关的场合请" "考虑使用返回欧拉角的 [method get_euler] 方法。" #: doc/classes/Basis.xml msgid "" "Returns the length of each axis of this basis, as a [Vector3]. If the basis " "is not sheared, this value is the scaling factor. It is not affected by " "rotation.\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis(\n" "\tVector3(2, 0, 0),\n" "\tVector3(0, 4, 0),\n" "\tVector3(0, 0, 8)\n" ")\n" "# Rotating the Basis in any way preserves its scale.\n" "my_basis = my_basis.rotated(Vector3.UP, TAU / 2)\n" "my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4)\n" "\n" "print(my_basis.get_scale()) # Prints (2.0, 4.0, 8.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = new Basis(\n" "\tVector3(2.0f, 0.0f, 0.0f),\n" "\tVector3(0.0f, 4.0f, 0.0f),\n" "\tVector3(0.0f, 0.0f, 8.0f)\n" ");\n" "// Rotating the Basis in any way preserves its scale.\n" "myBasis = myBasis.Rotated(Vector3.Up, Mathf.Tau / 2.0f);\n" "myBasis = myBasis.Rotated(Vector3.Right, Mathf.Tau / 4.0f);\n" "\n" "GD.Print(myBasis.Scale); // Prints (2, 4, 8)\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] If the value returned by [method determinant] is negative, the " "scale is also negative." msgstr "" "返回该基的每个轴的长度,形式为 [Vector3]。如果该基未经倾斜,该值就是缩放系" "数。它不受旋转的影响。\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis(\n" "\tVector3(2, 0, 0),\n" "\tVector3(0, 4, 0),\n" "\tVector3(0, 0, 8)\n" ")\n" "# 以任何方式旋转基都会保持其缩放。\n" "my_basis = my_basis.rotated(Vector3.UP, TAU / 2)\n" "my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4)\n" "\n" "print(my_basis.get_scale()) # 输出 (2.0, 4.0, 8.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = new Basis(\n" "\tVector3(2.0f, 0.0f, 0.0f),\n" "\tVector3(0.0f, 4.0f, 0.0f),\n" "\tVector3(0.0f, 0.0f, 8.0f)\n" ");\n" "// 以任何方式旋转基都会保持其缩放。\n" "myBasis = myBasis.Rotated(Vector3.Up, Mathf.Tau / 2.0f);\n" "myBasis = myBasis.Rotated(Vector3.Right, Mathf.Tau / 4.0f);\n" "\n" "GD.Print(myBasis.Scale); // 输出 (2.0, 4.0, 8.0)\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]如果 [method determinant] 返回的值为负数,则缩放也为负数。" #: doc/classes/Basis.xml msgid "" "Returns the [url=https://en.wikipedia.org/wiki/Invertible_matrix]inverse of " "this basis's matrix[/url]." msgstr "" "返回 [url=https://en.wikipedia.org/wiki/Invertible_matrix]该基矩阵的逆矩阵[/" "url]。" #: doc/classes/Basis.xml msgid "" "Returns [code]true[/code] if this basis is conformal. A conformal basis is " "both [i]orthogonal[/i] (the axes are perpendicular to each other) and " "[i]uniform[/i] (the axes share the same length). This method can be " "especially useful during physics calculations." msgstr "" "如果该基是共形的,则返回 [code]true[/code]。共形的基既是[i]正交的[/i](轴彼此" "垂直)又是[i]均匀的[/i](轴共享相同长度)。该方法在物理计算过程中特别有用。" #: doc/classes/Basis.xml msgid "" "Returns [code]true[/code] if this basis and [param b] are approximately " "equal, by calling [method @GlobalScope.is_equal_approx] on all vector " "components." msgstr "" "如果该基和 [param b] 近似相等,则返回 [code]true[/code],判断方法是在每个向量" "分量上调用 [method @GlobalScope.is_equal_approx]。" #: doc/classes/Basis.xml msgid "" "Returns [code]true[/code] if this basis is finite, by calling [method " "@GlobalScope.is_finite] on all vector components." msgstr "" "如果该基是有限的,则返回 [code]true[/code],判断方法是在每个向量分量上调用 " "[method @GlobalScope.is_finite]。" #: doc/classes/Basis.xml msgid "" "Creates a new [Basis] with a rotation such that the forward axis (-Z) points " "towards the [param target] position.\n" "By default, the -Z axis (camera forward) is treated as forward (implies +X " "is right). If [param use_model_front] is [code]true[/code], the +Z axis " "(asset front) is treated as forward (implies +X is left) and points toward " "the [param target] position.\n" "The up axis (+Y) points as close to the [param up] vector as possible while " "staying perpendicular to the forward axis. The returned basis is " "orthonormalized (see [method orthonormalized]).\n" "The [param target] and the [param up] cannot be [constant Vector3.ZERO], and " "shouldn't be colinear to avoid unintended rotation around local Z axis." msgstr "" "创建一个带有旋转的新 [Basis],使向前轴(-Z)指向 [param target] 的位置。\n" "默认情况下,-Z 轴(相机向前)被视为向前(意味着 +X 位于右侧)。如果 [param " "use_model_front] 为 [code]true[/code],则 +Z 轴(资产正面)被视为向前(意味" "着 +X 位于左侧)并指向 [param target] 的位置。\n" "向上轴(+Y)尽可能靠近 [param up] 向量,同时保持垂直于向前轴。返回的基是正交" "归一化的(见 [method orthonormalized])。\n" "[param target] 和 [param up] 向量不能是 [constant Vector3.ZERO],两者也不能共" "线,这样可以避免围绕局部 Z 轴发生预料之外的旋转。" #: doc/classes/Basis.xml msgid "" "Returns the orthonormalized version of this basis. An orthonormal basis is " "both [i]orthogonal[/i] (the axes are perpendicular to each other) and " "[i]normalized[/i] (the axes have a length of [code]1.0[/code]), which also " "means it can only represent a rotation.\n" "It is often useful to call this method to avoid rounding errors on a " "rotating basis:\n" "[codeblocks]\n" "[gdscript]\n" "# Rotate this Node3D every frame.\n" "func _process(delta):\n" "\tbasis = basis.rotated(Vector3.UP, TAU * delta)\n" "\tbasis = basis.rotated(Vector3.RIGHT, TAU * delta)\n" "\tbasis = basis.orthonormalized()\n" "[/gdscript]\n" "[csharp]\n" "// Rotate this Node3D every frame.\n" "public override void _Process(double delta)\n" "{\n" "\tBasis = Basis.Rotated(Vector3.Up, Mathf.Tau * (float)delta)\n" "\t\t\t.Rotated(Vector3.Right, Mathf.Tau * (float)delta)\n" "\t\t\t.Orthonormalized();\n" "}\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回该基的正交归一化版本。正交归一化基既是[i]正交的[/i](轴彼此垂直)又是[i]" "归一化的[/i](轴长度为 [code]1.0[/code]),这也意味着它只能代表旋转。\n" "调用该方法通常很有用,以避免旋转基上的舍入错误:\n" "[codeblocks]\n" "[gdscript]\n" "# 每帧旋转该 Node3D。\n" "func _process(delta):\n" "\tbasis = basis.rotated(Vector3.UP, TAU * delta)\n" "\tbasis = basis.rotated(Vector3.RIGHT, TAU * delta)\n" "\tbasis = basis.orthonormalized()\n" "[/gdscript]\n" "[csharp]\n" "// 每帧旋转该 Node3D。\n" "public override void _Process(double delta)\n" "{\n" "\tBasis = Basis.Rotated(Vector3.Up, Mathf.Tau * (float)delta)\n" "\t\t\t.Rotated(Vector3.Right, Mathf.Tau * (float)delta)\n" "\t\t\t.Orthonormalized();\n" "}\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Basis.xml msgid "" "Returns a copy of this basis rotated around the given [param axis] by the " "given [param angle] (in radians).\n" "The [param axis] must be a normalized vector (see [method " "Vector3.normalized]). If [param angle] is positive, the basis is rotated " "counter-clockwise around the axis.\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis.IDENTITY\n" "var angle = TAU / 2\n" "\n" "my_basis = my_basis.rotated(Vector3.UP, angle) # Rotate around the up " "axis (yaw).\n" "my_basis = my_basis.rotated(Vector3.RIGHT, angle) # Rotate around the right " "axis (pitch).\n" "my_basis = my_basis.rotated(Vector3.BACK, angle) # Rotate around the back " "axis (roll).\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = Basis.Identity;\n" "var angle = Mathf.Tau / 2.0f;\n" "\n" "myBasis = myBasis.Rotated(Vector3.Up, angle); // Rotate around the up " "axis (yaw).\n" "myBasis = myBasis.Rotated(Vector3.Right, angle); // Rotate around the right " "axis (pitch).\n" "myBasis = myBasis.Rotated(Vector3.Back, angle); // Rotate around the back " "axis (roll).\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回该基的副本,围绕给定轴 [param axis] 进行了旋转,旋转角度为 [param angle]" "(单位为弧度)。\n" "[param axis] 必须是归一化的向量(见 [method Vector3.normalized])。如果 " "[param angle] 为正值,则基围绕转轴进行逆时针旋转。\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis.IDENTITY\n" "var angle = TAU / 2\n" "\n" "my_basis = my_basis.rotated(Vector3.UP, angle) # 绕向上轴旋转(偏航)。\n" "my_basis = my_basis.rotated(Vector3.RIGHT, angle) # 绕向右轴旋转(俯仰)。\n" "my_basis = my_basis.rotated(Vector3.BACK, angle) # 绕向后轴旋转(滚动)。\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = Basis.Identity;\n" "var angle = Mathf.Tau / 2.0f;\n" "\n" "myBasis = myBasis.Rotated(Vector3.Up, angle); // 绕向上轴旋转(偏航)。\n" "myBasis = myBasis.Rotated(Vector3.Right, angle); // 绕向右轴旋转(俯仰)。\n" "myBasis = myBasis.Rotated(Vector3.Back, angle); // 绕向后轴旋转(滚动)。\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Basis.xml msgid "" "Returns this basis with each axis's components scaled by the given [param " "scale]'s components.\n" "The basis matrix's rows are multiplied by [param scale]'s components. This " "operation is a global scale (relative to the parent).\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis(\n" "\tVector3(1, 1, 1),\n" "\tVector3(2, 2, 2),\n" "\tVector3(3, 3, 3)\n" ")\n" "my_basis = my_basis.scaled(Vector3(0, 2, -2))\n" "\n" "print(my_basis.x) # Prints (0.0, 2.0, -2.0)\n" "print(my_basis.y) # Prints (0.0, 4.0, -4.0)\n" "print(my_basis.z) # Prints (0.0, 6.0, -6.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = new Basis(\n" "\tnew Vector3(1.0f, 1.0f, 1.0f),\n" "\tnew Vector3(2.0f, 2.0f, 2.0f),\n" "\tnew Vector3(3.0f, 3.0f, 3.0f)\n" ");\n" "myBasis = myBasis.Scaled(new Vector3(0.0f, 2.0f, -2.0f));\n" "\n" "GD.Print(myBasis.X); // Prints (0, 2, -2)\n" "GD.Print(myBasis.Y); // Prints (0, 4, -4)\n" "GD.Print(myBasis.Z); // Prints (0, 6, -6)\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回该基,其中每个轴的分量都按给定的 [param scale] 的分量缩放。\n" "该基矩阵的行乘以 [param scale] 的分量。该操作是全局缩放(相对于父级)。\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis(\n" "\tVector3(1, 1, 1),\n" "\tVector3(2, 2, 2),\n" "\tVector3(3, 3, 3)\n" ")\n" "my_basis = my_basis.scaled(Vector3(0, 2, -2))\n" "\n" "print(my_basis.x) # 输出 (0.0, 2.0, -2.0)\n" "print(my_basis.y) # 输出 (0.0, 4.0, -4.0)\n" "print(my_basis.z) # 输出 (0.0, 6.0, -6.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = new Basis(\n" "\tnew Vector3(1.0f, 1.0f, 1.0f),\n" "\tnew Vector3(2.0f, 2.0f, 2.0f),\n" "\tnew Vector3(3.0f, 3.0f, 3.0f)\n" ");\n" "myBasis = myBasis.Scaled(new Vector3(0.0f, 2.0f, -2.0f));\n" "\n" "GD.Print(myBasis.X); // 输出 (0.0, 2.0, -2.0)\n" "GD.Print(myBasis.Y); // 输出 (0.0, 4.0, -4.0)\n" "GD.Print(myBasis.Z); // 输出 (0.0, 6.0, -6.0)\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Basis.xml msgid "" "Returns this basis with each axis scaled by the corresponding component in " "the given [param scale].\n" "The basis matrix's columns are multiplied by [param scale]'s components. " "This operation is a local scale (relative to self).\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis(\n" " Vector3(1, 1, 1),\n" " Vector3(2, 2, 2),\n" " Vector3(3, 3, 3)\n" ")\n" "my_basis = my_basis.scaled_local(Vector3(0, 2, -2))\n" "\n" "print(my_basis.x) # Prints (0.0, 0.0, 0.0)\n" "print(my_basis.y) # Prints (4.0, 4.0, 4.0)\n" "print(my_basis.z) # Prints (-6.0, -6.0, -6.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = new Basis(\n" " new Vector3(1.0f, 1.0f, 1.0f),\n" " new Vector3(2.0f, 2.0f, 2.0f),\n" " new Vector3(3.0f, 3.0f, 3.0f)\n" ");\n" "myBasis = myBasis.ScaledLocal(new Vector3(0.0f, 2.0f, -2.0f));\n" "\n" "GD.Print(myBasis.X); // Prints (0, 0, 0)\n" "GD.Print(myBasis.Y); // Prints (4, 4, 4)\n" "GD.Print(myBasis.Z); // Prints (-6, -6, -6)\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回该基,其中每个轴都按给定的 [param scale] 中的相应分量缩放。\n" "该基矩阵的列乘以 [param scale] 的分量。该操作是局部缩放(相对于自身)。\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis(\n" " Vector3(1, 1, 1),\n" " Vector3(2, 2, 2),\n" " Vector3(3, 3, 3)\n" ")\n" "my_basis = my_basis.scaled_local(Vector3(0, 2, -2))\n" "\n" "print(my_basis.x) # 输出 (0.0, 0.0, 0.0)\n" "print(my_basis.y) # 输出 (4.0, 4.0, 4.0)\n" "print(my_basis.z) # 输出 (-6.0, -6.0, -6.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = new Basis(\n" " new Vector3(1.0f, 1.0f, 1.0f),\n" " new Vector3(2.0f, 2.0f, 2.0f),\n" " new Vector3(3.0f, 3.0f, 3.0f)\n" ");\n" "myBasis = myBasis.ScaledLocal(new Vector3(0.0f, 2.0f, -2.0f));\n" "\n" "GD.Print(myBasis.X); // 输出 (0, 0, 0)\n" "GD.Print(myBasis.Y); // 输出 (4, 4, 4)\n" "GD.Print(myBasis.Z); // 输出 (-6, -6, -6)\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Basis.xml msgid "" "Performs a spherical-linear interpolation with the [param to] basis, given a " "[param weight]. Both this basis and [param to] should represent a rotation.\n" "[b]Example:[/b] Smoothly rotate a [Node3D] to the target basis over time, " "with a [Tween]:\n" "[codeblock]\n" "var start_basis = Basis.IDENTITY\n" "var target_basis = Basis.IDENTITY.rotated(Vector3.UP, TAU / 2)\n" "\n" "func _ready():\n" "\tcreate_tween().tween_method(interpolate, 0.0, 1.0, " "5.0).set_trans(Tween.TRANS_EXPO)\n" "\n" "func interpolate(weight):\n" "\tbasis = start_basis.slerp(target_basis, weight)\n" "[/codeblock]" msgstr "" "使用 [param to] 基在给定 [param weight] 的情况下执行球面线性插值。该基和 " "[param to] 两者都应该代表一个旋转。\n" "[b]示例:[/b]使用 [Tween] 随时间平滑地将 [Node3D] 旋转到目标基:\n" "[codeblock]\n" "var start_basis = Basis.IDENTITY\n" "var target_basis = Basis.IDENTITY.rotated(Vector3.UP, TAU / 2)\n" "\n" "func _ready():\n" "\tcreate_tween().tween_method(interpolate, 0.0, 1.0, " "5.0).set_trans(Tween.TRANS_EXPO)\n" "\n" "func interpolate(weight):\n" "\tbasis = start_basis.slerp(target_basis, weight)\n" "[/codeblock]" #: doc/classes/Basis.xml msgid "" "Returns the transposed dot product between [param with] and the [member x] " "axis (see [method transposed]).\n" "This is equivalent to [code]basis.x.dot(vector)[/code]." msgstr "" "返回 [param with] 和 [member x] 轴之间的转置点积(请参阅 [method " "transposed])。\n" "这相当于 [code]basis.x.dot(vector)[/code]。" #: doc/classes/Basis.xml msgid "" "Returns the transposed dot product between [param with] and the [member y] " "axis (see [method transposed]).\n" "This is equivalent to [code]basis.y.dot(vector)[/code]." msgstr "" "返回 [param with] 和 [member y] 轴之间的转置点积(请参阅 [method " "transposed])。\n" "这相当于 [code]basis.y.dot(vector)[/code]。" #: doc/classes/Basis.xml msgid "" "Returns the transposed dot product between [param with] and the [member z] " "axis (see [method transposed]).\n" "This is equivalent to [code]basis.z.dot(vector)[/code]." msgstr "" "返回 [param with] 和 [member z] 轴之间的转置点积(请参阅 [method " "transposed])。\n" "这相当于 [code]basis.z.dot(vector)[/code]。" #: doc/classes/Basis.xml msgid "" "Returns the transposed version of this basis. This turns the basis matrix's " "columns into rows, and its rows into columns.\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis(\n" "\tVector3(1, 2, 3),\n" "\tVector3(4, 5, 6),\n" "\tVector3(7, 8, 9)\n" ")\n" "my_basis = my_basis.transposed()\n" "\n" "print(my_basis.x) # Prints (1.0, 4.0, 7.0)\n" "print(my_basis.y) # Prints (2.0, 5.0, 8.0)\n" "print(my_basis.z) # Prints (3.0, 6.0, 9.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = new Basis(\n" "\tnew Vector3(1.0f, 2.0f, 3.0f),\n" "\tnew Vector3(4.0f, 5.0f, 6.0f),\n" "\tnew Vector3(7.0f, 8.0f, 9.0f)\n" ");\n" "myBasis = myBasis.Transposed();\n" "\n" "GD.Print(myBasis.X); // Prints (1, 4, 7)\n" "GD.Print(myBasis.Y); // Prints (2, 5, 8)\n" "GD.Print(myBasis.Z); // Prints (3, 6, 9)\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回该基的转置版本。这会将基矩阵的列转换为行,并将其行转换为列。\n" "[codeblocks]\n" "[gdscript]\n" "var my_basis = Basis(\n" "\tVector3(1, 2, 3),\n" "\tVector3(4, 5, 6),\n" "\tVector3(7, 8, 9)\n" ")\n" "my_basis = my_basis.transposed()\n" "\n" "print(my_basis.x) # 输出 (1.0, 4.0, 7.0)\n" "print(my_basis.y) # 输出 (2.0, 5.0, 8.0)\n" "print(my_basis.z) # 输出 (3.0, 6.0, 9.0)\n" "[/gdscript]\n" "[csharp]\n" "var myBasis = new Basis(\n" "\tnew Vector3(1.0f, 2.0f, 3.0f),\n" "\tnew Vector3(4.0f, 5.0f, 6.0f),\n" "\tnew Vector3(7.0f, 8.0f, 9.0f)\n" ");\n" "myBasis = myBasis.Transposed();\n" "\n" "GD.Print(myBasis.X); // 输出 (1.0, 4.0, 7.0)\n" "GD.Print(myBasis.Y); // 输出 (2.0, 5.0, 8.0)\n" "GD.Print(myBasis.Z); // 输出 (3.0, 6.0, 9.0)\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Basis.xml msgid "" "The basis's X axis, and the column [code]0[/code] of the matrix.\n" "On the identity basis, this vector points right ([constant Vector3.RIGHT])." msgstr "" "该基的 X 轴和矩阵的 [code]0[/code] 列。\n" "在单位基上,该向量指向右侧([constant Vector3.RIGHT])。" #: doc/classes/Basis.xml msgid "" "The basis's Y axis, and the column [code]1[/code] of the matrix.\n" "On the identity basis, this vector points up ([constant Vector3.UP])." msgstr "" "该基的 Y 轴和矩阵的第 [code]1[/code] 列。\n" "在单位基上,该向量指向上方([constant Vector3.UP])。" #: doc/classes/Basis.xml msgid "" "The basis's Z axis, and the column [code]2[/code] of the matrix.\n" "On the identity basis, this vector points back ([constant Vector3.BACK])." msgstr "" "该基的 Z 轴和矩阵的第 [code]2[/code] 列。\n" "在单位基上,该向量指向后面([constant Vector3.BACK])。" #: doc/classes/Basis.xml msgid "" "The identity [Basis]. This is an orthonormal basis with no rotation, no " "shear, and a scale of [constant Vector3.ONE]. This also means that:\n" "- The [member x] points right ([constant Vector3.RIGHT]);\n" "- The [member y] points up ([constant Vector3.UP]);\n" "- The [member z] points back ([constant Vector3.BACK]).\n" "[codeblock]\n" "var basis = Basis.IDENTITY\n" "print(\"| X | Y | Z\")\n" "print(\"| %.f | %.f | %.f\" % [basis.x.x, basis.y.x, basis.z.x])\n" "print(\"| %.f | %.f | %.f\" % [basis.x.y, basis.y.y, basis.z.y])\n" "print(\"| %.f | %.f | %.f\" % [basis.x.z, basis.y.z, basis.z.z])\n" "# Prints:\n" "# | X | Y | Z\n" "# | 1 | 0 | 0\n" "# | 0 | 1 | 0\n" "# | 0 | 0 | 1\n" "[/codeblock]\n" "If a [Vector3] or another [Basis] is transformed (multiplied) by this " "constant, no transformation occurs.\n" "[b]Note:[/b] In GDScript, this constant is equivalent to creating a " "[constructor Basis] without any arguments. It can be used to make your code " "clearer, and for consistency with C#." msgstr "" "单位 [Basis]。这是一个没有旋转、没有倾斜的标准正交基,其缩放为 [constant " "Vector3.ONE]。这也意味着:\n" "- [member x] 指向右侧([constant Vector3.RIGHT]);\n" "- [member y] 指向上方([constant Vector3.UP]);\n" "- [member z] 指向后面([constant Vector3.BACK])。\n" "[codeblock]\n" "var basis = Basis.IDENTITY\n" "print(\"| X | Y | Z\")\n" "print(\"| %.f | %.f | %.f\" % [basis.x.x, basis.y.x, basis.z.x])\n" "print(\"| %.f | %.f | %.f\" % [basis.x.y, basis.y.y, basis.z.y])\n" "print(\"| %.f | %.f | %.f\" % [basis.x.z, basis.y.z, basis.z.z])\n" "# 输出:\n" "# | X | Y | Z\n" "# | 1 | 0 | 0\n" "# | 0 | 1 | 0\n" "# | 0 | 0 | 1\n" "[/codeblock]\n" "使用该常量变换(乘以)一个 [Vector3] 或其他 [Basis] 时不会发生变换。\n" "[b]注意:[/b]在 GDScript 中,该常量与不使用任何参数创建 [constructor Basis] " "相同。该常量可用于使你的代码更清晰,并与 C# 保持一致。" #: doc/classes/Basis.xml msgid "" "When any basis is multiplied by [constant FLIP_X], it negates all components " "of the [member x] axis (the X column).\n" "When [constant FLIP_X] is multiplied by any basis, it negates the [member " "Vector3.x] component of all axes (the X row)." msgstr "" "当任意基被 [constant FLIP_X] 相乘时,它会取负 [member x] 轴(X 列)的所有分" "量。\n" "当 [constant FLIP_X] 被任意基相乘时,它会取负所有轴(X 行)的 [member " "Vector3.x] 分量。" #: doc/classes/Basis.xml msgid "" "When any basis is multiplied by [constant FLIP_Y], it negates all components " "of the [member y] axis (the Y column).\n" "When [constant FLIP_Y] is multiplied by any basis, it negates the [member " "Vector3.y] component of all axes (the Y row)." msgstr "" "当任意基被 [constant FLIP_Y] 相乘时,它会取负 [member y] 轴(Y 列)的所有分" "量。\n" "当 [constant FLIP_Y] 被任意基相乘时,它会取负所有轴(Y 行)的 [member " "Vector3.y] 分量。" #: doc/classes/Basis.xml msgid "" "When any basis is multiplied by [constant FLIP_Z], it negates all components " "of the [member z] axis (the Z column).\n" "When [constant FLIP_Z] is multiplied by any basis, it negates the [member " "Vector3.z] component of all axes (the Z row)." msgstr "" "当任意基被 [constant FLIP_Z] 相乘时,它会取负 [member z] 轴(Z 列)的所有分" "量。\n" "当 [constant FLIP_Z] 被任意基相乘时,它会取负所有轴(Z 行)的 [member " "Vector3.z] 分量。" #: doc/classes/Basis.xml msgid "" "Returns [code]true[/code] if the components of both [Basis] matrices are not " "equal.\n" "[b]Note:[/b] Due to floating-point precision errors, consider using [method " "is_equal_approx] instead, which is more reliable." msgstr "" "如果两个 [Basis] 矩阵的分量不相等,则返回 [code]true[/code]。\n" "[b]注意:[/b]由于浮点精度误差,请考虑改用 [method is_equal_approx],这样更可" "靠。" #: doc/classes/Basis.xml msgid "" "Transforms (multiplies) the [param right] basis by this basis.\n" "This is the operation performed between parent and child [Node3D]s." msgstr "" "由该基转换(乘以) [param right] 基。\n" "这是父级和子级 [Node3D] 之间执行的操作。" #: doc/classes/Basis.xml msgid "" "Transforms (multiplies) the [param right] vector by this basis, returning a " "[Vector3].\n" "[codeblocks]\n" "[gdscript]\n" "# Basis that swaps the X/Z axes and doubles the scale.\n" "var my_basis = Basis(Vector3(0, 2, 0), Vector3(2, 0, 0), Vector3(0, 0, 2))\n" "print(my_basis * Vector3(1, 2, 3)) # Prints (4.0, 2.0, 6.0)\n" "[/gdscript]\n" "[csharp]\n" "// Basis that swaps the X/Z axes and doubles the scale.\n" "var myBasis = new Basis(new Vector3(0, 2, 0), new Vector3(2, 0, 0), new " "Vector3(0, 0, 2));\n" "GD.Print(myBasis * new Vector3(1, 2, 3)); // Prints (4, 2, 6)\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "使用该基变换(乘以)[param right] 向量,返回一个 [Vector3]。\n" "[codeblocks]\n" "[gdscript]\n" "# 交换 X/Z 轴并使缩放加倍的基。\n" "var my_basis = Basis(Vector3(0, 2, 0), Vector3(2, 0, 0), Vector3(0, 0, 2))\n" "print(my_basis * Vector3(1, 2, 3)) # 输出 (4.0, 2.0, 6.0)\n" "[/gdscript]\n" "[csharp]\n" "// 交换 X/Z 轴并使缩放加倍的基。\n" "var myBasis = new Basis(new Vector3(0, 2, 0), new Vector3(2, 0, 0), new " "Vector3(0, 0, 2));\n" "GD.Print(myBasis * new Vector3(1, 2, 3)); // 输出 (4.0, 2.0, 6.0)\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Basis.xml msgid "" "Multiplies all components of the [Basis] by the given [float]. This affects " "the basis's scale uniformly, resizing all 3 axes by the [param right] value." msgstr "" "将 [Basis] 的所有分量乘以给定的 [float]。这会均匀地影响该基矩阵的缩放,并通" "过 [param right] 值调整所有 3 个轴的大小。" #: doc/classes/Basis.xml msgid "" "Multiplies all components of the [Basis] by the given [int]. This affects " "the basis's scale uniformly, resizing all 3 axes by the [param right] value." msgstr "" "将该 [Basis] 的所有分量乘以给定的 [int]。这会均匀地影响该基的缩放,并通过 " "[param right] 值调整所有 3 个轴的大小。" #: doc/classes/Basis.xml msgid "" "Divides all components of the [Basis] by the given [float]. This affects the " "basis's scale uniformly, resizing all 3 axes by the [param right] value." msgstr "" "将 [Basis] 的所有分量除以给定的 [float]。这会均匀地影响该基的缩放,并通过 " "[param right] 值调整所有 3 个轴的大小。" #: doc/classes/Basis.xml msgid "" "Divides all components of the [Basis] by the given [int]. This affects the " "basis's scale uniformly, resizing all 3 axes by the [param right] value." msgstr "" "将 [Basis] 的所有分量除以给定的 [int]。这会均匀地影响该基的缩放,并通过 " "[param right] 值调整所有 3 个轴的大小。" #: doc/classes/Basis.xml msgid "" "Returns [code]true[/code] if the components of both [Basis] matrices are " "exactly equal.\n" "[b]Note:[/b] Due to floating-point precision errors, consider using [method " "is_equal_approx] instead, which is more reliable." msgstr "" "如果两个 [Basis] 矩阵的分量完全相等,则返回 [code]true[/code]。\n" "[b]注意:[/b]由于浮点精度误差,请考虑改用 [method is_equal_approx],这样更可" "靠。" #: doc/classes/Basis.xml msgid "" "Accesses each axis (column) of this basis by their index. Index [code]0[/" "code] is the same as [member x], index [code]1[/code] is the same as [member " "y], and index [code]2[/code] is the same as [member z].\n" "[b]Note:[/b] In C++, this operator accesses the rows of the basis matrix, " "[i]not[/i] the columns. For the same behavior as scripting languages, use " "the [code]set_column[/code] and [code]get_column[/code] methods." msgstr "" "通过索引访问该基的每个轴(列)。索引 [code]0[/code] 与 [member x] 相同,索引 " "[code]1[/code] 与 [member y] 相同,索引 [code]2[/code] 与 [member z] 相同。\n" "[b]注意:[/b]在 C++ 中,该运算符访问基础矩阵的行,而[i]不[/i]是列。对于与脚本" "语言相同的行为,请使用 [code]set_column[/code] 和 [code]get_column[/code] 方" "法。" #: doc/classes/BitMap.xml msgid "Boolean matrix." msgstr "布尔矩阵。" #: doc/classes/BitMap.xml msgid "" "A two-dimensional array of boolean values, can be used to efficiently store " "a binary matrix (every matrix element takes only one bit) and query the " "values using natural cartesian coordinates." msgstr "" "布尔值二维数组,可以用来高效存储二进制矩阵(每个矩阵元素只占一个比特位),并" "使用自然的笛卡尔坐标查询数值。" #: doc/classes/BitMap.xml msgid "" "Returns an image of the same size as the bitmap and with an [enum " "Image.Format] of type [constant Image.FORMAT_L8]. [code]true[/code] bits of " "the bitmap are being converted into white pixels, and [code]false[/code] " "bits into black." msgstr "" "返回与该位图大小相同且具有 [constant Image.FORMAT_L8] 类型的 [enum " "Image.Format] 的图像。该位图中的 [code]true[/code] 位被转换为白色像素," "[code]false[/code] 位被转换为黑色像素。" #: doc/classes/BitMap.xml msgid "" "Creates a bitmap with the specified size, filled with [code]false[/code]." msgstr "创建一个指定尺寸的位图,用 [code]false[/code] 填充。" #: doc/classes/BitMap.xml msgid "" "Creates a bitmap that matches the given image dimensions, every element of " "the bitmap is set to [code]false[/code] if the alpha value of the image at " "that position is equal to [param threshold] or less, and [code]true[/code] " "in other case." msgstr "" "创建一个匹配给定图像大小的位图,如果该位图的 Alpha 值等于或小于 [param " "threshold],则位图的每个元素都被设置为 [code]false[/code];否则被设置为 " "[code]true[/code]。" #: doc/classes/BitMap.xml msgid "Returns bitmap's value at the specified position." msgstr "返回位图在指定位置的值。" #: doc/classes/BitMap.xml msgid "Returns bitmap's dimensions." msgstr "返回位图的尺寸。" #: doc/classes/BitMap.xml msgid "" "Returns the number of bitmap elements that are set to [code]true[/code]." msgstr "返回设置为 [code]true[/code] 的位图元素的数量。" #: doc/classes/BitMap.xml msgid "" "Applies morphological dilation or erosion to the bitmap. If [param pixels] " "is positive, dilation is applied to the bitmap. If [param pixels] is " "negative, erosion is applied to the bitmap. [param rect] defines the area " "where the morphological operation is applied. Pixels located outside the " "[param rect] are unaffected by [method grow_mask]." msgstr "" "对位图进行形态学膨胀或腐蚀操作。如果 [param pixels] 为正,则对位图执行膨胀。" "如果 [param pixels] 为负,则对位图执行腐蚀。[param rect] 定义进行形态学操作的" "区域。位于 [param rect]] 之外的像素不会被 [method grow_mask] 影响。" #: doc/classes/BitMap.xml msgid "" "Creates an [Array] of polygons covering a rectangular portion of the bitmap. " "It uses a marching squares algorithm, followed by Ramer-Douglas-Peucker " "(RDP) reduction of the number of vertices. Each polygon is described as a " "[PackedVector2Array] of its vertices.\n" "To get polygons covering the whole bitmap, pass:\n" "[codeblock]\n" "Rect2(Vector2(), get_size())\n" "[/codeblock]\n" "[param epsilon] is passed to RDP to control how accurately the polygons " "cover the bitmap: a lower [param epsilon] corresponds to more points in the " "polygons." msgstr "" "创建一个多边形 [Array],以覆盖位图的矩形部分。它使用行进方块算法,然后使用 " "Ramer-Douglas-Peucker(RDP)减少顶点数。每个多边形都被描述为其顶点的 " "[PackedVector2Array]。\n" "要获取覆盖整个位图的多边形,请传递:\n" "[codeblock]\n" "Rect2(Vector2(), get_size())\n" "[/codeblock]\n" "[param epsilon] 被传递给 RDP,以控制多边形覆盖位图的准确程度:[param " "epsilon] 越低,对应的多边形中的点越多。" #: doc/classes/BitMap.xml msgid "Resizes the image to [param new_size]." msgstr "将该图像的大小修改为 [param new_size]。" #: doc/classes/BitMap.xml msgid "" "Sets the bitmap's element at the specified position, to the specified value." msgstr "将位图中指定位置的元素设置为指定值。" #: doc/classes/BitMap.xml msgid "Sets a rectangular portion of the bitmap to the specified value." msgstr "将位图的矩形部分设置为指定值。" #: doc/classes/Bone2D.xml msgid "A joint used with [Skeleton2D] to control and animate other nodes." msgstr "与 [Skeleton2D] 一起使用的关节,能够控制并动画其他节点。" #: doc/classes/Bone2D.xml msgid "" "A hierarchy of [Bone2D]s can be bound to a [Skeleton2D] to control and " "animate other [Node2D] nodes.\n" "You can use [Bone2D] and [Skeleton2D] nodes to animate 2D meshes created " "with the [Polygon2D] UV editor.\n" "Each bone has a [member rest] transform that you can reset to with [method " "apply_rest]. These rest poses are relative to the bone's parent.\n" "If in the editor, you can set the rest pose of an entire skeleton using a " "menu option, from the code, you need to iterate over the bones to set their " "individual rest poses." msgstr "" "[Bone2D] 层级结构可以绑定到 [Skeleton2D] 上,控制并动画其他 [Node2D] 节点。\n" "你可以使用 [Bone2D] 和 [Skeleton2D] 节点对使用 [Polygon2D] UV 编辑器创建的 " "2D 网格进行动画。\n" "每个骨骼都有一个 [member rest] 变换,你可以用 [method apply_rest] 来重置到这" "个变换。这些放松姿势是相对于骨骼的父节点而言的。\n" "如果在编辑器中,你可以使用菜单选项设置整个骨架的放松姿势,从代码中,你需要遍" "历骨骼来设置它们各自的放松姿势。" #: doc/classes/Bone2D.xml msgid "" "Resets the bone to the rest pose. This is equivalent to setting [member " "Node2D.transform] to [member rest]." msgstr "" "将骨骼重置为放松姿势。相当于将 [member Node2D.transform] 设置为 [member " "rest]。" #: doc/classes/Bone2D.xml msgid "" "Returns whether this [Bone2D] is going to autocalculate its length and bone " "angle using its first [Bone2D] child node, if one exists. If there are no " "[Bone2D] children, then it cannot autocalculate these values and will print " "a warning." msgstr "" "如果该 [Bone2D] 存在骨骼子节点,则返回是否要使用第一个 [Bone2D] 子节点自动计" "算其长度和骨骼角度。如果没有 [Bone2D] 子节点,则无法自动计算这些值,会打印一" "条警告。" #: doc/classes/Bone2D.xml msgid "" "Returns the angle of the bone in the [Bone2D].\n" "[b]Note:[/b] This is different from the [Bone2D]'s rotation. The bone's " "angle is the rotation of the bone shown by the gizmo, which is unaffected by " "the [Bone2D]'s [member Node2D.transform]." msgstr "" "返回 [Bone2D] 中骨骼的角度。\n" "[b]注意:[/b]这与 [Bone2D] 的旋转不同。骨骼角度是小工具显示的骨骼旋转,不受 " "[Bone2D] 的 [member Node2D.transform] 的影响。" #: doc/classes/Bone2D.xml msgid "" "Returns the node's index as part of the entire skeleton. See [Skeleton2D]." msgstr "返回节点在整个骨架中的索引号。见 [Skeleton2D]。" #: doc/classes/Bone2D.xml msgid "Returns the length of the bone in the [Bone2D] node." msgstr "返回 [Bone2D] 节点中骨骼的长度。" #: doc/classes/Bone2D.xml msgid "" "Returns the node's [member rest] [Transform2D] if it doesn't have a parent, " "or its rest pose relative to its parent." msgstr "" "如果节点没有父节点,返回节点的 [member rest] [Transform2D],或者返回它相对于" "父节点的放松姿势。" #: doc/classes/Bone2D.xml msgid "" "When set to [code]true[/code], the [Bone2D] node will attempt to " "automatically calculate the bone angle and length using the first child " "[Bone2D] node, if one exists. If none exist, the [Bone2D] cannot " "automatically calculate these values and will print a warning." msgstr "" "当设置为 [code]true[/code] 时,该 [Bone2D] 节点将尝试使用第一个子 [Bone2D] 节" "点(如果存在)自动计算骨骼角度和长度。如果不存在子节点,[Bone2D] 将无法自动计" "算这些值,并将输出一条警告。" #: doc/classes/Bone2D.xml msgid "" "Sets the bone angle for the [Bone2D]. This is typically set to the rotation " "from the [Bone2D] to a child [Bone2D] node.\n" "[b]Note:[/b] This is different from the [Bone2D]'s rotation. The bone's " "angle is the rotation of the bone shown by the gizmo, which is unaffected by " "the [Bone2D]'s [member Node2D.transform]." msgstr "" "设置 [Bone2D] 节点的骨骼角度。这通常设置为从 [Bone2D] 节点到子 [Bone2D] 节点" "的旋转。\n" "[b]注意:[/b]这与 [Bone2D] 的旋转不同。骨骼角度是 [Bone2D] 小工具显示的骨骼旋" "转,不受 [Bone2D] 的 [member Node2D.transform] 的影响。" #: doc/classes/Bone2D.xml msgid "Sets the length of the bone in the [Bone2D]." msgstr "设置该 [Bone2D] 中骨骼的长度。" #: doc/classes/Bone2D.xml msgid "" "Rest transform of the bone. You can reset the node's transforms to this " "value using [method apply_rest]." msgstr "" "骨骼的放松变换。你可以使用 [method apply_rest] 将节点的变换重置为这个值。" #: doc/classes/BoneAttachment3D.xml msgid "" "А node that dynamically copies or overrides the 3D transform of a bone in " "its parent [Skeleton3D]." msgstr "对父级 [Skeleton3D] 中某个骨骼的 3D 变换进行复制或覆盖的节点。" #: doc/classes/BoneAttachment3D.xml msgid "" "This node selects a bone in a [Skeleton3D] and attaches to it. This means " "that the [BoneAttachment3D] node will either dynamically copy or override " "the 3D transform of the selected bone." msgstr "" "这个节点能够选中 [Skeleton3D] 中的某个骨骼并附加到这个骨骼上。这样 " "[BoneAttachment3D] 节点就能够动态复制或覆盖所选骨骼的 3D 变换。" #: doc/classes/BoneAttachment3D.xml msgid "" "Returns the parent or external [Skeleton3D] node if it exists, otherwise " "returns [code]null[/code]." msgstr "" "如果存在父级或外部 [Skeleton3D] 节点则将其返回,否则返回 [code]null[/code]。" #: doc/classes/BoneAttachment3D.xml msgid "" "A function that is called automatically when the [Skeleton3D] is updated. " "This function is where the [BoneAttachment3D] node updates its position so " "it is correctly bound when it is [i]not[/i] set to override the bone pose." msgstr "" "当 [Skeleton3D] 被更新时自动调用的函数。该函数是 [BoneAttachment3D] 节点更新" "其位置的地方,以便在[i]未[/i]设置为覆盖骨骼姿势时正确绑定。" #: doc/classes/BoneAttachment3D.xml doc/classes/ModifierBoneTarget3D.xml #: doc/classes/SpringBoneCollision3D.xml msgid "The index of the attached bone." msgstr "所附着骨骼的索引。" #: doc/classes/BoneAttachment3D.xml doc/classes/ModifierBoneTarget3D.xml #: doc/classes/SpringBoneCollision3D.xml msgid "The name of the attached bone." msgstr "所附着骨骼的名称。" #: doc/classes/BoneAttachment3D.xml msgid "The [NodePath] to the external [Skeleton3D] node." msgstr "指向外部 [Skeleton3D] 节点的 [NodePath]。" #: doc/classes/BoneAttachment3D.xml msgid "" "Whether the [BoneAttachment3D] node will override the bone pose of the bone " "it is attached to. When set to [code]true[/code], the [BoneAttachment3D] " "node can change the pose of the bone. When set to [code]false[/code], the " "[BoneAttachment3D] will always be set to the bone's transform.\n" "[b]Note:[/b] This override performs interruptively in the skeleton update " "process using signals due to the old design. It may cause unintended " "behavior when used at the same time with [SkeletonModifier3D]." msgstr "" "[BoneAttachment3D] 节点是否会覆盖所附着骨骼的骨骼姿势。设置为 [code]true[/" "code] 时,[BoneAttachment3D] 节点能够更改骨骼的姿势。设置为 [code]false[/" "code] 时,[BoneAttachment3D] 始终为该骨骼的变换。\n" "[b]注意:[/b]由于固有的设计,覆盖是在骨架更新的过程中使用信号打断执行的。与 " "[SkeletonModifier3D] 一起使用时可能会造成预料之外的行为。" #: doc/classes/BoneAttachment3D.xml msgid "" "Whether the [BoneAttachment3D] node will use an external [Skeleton3D] node " "rather than attempting to use its parent node as the [Skeleton3D]. When set " "to [code]true[/code], the [BoneAttachment3D] node will use the external " "[Skeleton3D] node set in [member external_skeleton]." msgstr "" "设置 [BoneAttachment3D] 节点是否使用外部 [Skeleton3D] 节点,而不是尝试使用其" "父节点作为 [Skeleton3D]。当设置为 [code]true[/code] 时,[BoneAttachment3D] 节" "点将使用 [member external_skeleton] 中设置的外部 [Skeleton3D] 节点。" #: doc/classes/BoneConstraint3D.xml msgid "" "A node that may modify Skeleton3D's bone with associating the two bones." msgstr "能够修改 Skeleton3D 中骨骼对两根骨骼进行关联的节点。" #: doc/classes/BoneConstraint3D.xml msgid "" "Base class of [SkeletonModifier3D] that modifies the bone set in [method " "set_apply_bone] based on the transform of the bone retrieved by [method " "get_reference_bone]." msgstr "" "[SkeletonModifier3D] 的基类,能够根据 [method get_reference_bone] 所获得骨骼" "的变换修改 [method set_apply_bone] 中设置的骨骼。" #: doc/classes/BoneConstraint3D.xml msgid "Clear all settings." msgstr "清空所有设置。" #: doc/classes/BoneConstraint3D.xml msgid "Returns the apply amount of the setting at [param index]." msgstr "返回索引为 [param index] 的设置的应用量。" #: doc/classes/BoneConstraint3D.xml msgid "" "Returns the apply bone of the setting at [param index]. This bone will be " "modified." msgstr "返回索引为 [param index] 的设置的应用骨骼。骨骼会发生修改。" #: doc/classes/BoneConstraint3D.xml msgid "" "Returns the apply bone name of the setting at [param index]. This bone will " "be modified." msgstr "返回索引为 [param index] 的设置的应用骨骼名称。骨骼会发生修改。" #: doc/classes/BoneConstraint3D.xml msgid "" "Returns the reference bone of the setting at [param index].\n" "This bone will be only referenced and not modified by this modifier." msgstr "" "返回索引为 [param index] 的设置的参考骨骼。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneConstraint3D.xml msgid "" "Returns the reference bone name of the setting at [param index].\n" "This bone will be only referenced and not modified by this modifier." msgstr "" "返回索引为 [param index] 的设置的参考骨骼名称。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneConstraint3D.xml #, fuzzy msgid "" "Returns the reference node path of the setting at [param index].\n" "This node will be only referenced and not modified by this modifier." msgstr "" "返回索引为 [param index] 的设置的参考骨骼。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneConstraint3D.xml #, fuzzy msgid "" "Returns the reference target type of the setting at [param index]. See also " "[enum ReferenceType]." msgstr "" "返回索引为 [param index] 的设置的参考骨骼名称。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneConstraint3D.xml msgid "Returns the number of settings in the modifier." msgstr "返回修改器中的设置数。" #: doc/classes/BoneConstraint3D.xml msgid "" "Sets the apply amount of the setting at [param index] to [param amount]." msgstr "将索引为 [param index] 的设置的应用量设置为 [param amount]。" #: doc/classes/BoneConstraint3D.xml msgid "" "Sets the apply bone of the setting at [param index] to [param bone]. This " "bone will be modified." msgstr "" "将索引为 [param index] 的设置的应用骨骼设置为 [param bone]。骨骼会发生修改。" #: doc/classes/BoneConstraint3D.xml msgid "" "Sets the apply bone of the setting at [param index] to [param bone_name]. " "This bone will be modified." msgstr "" "将索引为 [param index] 的设置的应用骨骼名称设置为 [param bone_name]。骨骼会发" "生修改。" #: doc/classes/BoneConstraint3D.xml msgid "" "Sets the reference bone of the setting at [param index] to [param bone].\n" "This bone will be only referenced and not modified by this modifier." msgstr "" "将索引为 [param index] 的设置的参考骨骼设置为 [param bone]。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneConstraint3D.xml msgid "" "Sets the reference bone of the setting at [param index] to [param " "bone_name].\n" "This bone will be only referenced and not modified by this modifier." msgstr "" "将索引为 [param index] 的设置的参考骨骼名称设置为 [param bone_name]。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneConstraint3D.xml #, fuzzy msgid "" "Sets the reference node path of the setting at [param index] to [param " "node].\n" "This node will be only referenced and not modified by this modifier." msgstr "" "将索引为 [param index] 的设置的参考骨骼设置为 [param bone]。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneConstraint3D.xml #, fuzzy msgid "" "Sets the reference target type of the setting at [param index] to [param " "type]. See also [enum ReferenceType]." msgstr "" "将索引为 [param index] 的设置的参考骨骼设置为 [param bone]。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneConstraint3D.xml msgid "Sets the number of settings in the modifier." msgstr "设置修改器中的设置数。" #: doc/classes/BoneConstraint3D.xml msgid "" "The reference target is a bone. In this case, the reference target spaces is " "local space." msgstr "" #: doc/classes/BoneConstraint3D.xml msgid "" "The reference target is a [Node3D]. In this case, the reference target " "spaces is model space.\n" "In other words, the reference target's coordinates are treated as if it were " "placed directly under [Skeleton3D] which parent of the [BoneConstraint3D]." msgstr "" #: doc/classes/BoneMap.xml msgid "" "Describes a mapping of bone names for retargeting [Skeleton3D] into common " "names defined by a [SkeletonProfile]." msgstr "" "描述骨骼名称的映射,用于将 [Skeleton3D] 重定向至 [SkeletonProfile] 中定义的通" "用名称。" #: doc/classes/BoneMap.xml msgid "" "This class contains a dictionary that uses a list of bone names in " "[SkeletonProfile] as key names.\n" "By assigning the actual [Skeleton3D] bone name as the key value, it maps the " "[Skeleton3D] to the [SkeletonProfile]." msgstr "" "这个类中有一个字典,使用 [SkeletonProfile] 中的骨骼名称作为键名。\n" "将实际的 [Skeleton3D] 骨骼名称赋为键值后,就会将 [Skeleton3D] 映射到 " "[SkeletonProfile]。" #: doc/classes/BoneMap.xml doc/classes/SkeletonProfile.xml #: doc/classes/SkeletonProfileHumanoid.xml msgid "Retargeting 3D Skeletons" msgstr "重定向 3D 骨架" #: doc/classes/BoneMap.xml msgid "" "Returns a profile bone name having [param skeleton_bone_name]. If not found, " "an empty [StringName] will be returned.\n" "In the retargeting process, the returned bone name is the bone name of the " "target skeleton." msgstr "" "返回具有 [param skeleton_bone_name] 的轮廓骨骼名称。如果没有找到,将返回一个" "空的 [StringName]。\n" "在重定向过程中,返回的骨骼名称是目标骨架的骨骼名称。" #: doc/classes/BoneMap.xml msgid "" "Returns a skeleton bone name is mapped to [param profile_bone_name].\n" "In the retargeting process, the returned bone name is the bone name of the " "source skeleton." msgstr "" "返回与配置中的某个骨骼名称 [param profile_bone_name] 映射的骨架中的骨骼名" "称。\n" "在重定向过程中,设置的骨骼名称是源骨架中骨骼的名称。" #: doc/classes/BoneMap.xml msgid "" "Maps a skeleton bone name to [param profile_bone_name].\n" "In the retargeting process, the setting bone name is the bone name of the " "source skeleton." msgstr "" "将骨架中的某个骨骼名称映射到配置中的骨骼名称 [param profile_bone_name]。\n" "在重定向过程中,设置的骨骼名称是源骨架中骨骼的名称。" #: doc/classes/BoneMap.xml msgid "" "A [SkeletonProfile] of the mapping target. Key names in the [BoneMap] are " "synchronized with it." msgstr "映射目标的 [SkeletonProfile]。[BoneMap] 中的键名与此同步。" #: doc/classes/BoneMap.xml msgid "" "This signal is emitted when change the key value in the [BoneMap]. This is " "used to validate mapping and to update [BoneMap] editor." msgstr "" "[BoneMap] 中的键值发生改变时发出此信号。用于验证映射和更新 [BoneMap] 编辑器。" #: doc/classes/BoneMap.xml msgid "" "This signal is emitted when change the value in profile or change the " "reference of profile. This is used to update key names in the [BoneMap] and " "to redraw the [BoneMap] editor." msgstr "" "配置中的值发生改变或配置的引用发生改变时发出此信号。用于更新 [BoneMap] 中的键" "名、重绘 [BoneMap] 编辑器。" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "A node that propagates and disperses the child bone's twist to the parent " "bones." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "This [BoneTwistDisperser3D] allows for smooth twist interpolation between " "multiple bones by dispersing the end bone's twist to the parents. This only " "changes the twist without changing the global position of each joint.\n" "This is useful for smoothly twisting bones in combination with " "[CopyTransformModifier3D] and IK.\n" "[b]Note:[/b] If an extracted twist is greater than 180 degrees, flipping " "occurs. This is similar to [ConvertTransformModifier3D]." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/IKModifier3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Clears all settings." msgstr "清空所有设置。" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "Returns the damping curve when [method get_disperse_mode] is [constant " "DISPERSE_MODE_CUSTOM]." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "Returns whether to use automatic amount assignment or to allow manual " "assignment." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/LimitAngularVelocityModifier3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Returns the end bone index of the bone chain." msgstr "返回骨骼链末尾骨骼的索引。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/SpringBoneSimulator3D.xml #, fuzzy msgid "" "Returns the tail direction of the end bone of the bone chain when [method " "is_end_bone_extended] is [code]true[/code]." msgstr "" "当 [method is_end_bone_extended] 为 [code]true[/code] 时,返回骨骼链末端骨骼" "的尾部方向。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/LimitAngularVelocityModifier3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Returns the end bone name of the bone chain." msgstr "返回骨骼链末尾骨骼的名称。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Returns the bone index at [param joint] in the bone chain's joint list." msgstr "返回骨骼链关节列表中位于 [param joint] 的骨骼的索引。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Returns the bone name at [param joint] in the bone chain's joint list." msgstr "返回骨骼链关节列表中位于 [param joint] 的骨骼的名称。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Returns the joint count of the bone chain's joint list." msgstr "返回骨骼链关节列表中的关节数量。" #: doc/classes/BoneTwistDisperser3D.xml #, fuzzy msgid "" "Returns the twist amount at [param joint] in the bone chain's joint list " "when [method get_disperse_mode] is [constant DISPERSE_MODE_CUSTOM]." msgstr "" "当 [method is_config_individual] 为 [code]true[/code] 时,设置骨骼链关节列表" "中 [param joint] 关节的重力强度。" #: doc/classes/BoneTwistDisperser3D.xml #, fuzzy msgid "" "Returns the reference bone to extract twist of the setting at [param " "index].\n" "This bone is either the end of the chain or its parent, depending on [method " "is_end_bone_extended]." msgstr "" "返回索引为 [param index] 的设置的参考骨骼名称。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneTwistDisperser3D.xml #, fuzzy msgid "" "Returns the reference bone name to extract twist of the setting at [param " "index].\n" "This bone is either the end of the chain or its parent, depending on [method " "is_end_bone_extended]." msgstr "" "返回索引为 [param index] 的设置的参考骨骼名称。\n" "修改器只会参考该骨骼,不会对其进行修改。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/LimitAngularVelocityModifier3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Returns the root bone index of the bone chain." msgstr "返回骨骼链根骨骼的索引。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/LimitAngularVelocityModifier3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Returns the root bone name of the bone chain." msgstr "返回骨骼链根骨骼的名称。" #: doc/classes/BoneTwistDisperser3D.xml #, fuzzy msgid "" "Returns the rotation to an arbitrary state before twisting for the current " "bone pose to extract the twist when [method is_twist_from_rest] is " "[code]false[/code]." msgstr "" "当 [method is_end_bone_extended] 为 [code]true[/code] 时,返回骨骼链末端骨骼" "的尾部方向。" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "Returns the position at which to divide the segment between joints for " "weight assignment when [method get_disperse_mode] is [constant " "DISPERSE_MODE_WEIGHTED]." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/SpringBoneSimulator3D.xml doc/classes/TwoBoneIK3D.xml #, fuzzy msgid "Returns [code]true[/code] if the end bone is extended to have a tail." msgstr "如果末端骨骼被扩展形成尾部,则返回 [code]true[/code]。" #: doc/classes/BoneTwistDisperser3D.xml #, fuzzy msgid "" "Returns [code]true[/code] if extracting the twist amount from the difference " "between the bone rest and the current bone pose." msgstr "如果在给定动画节点之间存在过渡,则返回 [code]true[/code]。" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "Sets the damping curve when [method get_disperse_mode] is [constant " "DISPERSE_MODE_CUSTOM]." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "Sets whether to use automatic amount assignment or to allow manual " "assignment." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/LimitAngularVelocityModifier3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Sets the end bone index of the bone chain." msgstr "设置骨骼链中末端骨骼的索引。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "" "Sets the end bone tail direction of the bone chain when [method " "is_end_bone_extended] is [code]true[/code]." msgstr "" "当 [method is_end_bone_extended] 为 [code]true[/code] 时,设置骨骼链中末端骨" "骼的尾部方向。" #: doc/classes/BoneTwistDisperser3D.xml #, fuzzy msgid "" "Sets the end bone name of the bone chain.\n" "[b]Note:[/b] The end bone must be a child of the root bone." msgstr "" "设置骨骼链中末端骨骼的名称。\n" "[b]注意:[/b] 末端骨骼必须是根骨骼或根骨骼的子骨骼。如果相同,则必须通过 " "[method set_extend_end_bone] 扩展尾部,使骨骼产生摆动。" #: doc/classes/BoneTwistDisperser3D.xml #, fuzzy msgid "" "If [param enabled] is [code]true[/code], the end bone is extended to have a " "tail.\n" "If [param enabled] is [code]false[/code], [method get_reference_bone] " "becomes a parent of the end bone and it uses the vector to the end bone as a " "twist axis." msgstr "" "如果 [param enabled] 为 [code]true[/code],则会延伸末端骨骼形成尾部。\n" "扩展的尾部配置会分配给关节列表中的最后一个元素。\n" "换句话说,如果将 [param enabled] 设置为 [code]false[/code],则关节列表中最后" "一个元素的配置在模拟结果中将没有效果。" #: doc/classes/BoneTwistDisperser3D.xml #, fuzzy msgid "" "Sets the twist amount at [param joint] in the bone chain's joint list when " "[method get_disperse_mode] is [constant DISPERSE_MODE_CUSTOM]." msgstr "" "当 [method is_config_individual] 为 [code]true[/code] 时,设置骨骼链关节列表" "中 [param joint] 关节的重力强度。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/LimitAngularVelocityModifier3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Sets the root bone index of the bone chain." msgstr "设置骨骼链中根骨骼的索引。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/ChainIK3D.xml #: doc/classes/LimitAngularVelocityModifier3D.xml #: doc/classes/SpringBoneSimulator3D.xml msgid "Sets the root bone name of the bone chain." msgstr "设置骨骼链中根骨骼的名称。" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "Sets the rotation to an arbitrary state before twisting for the current bone " "pose to extract the twist when [method is_twist_from_rest] is [code]false[/" "code].\n" "In other words, by calling [method set_twist_from] by [signal " "SkeletonModifier3D.modification_processed] of a specific " "[SkeletonModifier3D], you can extract only the twists generated by modifiers " "processed after that but before this [BoneTwistDisperser3D]." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "If [param enabled] is [code]true[/code], it extracts the twist amount from " "the difference between the bone rest and the current bone pose.\n" "If [param enabled] is [code]false[/code], it extracts the twist amount from " "the difference between [method get_twist_from] and the current bone pose. " "See also [method set_twist_from]." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "Sets the position at which to divide the segment between joints for weight " "assignment when [method get_disperse_mode] is [constant " "DISPERSE_MODE_WEIGHTED].\n" "For example, when [param weight_position] is [code]0.5[/code], if two bone " "segments with a length of [code]1.0[/code] exist between three joints, " "weights are assigned to each joint from root to end at ratios of [code]0.5[/" "code], [code]1.0[/code], and [code]0.5[/code]. Then amounts become " "[code]0.25[/code], [code]0.75[/code], and [code]1.0[/code] respectively." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml #, fuzzy msgid "" "If [code]true[/code], the solver retrieves the bone axis from the bone pose " "every frame.\n" "If [code]false[/code], the solver retrieves the bone axis from the bone rest " "and caches it." msgstr "" "如果 [code]true[/code],则限制对称地分布在骨骼两侧。\n" "如果 [code]false[/code],则可以为骨骼放松时的每一侧单独指定限制。" #: doc/classes/BoneTwistDisperser3D.xml doc/classes/IterateIK3D.xml #: doc/classes/SplineIK3D.xml doc/classes/SpringBoneSimulator3D.xml #: doc/classes/TwoBoneIK3D.xml msgid "The number of settings." msgstr "设置的数量。" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "Assign amounts so that they monotonically increase from [code]0.0[/code] to " "[code]1.0[/code], ensuring all weights are equal. For example, with five " "joints, the amounts would be [code]0.2[/code], [code]0.4[/code], [code]0.6[/" "code], [code]0.8[/code], and [code]1.0[/code] starting from the root bone." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "Assign amounts so that they monotonically increase from [code]0.0[/code] to " "[code]1.0[/code], based on the length of the bones between joint segments. " "See also [method set_weight_position]." msgstr "" #: doc/classes/BoneTwistDisperser3D.xml msgid "" "You can assign arbitrary amounts to the joint list. See also [method " "set_joint_twist_amount].\n" "When [method is_end_bone_extended] is [code]false[/code], a child of the " "reference bone exists solely to determine the twist axis, so its custom " "amount has absolutely no effect at all." msgstr "" #: doc/classes/bool.xml msgid "A built-in boolean type." msgstr "内置布尔类型。" #: doc/classes/bool.xml msgid "" "The [bool] is a built-in [Variant] type that may only store one of two " "values: [code]true[/code] or [code]false[/code]. You can imagine it as a " "switch that can be either turned on or off, or as a binary digit that can " "either be 1 or 0.\n" "Booleans can be directly used in [code]if[/code], and other conditional " "statements:\n" "[codeblocks]\n" "[gdscript]\n" "var can_shoot = true\n" "if can_shoot:\n" "\tlaunch_bullet()\n" "[/gdscript]\n" "[csharp]\n" "bool canShoot = true;\n" "if (canShoot)\n" "{\n" "\tLaunchBullet();\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "All comparison operators return booleans ([code]==[/code], [code]>[/code], " "[code]<=[/code], etc.). As such, it is not necessary to compare booleans " "themselves. You do not need to add [code]== true[/code] or [code]== false[/" "code].\n" "Booleans can be combined with the logical operators [code]and[/code], " "[code]or[/code], [code]not[/code] to create complex conditions:\n" "[codeblocks]\n" "[gdscript]\n" "if bullets > 0 and not is_reloading():\n" "\tlaunch_bullet()\n" "\n" "if bullets == 0 or is_reloading():\n" "\tplay_clack_sound()\n" "[/gdscript]\n" "[csharp]\n" "if (bullets > 0 && !IsReloading())\n" "{\n" "\tLaunchBullet();\n" "}\n" "\n" "if (bullets == 0 || IsReloading())\n" "{\n" "\tPlayClackSound();\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] In modern programming languages, logical operators are " "evaluated in order. All remaining conditions are skipped if their result " "would have no effect on the final value. This concept is known as " "[url=https://en.wikipedia.org/wiki/Short-circuit_evaluation]short-circuit " "evaluation[/url] and can be useful to avoid evaluating expensive conditions " "in some performance-critical cases.\n" "[b]Note:[/b] By convention, built-in methods and properties that return " "booleans are usually defined as yes-no questions, single adjectives, or " "similar ([method String.is_empty], [method Node.can_process], [member " "Camera2D.enabled], etc.)." msgstr "" "布尔类型 [bool] 是内置的 [Variant] 类型,只能存储 [code]true[/code](真)和 " "[code]false[/code](假)的其中之一。你可以把它理解为开关,要么处于打开状态," "要么处于关闭状态。也可以理解为二进制所使用的数字,只有 1 或者 0。\n" "[code]if[/code] 等条件语句中可以直接使用布尔值:\n" "[codeblocks]\n" "[gdscript]\n" "var can_shoot = true\n" "if can_shoot:\n" "\tlaunch_bullet()\n" "[/gdscript]\n" "[csharp]\n" "bool canShoot = true;\n" "if (canShoot)\n" "{\n" "\tLaunchBullet();\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "比较运算符返回的都是布尔值([code]==[/code]、[code]>[/code]、[code]<=[/code] " "等)。没有必要比较布尔值本身,因此不需要在这些比较后面加上 [code]== true[/" "code] 或 [code]== false[/code]。\n" "布尔值可以和逻辑运算符 [code]and[/code]、[code]or[/code]、[code]not[/code] 组" "合,构成复杂的条件:\n" "[codeblocks]\n" "[gdscript]\n" "if bullets > 0 and not is_reloading():\n" "\tlaunch_bullet()\n" "\n" "if bullets == 0 or is_reloading():\n" "\tplay_clack_sound()\n" "[/gdscript]\n" "[csharp]\n" "if (bullets > 0 && !IsReloading())\n" "{\n" "\tLaunchBullet();\n" "}\n" "\n" "if (bullets == 0 || IsReloading())\n" "{\n" "\tPlayClackSound();\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]在现代编程语言中,逻辑运算符是按顺序求值的。如果后续条件不会对最" "终结果产生影响,那么就会跳过对这些条件的求值。这种行为叫作[url=https://" "zh.wikipedia.org/wiki/%E7%9F%AD%E8%B7%AF%E6%B1%82%E5%80%BC]短路求值[/url],在" "注重性能的场合能够避免对开销较大的条件进行求值。\n" "[b]注意:[/b]根据惯例,返回布尔值的内置方法和属性通常都以判断题、形容词等形式" "命名([method String.is_empty]、[method Node.can_process]、[member " "Camera2D.enabled] 等)。" #: doc/classes/bool.xml msgid "Constructs a [bool] set to [code]false[/code]." msgstr "构造设置为 [code]false[/code] 的 [bool]。" #: doc/classes/bool.xml msgid "Constructs a [bool] as a copy of the given [bool]." msgstr "构造给定 [bool] 的副本。" #: doc/classes/bool.xml msgid "" "Cast a [float] value to a boolean value. Returns [code]false[/code] if " "[param from] is equal to [code]0.0[/code] (including [code]-0.0[/code]), and " "[code]true[/code] for all other values (including [constant @GDScript.INF] " "and [constant @GDScript.NAN])." msgstr "" "将 [float] 值转换为布尔值。如果 [param from] 等于 [code]0.0[/code](包括 " "[code]-0.0[/code])则返回 [code]false[/code],其他值则返回 [code]true[/code]" "(包括 [constant @GDScript.INF] 和 [constant @GDScript.NAN])。" #: doc/classes/bool.xml msgid "" "Cast an [int] value to a boolean value. Returns [code]false[/code] if [param " "from] is equal to [code]0[/code], and [code]true[/code] for all other values." msgstr "" "将 [int] 值转换为布尔值。如果 [param from] 等于 [code]0[/code] 则返回 " "[code]false[/code],其他值则返回 [code]true[/code]。" #: doc/classes/bool.xml msgid "" "Returns [code]true[/code] if the two booleans are not equal. That is, one is " "[code]true[/code] and the other is [code]false[/code]. This operation can be " "seen as a logical XOR." msgstr "" "如果两个布尔值不同则返回 [code]true[/code],即一个是 [code]true[/code]、一个" "是 [code]false[/code] 的情况。这个运算可以视为逻辑异或(XOR)。" #: doc/classes/bool.xml msgid "" "Returns [code]true[/code] if the left operand is [code]false[/code] and the " "right operand is [code]true[/code]." msgstr "" "如果左操作数为 [code]false[/code] 且右操作数为 [code]true[/code],则返回 " "[code]true[/code]。" #: doc/classes/bool.xml msgid "" "Returns [code]true[/code] if the two booleans are equal. That is, both are " "[code]true[/code] or both are [code]false[/code]. This operation can be seen " "as a logical EQ or XNOR." msgstr "" "如果两个布尔值相同则返回 [code]true[/code],即都是 [code]true[/code] 或都是 " "[code]false[/code] 的情况。这个运算可以视为逻辑相等(EQ)或者同或(XNOR)。" #: doc/classes/bool.xml msgid "" "Returns [code]true[/code] if the left operand is [code]true[/code] and the " "right operand is [code]false[/code]." msgstr "" "如果左操作数为 [code]true[/code] 且右操作数为 [code]false[/code],则返回 " "[code]true[/code]。" #: doc/classes/BoxContainer.xml msgid "" "A container that arranges its child controls horizontally or vertically." msgstr "将子控件横向或纵向排列的容器。" #: doc/classes/BoxContainer.xml msgid "" "A container that arranges its child controls horizontally or vertically, " "rearranging them automatically when their minimum size changes." msgstr "" "将子控件横向或纵向排列的容器,会在这些控件的最小尺寸发生改变时自动重排。" #: doc/classes/BoxContainer.xml msgid "" "Adds a [Control] node to the box as a spacer. If [param begin] is " "[code]true[/code], it will insert the [Control] node in front of all other " "children." msgstr "" "添加 [Control] 节点作为间隔。如果 [param begin] 为 [code]true[/code],则会将" "该 [Control] 节点添加到所有其他节点之前。" #: doc/classes/BoxContainer.xml doc/classes/FlowContainer.xml msgid "" "The alignment of the container's children (must be one of [constant " "ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END])." msgstr "" "该容器子节点的对齐方式(必须是 [constant ALIGNMENT_BEGIN]、[constant " "ALIGNMENT_CENTER]、[constant ALIGNMENT_END] 之一)。" #: doc/classes/BoxContainer.xml msgid "" "If [code]true[/code], the [BoxContainer] will arrange its children " "vertically, rather than horizontally.\n" "Can't be changed when using [HBoxContainer] and [VBoxContainer]." msgstr "" "如果为 [code]true[/code],则该 [BoxContainer] 会将子节点垂直排列,否则会水平" "排列。\n" "使用 [HBoxContainer] 和 [VBoxContainer] 时无法改变。" #: doc/classes/BoxContainer.xml doc/classes/FlowContainer.xml msgid "" "The child controls will be arranged at the beginning of the container, i.e. " "top if orientation is vertical, left if orientation is horizontal (right for " "RTL layout)." msgstr "" "子控件会被排列在该容器的开头,如果是垂直朝向则为顶部,如果是水平朝向则为左侧" "(RTL 布局时为右侧)。" #: doc/classes/BoxContainer.xml doc/classes/FlowContainer.xml msgid "The child controls will be centered in the container." msgstr "子控件会在该容器里居中。" #: doc/classes/BoxContainer.xml doc/classes/FlowContainer.xml msgid "" "The child controls will be arranged at the end of the container, i.e. bottom " "if orientation is vertical, right if orientation is horizontal (left for RTL " "layout)." msgstr "" "子控件会被排列在该容器的末尾,如果是垂直朝向则为底部,如果是水平朝向则为右侧" "(RTL 布局时为左侧)。" #: doc/classes/BoxContainer.xml msgid "The space between the [BoxContainer]'s elements, in pixels." msgstr "[BoxContainer] 元素之间的距离,单位为像素。" #: doc/classes/BoxMesh.xml msgid "Generate an axis-aligned box [PrimitiveMesh]." msgstr "生成轴对齐盒 [PrimitiveMesh]。" #: doc/classes/BoxMesh.xml msgid "" "Generate an axis-aligned box [PrimitiveMesh].\n" "The box's UV layout is arranged in a 3×2 layout that allows texturing each " "face individually. To apply the same texture on all faces, change the " "material's UV property to [code]Vector3(3, 2, 1)[/code]. This is equivalent " "to adding [code]UV *= vec2(3.0, 2.0)[/code] in a vertex shader.\n" "[b]Note:[/b] When using a large textured [BoxMesh] (e.g. as a floor), you " "may stumble upon UV jittering issues depending on the camera angle. To solve " "this, increase [member subdivide_depth], [member subdivide_height] and " "[member subdivide_width] until you no longer notice UV jittering." msgstr "" "生成轴对齐盒 [PrimitiveMesh]。\n" "这个盒子的 UV 布局是以 3×2 的方式排列的,允许单独对每个面进行贴图。要在所有的" "面上应用相同的纹理,请将材质的 UV 属性改为 [code]Vector3(3, 2, 1)[/code]。这" "样做等价于在顶点着色器中添加 [code]UV *= vec2(3.0, 2.0)[/code]。\n" "[b]注意:[/b]当使用很大且有纹理的 [BoxMesh] 时(例如作为地板),你可能会发现 " "UV 偶尔抖动的问题,这取决于相机的角度。要解决此问题,请增加 [member " "subdivide_depth]、[member subdivide_height] 和 [member subdivide_width],直到" "你不再注意到 UV 抖动。" #: doc/classes/BoxMesh.xml doc/classes/BoxShape3D.xml #: modules/csg/doc_classes/CSGBox3D.xml msgid "The box's width, height and depth." msgstr "该盒子的宽度、高度和深度。" #: doc/classes/BoxMesh.xml msgid "Number of extra edge loops inserted along the Z axis." msgstr "沿 Z 轴插入的额外边缘环的数量。" #: doc/classes/BoxMesh.xml msgid "Number of extra edge loops inserted along the Y axis." msgstr "沿 Y 轴插入的额外边缘环的数量。" #: doc/classes/BoxMesh.xml msgid "Number of extra edge loops inserted along the X axis." msgstr "沿 X 轴插入的额外边缘环的数量。" #: doc/classes/BoxOccluder3D.xml msgid "Cuboid shape for use with occlusion culling in [OccluderInstance3D]." msgstr "与 [OccluderInstance3D] 中的遮挡剔除一起使用的长方体形状。" #: doc/classes/BoxOccluder3D.xml msgid "" "[BoxOccluder3D] stores a cuboid shape that can be used by the engine's " "occlusion culling system.\n" "See [OccluderInstance3D]'s documentation for instructions on setting up " "occlusion culling." msgstr "" "[BoxOccluder3D] 存储一个长方体形状,可供引擎的遮挡剔除系统使用。\n" "有关设置遮挡剔除的说明,请参阅 [OccluderInstance3D] 的文档。" #: doc/classes/BoxOccluder3D.xml msgid "The box's size in 3D units." msgstr "以 3D 单位表示的盒子大小。" #: doc/classes/BoxShape3D.xml msgid "A 3D box shape used for physics collision." msgstr "用于物理碰撞的 3D 盒形资源。" #: doc/classes/BoxShape3D.xml msgid "" "A 3D box shape, intended for use in physics. Usually used to provide a shape " "for a [CollisionShape3D].\n" "[b]Performance:[/b] [BoxShape3D] is fast to check collisions against. It is " "faster than [CapsuleShape3D] and [CylinderShape3D], but slower than " "[SphereShape3D]." msgstr "" "3D 盒子形状,旨在用于物理学。通常用于为 [CollisionShape3D] 提供形状。\n" "[b]性能:[/b][BoxShape3D] 可以快速检测碰撞,比 [CapsuleShape3D] 和 " "[CylinderShape3D] 快,但比 [SphereShape3D] 慢。" #: doc/classes/BoxShape3D.xml doc/classes/CharacterBody3D.xml #: doc/classes/CollisionShape3D.xml modules/gridmap/doc_classes/GridMap.xml #: doc/classes/Mesh.xml doc/classes/MeshInstance3D.xml #: doc/classes/MeshLibrary.xml msgid "3D Kinematic Character Demo" msgstr "3D 动力学角色演示" #: doc/classes/Button.xml msgid "A themed button that can contain text and an icon." msgstr "按钮,支持主题,能够包含文本和图标。" #: doc/classes/Button.xml msgid "" "[Button] is the standard themed button. It can contain text and an icon, and " "it will display them according to the current [Theme].\n" "[b]Example:[/b] Create a button and connect a method that will be called " "when the button is pressed:\n" "[codeblocks]\n" "[gdscript]\n" "func _ready():\n" "\tvar button = Button.new()\n" "\tbutton.text = \"Click me\"\n" "\tbutton.pressed.connect(_button_pressed)\n" "\tadd_child(button)\n" "\n" "func _button_pressed():\n" "\tprint(\"Hello world!\")\n" "[/gdscript]\n" "[csharp]\n" "public override void _Ready()\n" "{\n" "\tvar button = new Button();\n" "\tbutton.Text = \"Click me\";\n" "\tbutton.Pressed += ButtonPressed;\n" "\tAddChild(button);\n" "}\n" "\n" "private void ButtonPressed()\n" "{\n" "\tGD.Print(\"Hello world!\");\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "See also [BaseButton] which contains common properties and methods " "associated with this node.\n" "[b]Note:[/b] Buttons do not detect touch input and therefore don't support " "multitouch, since mouse emulation can only press one button at a given time. " "Use [TouchScreenButton] for buttons that trigger gameplay movement or " "actions." msgstr "" "[Button] 是标准的主题按钮,可以包含文字和图标,显示样式会根据当前的 [Theme] " "改变。\n" "[b]示例:[/b]创建按钮并连接在按下时调用的方法:\n" "[codeblocks]\n" "[gdscript]\n" "func _ready():\n" "\tvar button = Button.new()\n" "\tbutton.text = \"Click me\"\n" "\tbutton.pressed.connect(_button_pressed)\n" "\tadd_child(button)\n" "\n" "func _button_pressed():\n" "\tprint(\"Hello world!\")\n" "[/gdscript]\n" "[csharp]\n" "public override void _Ready()\n" "{\n" "\tvar button = new Button();\n" "\tbutton.Text = \"Click me\";\n" "\tbutton.Pressed += ButtonPressed;\n" "\tAddChild(button);\n" "}\n" "\n" "private void ButtonPressed()\n" "{\n" "\tGD.Print(\"Hello world!\");\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "另见 [BaseButton],其中包含与此节点相关联的通用属性和方法。\n" "[b]注意:[/b]按钮不处理触摸输入,因此不支持多点触控,因为模拟鼠标在给定时间只" "能按下一个按钮。请用 [TouchScreenButton] 制作触发游戏移动或动作的按钮。" #: doc/classes/Button.xml doc/classes/Dictionary.xml #: doc/classes/GridContainer.xml doc/classes/OS.xml #: doc/classes/PackedStringArray.xml doc/classes/ProjectSettings.xml #: doc/classes/ResourceLoader.xml doc/classes/RichTextLabel.xml msgid "Operating System Testing Demo" msgstr "操作系统测试演示" #: doc/classes/Button.xml msgid "Text alignment policy for the button's text." msgstr "按钮文本的文本对齐策略。" #: doc/classes/Button.xml doc/classes/RichTextLabel.xml msgid "" "If set to something other than [constant TextServer.AUTOWRAP_OFF], the text " "gets wrapped inside the node's bounding rectangle." msgstr "" "如果设置为 [constant TextServer.AUTOWRAP_OFF] 以外的值,则文本将在节点的边界" "矩形内换行。" #: doc/classes/Button.xml doc/classes/Label.xml doc/classes/Label3D.xml #: doc/classes/RichTextLabel.xml msgid "" "Autowrap space trimming flags. See [constant " "TextServer.BREAK_TRIM_START_EDGE_SPACES] and [constant " "TextServer.BREAK_TRIM_END_EDGE_SPACES] for more info." msgstr "" "自动换行空格修剪标志。详见 [constant " "TextServer.BREAK_TRIM_START_EDGE_SPACES] 和 [constant " "TextServer.BREAK_TRIM_END_EDGE_SPACES]。" #: doc/classes/Button.xml msgid "" "If [code]true[/code], text that is too large to fit the button is clipped " "horizontally. If [code]false[/code], the button will always be wide enough " "to hold the text. The text is not vertically clipped, and the button's " "height is not affected by this property." msgstr "" "如果为 [code]true[/code],则因过长而无法适配按钮的文本会被水平截断。如果为 " "[code]false[/code],则按钮的宽度始终足够容纳文本。文本不会垂直截断,按钮的高" "度不受该属性影响。" #: doc/classes/Button.xml msgid "" "When enabled, the button's icon will expand/shrink to fit the button's size " "while keeping its aspect. See also [theme_item icon_max_width]." msgstr "" "启用后,将在保持按钮图标长宽比的前提下对该图标进行扩展/收缩,从而适应按钮的大" "小。另见 [theme_item icon_max_width]。" #: doc/classes/Button.xml msgid "Flat buttons don't display decoration." msgstr "平面按钮不显示装饰。" #: doc/classes/Button.xml msgid "" "Button's icon, if text is present the icon will be placed before the text.\n" "To edit margin and spacing of the icon, use [theme_item h_separation] theme " "property and [code]content_margin_*[/code] properties of the used " "[StyleBox]es." msgstr "" "按钮的图标,如果文本存在,则图标将被放置在文本之前。\n" "要编辑图标的边距和间距,请使用 [theme_item h_separation] 主题属性,和所用 " "[StyleBox] 的 [code]content_margin_*[/code] 属性。" #: doc/classes/Button.xml msgid "" "Specifies if the icon should be aligned horizontally to the left, right, or " "center of a button. Uses the same [enum HorizontalAlignment] constants as " "the text alignment. If centered horizontally and vertically, text will draw " "on top of the icon." msgstr "" "指定图标在按钮上水平对齐的方式应该为左对齐、右对齐还是居中对齐。请使用与文本" "对齐相同的 [enum HorizontalAlignment] 常量。如果水平居中并且垂直居中,则文本" "将被绘制在图标之上。" #: doc/classes/Button.xml doc/classes/Label.xml doc/classes/Label3D.xml #: doc/classes/LineEdit.xml doc/classes/LinkButton.xml doc/classes/MenuBar.xml #: doc/classes/RichTextLabel.xml doc/classes/TextEdit.xml #: doc/classes/TextMesh.xml #, fuzzy msgid "" "Language code used for line-breaking and text shaping algorithms. If left " "empty, the current locale is used instead." msgstr "语言代码,用于断行和文本塑形算法。如果留空则使用当前区域设置。" #: doc/classes/Button.xml doc/classes/LinkButton.xml msgid "The button's text that will be displayed inside the button's area." msgstr "该按钮的文本,将显示在按钮的区域内。" #: doc/classes/Button.xml doc/classes/Label.xml doc/classes/Label3D.xml #: doc/classes/LineEdit.xml doc/classes/LinkButton.xml doc/classes/MenuBar.xml #: doc/classes/RichTextLabel.xml doc/classes/TextEdit.xml #: doc/classes/TextMesh.xml msgid "Base text writing direction." msgstr "基础文本书写方向。" #: doc/classes/Button.xml doc/classes/LinkButton.xml msgid "" "Sets the clipping behavior when the text exceeds the node's bounding " "rectangle." msgstr "设置文本超出节点边界框时的裁剪行为。" #: doc/classes/Button.xml msgid "" "Specifies if the icon should be aligned vertically to the top, bottom, or " "center of a button. Uses the same [enum VerticalAlignment] constants as the " "text alignment. If centered horizontally and vertically, text will draw on " "top of the icon." msgstr "" "指定图标在按钮上垂直对齐的方式应该为顶端对齐、底部对齐还是居中对齐。请使用与" "文本对齐相同的 [enum VerticalAlignment] 常量。如果水平居中并且垂直居中,则文" "本将被绘制在图标之上。" #: doc/classes/Button.xml msgid "Default text [Color] of the [Button]." msgstr "该 [Button] 的默认文本 [Color]。" #: doc/classes/Button.xml msgid "Text [Color] used when the [Button] is disabled." msgstr "该 [Button] 处于禁用状态时,使用的文本 [Color]。" #: doc/classes/Button.xml msgid "" "Text [Color] used when the [Button] is focused. Only replaces the normal " "text color of the button. Disabled, hovered, and pressed states take " "precedence over this color." msgstr "" "该 [Button] 处于聚焦状态时,使用的文本 [Color]。只替换该按钮的正常文本颜色。" "禁用、悬停、按下状态优先于这个颜色。" #: doc/classes/Button.xml msgid "Text [Color] used when the [Button] is being hovered." msgstr "该 [Button] 处于悬停状态时,使用的文本 [Color]。" #: doc/classes/Button.xml msgid "Text [Color] used when the [Button] is being hovered and pressed." msgstr "该 [Button] 处于悬停并按下状态时,使用的文本 [Color]。" #: doc/classes/Button.xml msgid "The tint of text outline of the [Button]." msgstr "该 [Button] 的文本轮廓的色调。" #: doc/classes/Button.xml msgid "Text [Color] used when the [Button] is being pressed." msgstr "该 [Button] 处于按下状态时,使用的文本 [Color] 。" #: doc/classes/Button.xml msgid "Icon modulate [Color] used when the [Button] is disabled." msgstr "该 [Button] 处于禁用状态时,使用的图标调色 [Color]。" #: doc/classes/Button.xml msgid "" "Icon modulate [Color] used when the [Button] is focused. Only replaces the " "normal modulate color of the button. Disabled, hovered, and pressed states " "take precedence over this color." msgstr "" "该 [Button] 处于聚焦状态时,使用的图标调色 [Color]。仅替换该按钮的正常调制颜" "色。禁用、悬停和按下状态优先于这个颜色。" #: doc/classes/Button.xml msgid "Icon modulate [Color] used when the [Button] is being hovered." msgstr "该 [Button] 处于悬停状态时,使用的图标调色 [Color]。" #: doc/classes/Button.xml msgid "" "Icon modulate [Color] used when the [Button] is being hovered and pressed." msgstr "该 [Button] 处于悬停并按下按下状态时,使用的图标调色 [Color]。" #: doc/classes/Button.xml msgid "Default icon modulate [Color] of the [Button]." msgstr "该 [Button] 的默认图标调色 [Color]。" #: doc/classes/Button.xml msgid "Icon modulate [Color] used when the [Button] is being pressed." msgstr "该 [Button] 处于按下状态时,使用的图标调色 [Color]。" #: doc/classes/Button.xml msgid "" "This constant acts as a boolean. If [code]true[/code], the minimum size of " "the button and text/icon alignment is always based on the largest stylebox " "margins, otherwise it's based on the current button state stylebox margins." msgstr "" "该常量是作为布尔值使用的。如果为 [code]true[/code],则按钮的最小尺寸和文本/图" "标对齐始终基于最大样式盒边距,否则则基于当前按钮状态样式盒边距。" #: doc/classes/Button.xml msgid "" "The horizontal space between [Button]'s icon and text. Negative values will " "be treated as [code]0[/code] when used." msgstr "" "[Button] 的图标和文本之间的水平间距。使用时会将负值当作 [code]0[/code]。" #: doc/classes/Button.xml msgid "" "The maximum allowed width of the [Button]'s icon. This limit is applied on " "top of the default size of the icon, or its expanded size if [member " "expand_icon] is [code]true[/code]. The height is adjusted according to the " "icon's ratio. If the button has additional icons (e.g. [CheckBox]), they " "will also be limited." msgstr "" "[Button] 图标的最大允许宽度。该限制应用于图标的默认大小,如果 [member " "expand_icon] 为 [code]true[/code],则应用于其扩展大小。高度根据图标的缩放进行" "调整。如果按钮有其他图标(例如 [CheckBox]),它们也将会受到限制。" #: doc/classes/Button.xml doc/classes/Label.xml doc/classes/Label3D.xml #: doc/classes/LabelSettings.xml doc/classes/RichTextLabel.xml #: doc/classes/TextEdit.xml doc/classes/TextMesh.xml #: doc/classes/TextParagraph.xml msgid "" "Additional vertical spacing between lines (in pixels), spacing is added to " "line descent. This value can be negative." msgstr "" "行与行之间的额外纵向留白(单位为像素),留白会被添加到行的降部。该值可以为负" "数。" #: doc/classes/Button.xml doc/classes/LineEdit.xml doc/classes/LinkButton.xml #: doc/classes/MenuBar.xml doc/classes/ProgressBar.xml #: doc/classes/RichTextLabel.xml doc/classes/TextEdit.xml doc/classes/Tree.xml msgid "" "The size of the text outline.\n" "[b]Note:[/b] If using a font with [member " "FontFile.multichannel_signed_distance_field] enabled, its [member " "FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of " "[theme_item outline_size] for outline rendering to look correct. Otherwise, " "the outline may appear to be cut off earlier than intended." msgstr "" "文字轮廓的大小。\n" "[b]注意:[/b]如果使用启用了 [member " "FontFile.multichannel_signed_distance_field] 的字体,其 [member " "FontFile.msdf_pixel_range] 必须至少设置为 [theme_item outline_size] 的[i]两倍" "[/i],轮廓渲染才能看起来正确。否则,轮廓可能会比预期的更早被切断。" #: doc/classes/Button.xml msgid "[Font] of the [Button]'s text." msgstr "该 [Button] 文本的 [Font]。" #: doc/classes/Button.xml msgid "Font size of the [Button]'s text." msgstr "该 [Button] 文本的字体大小。" #: doc/classes/Button.xml msgid "" "Default icon for the [Button]. Appears only if [member icon] is not assigned." msgstr "该 [Button] 的默认图标。仅在未指定 [member icon] 时显示。" #: doc/classes/Button.xml msgid "[StyleBox] used when the [Button] is disabled." msgstr "该 [Button] 处于禁用状态时使用的 [StyleBox]。" #: doc/classes/Button.xml msgid "" "[StyleBox] used when the [Button] is disabled (for right-to-left layouts)." msgstr "该 [Button] 处于禁用状态时使用的 [StyleBox](用于从右至左布局)。" #: doc/classes/Button.xml msgid "" "[StyleBox] used when the [Button] is focused. The [theme_item focus] " "[StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially " "transparent [StyleBox] should be used to ensure the base [StyleBox] remains " "visible. A [StyleBox] that represents an outline or an underline works well " "for this purpose. To disable the focus visual effect, assign a " "[StyleBoxEmpty] resource. Note that disabling the focus visual effect will " "harm keyboard/controller navigation usability, so this is not recommended " "for accessibility reasons." msgstr "" "该 [Button] 处于聚焦状态时使用的 [StyleBox]。[theme_item focus] [StyleBox] 显" "示在基础 [StyleBox] [i]之上[/i],所以应该使用部分透明的 [StyleBox],确保基础 " "[StyleBox] 仍然可见。代表轮廓或下划线的 [StyleBox] 可以很好地实现这个目的。要" "禁用聚焦的视觉效果,请指定 [StyleBoxEmpty] 资源。请注意,禁用聚焦的视觉效果会" "影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。" #: doc/classes/Button.xml msgid "[StyleBox] used when the [Button] is being hovered." msgstr "该 [Button] 处于悬停状态时使用的 [StyleBox]。" #: doc/classes/Button.xml msgid "" "[StyleBox] used when the [Button] is being hovered (for right-to-left " "layouts)." msgstr "该 [Button] 处于悬停状态时使用的 [StyleBox](用于从右至左布局)。" #: doc/classes/Button.xml msgid "" "[StyleBox] used when the [Button] is being pressed and hovered at the same " "time." msgstr "该 [Button] 同时处于按下和悬停状态时使用的 [StyleBox]。" #: doc/classes/Button.xml msgid "" "[StyleBox] used when the [Button] is being pressed and hovered at the same " "time (for right-to-left layouts)." msgstr "" "该 [Button] 同时处于按下和悬停状态时使用的 [StyleBox](用于从右至左布局)。" #: doc/classes/Button.xml msgid "Default [StyleBox] for the [Button]." msgstr "该 [Button] 的默认 [StyleBox]。" #: doc/classes/Button.xml msgid "Default [StyleBox] for the [Button] (for right-to-left layouts)." msgstr "该 [Button] 的默认 [StyleBox](用于从右至左布局)。" #: doc/classes/Button.xml msgid "[StyleBox] used when the [Button] is being pressed." msgstr "该 [Button] 处于按下状态时使用的 [StyleBox]。" #: doc/classes/Button.xml msgid "" "[StyleBox] used when the [Button] is being pressed (for right-to-left " "layouts)." msgstr "该 [Button] 处于按下状态时使用的 [StyleBox](用于从右至左布局)。" #: doc/classes/ButtonGroup.xml msgid "" "A group of buttons that doesn't allow more than one button to be pressed at " "a time." msgstr "不允许同时按下多个按钮的按钮的一个分组。" #: doc/classes/ButtonGroup.xml msgid "" "A group of [BaseButton]-derived buttons. The buttons in a [ButtonGroup] are " "treated like radio buttons: No more than one button can be pressed at a " "time. Some types of buttons (such as [CheckBox]) may have a special " "appearance in this state.\n" "Every member of a [ButtonGroup] should have [member BaseButton.toggle_mode] " "set to [code]true[/code]." msgstr "" "[BaseButton] 派生按钮的分组。[ButtonGroup] 中的按钮被视为单选按钮:同一时间最" "多只能按下一个按钮。某些类型的按钮(例如 [CheckBox])在该状态下可能会有特殊的" "外观。\n" "[ButtonGroup] 的每个成员都应该将 [member BaseButton.toggle_mode] 设置为 " "[code]true[/code]。" #: doc/classes/ButtonGroup.xml msgid "" "Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see " "[member BaseButton.button_group])." msgstr "" "返回元素类型为 [Button] 的 [Array],这些 [Button] 将其作为 [ButtonGroup](见 " "[member BaseButton.button_group])。" #: doc/classes/ButtonGroup.xml msgid "Returns the current pressed button." msgstr "返回当前按下的按钮。" #: doc/classes/ButtonGroup.xml msgid "" "If [code]true[/code], it is possible to unpress all buttons in this " "[ButtonGroup]." msgstr "" "如果为 [code]true[/code],则可以取消按下该 [ButtonGroup] 中的所有按钮。" #: doc/classes/ButtonGroup.xml msgid "Emitted when one of the buttons of the group is pressed." msgstr "当该组中的某个按钮被按下时发出。" #: doc/classes/Callable.xml msgid "A built-in type representing a method or a standalone function." msgstr "代表一个方法或一个独立函数的内置类型。" #: doc/classes/Callable.xml msgid "" "[Callable] is a built-in [Variant] type that represents a function. It can " "either be a method within an [Object] instance, or a custom callable used " "for different purposes (see [method is_custom]). Like all [Variant] types, " "it can be stored in variables and passed to other functions. It is most " "commonly used for signal callbacks.\n" "[codeblocks]\n" "[gdscript]\n" "func print_args(arg1, arg2, arg3 = \"\"):\n" "\tprints(arg1, arg2, arg3)\n" "\n" "func test():\n" "\tvar callable = Callable(self, \"print_args\")\n" "\tcallable.call(\"hello\", \"world\") # Prints \"hello world \".\n" "\tcallable.call(Vector2.UP, 42, callable) # Prints \"(0.0, -1.0) 42 " "Node(node.gd)::print_args\"\n" "\tcallable.call(\"invalid\") # Invalid call, should have at least 2 " "arguments.\n" "[/gdscript]\n" "[csharp]\n" "// Default parameter values are not supported.\n" "public void PrintArgs(Variant arg1, Variant arg2, Variant arg3 = default)\n" "{\n" "\tGD.PrintS(arg1, arg2, arg3);\n" "}\n" "\n" "public void Test()\n" "{\n" "\t// Invalid calls fail silently.\n" "\tCallable callable = new Callable(this, MethodName.PrintArgs);\n" "\tcallable.Call(\"hello\", \"world\"); // Default parameter values are not " "supported, should have 3 arguments.\n" "\tcallable.Call(Vector2.Up, 42, callable); // Prints \"(0, -1) 42 " "Node(Node.cs)::PrintArgs\"\n" "\tcallable.Call(\"invalid\"); // Invalid call, should have 3 arguments.\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "In GDScript, it's possible to create lambda functions within a method. " "Lambda functions are custom callables that are not associated with an " "[Object] instance. Optionally, lambda functions can also be named. The name " "will be displayed in the debugger, or when calling [method get_method].\n" "[codeblock]\n" "func _init():\n" "\tvar my_lambda = func (message):\n" "\t\tprint(message)\n" "\n" "\t# Prints \"Hello everyone!\"\n" "\tmy_lambda.call(\"Hello everyone!\")\n" "\n" "\t# Prints \"Attack!\", when the button_pressed signal is emitted.\n" "\tbutton_pressed.connect(func(): print(\"Attack!\"))\n" "[/codeblock]\n" "In GDScript, you can access methods and global functions as [Callable]s:\n" "[codeblock]\n" "tween.tween_callback(node.queue_free) # Object methods.\n" "tween.tween_callback(array.clear) # Methods of built-in types.\n" "tween.tween_callback(print.bind(\"Test\")) # Global functions.\n" "[/codeblock]\n" "[b]Note:[/b] [Dictionary] does not support the above due to ambiguity with " "keys.\n" "[codeblock]\n" "var dictionary = { \"hello\": \"world\" }\n" "\n" "# This will not work, `clear` is treated as a key.\n" "tween.tween_callback(dictionary.clear)\n" "\n" "# This will work.\n" "tween.tween_callback(Callable.create(dictionary, \"clear\"))\n" "[/codeblock]" msgstr "" "可调用体 [Callable] 是表示函数的内置 [Variant] 类型。它可以是 [Object] 实例中" "的方法,也可以是用于不同目的的自定义可调用函数(请参阅 [method is_custom])。" "与所有 [Variant] 类型一样,它可以存储在变量中,也可以传递给其他函数。它最常用" "于信号回调。\n" "[codeblocks]\n" "[gdscript]\n" "func print_args(arg1, arg2, arg3 = \"\"):\n" "\tprints(arg1, arg2, arg3)\n" "\n" "func test():\n" "\tvar callable = Callable(self, \"print_args\")\n" "\tcallable.call(\"hello\", \"world\") # 输出“hello world ”。\n" "\tcallable.call(Vector2.UP, 42, callable) # 输出“(0.0, -1.0) 42 " "Node(node.gd)::print_args”\n" "\tcallable.call(\"invalid\") # 无效调用,应当至少有 2 个参数。\n" "[/gdscript]\n" "[csharp]\n" "// 不支持参数默认值。\n" "public void PrintArgs(Variant arg1, Variant arg2, Variant arg3 = default)\n" "{\n" "\tGD.PrintS(arg1, arg2, arg3);\n" "}\n" "\n" "public void Test()\n" "{\n" "\t// Invalid calls fail silently.\n" "\tCallable callable = new Callable(this, MethodName.PrintArgs);\n" "\tcallable.Call(\"hello\", \"world\"); // 不支持参数默认值,应当有 3 个参" "数。\n" "\tcallable.Call(Vector2.Up, 42, callable); // 输出“(0.0, -1.0) 42 " "Node(node.gd)::print_args”\n" "\tcallable.Call(\"invalid\"); // 无效调用,应当有 3 个参数。\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "GDScript 中可以在方法里创建 lambda 函数。Lambda 函数是自定义的可调用体,不与 " "[Object] 实例关联。也可以为 Lambda 函数命名。该名称会显示在调试器中,也会在 " "[method get_method] 中使用。\n" "[codeblock]\n" "func _init():\n" "\tvar my_lambda = func (message):\n" "\t\tprint(message)\n" "\n" "\t# 输出“大家好呀!”\n" "\tmy_lambda.call(\"大家好呀!\")\n" "\n" "\t# 发出 button_pressed 信号时输出“全军出击!”。\n" "\tbutton_pressed.connect(func(): print(\"全军出击!\"))\n" "[/codeblock]\n" "在 GDScript 中,可以将方法和全局函数作为 [Callable] 进行访问:\n" "[codeblock]\n" "tween.tween_callback(node.queue_free) # Object 的方法。\n" "tween.tween_callback(array.clear) # 内置类型的方法。\n" "tween.tween_callback(print.bind(\"Test\")) # 全局函数。\n" "[/codeblock]\n" "[b]注意:[/b]由于键不明确,[Dictionary] 不支持上述内容。\n" "[codeblock]\n" "var dictionary = { \"hello\": \"world\" }\n" "\n" "# 不行,“clear” 被视为一个键。\n" "tween.tween_callback(dictionary.clear)\n" "\n" "# 有效。\n" "tween.tween_callback(Callable.create(dictionary, \"clear\"))\n" "[/codeblock]" #: doc/classes/Callable.xml msgid "Constructs an empty [Callable], with no object nor method bound." msgstr "构造空的 [Callable],没有绑定对象和方法。" #: doc/classes/Callable.xml msgid "Constructs a [Callable] as a copy of the given [Callable]." msgstr "构造给定 [Callable] 的副本。" #: doc/classes/Callable.xml msgid "" "Creates a new [Callable] for the method named [param method] in the " "specified [param object].\n" "[b]Note:[/b] For methods of built-in [Variant] types, use [method create] " "instead." msgstr "" "创建新的 [Callable],使用指定对象 [param object] 中名为 [param method] 的方" "法。\n" "[b]注意:[/b]对于内置 [Variant] 类型的方法,请改用 [method create]。" #: doc/classes/Callable.xml msgid "" "Returns a copy of this [Callable] with one or more arguments bound. When " "called, the bound arguments are passed [i]after[/i] the arguments supplied " "by [method call]. See also [method unbind].\n" "[b]Note:[/b] When this method is chained with other similar methods, the " "order in which the argument list is modified is read from right to left." msgstr "" "返回该 [Callable] 的副本,绑定其中的一个或多个参数。调用时,被绑定的参数在提" "供给 [method call] 的参数[i]之后[/i]传递。另见 [method unbind]。\n" "[b]注意:[/b]这个方法与其他类似方法链式调用时,参数列表的修改顺序是从右至左" "的。" #: doc/classes/Callable.xml msgid "" "Returns a copy of this [Callable] with one or more arguments bound, reading " "them from an array. When called, the bound arguments are passed [i]after[/i] " "the arguments supplied by [method call]. See also [method unbind].\n" "[b]Note:[/b] When this method is chained with other similar methods, the " "order in which the argument list is modified is read from right to left." msgstr "" "返回该 [Callable] 的副本,绑定其中的一个或多个参数,参数从数组中读取。调用" "时,被绑定的参数在提供给 [method call] 的参数[i]之后[/i]传递。另见 [method " "unbind]。\n" "[b]注意:[/b]这个方法与其他类似方法链式调用时,参数列表的修改顺序是从右至左" "的。" #: doc/classes/Callable.xml msgid "" "Calls the method represented by this [Callable]. Arguments can be passed and " "should match the method's signature." msgstr "" "调用该 [Callable] 所代表的方法。可以传递参数,必须与该方法的签名相匹配。" #: doc/classes/Callable.xml msgid "" "Calls the method represented by this [Callable] in deferred mode, i.e. at " "the end of the current frame. Arguments can be passed and should match the " "method's signature.\n" "[codeblocks]\n" "[gdscript]\n" "func _ready():\n" "\tgrab_focus.call_deferred()\n" "[/gdscript]\n" "[csharp]\n" "public override void _Ready()\n" "{\n" "\tCallable.From(GrabFocus).CallDeferred();\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] Deferred calls are processed at idle time. Idle time happens " "mainly at the end of process and physics frames. In it, deferred calls will " "be run until there are none left, which means you can defer calls from other " "deferred calls and they'll still be run in the current idle time cycle. This " "means you should not call a method deferred from itself (or from a method " "called by it), as this causes infinite recursion the same way as if you had " "called the method directly.\n" "See also [method Object.call_deferred]." msgstr "" "使用延迟模式调用该 [Callable] 所代表的方法,即在当前帧的末尾调用。可以传递参" "数,必须与该方法的签名相匹配。\n" "[codeblocks]\n" "[gdscript]\n" "func _ready():\n" "\tgrab_focus.call_deferred()\n" "[/gdscript]\n" "[csharp]\n" "public override void _Ready()\n" "{\n" "\tCallable.From(GrabFocus).CallDeferred();\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "[b]注意:[/b]延迟调用会在空闲时间处理。空闲时间主要发生在进程和物理帧的末尾。" "延迟调用将在其中一直运行,直到没有调用剩余为止,这意味着你可以从其他延迟调用" "中使用延迟调用,并且它们仍将在当前空闲时间周期中运行。这同样意味着你不应从延" "迟调用的方法(或从其调用的方法)中延迟调用其自身,因为这会导致无限递归,就像" "你直接调用该方法一样。\n" "另见 [method Object.call_deferred]。" #: doc/classes/Callable.xml msgid "" "Calls the method represented by this [Callable]. Unlike [method call], this " "method expects all arguments to be contained inside the [param arguments] " "[Array]." msgstr "" "调用该 [Callable] 所代表的方法。与 [method call] 不同,这个方法需要所有参数都" "放在 [param arguments] [Array] 之中。" #: doc/classes/Callable.xml msgid "" "Creates a new [Callable] for the method named [param method] in the " "specified [param variant]. To represent a method of a built-in [Variant] " "type, a custom callable is used (see [method is_custom]). If [param variant] " "is [Object], then a standard callable will be created instead.\n" "[b]Note:[/b] This method is always necessary for the [Dictionary] type, as " "property syntax is used to access its entries. You may also use this method " "when [param variant]'s type is not known in advance (for polymorphism)." msgstr "" "为指定的 [param variant] 中名为 [param method] 的方法创建一个新的 " "[Callable]。为了表示内置 [Variant] 类型的方法,使用自定义可调用函数(请参阅 " "[method is_custom])。如果 [param variant] 是 [Object],则将改为创建一个标准" "的可调用对象。\n" "[b]注意:[/b]该方法对于 [Dictionary] 类型始终是必需的,因为属性语法被用于访问" "其条目。当事先未知 [param variant] 的类型时(对于多态),你也可以使用该方法。" #: doc/classes/Callable.xml msgid "" "Returns the total number of arguments this [Callable] should take, including " "optional arguments. This means that any arguments bound with [method bind] " "are [i]subtracted[/i] from the result, and any arguments unbound with " "[method unbind] are [i]added[/i] to the result." msgstr "" "返回该 [Callable] 应接受的所有参数的数量,包括可选参数。也就是说,结果中会[i]" "减去[/i]使用 [method bind] 绑定的参数、[i]加上[/i]使用 [method unbind] 解除绑" "定的参数。" #: doc/classes/Callable.xml msgid "" "Returns the array of arguments bound via successive [method bind] or [method " "unbind] calls. These arguments will be added [i]after[/i] the arguments " "passed to the call, from which [method get_unbound_arguments_count] " "arguments on the right have been previously excluded.\n" "[codeblock]\n" "func get_effective_arguments(callable, call_args):\n" "\tassert(call_args.size() - callable.get_unbound_arguments_count() >= 0)\n" "\tvar result = call_args.slice(0, call_args.size() - " "callable.get_unbound_arguments_count())\n" "\tresult.append_array(callable.get_bound_arguments())\n" "\treturn result\n" "[/codeblock]" msgstr "" "返回一个参数数组,其元素通过连续的[method bind] or [method unbind]调用绑定。" "这些参数会被追加到传给该调用的参数[i]后面[/i],而位于右侧的[method " "get_unbound_arguments_count]的参数已被预先从此调用中排除。\n" "[codeblock]\n" "func get_effective_arguments(callable, call_args):\n" "\tassert(call_args.size() - callable.get_unbound_arguments_count() >= 0)\n" "\tvar result = call_args.slice(0, call_args.size() - " "callable.get_unbound_arguments_count())\n" "\tresult.append_array(callable.get_bound_arguments())\n" "\treturn result\n" "[/codeblock]" #: doc/classes/Callable.xml msgid "" "Returns the total amount of arguments bound via successive [method bind] or " "[method unbind] calls. This is the same as the size of the array returned by " "[method get_bound_arguments]. See [method get_bound_arguments] for details.\n" "[b]Note:[/b] The [method get_bound_arguments_count] and [method " "get_unbound_arguments_count] methods can both return positive values." msgstr "" "返回通过连续的[method bind]或[method unbind]调用绑定的参数总数。此总数与" "[method get_bound_arguments]返回的数组大小是一致的。详情参见[method " "get_bound_arguments]。\n" "[b]注意:[/b]方法[method get_bound_arguments_count]和[method " "get_unbound_arguments_count]都返回正值。" #: doc/classes/Callable.xml msgid "" "Returns the name of the method represented by this [Callable]. If the " "callable is a GDScript lambda function, returns the function's name or [code]" "\"\"[/code]." msgstr "" "返回该 [Callable] 所代表的方法的名称。如果该可调用体是 GDScript lambda 函数," "则返回该函数的名称或 [code]\"\"[/code]。" #: doc/classes/Callable.xml msgid "Returns the object on which this [Callable] is called." msgstr "返回该 [Callable] 所调用的对象。" #: doc/classes/Callable.xml msgid "" "Returns the ID of this [Callable]'s object (see [method " "Object.get_instance_id])." msgstr "返回该 [Callable] 中对象的 ID(见 [method Object.get_instance_id])。" #: doc/classes/Callable.xml msgid "" "Returns the total amount of arguments unbound via successive [method bind] " "or [method unbind] calls. See [method get_bound_arguments] for details.\n" "[b]Note:[/b] The [method get_bound_arguments_count] and [method " "get_unbound_arguments_count] methods can both return positive values." msgstr "" "返回通过连续调用 [method bind] 和 [method unbind] 解绑的参数总数。详见 " "[method get_bound_arguments]。\n" "[b]注意:[/b][method get_bound_arguments_count] 和 [method " "get_unbound_arguments_count] 方法都可以返回正值。" #: doc/classes/Callable.xml msgid "" "Returns the 32-bit hash value of this [Callable]'s object.\n" "[b]Note:[/b] [Callable]s with equal content will always produce identical " "hash values. However, the reverse is not true. Returning identical hash " "values does [i]not[/i] imply the callables are equal, because different " "callables can have identical hash values due to hash collisions. The engine " "uses a 32-bit hash algorithm for [method hash]." msgstr "" "返回该 [Callable] 对象的 32 位哈希值。\n" "[b]注意:[/b]内容相同的 [Callable] 哈希值始终相同。反之则不然,返回的哈希值相" "同[i]并不[/i]意味着可调用体相等,因为不同的可调用体可能由于哈希冲突而具有相同" "的哈希值。引擎在 [method hash] 中使用 32 位哈希算法。" #: doc/classes/Callable.xml msgid "" "Returns [code]true[/code] if this [Callable] is a custom callable. Custom " "callables are used:\n" "- for binding/unbinding arguments (see [method bind] and [method unbind]);\n" "- for representing methods of built-in [Variant] types (see [method " "create]);\n" "- for representing global, lambda, and RPC functions in GDScript;\n" "- for other purposes in the core, GDExtension, and C#." msgstr "" "如果该 [Callable] 是自定义可调用对象,则返回 [code]true[/code]。使用自定义可" "调用对象:\n" "- 用于绑定/解除绑定参数(参见 [method bind] 和 [method unbind]);\n" "- 用于表示内置 [Variant] 类型的方法(参见 [method create]);\n" "- 用于在 GDScript 中表示全局、lambda 和 RPC 函数;\n" "- 用于核心、GDExtension 和 C# 中的其他目的。" #: doc/classes/Callable.xml msgid "" "Returns [code]true[/code] if this [Callable] has no target to call the " "method on. Equivalent to [code]callable == Callable()[/code].\n" "[b]Note:[/b] This is [i]not[/i] the same as [code]not is_valid()[/code] and " "using [code]not is_null()[/code] will [i]not[/i] guarantee that this " "callable can be called. Use [method is_valid] instead." msgstr "" "如果这个 [Callable] 没有可以调用方法的目标,则返回 [code]true[/code]。等价于 " "[code]callable == Callable()[/code]。\n" "[b]注意:[/b]这与 [code]not is_valid()[/code] [i]不同[/i],使用 [code]not " "is_null()[/code] [i]无法[/i]保证能够调用该可调用对象。请改用 [method " "is_valid]。" #: doc/classes/Callable.xml msgid "" "Returns [code]true[/code] if this [Callable] is a standard callable. This " "method is the opposite of [method is_custom]. Returns [code]false[/code] if " "this callable is a lambda function." msgstr "" "如果该 [Callable] 为标准可调用体,则返回 [code]true[/code]。这个方法与 " "[method is_custom] 相对。如果该可调用体为 lambda 函数,则返回 [code]false[/" "code]。" #: doc/classes/Callable.xml msgid "" "Returns [code]true[/code] if the callable's object exists and has a valid " "method name assigned, or is a custom callable." msgstr "" "如果该可调用体的对象存在,且分配了有效的方法名,或者为自定义可调用体,则返回 " "[code]true[/code]。" #: doc/classes/Callable.xml msgid "" "Perform an RPC (Remote Procedure Call) on all connected peers. This is used " "for multiplayer and is normally not available, unless the function being " "called has been marked as [i]RPC[/i] (using [annotation @GDScript.@rpc] or " "[method Node.rpc_config]). Calling this method on unsupported functions will " "result in an error. See [method Node.rpc]." msgstr "" "在所有已连接的对等体上执行 RPC(Remote Procedure Call,远程过程调用)。用于多" "人游戏,一般不可用,除非所调用的函数有 [i]RPC[/i] 标记(使用 [annotation " "@GDScript.@rpc] 或 [method Node.rpc_config])。在不支持的方法上调用该方法会导" "致出错。见 [method Node.rpc]。" #: doc/classes/Callable.xml msgid "" "Perform an RPC (Remote Procedure Call) on a specific peer ID (see " "multiplayer documentation for reference). This is used for multiplayer and " "is normally not available unless the function being called has been marked " "as [i]RPC[/i] (using [annotation @GDScript.@rpc] or [method " "Node.rpc_config]). Calling this method on unsupported functions will result " "in an error. See [method Node.rpc_id]." msgstr "" "在指定的对等体 ID(请参阅多人游戏文档)上执行 RPC(Remote Procedure Call,远" "程过程调用)。用于多人游戏,一般不可用,除非所调用的函数有 [i]RPC[/i] 标记" "(使用 [annotation @GDScript.@rpc] 或 [method Node.rpc_config])。在不支持的" "方法上调用该方法会导致出错。见 [method Node.rpc_id]。" #: doc/classes/Callable.xml msgid "" "Returns a copy of this [Callable] with a number of arguments unbound. In " "other words, when the new callable is called the last few arguments supplied " "by the user are ignored, according to [param argcount]. The remaining " "arguments are passed to the callable. This allows to use the original " "callable in a context that attempts to pass more arguments than this " "callable can handle, e.g. a signal with a fixed number of arguments. See " "also [method bind].\n" "[b]Note:[/b] When this method is chained with other similar methods, the " "order in which the argument list is modified is read from right to left.\n" "[codeblock]\n" "func _ready():\n" "\tfoo.unbind(1).call(1, 2) # Calls foo(1).\n" "\tfoo.bind(3, 4).unbind(1).call(1, 2) # Calls foo(1, 3, 4), note that it " "does not change the arguments from bind.\n" "[/codeblock]" msgstr "" "返回这个 [Callable] 的副本,解绑了一些参数。换句话说,调用新的可调用体时,用" "户提供的最后几个参数会被忽略,忽略几个由 [param argcount] 决定。剩余的参数会" "被传递给该可调用体。这样传入的参数就能够比原本可调用体所能处理的参数要多,例" "如带有固定数量参数的信号。另见 [method bind]。\n" "[b]注意:[/b]这个方法与其他类似方法链式调用时,参数列表的修改顺序是从右至左" "的。\n" "[codeblock]\n" "func _ready():\n" "\tfoo.unbind(1).call(1, 2) # 调用 foo(1).\n" "\tfoo.bind(3, 4).unbind(1).call(1, 2) # 调用 foo(1, 3, 4),注意改动的不是 " "bind 中的参数。\n" "[/codeblock]" #: doc/classes/Callable.xml msgid "Returns [code]true[/code] if both [Callable]s invoke different targets." msgstr "如果两个 [Callable] 调用的目标不同,则返回 [code]true[/code]。" #: doc/classes/Callable.xml msgid "" "Returns [code]true[/code] if both [Callable]s invoke the same custom target." msgstr "如果两个 [Callable] 调用的自定义目标相同,则返回 [code]true[/code]。" #: doc/classes/CallbackTweener.xml msgid "Calls the specified method after optional delay." msgstr "在可选的延迟之后调用指定的方法。" #: doc/classes/CallbackTweener.xml msgid "" "[CallbackTweener] is used to call a method in a tweening sequence. See " "[method Tween.tween_callback] for more usage information.\n" "The tweener will finish automatically if the callback's target object is " "freed.\n" "[b]Note:[/b] [method Tween.tween_callback] is the only correct way to create " "[CallbackTweener]. Any [CallbackTweener] created manually will not function " "correctly." msgstr "" "[CallbackTweener] 可用于在补间序列中调用方法。更多用法信息请参阅 [method " "Tween.tween_callback]。\n" "如果回调的目标对象被释放,该补间将自动结束。\n" "[b]注意:[/b]创建 [CallbackTweener] 的唯一正确方法是 [method " "Tween.tween_callback]。任何手动创建的 [CallbackTweener] 都无法正常工作。" #: doc/classes/CallbackTweener.xml msgid "" "Makes the callback call delayed by given time in seconds.\n" "[b]Example:[/b] Call [method Node.queue_free] after 2 seconds:\n" "[codeblock]\n" "var tween = get_tree().create_tween()\n" "tween.tween_callback(queue_free).set_delay(2)\n" "[/codeblock]" msgstr "" "让该回调延迟给定的时间,单位为秒。\n" "[b]示例:[/b]在 2 秒后调用 [method Node.queue_free]:\n" "[codeblock]\n" "var tween = get_tree().create_tween()\n" "tween.tween_callback(queue_free).set_delay(2)\n" "[/codeblock]" #: doc/classes/Camera2D.xml msgid "Camera node for 2D scenes." msgstr "2D 场景的相机节点。" #: doc/classes/Camera2D.xml msgid "" "Camera node for 2D scenes. It forces the screen (current layer) to scroll " "following this node. This makes it easier (and faster) to program scrollable " "scenes than manually changing the position of [CanvasItem]-based nodes.\n" "Cameras register themselves in the nearest [Viewport] node (when ascending " "the tree). Only one camera can be active per viewport. If no viewport is " "available ascending the tree, the camera will register in the global " "viewport.\n" "This node is intended to be a simple helper to get things going quickly, but " "more functionality may be desired to change how the camera works. To make " "your own custom camera node, inherit it from [Node2D] and change the " "transform of the canvas by setting [member Viewport.canvas_transform] in " "[Viewport] (you can obtain the current [Viewport] by using [method " "Node.get_viewport]).\n" "Note that the [Camera2D] node's [member Node2D.global_position] doesn't " "represent the actual position of the screen, which may differ due to applied " "smoothing or limits. You can use [method get_screen_center_position] to get " "the real position. Same for the node's [member Node2D.global_rotation] which " "may be different due to applied rotation smoothing. You can use [method " "get_screen_rotation] to get the current rotation of the screen." msgstr "" "用于 2D 场景的相机节点。它强制屏幕(当前层)跟随该节点滚动。与手动改变基于 " "[CanvasItem] 节点的坐标相比,这使得对可滚动场景进行编程更加容易和快捷。\n" "相机会在最近的 [Viewport](在上层树时)节点中注册自己。每个视口只能激活一个相" "机。如果树上没有可用的视口,相机将在全局视口中注册。\n" "这个节点旨在成为简单的辅助工具,让事情便捷,但可能需要更多的功能来改变相机的" "工作方式。要制作自定义相机节点,则从 [Node2D] 继承,并通过设置 [Viewport] 中" "的 [member Viewport.canvas_transform] 来改变画布的变换(你可以通过使用 " "[method Node.get_viewport] 获得当前的 [Viewport])。\n" "请注意,[Camera2D] 节点的 [member Node2D.global_position] 并不代表屏幕的实际" "位置,这可能会因应用的平滑或限制而有所不同。可以使用 [method " "get_screen_center_position] 获取真实位置。该节点的 [member " "Node2D.global_rotation] 亦然,可能由于应用的旋转平滑而有所不同。可以使用 " "[method get_screen_rotation] 获取屏幕的当前旋转值。" #: doc/classes/Camera2D.xml doc/classes/TileMap.xml #: doc/classes/TileMapLayer.xml doc/classes/TileSet.xml msgid "2D Isometric Demo" msgstr "2D 等轴演示" #: doc/classes/Camera2D.xml msgid "Aligns the camera to the tracked node." msgstr "将相机与跟踪的节点对齐。" #: doc/classes/Camera2D.xml msgid "Forces the camera to update scroll immediately." msgstr "强制相机立即更新滚动。" #: doc/classes/Camera2D.xml msgid "" "Returns the specified [enum Side]'s margin. See also [member " "drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], " "and [member drag_right_margin]." msgstr "" "返回指定边 [enum Side] 的边距。另见 [member drag_bottom_margin]、[member " "drag_top_margin]、[member drag_left_margin] 和 [member drag_right_margin]。" #: doc/classes/Camera2D.xml msgid "" "Returns the camera limit for the specified [enum Side]. See also [member " "limit_bottom], [member limit_top], [member limit_left], and [member " "limit_right]." msgstr "" "返回指定边 [enum Side] 的相机极限。另见 [member limit_bottom]、[member " "limit_top]、[member limit_left] 和 [member limit_right]。" #: doc/classes/Camera2D.xml msgid "" "Returns the center of the screen from this camera's point of view, in global " "coordinates.\n" "[b]Note:[/b] The exact targeted position of the camera may be different. See " "[method get_target_position]." msgstr "" "返回该 [Camera2D] 视角下的屏幕中心位置,使用全局坐标。\n" "[b]注意:[/b]相机实际的目标位置可能与此不同。见 [method " "get_target_position]。" #: doc/classes/Camera2D.xml msgid "" "Returns the current screen rotation from this camera's point of view.\n" "[b]Note:[/b] The screen rotation can be different from [member " "Node2D.global_rotation] if the camera is rotating smoothly due to [member " "rotation_smoothing_enabled]." msgstr "" "从该相机的视角返回当前的屏幕旋转。\n" "[b]注意:[/b]如果相机由于 [member rotation_smoothing_enabled] 平滑旋转,则屏" "幕旋转可能与 [member Node2D.global_rotation] 不同。" #: doc/classes/Camera2D.xml msgid "" "Returns this camera's target position, in global coordinates.\n" "[b]Note:[/b] The returned value is not the same as [member " "Node2D.global_position], as it is affected by the drag properties. It is " "also not the same as the current position if [member " "position_smoothing_enabled] is [code]true[/code] (see [method " "get_screen_center_position])." msgstr "" "返回该相机的目标位置,使用全局坐标。\n" "[b]注意:[/b]返回值与 [member Node2D.global_position] 不同,因为会受到拖动属" "性的影响。如果 [member position_smoothing_enabled] 为 [code]true[/code] ,也" "不等同于当前位置(见 [method get_screen_center_position])。" #: doc/classes/Camera2D.xml msgid "" "Returns [code]true[/code] if this [Camera2D] is the active camera (see " "[method Viewport.get_camera_2d])." msgstr "" "如果该 [Camera2D] 为活动相机,则返回 [code]true[/code](见 [method " "Viewport.get_camera_2d])。" #: doc/classes/Camera2D.xml msgid "" "Forces this [Camera2D] to become the current active one. [member enabled] " "must be [code]true[/code]." msgstr "" "强制该 [Camera2D] 成为当前的活动相机。[member enabled] 必须为 [code]true[/" "code]。" #: doc/classes/Camera2D.xml msgid "" "Sets the camera's position immediately to its current smoothing " "destination.\n" "This method has no effect if [member position_smoothing_enabled] is " "[code]false[/code]." msgstr "" "将相机的位置立即设置为其当前平滑的目标位置。\n" "当 [member position_smoothing_enabled] 为 [code]false[/code] 时,本方法无效。" #: doc/classes/Camera2D.xml msgid "" "Sets the specified [enum Side]'s margin. See also [member " "drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], " "and [member drag_right_margin]." msgstr "" "设置指定边 [enum Side] 的边距。另见 [member drag_bottom_margin]、[member " "drag_top_margin]、[member drag_left_margin] 和 [member drag_right_margin]。" #: doc/classes/Camera2D.xml msgid "" "Sets the camera limit for the specified [enum Side]. See also [member " "limit_bottom], [member limit_top], [member limit_left], and [member " "limit_right]." msgstr "" "设置指定边 [enum Side] 的相机极限。另见 [member limit_bottom]、[member " "limit_top]、[member limit_left] 和 [member limit_right]。" #: doc/classes/Camera2D.xml msgid "The Camera2D's anchor point." msgstr "Camera2D 的锚点。" #: doc/classes/Camera2D.xml msgid "" "The custom [Viewport] node attached to the [Camera2D]. If [code]null[/code] " "or not a [Viewport], uses the default viewport instead." msgstr "" "连接到 [Camera2D] 的自定义 [Viewport] 节点。如果为 [code]null[/code] 或者不" "是 [Viewport],则使用默认的视口。" #: doc/classes/Camera2D.xml msgid "" "Bottom margin needed to drag the camera. A value of [code]1[/code] makes the " "camera move only when reaching the bottom edge of the screen." msgstr "" "拖动相机所需的下边距。值为 [code]1[/code] 时,相机仅在到达屏幕底部边缘时移" "动。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], the camera only moves when reaching the horizontal " "(left and right) drag margins. If [code]false[/code], the camera moves " "horizontally regardless of margins." msgstr "" "如果为 [code]true[/code],相机仅在到达水平(左或右)拖动边距时移动。如果为 " "[code]false[/code],则相机水平移动时不考虑边距。" #: doc/classes/Camera2D.xml msgid "" "The relative horizontal drag offset of the camera between the right " "([code]-1[/code]) and left ([code]1[/code]) drag margins.\n" "[b]Note:[/b] Used to set the initial horizontal drag offset; determine the " "current offset; or force the current offset. It's not automatically updated " "when [member drag_horizontal_enabled] is [code]true[/code] or the drag " "margins are changed." msgstr "" "相机在右侧([code]-1[/code])和左侧([code]1[/code])拖动边距之间的相对水平拖" "动偏移量。\n" "[b]注意:[/b]用于设置初始水平拖动偏移量;确定当前偏移量;或强制当前偏移量。" "当 [member drag_horizontal_enabled] 为 [code]true[/code] 或更改拖动边距时,它" "不会自动更新。" #: doc/classes/Camera2D.xml msgid "" "Left margin needed to drag the camera. A value of [code]1[/code] makes the " "camera move only when reaching the left edge of the screen." msgstr "" "拖动相机所需的左边距。值为 [code]1[/code] 时,相机仅在到达屏幕左侧边缘时移" "动。" #: doc/classes/Camera2D.xml msgid "" "Right margin needed to drag the camera. A value of [code]1[/code] makes the " "camera move only when reaching the right edge of the screen." msgstr "" "拖动相机所需的右边距。值为 [code]1[/code] 时,相机仅在到达屏幕右侧边缘时移" "动。" #: doc/classes/Camera2D.xml msgid "" "Top margin needed to drag the camera. A value of [code]1[/code] makes the " "camera move only when reaching the top edge of the screen." msgstr "" "拖动相机所需的上边距。值为 [code]1[/code] 时,相机仅在到达屏幕顶部边缘时移" "动。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], the camera only moves when reaching the vertical (top " "and bottom) drag margins. If [code]false[/code], the camera moves vertically " "regardless of the drag margins." msgstr "" "如果为 [code]true[/code],相机仅在达到垂直(顶部及底部)拖动边距时才移动。如" "果为 [code]false[/code],相机会垂直移动而不管边距。" #: doc/classes/Camera2D.xml msgid "" "The relative vertical drag offset of the camera between the bottom " "([code]-1[/code]) and top ([code]1[/code]) drag margins.\n" "[b]Note:[/b] Used to set the initial vertical drag offset; determine the " "current offset; or force the current offset. It's not automatically updated " "when [member drag_vertical_enabled] is [code]true[/code] or the drag margins " "are changed." msgstr "" "相机在底部([code]-1[/code])和顶部([code]1[/code])拖动边距之间的相对垂直拖" "动偏移量。\n" "[b]注意:[/b]用于设置初始垂直拖动偏移量;确定当前偏移量;或强制当前偏移量。" "当 [member drag_vertical_enabled] 为 [code]true[/code] 或更改拖动边距时,它不" "会自动更新。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], draws the camera's drag margin rectangle in the editor." msgstr "如果为 [code]true[/code],在编辑器中绘制相机的拖动边距矩形。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], draws the camera's limits rectangle in the editor." msgstr "如果为 [code]true[/code],在编辑器中绘制相机的极限矩形。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], draws the camera's screen rectangle in the editor." msgstr "如果为 [code]true[/code],在编辑器中绘制相机的画面矩形。" #: doc/classes/Camera2D.xml msgid "" "Controls whether the camera can be active or not. If [code]true[/code], the " "[Camera2D] will become the main camera when it enters the scene tree and " "there is no active camera currently (see [method Viewport.get_camera_2d]).\n" "When the camera is currently active and [member enabled] is set to " "[code]false[/code], the next enabled [Camera2D] in the scene tree will " "become active." msgstr "" "控制该相机是否可以激活。如果为 [code]true[/code],当该 [Camera2D] 进入场景树" "并且当前没有活动的相机时,它将成为主相机(参见 [method " "Viewport.get_camera_2d])。\n" "当该相机当前处于活动状态且 [member enabled] 被设置为 [code]false[/code] 时," "则场景树中下一个启用的 [Camera2D] 将变为活动状态。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], the camera's rendered view is not affected by its " "[member Node2D.rotation] and [member Node2D.global_rotation]." msgstr "" "如果为 [code]true[/code] ,相机的渲染视图不会受到其 [member Node2D.rotation] " "和 [member Node2D.global_rotation] 的影响。" #: doc/classes/Camera2D.xml msgid "" "Bottom scroll limit in pixels. The camera stops moving when reaching this " "value, but [member offset] can push the view past the limit." msgstr "" "底部滚动极限,单位为像素。相机会在抵达该值时停止移动,但是 [member offset] 可" "以把视图推过该极限。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], the limits will be enabled. Disabling this will allow " "the camera to focus anywhere, when the four [code]limit_*[/code] properties " "will not work." msgstr "" "如果为 [code]true[/code] 则启用限制。禁用该选项将允许相机聚焦在任何位置,此时" "四个 [code]limit_*[/code] 属性不起作用。" #: doc/classes/Camera2D.xml msgid "" "Left scroll limit in pixels. The camera stops moving when reaching this " "value, but [member offset] can push the view past the limit." msgstr "" "左侧滚动极限,单位为像素。相机会在抵达该值时停止移动,但是 [member offset] 可" "以把视图推过该极限。" #: doc/classes/Camera2D.xml msgid "" "Right scroll limit in pixels. The camera stops moving when reaching this " "value, but [member offset] can push the view past the limit." msgstr "" "右侧滚动极限,单位为像素。相机会在抵达该值时停止移动,但是 [member offset] 可" "以把视图推过该极限。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], the camera smoothly stops when reaches its limits.\n" "This property has no effect if [member position_smoothing_enabled] is " "[code]false[/code].\n" "[b]Note:[/b] To immediately update the camera's position to be within limits " "without smoothing, even with this setting enabled, invoke [method " "reset_smoothing]." msgstr "" "如果为 [code]true[/code],相机会在达到极限时平滑地停止。\n" "如果 [member position_smoothing_enabled] 为 [code]false[/code],则该属性无" "效。\n" "[b]注意:[/b]要立即将相机的位置更新到限制范围内而不进行平滑,即使启用了该设" "置,也要调用 [method reset_smoothing]。" #: doc/classes/Camera2D.xml msgid "" "Top scroll limit in pixels. The camera stops moving when reaching this " "value, but [member offset] can push the view past the limit." msgstr "" "顶部滚动极限,单位为像素。相机会在抵达该值时停止移动,但是 [member offset] 可" "以把视图推过该极限。" #: doc/classes/Camera2D.xml msgid "" "The camera's relative offset. Useful for looking around or camera shake " "animations. The offsetted camera can go past the limits defined in [member " "limit_top], [member limit_bottom], [member limit_left] and [member " "limit_right]." msgstr "" "相机的相对偏移量。用于环顾四周或相机抖动动画。偏移后的相机可以超过 [member " "limit_top]、[member limit_bottom]、[member limit_left] 和 [member " "limit_right] 中定义的限制。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], the camera's view smoothly moves towards its target " "position at [member position_smoothing_speed]." msgstr "" "如果为 [code]true[/code],相机的视图会以 [member position_smoothing_speed] 的" "速度,平滑地移向其目标位置。" #: doc/classes/Camera2D.xml msgid "" "Speed in pixels per second of the camera's smoothing effect when [member " "position_smoothing_enabled] is [code]true[/code]." msgstr "" "当 [member position_smoothing_enabled] 为 [code]true[/code] 时,相机平滑效果" "的速度,单位为每秒像素。" #: doc/classes/Camera2D.xml msgid "The camera's process callback." msgstr "相机的处理回调。" #: doc/classes/Camera2D.xml msgid "" "If [code]true[/code], the camera's view smoothly rotates, via asymptotic " "smoothing, to align with its target rotation at [member " "rotation_smoothing_speed].\n" "[b]Note:[/b] This property has no effect if [member ignore_rotation] is " "[code]true[/code]." msgstr "" "如果为 [code]true[/code],相机的视图会通过渐近平滑的方式平滑地旋转,以 " "[member rotation_smoothing_speed] 的速度与其目标旋转对齐。\n" "[b]注意:[/b]如果 [member ignore_rotation] 为 [code]true[/code],则该属性无" "效。" #: doc/classes/Camera2D.xml msgid "" "The angular, asymptotic speed of the camera's rotation smoothing effect when " "[member rotation_smoothing_enabled] is [code]true[/code]." msgstr "" "当 [member rotation_smoothing_enabled] 为 [code]true[/code] 时,相机旋转平滑" "效果的角度渐近速度。" #: doc/classes/Camera2D.xml msgid "" "The camera's zoom. Higher values are more zoomed in. For example, a zoom of " "[code]Vector2(2.0, 2.0)[/code] will be twice as zoomed in on each axis (the " "view covers an area four times smaller). In contrast, a zoom of " "[code]Vector2(0.5, 0.5)[/code] will be twice as zoomed out on each axis (the " "view covers an area four times larger). The X and Y components should " "generally always be set to the same value, unless you wish to stretch the " "camera view.\n" "[b]Note:[/b] [member FontFile.oversampling] does [i]not[/i] take [Camera2D] " "zoom into account. This means that zooming in/out will cause bitmap fonts " "and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated unless " "the font is part of a [CanvasLayer] that makes it ignore camera zoom. To " "ensure text remains crisp regardless of zoom, you can enable MSDF font " "rendering by enabling [member ProjectSettings.gui/theme/" "default_font_multichannel_signed_distance_field] (applies to the default " "project font only), or enabling [b]Multichannel Signed Distance Field[/b] in " "the import options of a DynamicFont for custom fonts. On system fonts, " "[member SystemFont.multichannel_signed_distance_field] can be enabled in the " "inspector." msgstr "" "相机的缩放。值越高,放大效果越明显。例如,[code]Vector2(2.0, 2.0)[/code] 的缩" "放将在各个轴上放大两倍(视图覆盖的区域缩小四倍)。相反,[code]Vector2(0.5, " "0.5)[/code] 的缩放将在各个轴上缩小两倍(视图覆盖的区域扩大四倍)。X 和 Y 分量" "通常应始终设置为相同的值,除非你希望拉伸相机视图。\n" "[b]注意:[/b][member FontFile.oversampling] [i]不会[/i]考虑 [Camera2D] 的缩放" "值。这意味着放大/缩小将导致位图字体和光栅化(非 MSDF)动态字体看起来模糊或像" "素化,除非字体是[CanvasLayer]的一部分从而使其忽略相机缩放。为了确保文本无论如" "何缩放都保持清晰,你可以通过启用 [member ProjectSettings.gui/theme/" "default_font_multichannel_signed_distance_field] (仅适用于默认项目字体)来启" "用 MSDF 字体渲染,或在自定义字体的动态字体导入选项中启用[b]多通道带符号距离场" "[/b]。对于系统字体,可以在检查器中启用 [member " "SystemFont.multichannel_signed_distance_field] 。" #: doc/classes/Camera2D.xml msgid "" "The camera's position is fixed so that the top-left corner is always at the " "origin." msgstr "相机的位置是固定的,所以左上角总是在原点。" #: doc/classes/Camera2D.xml msgid "" "The camera's position takes into account vertical/horizontal offsets and the " "screen size." msgstr "相机的位置要考虑垂直/水平偏移和屏幕尺寸。" #: doc/classes/Camera2D.xml msgid "" "The camera updates during physics frames (see [constant " "Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS])." msgstr "" "相机在物理帧期间更新(见 [constant " "Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS])。" #: doc/classes/Camera2D.xml msgid "" "The camera updates during process frames (see [constant " "Node.NOTIFICATION_INTERNAL_PROCESS])." msgstr "" "相机在进程帧期间更新(见 [constant Node.NOTIFICATION_INTERNAL_PROCESS])。" #: doc/classes/Camera3D.xml msgid "Camera node, displays from a point of view." msgstr "相机节点,会从某个角度进行显示。" #: doc/classes/Camera3D.xml msgid "" "[Camera3D] is a special node that displays what is visible from its current " "location. Cameras register themselves in the nearest [Viewport] node (when " "ascending the tree). Only one camera can be active per viewport. If no " "viewport is available ascending the tree, the camera will register in the " "global viewport. In other words, a camera just provides 3D display " "capabilities to a [Viewport], and, without one, a scene registered in that " "[Viewport] (or higher viewports) can't be displayed." msgstr "" "[Camera3D] 是一个特殊节点,用于显示从其当前位置可见的内容。相机在最近的 " "[Viewport] 节点中注册自己(当树上行)。每个视口中只能有一个激活的相机。如果在" "树上没有可用的视口,相机将在全局视口中注册。换句话说,相机只是用来为 " "[Viewport] 提供 3D 显示能力的,如果没有,则在该 [Viewport](或更高层视口)中" "注册的场景无法显示。" #: doc/classes/Camera3D.xml msgid "" "If this is the current camera, remove it from being current. If [param " "enable_next] is [code]true[/code], request to make the next camera current, " "if any." msgstr "" "如果这是当前相机,则将其从当前相机中移除。如果 [param enable_next] 为 " "[code]true[/code],则请求使下一个相机(如果有)成为当前相机。" #: doc/classes/Camera3D.xml msgid "" "Returns the projection matrix that this camera uses to render to its " "associated viewport. The camera must be part of the scene tree to function." msgstr "" "返回该相机用于渲染至关联视口的投影矩阵。相机必须是场景树的一部分才能正常工" "作。" #: doc/classes/Camera3D.xml msgid "Returns the camera's RID from the [RenderingServer]." msgstr "从 [RenderingServer] 返回该相机的 RID。" #: doc/classes/Camera3D.xml msgid "" "Returns the transform of the camera plus the vertical ([member v_offset]) " "and horizontal ([member h_offset]) offsets; and any other adjustments made " "to the position and orientation of the camera by subclassed cameras such as " "[XRCamera3D]." msgstr "" "返回该相机的变换,该变换会加上垂直([member v_offset])和水平([member " "h_offset])偏移;以及 [XRCamera3D] 等子类相机对相机位置和方向所做的任何其他调" "整。" #: doc/classes/Camera3D.xml msgid "" "Returns whether or not the specified layer of the [member cull_mask] is " "enabled, given a [param layer_number] between 1 and 20." msgstr "" "返回是否启用了 [member cull_mask] 的指定层,该层由一个介于 1 和 20 之间的给" "定 [param layer_number] 指定。" #: doc/classes/Camera3D.xml msgid "" "Returns the camera's frustum planes in world space units as an array of " "[Plane]s in the following order: near, far, left, top, right, bottom. Not to " "be confused with [member frustum_offset]." msgstr "" "以世界空间单位将相机的视锥平面作为 [Plane] 数组按以下顺序返回:near、far、" "left、top、right、bottom。不要与 [member frustum_offset] 混淆。" #: doc/classes/Camera3D.xml msgid "" "Returns the RID of a pyramid shape encompassing the camera's view frustum, " "ignoring the camera's near plane. The tip of the pyramid represents the " "position of the camera." msgstr "" "返回包含该相机视锥的锥体形状的 RID,忽略相机的近处平面。锥体的尖端代表该相机" "的位置。" #: doc/classes/Camera3D.xml msgid "" "Returns [code]true[/code] if the given position is behind the camera (the " "blue part of the linked diagram). [url=https://raw.githubusercontent.com/" "godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this " "diagram[/url] for an overview of position query methods.\n" "[b]Note:[/b] A position which returns [code]false[/code] may still be " "outside the camera's field of view." msgstr "" "如果给定位置在相机后面(链接图的蓝色部分),则返回 [code]true[/code]。" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "camera3d_position_frustum.png]查看此图[/url]以了解位置查询方法的概述。\n" "[b]注意:[/b]返回 [code]false[/code] 的位置可能仍然在相机的视野之外。" #: doc/classes/Camera3D.xml msgid "" "Returns [code]true[/code] if the given position is inside the camera's " "frustum (the green part of the linked diagram). [url=https://" "raw.githubusercontent.com/godotengine/godot-docs/master/img/" "camera3d_position_frustum.png]See this diagram[/url] for an overview of " "position query methods." msgstr "" "如果给定位置在相机的视锥内(位于链接图中的绿色部分),则返回 [code]true[/" "code]。[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/" "img/camera3d_position_frustum.png]查看此图[/url]以了解位置查询方法的概述。" #: doc/classes/Camera3D.xml msgid "" "Makes this camera the current camera for the [Viewport] (see class " "description). If the camera node is outside the scene tree, it will attempt " "to become current once it's added." msgstr "" "使此相机成为 [Viewport] 的当前相机(见类的说明)。如果相机节点在场景树之外," "一旦添加,它将尝试成为当前相机。" #: doc/classes/Camera3D.xml msgid "" "Returns a normal vector from the screen point location directed along the " "camera. Orthogonal cameras are normalized. Perspective cameras account for " "perspective, screen width/height, etc." msgstr "" "返回从屏幕点位置沿相机方向的法向量。正交相机会被归一化。透视相机考虑到透视、" "屏幕宽度/高度等因素。" #: doc/classes/Camera3D.xml msgid "" "Returns the 3D point in world space that maps to the given 2D coordinate in " "the [Viewport] rectangle on a plane that is the given [param z_depth] " "distance into the scene away from the camera." msgstr "" "返回世界空间中的 3D 点,该点映射到平面上 [Viewport] 矩形中的给定 2D 坐标,该" "平面是距相机到场景的给定 [param z_depth] 距离。" #: doc/classes/Camera3D.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " "point on the [Viewport] rectangle by the inverse camera projection. This is " "useful for casting rays in the form of (origin, normal) for object " "intersection or picking." msgstr "" "返回世界空间中的法线向量,即通过逆相机投影将点投影到 [Viewport] 矩形上的结" "果。这对于以(原点,法线)的形式投射光线,以进行对象相交或拾取很有用。" #: doc/classes/Camera3D.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " "point on the [Viewport] rectangle by the inverse camera projection. This is " "useful for casting rays in the form of (origin, normal) for object " "intersection or picking." msgstr "" "返回世界空间中的 3D 位置,即通过逆相机投影将点投影到 [Viewport] 矩形上的结" "果。这对于以(原点,法线)的形式投射光线,以进行对象相交或拾取很有用。" #: doc/classes/Camera3D.xml msgid "" "Based on [param value], enables or disables the specified layer in the " "[member cull_mask], given a [param layer_number] between 1 and 20." msgstr "" "基于 [param value],启用或禁用 [member cull_mask] 中的指定层,该层由一个介于 " "1 和 20 之间的给定 [param layer_number] 指定。" #: doc/classes/Camera3D.xml msgid "" "Sets the camera projection to frustum mode (see [constant " "PROJECTION_FRUSTUM]), by specifying a [param size], an [param offset], and " "the [param z_near] and [param z_far] clip planes in world space units. See " "also [member frustum_offset]." msgstr "" "通过指定的以世界空间单位为单位的 [param size]、[param offset]、以及 [param " "z_near] 和 [param z_far] 裁剪平面,将相机投影设置为视锥模式(见 [constant " "PROJECTION_FRUSTUM])。另见 [member frustum_offset]。" #: doc/classes/Camera3D.xml msgid "" "Sets the camera projection to orthogonal mode (see [constant " "PROJECTION_ORTHOGONAL]), by specifying a [param size], and the [param " "z_near] and [param z_far] clip planes in world space units.\n" "As a hint, 3D games that look 2D often use this projection, with [param " "size] specified in pixels." msgstr "" "通过指定的以世界空间单位为单位的 [param size]、以及 [param z_near] 和 [param " "z_far] 裁剪平面,将相机投影设置为正交模式(参见 [constant " "PROJECTION_ORTHOGONAL])。\n" "作为提示,看起来像 2D 的 3D 游戏经常使用这种投影,其中 [param size] 以像素为" "单位指定。" #: doc/classes/Camera3D.xml msgid "" "Sets the camera projection to perspective mode (see [constant " "PROJECTION_PERSPECTIVE]), by specifying a [param fov] (field of view) angle " "in degrees, and the [param z_near] and [param z_far] clip planes in world " "space units." msgstr "" "通过指定的以度为单位的 [param fov](视野)角度,以及以世界空间单位为单位的 " "[param z_near] 和 [param z_far] 裁剪平面,将相机投影设置为透视模式(参见 " "[constant PROJECTION_PERSPECTIVE])。" #: doc/classes/Camera3D.xml msgid "" "Returns the 2D coordinate in the [Viewport] rectangle that maps to the given " "3D point in world space.\n" "[b]Note:[/b] When using this to position GUI elements over a 3D viewport, " "use [method is_position_behind] to prevent them from appearing if the 3D " "point is behind the camera:\n" "[codeblock]\n" "# This code block is part of a script that inherits from Node3D.\n" "# `control` is a reference to a node inheriting from Control.\n" "control.visible = not " "get_viewport().get_camera_3d().is_position_behind(global_transform.origin)\n" "control.position = " "get_viewport().get_camera_3d().unproject_position(global_transform.origin)\n" "[/codeblock]" msgstr "" "返回映射到世界空间中给定 3D 点的 [Viewport] 矩形中的 2D 坐标。\n" "[b]注意:[/b]当使用它在 3D 视口上定位 GUI 元素时,如果 3D 点在相机后面,请使" "用 [method is_position_behind] 来防止它们出现:\n" "[codeblock]\n" "# 该代码块是从 Node3D 继承的脚本的一部分。\n" "# `control` 是对从 Control 继承的节点的引用。\n" "control.visible = not " "get_viewport().get_camera_3d().is_position_behind(global_transform.origin)\n" "control.position = " "get_viewport().get_camera_3d().unproject_position(global_transform.origin)\n" "[/codeblock]" #: doc/classes/Camera3D.xml msgid "The [CameraAttributes] to use for this camera." msgstr "该相机所使用的 [CameraAttributes]。" #: doc/classes/Camera3D.xml msgid "The [Compositor] to use for this camera." msgstr "该相机所使用的 [Compositor]。" #: doc/classes/Camera3D.xml msgid "" "The culling mask that describes which [member VisualInstance3D.layers] are " "rendered by this camera. By default, all 20 user-visible layers are " "rendered.\n" "[b]Note:[/b] Since the [member cull_mask] allows for 32 layers to be stored " "in total, there are an additional 12 layers that are only used internally by " "the engine and aren't exposed in the editor. Setting [member cull_mask] " "using a script allows you to toggle those reserved layers, which can be " "useful for editor plugins.\n" "To adjust [member cull_mask] more easily using a script, use [method " "get_cull_mask_value] and [method set_cull_mask_value].\n" "[b]Note:[/b] [VoxelGI], SDFGI and [LightmapGI] will always take all layers " "into account to determine what contributes to global illumination. If this " "is an issue, set [member GeometryInstance3D.gi_mode] to [constant " "GeometryInstance3D.GI_MODE_DISABLED] for meshes and [member " "Light3D.light_bake_mode] to [constant Light3D.BAKE_DISABLED] for lights to " "exclude them from global illumination." msgstr "" "剔除掩码,描述该相机渲染了哪些 [member VisualInstance3D.layers]。默认情况下," "20 个用户可见层全都被渲染。\n" "[b]注意:[/b]由于 [member cull_mask] 允许总共存储 32 个层,因此另外 12 个层仅" "供引擎内部使用,不会在编辑器中公开。使用脚本设置 [member cull_mask] 允许你切" "换那些保留层,这对编辑器插件很有用。\n" "要使用脚本更轻松地调整 [member cull_mask],请使用 [method " "get_cull_mask_value] 和 [method set_cull_mask_value]。\n" "[b]注意:[/b][VoxelGI]、SDFGI 和 [LightmapGI] 将始终考虑所有层以确定对全局光" "照有贡献的内容。如果这是一个问题,请将网格的 [member " "GeometryInstance3D.gi_mode] 设置为 [constant " "GeometryInstance3D.GI_MODE_DISABLED],并将灯光的 [member " "Light3D.light_bake_mode] 设置为 [constant Light3D.BAKE_DISABLED],以将它们从" "全局光照中排除。" #: doc/classes/Camera3D.xml msgid "" "If [code]true[/code], the ancestor [Viewport] is currently using this " "camera.\n" "If multiple cameras are in the scene, one will always be made current. For " "example, if two [Camera3D] nodes are present in the scene and only one is " "current, setting one camera's [member current] to [code]false[/code] will " "cause the other camera to be made current." msgstr "" "如果为 [code]true[/code],则祖级 [Viewport] 正在使用这个相机。\n" "如果场景中有多个相机,总会有一个被设为当前相机。例如,假设场景中存在两个 " "[Camera3D] 节点并且只有一个为当前相机,那么如果把某一个相机的 [member " "current] 设为 [code]false[/code] 就会导致另一个相机被设为当前相机。" #: doc/classes/Camera3D.xml msgid "" "If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the " "[url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for " "objects changed in particular [code]_process[/code] methods.\n" "[b]Note:[/b] The Doppler effect will only be heard on [AudioStreamPlayer3D]s " "if [member AudioStreamPlayer3D.doppler_tracking] is not set to [constant " "AudioStreamPlayer3D.DOPPLER_TRACKING_DISABLED]." msgstr "" "如果不是 [constant DOPPLER_TRACKING_DISABLED],此相机将为在 [code]_process[/" "code] 中变化的对象模拟[url=https://zh.wikipedia.org/wiki/" "%E5%A4%9A%E6%99%AE%E5%8B%92%E6%95%88%E5%BA%94]多普勒效应[/url]。\n" "[b]注意:[/b]仅当 [member AudioStreamPlayer3D.doppler_tracking] 未设置为 " "[constant AudioStreamPlayer3D.DOPPLER_TRACKING_DISABLED] 时,才会在 " "[AudioStreamPlayer3D] 上听到多普勒效果。" #: doc/classes/Camera3D.xml msgid "The [Environment] to use for this camera." msgstr "此相机要使用的 [Environment]。" #: doc/classes/Camera3D.xml msgid "" "The distance to the far culling boundary for this camera relative to its " "local Z axis. Higher values allow the camera to see further away, while " "decreasing [member far] can improve performance if it results in objects " "being partially or fully culled." msgstr "" "该相机相对于其局部 Z 轴到远剔除边界的距离。较高的值允许相机看得更远,而减少 " "[member far] 如果会导致对象被部分或完全剔除,则可以提高性能。" #: doc/classes/Camera3D.xml msgid "" "The camera's field of view angle (in degrees). Only applicable in " "perspective mode. Since [member keep_aspect] locks one axis, [member fov] " "sets the other axis' field of view angle.\n" "For reference, the default vertical field of view value ([code]75.0[/code]) " "is equivalent to a horizontal FOV of:\n" "- ~91.31 degrees in a 4:3 viewport\n" "- ~101.67 degrees in a 16:10 viewport\n" "- ~107.51 degrees in a 16:9 viewport\n" "- ~121.63 degrees in a 21:9 viewport" msgstr "" "相机的视野角度(单位为度)。仅适用于透视模式。由于 [member keep_aspect] 锁定" "一个轴,因此 [member fov] 设置另一个轴的视角。\n" "作为参考,默认的垂直视野值([code]70.0[/code])相当于以下水平 FOV:\n" "- 在 4:3 视口中约 91.31 度\n" "- 在 16:10 视口中约 101.67 度\n" "- 在 16:9 视口中约 107.51 度\n" "- 在 21:9 视口中约 121.63 度" #: doc/classes/Camera3D.xml msgid "" "The camera's frustum offset. This can be changed from the default to create " "\"tilted frustum\" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-" "shearing[/url].\n" "[b]Note:[/b] Only effective if [member projection] is [constant " "PROJECTION_FRUSTUM]." msgstr "" "相机的视锥偏移。可以更改默认值,以创建如 [url=https://zdoom.org/wiki/Y-" "shearing]Y-shearing[/url] 一样的“倾斜的视锥”效果。\n" "[b]注意:[/b]仅在 [member projection] 为 [constant PROJECTION_FRUSTUM] 时有" "效。" #: doc/classes/Camera3D.xml msgid "The horizontal (X) offset of the camera viewport." msgstr "相机视口的水平(X)偏移量。" #: doc/classes/Camera3D.xml msgid "" "The axis to lock during [member fov]/[member size] adjustments. Can be " "either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT]." msgstr "" "在 [member fov]/[member size] 调整时要锁定的轴。可以是 [constant KEEP_WIDTH] " "或 [constant KEEP_HEIGHT]。" #: doc/classes/Camera3D.xml msgid "" "The distance to the near culling boundary for this camera relative to its " "local Z axis. Lower values allow the camera to see objects more up close to " "its origin, at the cost of lower precision across the [i]entire[/i] range. " "Values lower than the default can lead to increased Z-fighting." msgstr "" "该相机相对于其局部 Z 轴到近剔除边界的距离。较低的值允许相机看到更靠近其原点的" "对象,但代价是[i]整个[/i]范围内的精度较低。低于默认值的值会导致 Z 冲突增加。" #: doc/classes/Camera3D.xml msgid "" "The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, " "objects' Z distance from the camera's local space scales their perceived " "size." msgstr "" "相机的投影模式。在 [constant PROJECTION_PERSPECTIVE] 模式下,物体与相机局部空" "间的Z距离会影响其感知的大小。" #: doc/classes/Camera3D.xml msgid "" "The camera's size in meters measured as the diameter of the width or height, " "depending on [member keep_aspect]. Only applicable in orthogonal and frustum " "modes." msgstr "" "该相机的大小,单位为米,描述的是完整的宽度或者高度,取决于 [member " "keep_aspect]。仅适用于正交和视锥模式。" #: doc/classes/Camera3D.xml msgid "The vertical (Y) offset of the camera viewport." msgstr "相机视口的垂直(Y)偏移量。" #: doc/classes/Camera3D.xml msgid "" "Perspective projection. Objects on the screen becomes smaller when they are " "far away." msgstr "透视投影。物体距离相机屏幕越远显示就越小。" #: doc/classes/Camera3D.xml msgid "" "Orthogonal projection, also known as orthographic projection. Objects remain " "the same size on the screen no matter how far away they are." msgstr "正交投影,又称正交投影。物体无论距离多远,在屏幕上都保持相同的大小。" #: doc/classes/Camera3D.xml msgid "" "Frustum projection. This mode allows adjusting [member frustum_offset] to " "create \"tilted frustum\" effects." msgstr "" "视锥投影。通过该模式可以调整 [member frustum_offset] 来创建“倾斜的视锥”效果。" #: doc/classes/Camera3D.xml msgid "" "Preserves the horizontal aspect ratio; also known as Vert- scaling. This is " "usually the best option for projects running in portrait mode, as taller " "aspect ratios will benefit from a wider vertical FOV." msgstr "" "保留水平长宽比,也称为 Vert- 缩放。这通常是在纵向模式下运行的项目的最佳选择," "因为较高的纵横比将从更宽的垂直视场中受益。" #: doc/classes/Camera3D.xml msgid "" "Preserves the vertical aspect ratio; also known as Hor+ scaling. This is " "usually the best option for projects running in landscape mode, as wider " "aspect ratios will automatically benefit from a wider horizontal FOV." msgstr "" "保留垂直长宽比,也称为 Hor+ 缩放。这通常是在横向模式下运行的项目的最佳选择," "因为较宽的纵横比会自动从较宽的水平视场中受益。" #: doc/classes/Camera3D.xml msgid "" "Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/" "url] by tracking positions of objects that are changed in [code]_process[/" "code]. Changes in the relative velocity of this camera compared to those " "objects affect how audio is perceived (changing the audio's [member " "AudioStreamPlayer3D.pitch_scale])." msgstr "" "通过跟踪在 [code]_process[/code] 中改变的物体位置来模拟[url=https://" "zh.wikipedia.org/wiki/%E5%A4%9A%E6%99%AE%E5%8B%92%E6%95%88%E5%BA%94]多普勒效" "应[/url]。与这些物体相比,该相机的相对速度的变化会影响音频的感知方式(改变音" "频的 [member AudioStreamPlayer3D.pitch_scale])。" #: doc/classes/Camera3D.xml msgid "" "Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/" "url] by tracking positions of objects that are changed in " "[code]_physics_process[/code]. Changes in the relative velocity of this " "camera compared to those objects affect how audio is perceived (changing the " "audio's [member AudioStreamPlayer3D.pitch_scale])." msgstr "" "通过跟踪在 [code]_process[/code] 中改变的物体位置来模拟[url=https://" "zh.wikipedia.org/wiki/%E5%A4%9A%E6%99%AE%E5%8B%92%E6%95%88%E5%BA%94]多普勒效" "应[/url]。与这些物体相比,该相机的相对速度的变化会影响音频的感知方式(改变音" "频的 [member AudioStreamPlayer3D.pitch_scale])。" #: doc/classes/CameraAttributes.xml msgid "Parent class for camera settings." msgstr "相机设置的父类。" #: doc/classes/CameraAttributes.xml msgid "" "Controls camera-specific attributes such as depth of field and exposure " "override.\n" "When used in a [WorldEnvironment] it provides default settings for exposure, " "auto-exposure, and depth of field that will be used by all cameras without " "their own [CameraAttributes], including the editor camera. When used in a " "[Camera3D] it will override any [CameraAttributes] set in the " "[WorldEnvironment]. When used in [VoxelGI] or [LightmapGI], only the " "exposure settings will be used.\n" "See also [Environment] for general 3D environment settings.\n" "This is a pure virtual class that is inherited by [CameraAttributesPhysical] " "and [CameraAttributesPractical]." msgstr "" "控制相机的特定属性,如景深和曝光覆盖。\n" "当在 [WorldEnvironment] 中使用时,它提供了曝光、自动曝光、以及景深的默认设" "置,这些设置将由所有没有自己的 [CameraAttributes] 的相机使用,包括编辑器相" "机。当在 [Camera3D] 中使用时,它将覆盖 [WorldEnvironment] 中设置的任何 " "[CameraAttributes]。当在 [VoxelGI] 或 [LightmapGI] 中使用时,将只会使用曝光设" "置。\n" "另见 [Environment] 了解一般的 3D 环境设置。\n" "这是一个由 [CameraAttributesPhysical] 和 [CameraAttributesPractical] 继承的纯" "虚类。" #: doc/classes/CameraAttributes.xml msgid "" "If [code]true[/code], enables the tonemapping auto exposure mode of the " "scene renderer. If [code]true[/code], the renderer will automatically " "determine the exposure setting to adapt to the scene's illumination and the " "observed light." msgstr "" "如果为 [code]true[/code],启用场景渲染器的色调映射自动曝光模式。如果为 " "[code]true[/code],渲染器将自动确定曝光设置,以适应场景的照明和观察到的光线。" #: doc/classes/CameraAttributes.xml msgid "" "The scale of the auto exposure effect. Affects the intensity of auto " "exposure." msgstr "自动曝光效果的比例。影响自动曝光的强度。" #: doc/classes/CameraAttributes.xml msgid "" "The speed of the auto exposure effect. Affects the time needed for the " "camera to perform auto exposure." msgstr "自动曝光效果的速度。影响相机执行自动曝光所需的时间。" #: doc/classes/CameraAttributes.xml msgid "" "Multiplier for the exposure amount. A higher value results in a brighter " "image." msgstr "曝光量的乘数。较高的值会产生较亮的图像。" #: doc/classes/CameraAttributes.xml msgid "" "Sensitivity of camera sensors, measured in ISO. A higher sensitivity results " "in a brighter image.\n" "If [member auto_exposure_enabled] is [code]true[/code], this can be used as " "a method of exposure compensation, doubling the value will increase the " "exposure value (measured in EV100) by 1 stop.\n" "[b]Note:[/b] Only available when [member ProjectSettings.rendering/" "lights_and_shadows/use_physical_light_units] is enabled." msgstr "" "相机传感器的灵敏度,以 ISO 测量。灵敏度越高,图像越亮。\n" "[member auto_exposure_enabled] 为 [code]true[/code] 时,可以用作曝光补偿的方" "法,将该值加倍会使曝光值增加 1 档(以 EV100 测量)。\n" "[b]注意:[/b]仅在启用 [member ProjectSettings.rendering/lights_and_shadows/" "use_physical_light_units] 时可用。" #: doc/classes/CameraAttributesPhysical.xml msgid "Physically-based camera settings." msgstr "基于物理的相机设置。" #: doc/classes/CameraAttributesPhysical.xml msgid "" "[CameraAttributesPhysical] is used to set rendering settings based on a " "physically-based camera's settings. It is responsible for exposure, auto-" "exposure, and depth of field.\n" "When used in a [WorldEnvironment] it provides default settings for exposure, " "auto-exposure, and depth of field that will be used by all cameras without " "their own [CameraAttributes], including the editor camera. When used in a " "[Camera3D] it will override any [CameraAttributes] set in the " "[WorldEnvironment] and will override the [Camera3D]s [member Camera3D.far], " "[member Camera3D.near], [member Camera3D.fov], and [member " "Camera3D.keep_aspect] properties. When used in [VoxelGI] or [LightmapGI], " "only the exposure settings will be used.\n" "The default settings are intended for use in an outdoor environment, tips " "for settings for use in an indoor environment can be found in each setting's " "documentation.\n" "[b]Note:[/b] Depth of field blur is only supported in the Forward+ and " "Mobile rendering methods, not Compatibility." msgstr "" "[CameraAttributesPhysical] 用于根据基于物理的相机的设置来设置渲染设置。它负责" "曝光、自动曝光、以及景深。\n" "当在 [WorldEnvironment] 中使用时,它提供了曝光、自动曝光、以及景深的默认设" "置,这些设置将由所有没有自己的 [CameraAttributes] 的相机使用,包括编辑器相" "机。当在 [Camera3D] 中使用时,它将覆盖 [WorldEnvironment] 中设置的任何 " "[CameraAttributes],并将覆盖 [Camera3D] 的 [member Camera3D.far]、[member " "Camera3D.near]、[member Camera3D.fov]、以及 [member Camera3D.keep_aspect] 属" "性。当在 [VoxelGI] 或 [LightmapGI] 中使用时,将只会使用曝光设置。\n" "默认设置适用于室外环境,可在每个设置的文档中找到有关在室内环境中使用的设置的" "提示。\n" "[b]注意:[/b]景深模糊只支持 Forward+ 和移动渲染方式,不支持兼容模式。" #: doc/classes/CameraAttributesPhysical.xml msgid "Physical light and camera units" msgstr "物理灯光与相机单位" #: doc/classes/CameraAttributesPhysical.xml msgid "" "Returns the vertical field of view that corresponds to the [member " "frustum_focal_length]. This value is calculated internally whenever [member " "frustum_focal_length] is changed." msgstr "" "返回对应于 [member frustum_focal_length] 的垂直视野。每当 [member " "frustum_focal_length] 发生变化时,该值都会在内部计算。" #: doc/classes/CameraAttributesPhysical.xml msgid "" "The maximum luminance (in EV100) used when calculating auto exposure. When " "calculating scene average luminance, color values will be clamped to at " "least this value. This limits the auto-exposure from exposing below a " "certain brightness, resulting in a cut off point where the scene will remain " "bright." msgstr "" "计算自动曝光时使用的最大亮度(单位:EV100)。在计算场景平均亮度时,颜色值将至" "少被钳制在这个值上。这限制了自动曝光在低于一定的亮度进行曝光时,导致场景将保" "持明亮的一个截止点。" #: doc/classes/CameraAttributesPhysical.xml msgid "" "The minimum luminance (in EV100) used when calculating auto exposure. When " "calculating scene average luminance, color values will be clamped to at " "least this value. This limits the auto-exposure from exposing above a " "certain brightness, resulting in a cut off point where the scene will remain " "dark." msgstr "" "计算自动曝光时使用的最小亮度(单位为 EV100)。在计算场景平均亮度时,颜色值将" "至少被钳制在这个值上。这限制了自动曝光在超过一定的亮度进行曝光时,导致场景将" "保持黑暗的一个截止点。" #: doc/classes/CameraAttributesPhysical.xml msgid "" "Size of the aperture of the camera, measured in f-stops. An f-stop is a " "unitless ratio between the focal length of the camera and the diameter of " "the aperture. A high aperture setting will result in a smaller aperture " "which leads to a dimmer image and sharper focus. A low aperture results in a " "wide aperture which lets in more light resulting in a brighter, less-focused " "image. Default is appropriate for outdoors at daytime (i.e. for use with a " "default [DirectionalLight3D]), for indoor lighting, a value between 2 and 4 " "is more appropriate.\n" "Only available when [member ProjectSettings.rendering/lights_and_shadows/" "use_physical_light_units] is enabled." msgstr "" "相机光圈的大小,以 f 档为单位进行测量。f 档是相机焦距与光圈直径之间的一个无单" "位比率。高光圈设置将产生一个更小的光圈,从而导致更暗的图像和更清晰的焦点。低" "光圈会产生一个大光圈,让更多的光线进入,从而产生一个更亮、更不聚焦的图像。默" "认值适用于白天的室外(即与默认 [DirectionalLight3D] 一起使用),对于室内照" "明,2 到 4 之间的值更合适。\n" "仅在启用 [member ProjectSettings.rendering/lights_and_shadows/" "use_physical_light_units] 时可用。" #: doc/classes/CameraAttributesPhysical.xml msgid "" "Time for shutter to open and close, evaluated as [code]1 / shutter_speed[/" "code] seconds. A higher value will allow less light (leading to a darker " "image), while a lower value will allow more light (leading to a brighter " "image).\n" "Only available when [member ProjectSettings.rendering/lights_and_shadows/" "use_physical_light_units] is enabled." msgstr "" "快门打开和关闭的时间,计算方式为 [code]1 / shutter_speed[/code] 秒。较高的值" "将允许较少的光线(导致图像较暗),而较低的值将允许更多的光线(导致图像较" "亮)。\n" "仅当启用 [member ProjectSettings.rendering/lights_and_shadows/" "use_physical_light_units] 时可用。" #: doc/classes/CameraAttributesPhysical.xml msgid "" "Override value for [member Camera3D.far]. Used internally when calculating " "depth of field. When attached to a [Camera3D] as its [member " "Camera3D.attributes], it will override the [member Camera3D.far] property." msgstr "" "覆盖 [member Camera3D.far] 的值。在内部计算景深时使用。当被附加到 [Camera3D] " "作为其 [member Camera3D.attributes] 时,它将覆盖 [member Camera3D.fov] 属性。" #: doc/classes/CameraAttributesPhysical.xml msgid "" "Distance between camera lens and camera aperture, measured in millimeters. " "Controls field of view and depth of field. A larger focal length will result " "in a smaller field of view and a narrower depth of field meaning fewer " "objects will be in focus. A smaller focal length will result in a wider " "field of view and a larger depth of field meaning more objects will be in " "focus. When attached to a [Camera3D] as its [member Camera3D.attributes], it " "will override the [member Camera3D.fov] property and the [member " "Camera3D.keep_aspect] property." msgstr "" "相机镜头和相机光圈之间的距离,单位:毫米。控制视野和景深。较大的焦距会导致较" "小的视野和较窄的景深,这意味着更少的对象将在焦点中。较小的焦距会导致更宽的视" "野和更大的景深,这意味着更多的物体将在焦点中。当被附加到 [Camera3D] 作为其 " "[member Camera3D.attributes] 时,它将覆盖 [member Camera3D.fov] 属性和 " "[member Camera3D.keep_aspect] 属性。" #: doc/classes/CameraAttributesPhysical.xml msgid "" "Distance from camera of object that will be in focus, measured in meters. " "Internally this will be clamped to be at least 1 millimeter larger than " "[member frustum_focal_length]." msgstr "" "将在焦点中的物体与相机的距离,以米为单位进行测量。在内部,这将被钳制为至少比 " "[member frustum_focal_length] 大 1 毫米。" #: doc/classes/CameraAttributesPhysical.xml msgid "" "Override value for [member Camera3D.near]. Used internally when calculating " "depth of field. When attached to a [Camera3D] as its [member " "Camera3D.attributes], it will override the [member Camera3D.near] property." msgstr "" "覆盖 [member Camera3D.near] 的值。在内部计算景深时使用。当被附加到 " "[Camera3D] 作为其 [member Camera3D.attributes] 时,它将覆盖 [member " "Camera3D.near] 属性。" #: doc/classes/CameraAttributesPractical.xml msgid "Camera settings in an easy to use format." msgstr "相机设置,格式比较易用。" #: doc/classes/CameraAttributesPractical.xml msgid "" "Controls camera-specific attributes such as auto-exposure, depth of field, " "and exposure override.\n" "When used in a [WorldEnvironment] it provides default settings for exposure, " "auto-exposure, and depth of field that will be used by all cameras without " "their own [CameraAttributes], including the editor camera. When used in a " "[Camera3D] it will override any [CameraAttributes] set in the " "[WorldEnvironment]. When used in [VoxelGI] or [LightmapGI], only the " "exposure settings will be used." msgstr "" "控制相机的特定属性,如自动曝光、景深、以及曝光覆盖。\n" "当在 [WorldEnvironment] 中使用时,它提供了曝光、自动曝光、以及景深的默认设" "置,这些设置将由所有没有自己的 [CameraAttributes] 的相机使用,包括编辑器相" "机。当在 [Camera3D] 中使用时,它将覆盖 [WorldEnvironment] 中设置的任何 " "[CameraAttributes]。当在 [VoxelGI] 或 [LightmapGI] 中使用时,只会使用曝光设" "置。" #: doc/classes/CameraAttributesPractical.xml msgid "" "The maximum sensitivity (in ISO) used when calculating auto exposure. When " "calculating scene average luminance, color values will be clamped to at " "least this value. This limits the auto-exposure from exposing below a " "certain brightness, resulting in a cut off point where the scene will remain " "bright." msgstr "" "计算自动曝光时使用的最大感光度(单位:ISO)。在计算场景平均亮度时,颜色值将至" "少被钳制在这个值上。这限制了自动曝光在低于一定的亮度进行曝光时,导致场景将保" "持明亮的一个截止点。" #: doc/classes/CameraAttributesPractical.xml msgid "" "The minimum sensitivity (in ISO) used when calculating auto exposure. When " "calculating scene average luminance, color values will be clamped to at " "least this value. This limits the auto-exposure from exposing above a " "certain brightness, resulting in a cut off point where the scene will remain " "dark." msgstr "" "计算自动曝光时使用的最小感光度(单位:ISO)。在计算场景平均亮度时,颜色值将至" "少被钳制在这个值上。这限制了自动曝光在超过一定的亮度进行曝光时,导致场景将保" "持黑暗的一个截止点。" #: doc/classes/CameraAttributesPractical.xml msgid "" "Sets the maximum amount of blur. When using physically-based blur amounts, " "will instead act as a multiplier. High values lead to an increased amount of " "blurriness, but can be much more expensive to calculate. It is best to keep " "this as low as possible for a given art style." msgstr "" "设置最大模糊量。当使用基于物理的模糊量时,将改为充当一个乘数。高值会导致模糊" "度增加,但计算起来会更昂贵。对于一个给定的艺术风格,最好将该值保持得尽可能" "低。" #: doc/classes/CameraAttributesPractical.xml msgid "" "Objects further from the [Camera3D] by this amount will be blurred by the " "depth of field effect. Measured in meters." msgstr "" "距离该 [Camera3D] 比该值远的对象将因景深效果而变得模糊。以米为单位进行测量。" #: doc/classes/CameraAttributesPractical.xml msgid "" "Enables depth of field blur for objects further than [member " "dof_blur_far_distance]. Strength of blur is controlled by [member " "dof_blur_amount] and modulated by [member dof_blur_far_transition].\n" "[b]Note:[/b] Depth of field blur is only supported in the Forward+ and " "Mobile rendering methods, not Compatibility.\n" "[b]Note:[/b] Depth of field blur is not supported on viewports that have a " "transparent background (where [member Viewport.transparent_bg] is " "[code]true[/code])." msgstr "" "为比 [member dof_blur_far_distance] 更远的对象启用景深模糊。模糊强度由 " "[member dof_blur_amount] 控制并由 [member dof_blur_far_transition] 调制。\n" "[b]注意:[/b]景深模糊只支持 Forward+ 和移动渲染方式,不支持兼容模式。\n" "[b]注意:[/b] 当视口背景为透明(即 [member Viewport.transparent_bg] 为 " "[code]true[/code])时,不支持景深模糊效果。" #: doc/classes/CameraAttributesPractical.xml msgid "" "When positive, distance over which (starting from [member " "dof_blur_far_distance]) blur effect will scale from 0 to [member " "dof_blur_amount]. When negative, uses physically-based scaling so depth of " "field effect will scale from 0 at [member dof_blur_far_distance] and will " "increase in a physically accurate way as objects get further from the " "[Camera3D]." msgstr "" "当为正数时,距离超过该值(从 [member dof_blur_far_distance] 开始)时,模糊效" "果将从 0 缩放到 [member dof_blur_amount]。当为负数时,使用基于物理的缩放,因" "此景深效果将在 [member dof_blur_far_distance] 处从 0 开始缩放,并且随着对象远" "离该 [Camera3D],将以物理上准确的方式增加该效果。" #: doc/classes/CameraAttributesPractical.xml msgid "" "Objects closer from the [Camera3D] by this amount will be blurred by the " "depth of field effect. Measured in meters." msgstr "" "距离该 [Camera3D] 比该值近的对象将因景深效果而变得模糊。以米为单位进行测量。" #: doc/classes/CameraAttributesPractical.xml msgid "" "Enables depth of field blur for objects closer than [member " "dof_blur_near_distance]. Strength of blur is controlled by [member " "dof_blur_amount] and modulated by [member dof_blur_near_transition].\n" "[b]Note:[/b] Depth of field blur is only supported in the Forward+ and " "Mobile rendering methods, not Compatibility.\n" "[b]Note:[/b] Depth of field blur is not supported on viewports that have a " "transparent background (where [member Viewport.transparent_bg] is " "[code]true[/code])." msgstr "" "为比 [member dof_blur_near_distance] 更近的对象启用景深模糊。模糊强度由 " "[member dof_blur_amount] 控制并由 [member dof_blur_near_transition] 调制。\n" "[b]注意:[/b]景深模糊只支持 Forward+ 和移动渲染方式,不支持兼容模式。\n" "[b]注意:[/b] 当视口背景为透明(即 [member Viewport.transparent_bg] 为 " "[code]true[/code])时,不支持景深模糊效果。" #: doc/classes/CameraAttributesPractical.xml msgid "" "When positive, distance over which blur effect will scale from 0 to [member " "dof_blur_amount], ending at [member dof_blur_near_distance]. When negative, " "uses physically-based scaling so depth of field effect will scale from 0 at " "[member dof_blur_near_distance] and will increase in a physically accurate " "way as objects get closer to the [Camera3D]." msgstr "" "当为正数时,距离超过该值且截止到 [member dof_blur_near_distance] 时,模糊效果" "将从 0 缩放到 [member dof_blur_amount]。当为负数时,使用基于物理的缩放,因此" "景深效果将在 [member dof_blur_near_distance] 处从 0 开始缩放,并且随着对象靠" "近该 [Camera3D],将以物理上准确的方式增加该效果。" #: doc/classes/CameraFeed.xml msgid "" "A camera feed gives you access to a single physical camera attached to your " "device." msgstr "通过相机源,你可以访问连接到设备的单个物理相机。" #: doc/classes/CameraFeed.xml msgid "" "A camera feed gives you access to a single physical camera attached to your " "device. When enabled, Godot will start capturing frames from the camera " "which can then be used. See also [CameraServer].\n" "[b]Note:[/b] Many cameras will return YCbCr images which are split into two " "textures and need to be combined in a shader. Godot does this automatically " "for you if you set the environment to show the camera image in the " "background.\n" "[b]Note:[/b] This class is currently only implemented on Linux, Android, " "macOS, and iOS. On other platforms no [CameraFeed]s will be available. To " "get a [CameraFeed] on iOS, the camera plugin from [url=https://github.com/" "godotengine/godot-ios-plugins]godot-ios-plugins[/url] is required." msgstr "" "通过相机源,你可以访问连接到设备的某个物理相机。启用后,Godot 将开始从相机捕" "获帧,随后这些帧便可使用。另见 [CameraServer]。\n" "[b]注意:[/b]很多相机会返回 YCbCr 图像,这些图像被分成两个纹理,需要在着色器" "中组合。如果你将环境设置为在背景中显示相机图像,Godot 会自动执行此操作。\n" "[b]注意:[/b]这个类目前只在 Linux、Android、macOS 和 iOS 上实现。在其他平台上" "没有可用的 [CameraFeed]。在 iOS 上获取 [CameraFeed] 需要 [url=https://" "github.com/godotengine/godot-ios-plugins]godot-ios-plugins[/url] 中的相机插" "件。" #: doc/classes/CameraFeed.xml msgid "Called when the camera feed is activated." msgstr "相机源被激活时调用。" #: doc/classes/CameraFeed.xml msgid "Called when the camera feed is deactivated." msgstr "相机源失去激活时调用。" #: doc/classes/CameraFeed.xml msgid "Returns feed image data type." msgstr "返回源图像的数据类型。" #: doc/classes/CameraFeed.xml msgid "Returns the unique ID for this feed." msgstr "返回该源的唯一ID。" #: doc/classes/CameraFeed.xml msgid "Returns the camera's name." msgstr "返回相机的名称。" #: doc/classes/CameraFeed.xml msgid "Returns the position of camera on the device." msgstr "返回设备上的相机位置。" #: doc/classes/CameraFeed.xml msgid "" "Returns the texture backend ID (usable by some external libraries that need " "a handle to a texture to write data)." msgstr "返回纹理后端的 ID(可用于某些需要通过纹理句柄写入数据的外部库)。" #: doc/classes/CameraFeed.xml msgid "Sets the feed as external feed provided by another library." msgstr "将供给设置为由另一个库提供的外部供给。" #: doc/classes/CameraFeed.xml msgid "" "Sets the feed format parameters for the given [param index] in the [member " "formats] array. Returns [code]true[/code] on success. By default, the YUYV " "encoded stream is transformed to [constant FEED_RGB]. The YUYV encoded " "stream output format can be changed by setting [param parameters]'s " "[code]output[/code] entry to one of the following:\n" "- [code]\"separate\"[/code] will result in [constant FEED_YCBCR_SEP];\n" "- [code]\"grayscale\"[/code] will result in desaturated [constant " "FEED_RGB];\n" "- [code]\"copy\"[/code] will result in [constant FEED_YCBCR]." msgstr "" "设置 [member formats] 数组中给定 [param index] 的源格式参数。成功时返回 " "[code]true[/code]。默认情况下,YUYV 编码的流会转换为 [constant FEED_RGB]。" "YUYV 编码的流的输出格式可以通过将 [param parameters] 的 [code]output[/code] " "条目设置为以下之一来更改:\n" "- [code]\"separate\"[/code] 得到的是 [constant FEED_YCBCR_SEP];\n" "- [code]\"grayscale\"[/code] 得到的是降低饱和度的 [constant FEED_RGB];\n" "- [code]\"copy\"[/code] 得到的是 [constant FEED_YCBCR]。" #: doc/classes/CameraFeed.xml msgid "Sets the camera's name." msgstr "设置相机的名称。" #: doc/classes/CameraFeed.xml msgid "Sets the position of this camera." msgstr "设置相机的位置。" #: doc/classes/CameraFeed.xml msgid "Sets RGB image for this feed." msgstr "设置该源的 RGB 图像。" #: doc/classes/CameraFeed.xml msgid "Sets YCbCr image for this feed." msgstr "设置该源的 YCbCr 图像。" #: doc/classes/CameraFeed.xml #, fuzzy msgid "Sets Y and CbCr images for this feed." msgstr "设置该源的 YCbCr 图像。" #: doc/classes/CameraFeed.xml msgid "If [code]true[/code], the feed is active." msgstr "如果为 [code]true[/code],则源是激活的。" #: doc/classes/CameraFeed.xml msgid "The transform applied to the camera's image." msgstr "应用于相机图像的变换。" #: doc/classes/CameraFeed.xml msgid "" "Formats supported by the feed. Each entry is a [Dictionary] describing " "format parameters." msgstr "源支持的所有格式。每个条目都是描述格式参数的 [Dictionary]。" #: doc/classes/CameraFeed.xml msgid "Emitted when the format has changed." msgstr "格式发生变化时发出。" #: doc/classes/CameraFeed.xml msgid "Emitted when a new frame is available." msgstr "新图像帧可用时发出。" #: doc/classes/CameraFeed.xml msgid "No image set for the feed." msgstr "没有为该源设置图像。" #: doc/classes/CameraFeed.xml msgid "Feed supplies RGB images." msgstr "源提供 RGB 图像。" #: doc/classes/CameraFeed.xml msgid "Feed supplies YCbCr images that need to be converted to RGB." msgstr "源提供的 YCbCr 图像需要转换成 RGB 图像。" #: doc/classes/CameraFeed.xml msgid "" "Feed supplies separate Y and CbCr images that need to be combined and " "converted to RGB." msgstr "源提供单独的 Y 和 CbCr 图像,需要合并并转换为 RGB。" #: doc/classes/CameraFeed.xml msgid "Feed supplies external image." msgstr "源提供外部图像。" #: doc/classes/CameraFeed.xml msgid "Unspecified position." msgstr "未指定坐标。" #: doc/classes/CameraFeed.xml msgid "Camera is mounted at the front of the device." msgstr "相机安装在了设备前部。" #: doc/classes/CameraFeed.xml msgid "Camera is mounted at the back of the device." msgstr "相机安装在了设备后部。" #: doc/classes/CameraServer.xml msgid "Server keeping track of different cameras accessible in Godot." msgstr "跟踪 Godot 中可访问的不同摄像头的服务器。" #: doc/classes/CameraServer.xml msgid "" "The [CameraServer] keeps track of different cameras accessible in Godot. " "These are external cameras such as webcams or the cameras on your phone.\n" "It is notably used to provide AR modules with a video feed from the camera.\n" "[b]Note:[/b] This class is currently only implemented on Linux, Android, " "macOS, and iOS. On other platforms no [CameraFeed]s will be available. To " "get a [CameraFeed] on iOS, the camera plugin from [url=https://github.com/" "godotengine/godot-ios-plugins]godot-ios-plugins[/url] is required." msgstr "" "[CameraServer] 记录了 Godot 中可访问的不同相机。此处的相机指外部相机,例如网" "络摄像头或手机上的摄像头。\n" "主要用于为 AR 模块提供来自相机的视频源。\n" "[b]注意:[/b]这个类目前只在 Linux、Android、macOS 和 iOS 上实现。在其他平台上" "没有可用的 [CameraFeed]。在 iOS 上获取 [CameraFeed] 需要 [url=https://" "github.com/godotengine/godot-ios-plugins]godot-ios-plugins[/url] 中的相机插" "件。" #: doc/classes/CameraServer.xml msgid "Adds the camera [param feed] to the camera server." msgstr "将相机源 [param feed] 添加到相机服务器中。" #: doc/classes/CameraServer.xml msgid "Returns an array of [CameraFeed]s." msgstr "返回一个 [CameraFeed] 数组。" #: doc/classes/CameraServer.xml msgid "" "Returns the [CameraFeed] corresponding to the camera with the given [param " "index]." msgstr "返回与给定索引 [param index] 的相机对应的 [CameraFeed]。" #: doc/classes/CameraServer.xml msgid "Returns the number of [CameraFeed]s registered." msgstr "返回注册的 [CameraFeed] 的数量。" #: doc/classes/CameraServer.xml msgid "Removes the specified camera [param feed]." msgstr "移除指定的相机源 [param feed]。" #: doc/classes/CameraServer.xml msgid "" "If [code]true[/code], the server is actively monitoring available camera " "feeds.\n" "This has a performance cost, so only set it to [code]true[/code] when you're " "actively accessing the camera.\n" "[b]Note:[/b] After setting it to [code]true[/code], you can receive updated " "camera feeds through the [signal camera_feeds_updated] signal.\n" "[codeblocks]\n" "[gdscript]\n" "func _ready():\n" "\tCameraServer.camera_feeds_updated.connect(_on_camera_feeds_updated)\n" "\tCameraServer.monitoring_feeds = true\n" "\n" "func _on_camera_feeds_updated():\n" "\tvar feeds = CameraServer.feeds()\n" "[/gdscript]\n" "[csharp]\n" "public override void _Ready()\n" "{\n" "\tCameraServer.CameraFeedsUpdated += OnCameraFeedsUpdated;\n" "\tCameraServer.MonitoringFeeds = true;\n" "}\n" "\n" "void OnCameraFeedsUpdated()\n" "{\n" "\tvar feeds = CameraServer.Feeds();\n" "}\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "如果为 [code]true[/code],则服务器会主动监听可用的相机源。\n" "这样做存在性能开销,因此请只在主动访问相机时将其设为 [code]true[/code]。\n" "[b]注意:[/b]设为 [code]true[/code] 后,你可以通过 [signal " "camera_feeds_updated] 信号获取更新后的相机源。\n" "[codeblocks]\n" "[gdscript]\n" "func _ready():\n" "\tCameraServer.camera_feeds_updated.connect(_on_camera_feeds_updated)\n" "\tCameraServer.monitoring_feeds = true\n" "\n" "func _on_camera_feeds_updated():\n" "\tvar feeds = CameraServer.feeds()\n" "[/gdscript]\n" "[csharp]\n" "public override void _Ready()\n" "{\n" "\tCameraServer.CameraFeedsUpdated += OnCameraFeedsUpdated;\n" "\tCameraServer.MonitoringFeeds = true;\n" "}\n" "\n" "void OnCameraFeedsUpdated()\n" "{\n" "\tvar feeds = CameraServer.Feeds();\n" "}\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/CameraServer.xml msgid "Emitted when a [CameraFeed] is added (e.g. a webcam is plugged in)." msgstr "当添加 [CameraFeed] 时发出(例如插入网络摄像头时)。" #: doc/classes/CameraServer.xml msgid "Emitted when a [CameraFeed] is removed (e.g. a webcam is unplugged)." msgstr "当移除 [CameraFeed] 时发出(例如拔掉网络摄像头时)。" #: doc/classes/CameraServer.xml msgid "Emitted when camera feeds are updated." msgstr "更新相机源时发出。" #: doc/classes/CameraServer.xml msgid "The RGBA camera image." msgstr "RGBA 相机图像。" #: doc/classes/CameraServer.xml msgid "The [url=https://en.wikipedia.org/wiki/YCbCr]YCbCr[/url] camera image." msgstr "[url=https://zh.wikipedia.org/zh-cn/YCbCr]YCbCr[/url] 相机图像。" #: doc/classes/CameraServer.xml msgid "The Y component camera image." msgstr "Y 分量相机图像。" #: doc/classes/CameraServer.xml msgid "The CbCr component camera image." msgstr "CbCr 分量相机图像。" #: doc/classes/CameraTexture.xml msgid "Texture provided by a [CameraFeed]." msgstr "由 [CameraFeed] 提供的纹理。" #: doc/classes/CameraTexture.xml msgid "" "This texture gives access to the camera texture provided by a [CameraFeed].\n" "[b]Note:[/b] Many cameras supply YCbCr images which need to be converted in " "a shader." msgstr "" "该纹理可以访问 [CameraFeed] 提供的相机纹理。\n" "[b]注意:[/b]许多相机提供的都是 YCbCr 图像,需要在着色器中进行转换。" #: doc/classes/CameraTexture.xml msgid "The ID of the [CameraFeed] for which we want to display the image." msgstr "我们要显示图像的 [CameraFeed] 的 ID。" #: doc/classes/CameraTexture.xml msgid "" "Convenience property that gives access to the active property of the " "[CameraFeed]." msgstr "给予访问 [CameraFeed] 的活动属性的便利属性。" #: doc/classes/CameraTexture.xml msgid "" "Which image within the [CameraFeed] we want access to, important if the " "camera image is split in a Y and CbCr component." msgstr "" "我们要访问 [CameraFeed] 中的哪个图像,如果相机图像被分割成 Y 和 CbCr 分量,这" "一点很重要。" #: doc/classes/CanvasGroup.xml msgid "Merges several 2D nodes into a single draw operation." msgstr "将若干 2D 节点合并至单次绘制操作。" #: doc/classes/CanvasGroup.xml #, fuzzy msgid "" "Child [CanvasItem] nodes of a [CanvasGroup] are drawn as a single object. It " "allows to e.g. draw overlapping translucent 2D nodes without causing the " "overlapping sections to be more opaque than intended (set the [member " "CanvasItem.self_modulate] property on the [CanvasGroup] to achieve this " "effect).\n" "[b]Note:[/b] The [CanvasGroup] uses a custom shader to read from the " "backbuffer to draw its children. Assigning a [Material] to the [CanvasGroup] " "overrides the built-in shader. To duplicate the behavior of the built-in " "shader in a custom [Shader], use the following:\n" "[codeblock]\n" "shader_type canvas_item;\n" "render_mode unshaded;\n" "\n" "uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, " "filter_nearest;\n" "\n" "void fragment() {\n" "\tvec4 c = textureLod(screen_texture, SCREEN_UV, 0.0);\n" "\n" "\tif (c.a > 0.0001) {\n" "\t\tc.rgb /= c.a;\n" "\t}\n" "\n" "\tCOLOR *= c;\n" "}\n" "[/codeblock]\n" "[b]Note:[/b] Since [CanvasGroup] and [member CanvasItem.clip_children] both " "utilize the backbuffer, children of a [CanvasGroup] who have their [member " "CanvasItem.clip_children] set to anything other than [constant " "CanvasItem.CLIP_CHILDREN_DISABLED] will not function correctly." msgstr "" "[CanvasGroup] 的所有子 [CanvasItem] 节点会作为一个单独的对象绘制。它允许在不" "混合的情况下绘制重叠的半透明 2D 节点(设置 [CanvasGroup] 的 [member " "CanvasItem.self_modulate] 属性来实现这一效果)。\n" "[b]注意:[/b][CanvasGroup] 使用一个自定义着色器从后台缓冲区读取以绘制其子节" "点。为 [CanvasGroup] 指定一个 [Material] 会覆盖内置着色器。要在自定义 " "[Shader] 中复制内置着色器的行为,请使用以下方法:\n" "[codeblock]\n" "shader_type canvas_item;\n" "render_mode unshaded;\n" "\n" "uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, " "filter_nearest;\n" "\n" "void fragment() {\n" "\tvec4 c = textureLod(screen_texture, SCREEN_UV, 0.0);\n" "\n" "\tif (c.a > 0.0001) {\n" "\t\tc.rgb /= c.a;\n" "\t}\n" "\n" "\tCOLOR *= c;\n" "}\n" "[/codeblock]\n" "[b]注意:[/b]由于 [CanvasGroup] 和 [member CanvasItem.clip_children] 都使用后" "台缓冲区,因此 [CanvasGroup] 的子级如果将其 [member " "CanvasItem.clip_children] 设置为 [constant " "CanvasItem.CLIP_CHILDREN_DISABLED] 以外的其他值将无法正常工作。" #: doc/classes/CanvasGroup.xml msgid "" "Sets the size of the margin used to expand the clearing rect of this " "[CanvasGroup]. This expands the area of the backbuffer that will be used by " "the [CanvasGroup]. A smaller margin will reduce the area of the backbuffer " "used which can increase performance, however if [member use_mipmaps] is " "enabled, a small margin may result in mipmap errors at the edge of the " "[CanvasGroup]. Accordingly, this should be left as small as possible, but " "should be increased if artifacts appear along the edges of the canvas group." msgstr "" "设置用于扩展该 [CanvasGroup] 清除矩形的边距大小。会对该 [CanvasGroup] 所使用" "的后台缓冲的区域进行扩展。边距较小时可以减少后台缓冲的区域大小,从而提升性" "能,但如果启用了 [member use_mipmaps],较小的边距可能在该 [CanvasGroup] 边缘" "造成 mipmap 错误。因此,这个值应该尽量调小,但是如果画布组的边缘出现问题,就" "应该将其调大。" #: doc/classes/CanvasGroup.xml msgid "" "Sets the size of a margin used to expand the drawable rect of this " "[CanvasGroup]. The size of the [CanvasGroup] is determined by fitting a rect " "around its children then expanding that rect by [member fit_margin]. This " "increases both the backbuffer area used and the area covered by the " "[CanvasGroup] both of which can reduce performance. This should be kept as " "small as possible and should only be expanded when an increased size is " "needed (e.g. for custom shader effects)." msgstr "" "设置用于扩展该 [CanvasGroup] 绘图矩形的边距大小。确定该 [CanvasGroup] 大小的" "方法是:首先框定子节点的矩形区域,然后将该矩形按照 [member fit_margin] 进行扩" "展。会增大该 [CanvasGroup] 所使用的后台缓冲的区域,也会增大该 [CanvasGroup] " "所覆盖的面积,两者都会降低性能。这个值应该尽量调小,仅在需要时调大(例如自定" "义着色器效果)。" #: doc/classes/CanvasGroup.xml msgid "" "If [code]true[/code], calculates mipmaps for the backbuffer before drawing " "the [CanvasGroup] so that mipmaps can be used in a custom [ShaderMaterial] " "attached to the [CanvasGroup]. Generating mipmaps has a performance cost so " "this should not be enabled unless required." msgstr "" "如果为 [code]true[/code],则会在绘制该 [CanvasGroup] 之前为其后台缓冲计算 " "mipmap,附加到该 [CanvasGroup] 的自定义 [ShaderMaterial] 就可以使用 mipmap。" "Mipmap 的生成会造成性能消耗,所以应在必要时才启用。" #: doc/classes/CanvasItem.xml msgid "Abstract base class for everything in 2D space." msgstr "2D 空间中所有对象的抽象基类。" #: doc/classes/CanvasItem.xml msgid "" "Abstract base class for everything in 2D space. Canvas items are laid out in " "a tree; children inherit and extend their parent's transform. [CanvasItem] " "is extended by [Control] for GUI-related nodes, and by [Node2D] for 2D game " "objects.\n" "Any [CanvasItem] can draw. For this, [method queue_redraw] is called by the " "engine, then [constant NOTIFICATION_DRAW] will be received on idle time to " "request a redraw. Because of this, canvas items don't need to be redrawn on " "every frame, improving the performance significantly. Several functions for " "drawing on the [CanvasItem] are provided (see [code]draw_*[/code] " "functions). However, they can only be used inside [method _draw], its " "corresponding [method Object._notification] or methods connected to the " "[signal draw] signal.\n" "Canvas items are drawn in tree order on their canvas layer. By default, " "children are on top of their parents, so a root [CanvasItem] will be drawn " "behind everything. This behavior can be changed on a per-item basis.\n" "A [CanvasItem] can be hidden, which will also hide its children. By " "adjusting various other properties of a [CanvasItem], you can also modulate " "its color (via [member modulate] or [member self_modulate]), change its Z-" "index, blend mode, and more.\n" "Note that properties like transform, modulation, and visibility are only " "propagated to [i]direct[/i] [CanvasItem] child nodes. If there is a non-" "[CanvasItem] node in between, like [Node] or [AnimationPlayer], the " "[CanvasItem] nodes below will have an independent position and [member " "modulate] chain. See also [member top_level]." msgstr "" "2D 空间中所有对象的抽象基类。画布项目以树状排列;子节点继承并扩展其父节点的变" "换。[CanvasItem] 由 [Control] 扩展为 GUI 相关的节点,由 [Node2D] 扩展为 2D 游" "戏对象。\n" "任何 [CanvasItem] 都可以进行绘图。绘图时,引擎会调用 [method queue_redraw]," "然后 [constant NOTIFICATION_DRAW] 就会在空闲时被接收到以请求重绘。因此,画布" "项目不需要每一帧都重绘,这显著提升了性能。这个类还提供了几个用于在 " "[CanvasItem] 上绘图的函数(见 [code]draw_*[/code] 函数)。不过这些函数都只能" "在 [method _draw] 及其对应的 [method Object._notification] 或连接到 [signal " "draw] 的方法内使用。\n" "画布项目在其画布层上是按树状顺序绘制的。默认情况下,子项目位于其父项目的上" "方,因此根 [CanvasItem] 将被画在所有项目的后面。这种行为可以针对每个画布项目" "进行更改。\n" "[CanvasItem] 可以隐藏,隐藏时也会隐藏其子项目。通过调整 [CanvasItem] 的各种其" "它属性,你还可以调制它的颜色(通过 [member modulate] 或 [member " "self_modulate])、更改 Z 索引、混合模式等。\n" "请注意,变换、调制、可见性等属性只会传播至[i]直属[/i]的 [CanvasItem] 子节点。" "如果中间有 [Node]、[AnimationPlayer] 等非 [CanvasItem] 节点,那么更深层 " "[CanvasItem] 的位置和 [member modulate] 链就是独立的了。另见 [member " "top_level]。" #: doc/classes/CanvasItem.xml doc/classes/CanvasLayer.xml #: doc/classes/InputEvent.xml doc/classes/SubViewport.xml #: doc/classes/Viewport.xml msgid "Viewport and canvas transforms" msgstr "Viewport 和画布变换" #: doc/classes/CanvasItem.xml doc/classes/Control.xml doc/classes/Node2D.xml msgid "Custom drawing in 2D" msgstr "2D 中的自定义绘图" #: doc/classes/CanvasItem.xml msgid "" "Called when [CanvasItem] has been requested to redraw (after [method " "queue_redraw] is called, either manually or by the engine).\n" "Corresponds to the [constant NOTIFICATION_DRAW] notification in [method " "Object._notification]." msgstr "" "当 [CanvasItem] 被请求重绘时调用(手动调用或者引擎调用 [method queue_redraw] " "之后)。\n" "对应于 [method Object._notification] 中的 [constant NOTIFICATION_DRAW] 通知。" #: doc/classes/CanvasItem.xml doc/classes/RenderingServer.xml msgid "" "Subsequent drawing commands will be ignored unless they fall within the " "specified animation slice. This is a faster way to implement animations that " "loop on background rather than redrawing constantly." msgstr "" "后续的绘制命令将被忽略,除非它们位于指定的动画切片内。这是实现在背景上循环而" "不是不断重绘的动画的更快方法。" #: doc/classes/CanvasItem.xml #, fuzzy msgid "" "Draws an unfilled arc between the given angles with a uniform [param color] " "and [param width] and optional antialiasing (supported only for positive " "[param width]). The larger the value of [param point_count], the smoother " "the curve. [param center] is defined in local space. For elliptical arcs, " "see [method draw_ellipse_arc]. See also [method draw_circle].\n" "If [param width] is negative, it will be ignored and the arc will be drawn " "using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when " "the CanvasItem is scaled, the arc will remain thin. If this behavior is not " "desired, then pass a positive [param width] like [code]1.0[/code].\n" "The arc is drawn from [param start_angle] towards the value of [param " "end_angle] so in clockwise direction if [code]start_angle < end_angle[/code] " "and counter-clockwise otherwise. Passing the same angles but in reversed " "order will produce the same arc. If absolute difference of [param " "start_angle] and [param end_angle] is greater than [constant @GDScript.TAU] " "radians, then a full circle arc is drawn (i.e. arc will not overlap itself)." msgstr "" "使用一个 uniform [param color] 和 [param width] 以及可选的抗锯齿(仅支持正 " "[param width] ),在给定的角度之间绘制一条未填充的弧线。[param point_count] " "的值越大,该曲线越平滑。[param center] 定义在局部空间。另见 [method " "draw_circle]。\n" "如果 [param width] 为负,则它将被忽略,并使用 [constant " "RenderingServer.PRIMITIVE_LINE_STRIP] 绘制该弧线。这意味着当缩放 CanvasItem " "时,弧线将保持细长。如果不需要此行为,请传递一个正的 [param width],如 " "[code]1.0[/code]。\n" "如果 [code]start_angle < end_angle[/code] ,则圆弧是从 [param start_angle] 朝" "向 [param end_angle] 的值绘制的,即是顺时针方向;否则为逆时针方向。以相反的顺" "序传递相同的角度,将产生相同的弧线。如果 [param start_angle] 和 [param " "end_angle] 的差的绝对值大于 [constant @GDScript.TAU] 弧度,则绘制一个完整的圆" "弧(即弧线不会与自身重叠)。" #: doc/classes/CanvasItem.xml msgid "" "Draws a string first character using a custom font. If [param oversampling] " "is greater than zero, it is used as font oversampling factor, otherwise " "viewport oversampling settings are used. [param pos] is defined in local " "space." msgstr "" "使用自定义字体绘制字符串中的第一个字符。如果 [param oversampling] 大于零则会" "用作字体过采样系数,否则使用视口的过采样设置。[param pos] 定义在局部空间。" #: doc/classes/CanvasItem.xml msgid "" "Draws a string first character outline using a custom font. If [param " "oversampling] is greater than zero, it is used as font oversampling factor, " "otherwise viewport oversampling settings are used. [param pos] is defined in " "local space." msgstr "" "使用自定义字体绘制字符串中第一个字符的轮廓。如果 [param oversampling] 大于零" "则会用作字体过采样系数,否则使用视口的过采样设置。[param pos] 定义在局部空" "间。" #: doc/classes/CanvasItem.xml #, fuzzy msgid "" "Draws a circle, with [param position] defined in local space. See also " "[method draw_ellipse], [method draw_arc], [method draw_polyline], and " "[method draw_polygon].\n" "If [param filled] is [code]true[/code], the circle will be filled with the " "[param color] specified. If [param filled] is [code]false[/code], the circle " "will be drawn as a stroke with the [param color] and [param width] " "specified.\n" "If [param width] is negative, then two-point primitives will be drawn " "instead of a four-point ones. This means that when the CanvasItem is scaled, " "the lines will remain thin. If this behavior is not desired, then pass a " "positive [param width] like [code]1.0[/code].\n" "If [param antialiased] is [code]true[/code], half transparent \"feathers\" " "will be attached to the boundary, making outlines smooth.\n" "[b]Note:[/b] [param width] is only effective if [param filled] is " "[code]false[/code]." msgstr "" "绘制圆形,[param position] 定义在局部空间。另见 [method draw_arc]、[method " "draw_polyline]、[method draw_polygon]。\n" "如果 [param filled] 为 [code]true[/code],则圆形将使用指定的 [param color] 填" "充。如果 [param filled] 为 [code]false[/code],则圆形将被绘制为具有指定的 " "[param color] 和 [param width] 的笔划。\n" "如果 [param width] 为负,则将绘制两点图元而不是四点图元。这意味着当缩放 " "CanvasItem 时,线条将保持细长。如果不需要此行为,请传递一个正的 [param " "width],如 [code]1.0[/code]。\n" "如果 [param antialiased] 为 [code]true[/code],则半透明的“羽毛”将附加到边界," "使轮廓变得平滑。\n" "[b]注意:[/b][param width] 只有在 [param filled] 为 [code]false[/code] 时才有" "效。" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any number of points, convex or concave. The " "points in the [param points] array are defined in local space. Unlike " "[method draw_polygon], a single color must be specified for the whole " "polygon.\n" "[b]Note:[/b] If you frequently redraw the same polygon with a large number " "of vertices, consider pre-calculating the triangulation with [method " "Geometry2D.triangulate_polygon] and using [method draw_mesh], [method " "draw_multimesh], or [method RenderingServer.canvas_item_add_triangle_array]." msgstr "" "绘制一个由任意数量的点构成的实心多边形,凹凸均可。[param points] 数组中的点定" "义在局部空间。与 [method draw_polygon] 不同,必须为整个多边形制定单一颜色。\n" "[b]注意:[/b]如果你需要频繁重绘同样的多边形,包含大量顶点,请考虑预先使用 " "[method Geometry2D.triangulate_polygon] 进行三角剖分计算,并使用 [method " "draw_mesh]、[method draw_multimesh] 或 [method " "RenderingServer.canvas_item_add_triangle_array]。" #: doc/classes/CanvasItem.xml msgid "" "Draws a dashed line from a 2D point to another, with a given color and " "width. The [param from] and [param to] positions are defined in local space. " "See also [method draw_line], [method draw_multiline], and [method " "draw_polyline].\n" "If [param width] is negative, then a two-point primitives will be drawn " "instead of a four-point ones. This means that when the CanvasItem is scaled, " "the line parts will remain thin. If this behavior is not desired, then pass " "a positive [param width] like [code]1.0[/code].\n" "[param dash] is the length of each dash in pixels, with the gap between each " "dash being the same length. If [param aligned] is [code]true[/code], the " "length of the first and last dashes may be shortened or lengthened to allow " "the line to begin and end at the precise points defined by [param from] and " "[param to]. Both ends are always symmetrical when [param aligned] is " "[code]true[/code]. If [param aligned] is [code]false[/code], all dashes will " "have the same length, but the line may appear incomplete at the end due to " "the dash length not dividing evenly into the line length. Only full dashes " "are drawn when [param aligned] is [code]false[/code].\n" "If [param antialiased] is [code]true[/code], half transparent \"feathers\" " "will be attached to the boundary, making outlines smooth.\n" "[b]Note:[/b] [param antialiased] is only effective if [param width] is " "greater than [code]0.0[/code]." msgstr "" "使用给定的颜色和宽度,从一个 2D 点到另一个点绘制一条虚线。[param from] 位置" "和 [param to] 位置定义在局部空间。另见 [method draw_line]、[method " "draw_multiline] 和 [method draw_polyline]。\n" "如果 [param width] 为负,则将绘制一个两点图元而不是一个四点图元。这意味着当缩" "放 CanvasItem 时,线条部分将保持细长。如果不需要此行为,请传递一个正的 " "[param width],如 [code]1.0[/code]。\n" "[param dash] 是每一段的长度,单位为像素,段与段之间的留空使用相同的长度。如" "果 [param aligned] 为 [code]true[/code],则可能会缩短第一段和最后一段的长度," "使得虚线的两端精确地落在 [param from] 和 [param to] 所定义的位置。[param " "aligned] 为 [code]true[/code] 时虚线两端始终是对称的。如果 [param aligned] " "为 [code]false[/code],则每一段的长度都相同,但是虚线长度无法被段长度整除时," "末尾可能看上去不完整。[param aligned] 为 [code]false[/code] 时只会绘制完整的" "段。\n" "如果 [param antialiased] 为 [code]true[/code],则半透明的“羽毛”将附加到边界," "使轮廓变得平滑。\n" "[b]注意:[/b]仅当 [param width] 大于 [code]0.0[/code] 时,[param " "antialiased] 才有效。" #: doc/classes/CanvasItem.xml #, fuzzy msgid "" "Draws an ellipse with semi-major axis [param major] and semi-minor axis " "[param minor]. See also [method draw_circle], [method draw_ellipse_arc], " "[method draw_polyline], and [method draw_polygon].\n" "If [param filled] is [code]true[/code], the ellipse will be filled with the " "[param color] specified. If [param filled] is [code]false[/code], the " "ellipse will be drawn as a stroke with the [param color] and [param width] " "specified.\n" "If [param width] is negative, then two-point primitives will be drawn " "instead of four-point ones. This means that when the CanvasItem is scaled, " "the lines will remain thin. If this behavior is not desired, then pass a " "positive [param width] like [code]1.0[/code].\n" "If [param antialiased] is [code]true[/code], half transparent \"feathers\" " "will be attached to the boundary, making outlines smooth.\n" "[b]Note:[/b] [param width] is only effective if [param filled] is " "[code]false[/code]." msgstr "" "绘制圆形,[param position] 定义在局部空间。另见 [method draw_arc]、[method " "draw_polyline]、[method draw_polygon]。\n" "如果 [param filled] 为 [code]true[/code],则圆形将使用指定的 [param color] 填" "充。如果 [param filled] 为 [code]false[/code],则圆形将被绘制为具有指定的 " "[param color] 和 [param width] 的笔划。\n" "如果 [param width] 为负,则将绘制两点图元而不是四点图元。这意味着当缩放 " "CanvasItem 时,线条将保持细长。如果不需要此行为,请传递一个正的 [param " "width],如 [code]1.0[/code]。\n" "如果 [param antialiased] 为 [code]true[/code],则半透明的“羽毛”将附加到边界," "使轮廓变得平滑。\n" "[b]注意:[/b][param width] 只有在 [param filled] 为 [code]false[/code] 时才有" "效。" #: doc/classes/CanvasItem.xml #, fuzzy msgid "" "Draws an unfilled elliptical arc between the given angles with a uniform " "[param color] and [param width] and optional antialiasing (supported only " "for positive [param width]). The larger the value of [param point_count], " "the smoother the curve. For circular arcs, see [method draw_arc]. See also " "[method draw_ellipse].\n" "If [param width] is negative, it will be ignored and the arc will be drawn " "using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when " "the CanvasItem is scaled, the arc will remain thin. If this behavior is not " "desired, then pass a positive [param width] like [code]1.0[/code].\n" "The arc is drawn from [param start_angle] towards the value of [param " "end_angle] so in clockwise direction if [code]start_angle < end_angle[/code] " "and counter-clockwise otherwise. Passing the same angles but in reversed " "order will produce the same arc. If absolute difference of [param " "start_angle] and [param end_angle] is greater than [constant @GDScript.TAU] " "radians, then a full ellipse is drawn (i.e. arc will not overlap itself)." msgstr "" "使用一个 uniform [param color] 和 [param width] 以及可选的抗锯齿(仅支持正 " "[param width] ),在给定的角度之间绘制一条未填充的弧线。[param point_count] " "的值越大,该曲线越平滑。[param center] 定义在局部空间。另见 [method " "draw_circle]。\n" "如果 [param width] 为负,则它将被忽略,并使用 [constant " "RenderingServer.PRIMITIVE_LINE_STRIP] 绘制该弧线。这意味着当缩放 CanvasItem " "时,弧线将保持细长。如果不需要此行为,请传递一个正的 [param width],如 " "[code]1.0[/code]。\n" "如果 [code]start_angle < end_angle[/code] ,则圆弧是从 [param start_angle] 朝" "向 [param end_angle] 的值绘制的,即是顺时针方向;否则为逆时针方向。以相反的顺" "序传递相同的角度,将产生相同的弧线。如果 [param start_angle] 和 [param " "end_angle] 的差的绝对值大于 [constant @GDScript.TAU] 弧度,则绘制一个完整的圆" "弧(即弧线不会与自身重叠)。" #: doc/classes/CanvasItem.xml msgid "" "After submitting all animations slices via [method draw_animation_slice], " "this function can be used to revert drawing to its default state (all " "subsequent drawing commands will be visible). If you don't care about this " "particular use case, usage of this function after submitting the slices is " "not required." msgstr "" "通过 [method draw_animation_slice] 提交所有动画切片后,该函数可以被用来将绘制" "恢复到其默认状态(所有后续绘制命令都将可见)。如果不关心这个特定用例,则不需" "要在提交切片后使用该函数。" #: doc/classes/CanvasItem.xml msgid "" "Draws a textured rectangle region of the font texture with LCD subpixel anti-" "aliasing at a given position, optionally modulated by a color. The [param " "rect] is defined in local space.\n" "Texture is drawn using the following blend operation, blend mode of the " "[CanvasItemMaterial] is ignored:\n" "[codeblock]\n" "dst.r = texture.r * modulate.r * modulate.a + dst.r * (1.0 - texture.r * " "modulate.a);\n" "dst.g = texture.g * modulate.g * modulate.a + dst.g * (1.0 - texture.g * " "modulate.a);\n" "dst.b = texture.b * modulate.b * modulate.a + dst.b * (1.0 - texture.b * " "modulate.a);\n" "dst.a = modulate.a + dst.a * (1.0 - modulate.a);\n" "[/codeblock]" msgstr "" "在给定的位置绘制一个带有 LCD 子像素抗锯齿的字体纹理的矩形区域,可以选择用一种" "颜色来调制。[param rect] 定义在局部空间。\n" "纹理是通过以下混合操作绘制的,[CanvasItemMaterial] 的混合模式被忽略:\n" "[codeblock]\n" "dst.r = texture.r * modulate.r * modulate.a + dst.r * (1.0 - texture.r * " "modulate.a);\n" "dst.g = texture.g * modulate.g * modulate.a + dst.g * (1.0 - texture.g * " "modulate.a);\n" "dst.b = texture.b * modulate.b * modulate.a + dst.b * (1.0 - texture.b * " "modulate.a);\n" "dst.a = modulate.a + dst.a * (1.0 - modulate.a);\n" "[/codeblock]" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. The [param from] and [param to] positions are " "defined in local space. See also [method draw_dashed_line], [method " "draw_multiline], and [method draw_polyline].\n" "If [param width] is negative, then a two-point primitive will be drawn " "instead of a four-point one. This means that when the CanvasItem is scaled, " "the line will remain thin. If this behavior is not desired, then pass a " "positive [param width] like [code]1.0[/code]." msgstr "" "使用给定的颜色和宽度,从一个 2D 点到另一个点绘制一条直线。它可以选择抗锯齿。" "[param from] 位置和 [param to] 位置定义在局部空间。另见 [method " "draw_dashed_line]、[method draw_multiline] 和 [method draw_polyline]。\n" "如果 [param width] 为负,则将绘制一个两点图元而不是一个四点图元。这意味着当缩" "放 CanvasItem 时,线条将保持细长。如果不需要此行为,请传递一个正的 [param " "width],如 [code]1.0[/code]。" #: doc/classes/CanvasItem.xml msgid "" "Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for " "related documentation. The [param transform] is defined in local space." msgstr "" "使用所提供的纹理以 2D 方式绘制一个 [Mesh]。相关文档请参阅 [MeshInstance2D]。" "[param transform] 定义在局部空间。" #: doc/classes/CanvasItem.xml msgid "" "Draws a textured rectangle region of the multichannel signed distance field " "texture at a given position, optionally modulated by a color. The [param " "rect] is defined in local space. See [member " "FontFile.multichannel_signed_distance_field] for more information and " "caveats about MSDF font rendering.\n" "If [param outline] is positive, each alpha channel value of pixel in region " "is set to maximum value of true distance in the [param outline] radius.\n" "Value of the [param pixel_range] should the same that was used during " "distance field texture generation." msgstr "" "在给定位置,绘制一条多通道有符号距离场纹理的纹理矩形区域,可以选择用一种颜色" "来调制。[param rect] 定义在局部空间。有关 MSDF 字体渲染的更多信息和注意事项," "请参阅 [member FontFile.multichannel_signed_distance_field]。\n" "如果 [param outline] 为正,则区域中像素的每个 Alpha 通道值都被设置为 [param " "outline] 半径内真实距离的最大值。\n" "[param pixel_range] 的值应该与距离场纹理生成期间使用的值相同。" #: doc/classes/CanvasItem.xml msgid "" "Draws multiple disconnected lines with a uniform [param width] and [param " "color]. Each line is defined by two consecutive points from [param points] " "array in local space, i.e. i-th segment consists of [code]points[2 * i][/" "code], [code]points[2 * i + 1][/code] endpoints. When drawing large amounts " "of lines, this is faster than using individual [method draw_line] calls. To " "draw interconnected lines, use [method draw_polyline] instead.\n" "If [param width] is negative, then two-point primitives will be drawn " "instead of a four-point ones. This means that when the CanvasItem is scaled, " "the lines will remain thin. If this behavior is not desired, then pass a " "positive [param width] like [code]1.0[/code].\n" "[b]Note:[/b] [param antialiased] is only effective if [param width] is " "greater than [code]0.0[/code]." msgstr "" "使用一致的宽度 [param width] 和颜色 [param color] 绘制多条断开的线段。[param " "points] 数组中相邻的两个点定义一条线段,即第 i 条线段由端点 [code]points[2 * " "i][/code] 和 [code]points[2 * i + 1][/code] 组成,这些点定义在局部空间。绘制" "大量线段时,这种方法比使用 [method draw_line] 一条条画要快。要绘制相连的线" "段,请改用 [method draw_polyline]。\n" "如果 [param width] 为负数,则会绘制由两个点组成的图元,不使用四个点组成的图" "元。此时如果 CanvasItem 发生缩放,则线段仍然会很细。如果不想要这样的行为,请" "传入 [code]1.0[/code] 等正数 [param width]。\n" "[b]注意:[/b]仅当 [param width] 大于 [code]0.0[/code] 时,[param " "antialiased] 才有效。" #: doc/classes/CanvasItem.xml msgid "" "Draws multiple disconnected lines with a uniform [param width] and segment-" "by-segment coloring. Each segment is defined by two consecutive points from " "[param points] array in local space and a corresponding color from [param " "colors] array, i.e. i-th segment consists of [code]points[2 * i][/code], " "[code]points[2 * i + 1][/code] endpoints and has [code]colors[i][/code] " "color. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw interconnected lines, use " "[method draw_polyline_colors] instead.\n" "If [param width] is negative, then two-point primitives will be drawn " "instead of a four-point ones. This means that when the CanvasItem is scaled, " "the lines will remain thin. If this behavior is not desired, then pass a " "positive [param width] like [code]1.0[/code].\n" "[b]Note:[/b] [param antialiased] is only effective if [param width] is " "greater than [code]0.0[/code]." msgstr "" "使用一致的宽度 [param width] 分段颜色绘制多条断开的线段。[param points] 数组" "中相邻的两个点定义一条线段,即第 i 条线段由端点 [code]points[2 * i][/code] " "和 [code]points[2 * i + 1][/code] 组成,这些点定义在局部空间,使用的颜色为 " "[code]colors[i][/code]。绘制大量线段时,这种方法比使用 [method draw_line] 一" "条条画要快。要绘制相连的线段,请改用 [method draw_polyline_colors]。\n" "如果 [param width] 为负数,则会绘制由两个点组成的图元,不使用四个点组成的图" "元。此时如果 CanvasItem 发生缩放,则线段仍然会很细。如果不想要这样的行为,请" "传入 [code]1.0[/code] 等正数 [param width]。\n" "[b]注意:[/b]仅当 [param width] 大于 [code]0.0[/code] 时,[param " "antialiased] 才有效。" #: doc/classes/CanvasItem.xml msgid "" "Breaks [param text] into lines and draws it using the specified [param font] " "at the [param pos] in local space (top-left corner). The text will have its " "color multiplied by [param modulate]. If [param width] is greater than or " "equal to 0, the text will be clipped if it exceeds the specified width. If " "[param oversampling] is greater than zero, it is used as font oversampling " "factor, otherwise viewport oversampling settings are used." msgstr "" "使用 [param font] 字体分若干行绘制 [param text] 文本,以局部空间中的 [param " "pos] 作为左上角。文本颜色会与 [param modulate] 相乘。如果 [param width] 大于" "等于 0,则文本超出该宽度的部分会被裁剪。如果 [param oversampling] 大于零则会" "用作字体过采样系数,否则使用视口的过采样设置。" #: doc/classes/CanvasItem.xml msgid "" "Breaks [param text] to the lines and draws text outline using the specified " "[param font] at the [param pos] in local space (top-left corner). The text " "will have its color multiplied by [param modulate]. If [param width] is " "greater than or equal to 0, the text will be clipped if it exceeds the " "specified width. If [param oversampling] is greater than zero, it is used as " "font oversampling factor, otherwise viewport oversampling settings are used." msgstr "" "使用 [param font] 字体分若干行绘制 [param text] 文本的轮廓,以局部空间中的 " "[param pos] 作为左上角。文本颜色会与 [param modulate] 相乘。如果 [param " "width] 大于等于 0,则文本超出该宽度的部分会被裁剪。如果 [param oversampling] " "大于零则会用作字体过采样系数,否则使用视口的过采样设置。" #: doc/classes/CanvasItem.xml msgid "" "Draws a [MultiMesh] in 2D with the provided texture. See " "[MultiMeshInstance2D] for related documentation." msgstr "" "用所提供的纹理以 2D 方式绘制一个 [MultiMesh]。相关文档请参考 " "[MultiMeshInstance2D]。" #: doc/classes/CanvasItem.xml msgid "" "Draws a solid polygon of any number of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. The [param points] array is defined in local space. See also " "[method draw_polyline] and [method draw_polyline_colors]. If you need more " "flexibility (such as being able to use bones), use [method " "RenderingServer.canvas_item_add_triangle_array] instead.\n" "[b]Note:[/b] If you frequently redraw the same polygon with a large number " "of vertices, consider pre-calculating the triangulation with [method " "Geometry2D.triangulate_polygon] and using [method draw_mesh], [method " "draw_multimesh], or [method RenderingServer.canvas_item_add_triangle_array]." msgstr "" "绘制一个由任意数量的点构成的实心多边形,凹凸均可。与 [method " "draw_colored_polygon] 不同,每个点的颜色都可以单独修改。[param points] 数组定" "义在局部空间。另见 [method draw_polyline] 和 [method draw_polyline_colors]。" "如果需要更高的灵活度(例如能够用到骨骼),请改用 [method " "RenderingServer.canvas_item_add_triangle_array]。\n" "[b]注意:[/b]如果你需要频繁重绘同样的多边形,包含大量顶点,请考虑预先使用 " "[method Geometry2D.triangulate_polygon] 进行三角剖分计算,并使用 [method " "draw_mesh]、[method draw_multimesh] 或 [method " "RenderingServer.canvas_item_add_triangle_array]。" #: doc/classes/CanvasItem.xml msgid "" "Draws interconnected line segments with a uniform [param color] and [param " "width] and optional antialiasing (supported only for positive [param " "width]). The [param points] array is defined in local space. When drawing " "large amounts of lines, this is faster than using individual [method " "draw_line] calls. To draw disconnected lines, use [method draw_multiline] " "instead. See also [method draw_polygon].\n" "If [param width] is negative, it will be ignored and the polyline will be " "drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that " "when the CanvasItem is scaled, the polyline will remain thin. If this " "behavior is not desired, then pass a positive [param width] like [code]1.0[/" "code]." msgstr "" "使用一致的 [param color] 和 [param width] 以及可选的抗锯齿(仅支持正 [param " "width] ),绘制相互连接的线段。[param points] 数组定义在局部空间。绘制大量线" "条时,这比使用单独的 [method draw_line] 调用更快。要绘制不相连的的线段,请改" "用 [method draw_multiline]。另见 [method draw_polygon]。\n" "如果 [param width] 为负,则它将被忽略,并使用 [constant " "RenderingServer.PRIMITIVE_LINE_STRIP] 绘制该折线。这意味着当 CanvasItem 被缩" "放时,折线将保持为细线。如果不需要该行为,请传入一个正的 [param width],如 " "[code]1.0[/code]。" #: doc/classes/CanvasItem.xml msgid "" "Draws interconnected line segments with a uniform [param width], point-by-" "point coloring, and optional antialiasing (supported only for positive " "[param width]). Colors assigned to line points match by index between [param " "points] and [param colors], i.e. each line segment is filled with a gradient " "between the colors of the endpoints. The [param points] array is defined in " "local space. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " "draw_multiline_colors] instead. See also [method draw_polygon].\n" "If [param width] is negative, it will be ignored and the polyline will be " "drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that " "when the CanvasItem is scaled, the polyline will remain thin. If this " "behavior is not desired, then pass a positive [param width] like [code]1.0[/" "code]." msgstr "" "绘制相连的线段,使用一致的宽度 [param width],按点指定颜色,还可以开启抗锯齿" "(仅支持正的 [param width])。将颜色与线段上的点匹配时,使用的是 [param " "points] 和 [param colors] 的索引,即每条线段填充的都是在两个端点之间颜色的渐" "变色。[param points] 数组定义在局部空间。绘制大量线段时,这种方法比使用 " "[method draw_line] 一条条画要快。要绘制不相连的线段,请改用 [method " "draw_multiline_colors]。另见 [method draw_polygon]。\n" "如果 [param width] 为负,则它将被忽略,并使用 [constant " "RenderingServer.PRIMITIVE_LINE_STRIP] 绘制该折线。这意味着当 CanvasItem 被缩" "放时,折线将保持为细线。如果不需要该行为,请传入一个正的 [param width],如 " "[code]1.0[/code]。" #: doc/classes/CanvasItem.xml msgid "" "Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points " "for a triangle, and 4 points for a quad. If 0 points or more than 4 points " "are specified, nothing will be drawn and an error message will be printed. " "The [param points] array is defined in local space. See also [method " "draw_line], [method draw_polyline], [method draw_polygon], and [method " "draw_rect]." msgstr "" "绘制自定义图元。1 个点的是个点,2 个点的是线段,3 个点的是三角形,4 个点的是" "四边形。如果没有指定点或者指定了超过 4 个点,则不会绘制任何东西,只会输出错误" "消息。[param points] 数组定义在局部空间。另见 [method draw_line]、[method " "draw_polyline]、[method draw_polygon]、[method draw_rect]。" #: doc/classes/CanvasItem.xml msgid "" "Draws a rectangle. If [param filled] is [code]true[/code], the rectangle " "will be filled with the [param color] specified. If [param filled] is " "[code]false[/code], the rectangle will be drawn as a stroke with the [param " "color] and [param width] specified. The [param rect] is specified in local " "space. See also [method draw_texture_rect].\n" "If [param width] is negative, then two-point primitives will be drawn " "instead of a four-point ones. This means that when the CanvasItem is scaled, " "the lines will remain thin. If this behavior is not desired, then pass a " "positive [param width] like [code]1.0[/code].\n" "If [param antialiased] is [code]true[/code], half transparent \"feathers\" " "will be attached to the boundary, making outlines smooth.\n" "[b]Note:[/b] [param width] is only effective if [param filled] is " "[code]false[/code].\n" "[b]Note:[/b] Unfilled rectangles drawn with a negative [param width] may not " "display perfectly. For example, corners may be missing or brighter due to " "overlapping lines (for a translucent [param color])." msgstr "" "绘制一个矩形。如果 [param filled] 为 [code]true[/code],则矩形将使用指定的 " "[param color] 填充。如果 [param filled] 为 [code]false[/code],则矩形将被绘制" "为具有指定的 [param color] 和 [param width] 的笔划。[param rect] 使用局部空间" "指定。另见 [method draw_texture_rect]。\n" "如果 [param width] 为负,则将绘制一个两点图元而不是一个四点图元。这意味着当缩" "放 CanvasItem 时,线条将保持细长。如果不需要此行为,请传递一个正的 [param " "width],如 [code]1.0[/code]。\n" "如果 [param antialiased] 为 [code]true[/code],则半透明的“羽毛”将附加到边界," "使轮廓变得平滑。\n" "[b]注意:[/b][param width] 只有在 [param filled] 为 [code]false[/code] 时才有" "效。\n" "[b]注意:[/b]使用负 [param width] 绘制的未填充矩形可能不会完美显示。例如,由" "于线条的重叠,角可能会缺失或变亮(对于半透明的 [param color])。" #: doc/classes/CanvasItem.xml msgid "" "Sets a custom local transform for drawing via components. Anything drawn " "afterwards will be transformed by this.\n" "[b]Note:[/b] [member FontFile.oversampling] does [i]not[/i] take [param " "scale] into account. This means that scaling up/down will cause bitmap fonts " "and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated. To " "ensure text remains crisp regardless of scale, you can enable MSDF font " "rendering by enabling [member ProjectSettings.gui/theme/" "default_font_multichannel_signed_distance_field] (applies to the default " "project font only), or enabling [b]Multichannel Signed Distance Field[/b] in " "the import options of a DynamicFont for custom fonts. On system fonts, " "[member SystemFont.multichannel_signed_distance_field] can be enabled in the " "inspector." msgstr "" "使用分量设置用于绘图的自定义局部变换。后续的绘制都会使用这个变换。\n" "[b]注意:[/b][member FontFile.oversampling] [i]不会[/i]考虑 [param scale]。这" "意味着将位图字体及栅格化(非 MSDF)动态字体放大/缩小会产生模糊或像素化的结" "果。要让文本无论如何缩放都保持清晰,可以启用 MSDF 字体渲染,方法是启用 " "[member ProjectSettings.gui/theme/" "default_font_multichannel_signed_distance_field](仅应用于默认项目字体),或" "者启用自定义 DynamicFont 的[b]多通道带符号距离场[/b]导入选项。对于系统字体," "可以在检查器中启用 [member SystemFont.multichannel_signed_distance_field]。" #: doc/classes/CanvasItem.xml msgid "" "Sets a custom local transform for drawing via matrix. Anything drawn " "afterwards will be transformed by this." msgstr "设置通过矩阵绘制时的自定义局部变换。此后绘制的任何东西都将被它变换。" #: doc/classes/CanvasItem.xml msgid "" "Draws [param text] using the specified [param font] at the [param pos] in " "local space (bottom-left corner using the baseline of the font). The text " "will have its color multiplied by [param modulate]. If [param width] is " "greater than or equal to 0, the text will be clipped if it exceeds the " "specified width. If [param oversampling] is greater than zero, it is used as " "font oversampling factor, otherwise viewport oversampling settings are " "used.\n" "[b]Example:[/b] Draw \"Hello world\", using the project's default font:\n" "[codeblocks]\n" "[gdscript]\n" "# If using this method in a script that redraws constantly, move the\n" "# `default_font` declaration to a member variable assigned in `_ready()`\n" "# so the Control is only created once.\n" "var default_font = ThemeDB.fallback_font\n" "var default_font_size = ThemeDB.fallback_font_size\n" "draw_string(default_font, Vector2(64, 64), \"Hello world\", " "HORIZONTAL_ALIGNMENT_LEFT, -1, default_font_size)\n" "[/gdscript]\n" "[csharp]\n" "// If using this method in a script that redraws constantly, move the\n" "// `default_font` declaration to a member variable assigned in `_Ready()`\n" "// so the Control is only created once.\n" "Font defaultFont = ThemeDB.FallbackFont;\n" "int defaultFontSize = ThemeDB.FallbackFontSize;\n" "DrawString(defaultFont, new Vector2(64, 64), \"Hello world\", " "HORIZONTAL_ALIGNMENT_LEFT, -1, defaultFontSize);\n" "[/csharp]\n" "[/codeblocks]\n" "See also [method Font.draw_string]." msgstr "" "使用 [param font] 字体绘制 [param text] 文本,以局部空间中的 [param pos] 作为" "左下角,对齐字体基线。文本颜色会与 [param modulate] 相乘。如果 [param width] " "大于等于 0,则文本超出该宽度的部分会被裁剪。如果 [param oversampling] 大于零" "则会用作字体过采样系数,否则使用视口的过采样设置。\n" "[b]示例:[/b]使用项目默认字体绘制“Hello world”:\n" "[codeblocks]\n" "[gdscript]\n" "# 如果在不断重绘的脚本中使用此方法,\n" "# 则将 `default_font` 声明移动到在 `_ready()` 中赋值的成员变量中\n" "# 这样 Control 只创建一次。\n" "var default_font = ThemeDB.fallback_font\n" "var default_font_size = ThemeDB.fallback_font_size\n" "draw_string(default_font, Vector2(64, 64), \"Hello world\", " "HORIZONTAL_ALIGNMENT_LEFT, -1, default_font_size)\n" "[/gdscript]\n" "[csharp]\n" "// 如果在不断重绘的脚本中使用此方法,\n" "// 则将 `default_font` 声明移动到在 `_ready()` 中赋值的成员变量中\n" "// 这样 Control 只创建一次。\n" "Font defaultFont = ThemeDB.FallbackFont;\n" "int defaultFontSize = ThemeDB.FallbackFontSize;\n" "DrawString(defaultFont, new Vector2(64, 64), \"Hello world\", " "HORIZONTAL_ALIGNMENT_LEFT, -1, defaultFontSize);\n" "[/csharp]\n" "[/codeblocks]\n" "另见 [method Font.draw_string]。" #: doc/classes/CanvasItem.xml msgid "" "Draws [param text] outline using the specified [param font] at the [param " "pos] in local space (bottom-left corner using the baseline of the font). The " "text will have its color multiplied by [param modulate]. If [param width] is " "greater than or equal to 0, the text will be clipped if it exceeds the " "specified width. If [param oversampling] is greater than zero, it is used as " "font oversampling factor, otherwise viewport oversampling settings are used." msgstr "" "使用 [param font] 字体绘制 [param text] 文本的轮廓,以局部空间中的 [param " "pos] 作为左下角,对齐字体基线。文本颜色会与 [param modulate] 相乘。如果 " "[param width] 大于等于 0,则文本超出该宽度的部分会被裁剪。如果 [param " "oversampling] 大于零则会用作字体过采样系数,否则使用视口的过采样设置。" #: doc/classes/CanvasItem.xml msgid "Draws a styled rectangle. The [param rect] is defined in local space." msgstr "绘制风格化的矩形。[param rect] 定义在局部空间。" #: doc/classes/CanvasItem.xml msgid "" "Draws a texture at a given position. The [param position] is defined in " "local space." msgstr "在给定的位置绘制纹理。[param position] 定义在局部空间。" #: doc/classes/CanvasItem.xml msgid "" "Draws a textured rectangle at a given position, optionally modulated by a " "color. The [param rect] is defined in local space. If [param transpose] is " "[code]true[/code], the texture will have its X and Y coordinates swapped. " "See also [method draw_rect] and [method draw_texture_rect_region]." msgstr "" "在给定位置绘制一个带纹理的矩形,可以选择用颜色调制。[param rect] 定义在局部空" "间。如果 [param transpose] 为 [code]true[/code],则纹理将交换其 X 和 Y 坐标。" "另见 [method draw_rect] 和 [method draw_texture_rect_region]。" #: doc/classes/CanvasItem.xml msgid "" "Draws a textured rectangle from a texture's region (specified by [param " "src_rect]) at a given position in local space, optionally modulated by a " "color. If [param transpose] is [code]true[/code], the texture will have its " "X and Y coordinates swapped. See also [method draw_texture_rect]." msgstr "" "在给定的局部空间位置绘制具有纹理的矩形,可以指定所使用的纹理区域(由 [param " "src_rect] 指定),可选择用颜色调制。如果 [param transpose] 为 [code]true[/" "code],则纹理将交换其 X 和 Y 坐标。另见 [method draw_texture_rect]。" #: doc/classes/CanvasItem.xml msgid "" "Forces the node's transform to update. Fails if the node is not inside the " "tree. See also [method get_transform].\n" "[b]Note:[/b] For performance reasons, transform changes are usually " "accumulated and applied [i]once[/i] at the end of the frame. The update " "propagates through [CanvasItem] children, as well. Therefore, use this " "method only when you need an up-to-date transform (such as during physics " "operations)." msgstr "" "强制更新节点的变换。如果节点不在树中则失败。另见 [method get_transform]。\n" "[b]注意:[/b]出于性能考虑,通常会对变换的更新进行累积,在帧结束时应用[i]一次" "[/i]。更新也会沿着 [CanvasItem] 子节点传播。因此只应在确实需要最新的变换时使" "用该方法(例如进行物理运算)。" #: doc/classes/CanvasItem.xml msgid "" "Returns the [RID] of the [World2D] canvas where this node is registered to, " "used by the [RenderingServer]." msgstr "返回该节点注册到的 [World2D] 画布的 [RID],适用于 [RenderingServer]。" #: doc/classes/CanvasItem.xml msgid "" "Returns the internal canvas item [RID] used by the [RenderingServer] for " "this node." msgstr "返回 [RenderingServer] 对该项目使用的画布项目 [RID]。" #: doc/classes/CanvasItem.xml msgid "" "Returns the [CanvasLayer] that contains this node, or [code]null[/code] if " "the node is not in any [CanvasLayer]." msgstr "" "返回包含该节点的 [CanvasLayer],如果该节点不在任何 [CanvasLayer] 中,则返回 " "[code]null[/code]。" #: doc/classes/CanvasItem.xml msgid "" "Returns the transform of this node, converted from its registered canvas's " "coordinate system to its viewport's coordinate system. See also [method " "Node.get_viewport]." msgstr "" "返回节点的变换,从所在画布的坐标系转换至所在视口的坐标系。另见 [method " "Node.get_viewport]。" #: doc/classes/CanvasItem.xml msgid "" "Returns mouse cursor's global position relative to the [CanvasLayer] that " "contains this node.\n" "[b]Note:[/b] For screen-space coordinates (e.g. when using a non-embedded " "[Popup]), you can use [method DisplayServer.mouse_get_position]." msgstr "" "返回鼠标光标的全局位置,相对于包含该节点的 [CanvasLayer]。\n" "[b]注意:[/b]要得到屏幕空间的坐标(例如使用非嵌入式 [Popup] 时)可以使用 " "[method DisplayServer.mouse_get_position]。" #: doc/classes/CanvasItem.xml msgid "" "Returns the global transform matrix of this item, i.e. the combined " "transform up to the topmost [CanvasItem] node. The topmost item is a " "[CanvasItem] that either has no parent, has non-[CanvasItem] parent or it " "has [member top_level] enabled." msgstr "" "返回该项目的全局变换矩阵,即到最顶层的 [CanvasItem] 节点的综合变换。最顶层的" "项目是一个 [CanvasItem],它要么没有父级,要么有非 [CanvasItem] 父级,或者要么" "它启用了 [member top_level]。" #: doc/classes/CanvasItem.xml msgid "" "Returns the transform from the local coordinate system of this [CanvasItem] " "to the [Viewport]s coordinate system." msgstr "返回从该 [CanvasItem] 的局部坐标系到 [Viewport] 坐标系的变换。" #: doc/classes/CanvasItem.xml doc/classes/GeometryInstance3D.xml msgid "Get the value of a shader parameter as set on this instance." msgstr "获取在该实例上设置的着色器参数值。" #: doc/classes/CanvasItem.xml msgid "" "Returns the mouse's position in this [CanvasItem] using the local coordinate " "system of this [CanvasItem]." msgstr "返回该 [CanvasItem] 中鼠标的位置,使用该 [CanvasItem] 的局部坐标系。" #: doc/classes/CanvasItem.xml #, fuzzy msgid "" "Returns the transform of this [CanvasItem] in global screen coordinates " "(i.e. taking window position into account). Mostly useful for editor " "plugins.\n" "Equivalent to [method get_global_transform_with_canvas] if the window is " "embedded (see [member Viewport.gui_embed_subwindows])." msgstr "" "返回该 [CanvasItem] 在全局屏幕坐标中的变换(即考虑窗口位置)。主要用于编辑器" "插件。\n" "如果窗口是嵌入的,则等于 [method get_global_transform](参见 [member " "Viewport.gui_embed_subwindows])。" #: doc/classes/CanvasItem.xml msgid "Returns the transform matrix of this [CanvasItem]." msgstr "返回该 [CanvasItem] 的变换矩阵。" #: doc/classes/CanvasItem.xml msgid "" "Returns this node's viewport boundaries as a [Rect2]. See also [method " "Node.get_viewport]." msgstr "" "以 [Rect2] 的形式返回该节点的视口边界。另见 [method Node.get_viewport]。" #: doc/classes/CanvasItem.xml msgid "" "Returns the transform of this node, converted from its registered canvas's " "coordinate system to its viewport embedder's coordinate system. See also " "[method Viewport.get_final_transform] and [method Node.get_viewport]." msgstr "" "返回该节点的变换,从所注册画布的坐标系转换至视口嵌入器的坐标系。另见 [method " "Viewport.get_final_transform] 和 [method Node.get_viewport]。" #: doc/classes/CanvasItem.xml msgid "" "Returns [code]true[/code] if the layer at the given index is set in [member " "visibility_layer]." msgstr "" "如果 [member visibility_layer] 中设置了给定索引对应的层,则返回 [code]true[/" "code]。" #: doc/classes/CanvasItem.xml msgid "" "Returns the [World2D] this node is registered to.\n" "Usually, this is the same as this node's viewport (see [method " "Node.get_viewport] and [method Viewport.find_world_2d])." msgstr "" "返回该节点注册到的 [World2D]。\n" "通常与该节点的视口相同(见 [method Node.get_viewport] 和 [method " "Viewport.find_world_2d])。" #: doc/classes/CanvasItem.xml msgid "" "Hide the [CanvasItem] if it's currently visible. This is equivalent to " "setting [member visible] to [code]false[/code]." msgstr "" "如果该 [CanvasItem] 目前是可见的,则将其隐藏。相当于将 [member visible] 设为 " "[code]false[/code]。" #: doc/classes/CanvasItem.xml msgid "" "Returns [code]true[/code] if the node receives [constant " "NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever its local transform changes. " "This is enabled with [method set_notify_local_transform]." msgstr "" "如果节点会在局部变换发生改变时收到 [constant " "NOTIFICATION_LOCAL_TRANSFORM_CHANGED] 则返回 [code]true[/code]。使用 [method " "set_notify_local_transform] 启用。" #: doc/classes/CanvasItem.xml msgid "" "Returns [code]true[/code] if the node receives [constant " "NOTIFICATION_TRANSFORM_CHANGED] whenever its global transform changes. This " "is enabled with [method set_notify_transform]." msgstr "" "如果节点会在全局变换发生改变时收到 [constant NOTIFICATION_TRANSFORM_CHANGED] " "则返回 [code]true[/code]。使用 [method set_notify_transform] 启用。" #: doc/classes/CanvasItem.xml msgid "" "Returns [code]true[/code] if the node is present in the [SceneTree], its " "[member visible] property is [code]true[/code] and all its ancestors are " "also visible. If any ancestor is hidden, this node will not be visible in " "the scene tree, and is therefore not drawn (see [method _draw]).\n" "Visibility is checked only in parent nodes that inherit from [CanvasItem], " "[CanvasLayer], and [Window]. If the parent is of any other type (such as " "[Node], [AnimationPlayer], or [Node3D]), it is assumed to be visible.\n" "[b]Note:[/b] This method does not take [member visibility_layer] into " "account, so even if this method returns [code]true[/code], the node might " "end up not being rendered." msgstr "" "如果节点存在于 [SceneTree] 中,并且 [member visible] 属性为 [code]true[/" "code]、所有祖级节点也都可见,则返回 [code]true[/code]。如果存在隐藏的祖级节" "点,则该节点在场景树中不可见,因此不会进行绘制(见 [method _draw])。\n" "父节点派生自 [CanvasItem]、[CanvasLayer] 或 [Window] 时才会进行可见性检查。如" "果父节点为其他类型(例如 [Node]、[AnimationPlayer]、[Node3D]),则会当作可" "见。\n" "[b]注意:[/b]该方法不会考虑 [member visibility_layer],因此即便返回 " "[code]true[/code],最后也可能不渲染该节点。" #: doc/classes/CanvasItem.xml msgid "" "Transforms [param viewport_point] from the viewport's coordinates to this " "node's local coordinates.\n" "For the opposite operation, use [method get_global_transform_with_canvas].\n" "[codeblock]\n" "var viewport_point = get_global_transform_with_canvas() * local_point\n" "[/codeblock]" msgstr "" "将 [param viewport_point] 从视口坐标系变换到该节点的本地坐标系。\n" "要进行相反的操作,请使用 [method get_global_transform_with_canvas]。\n" "[codeblock]\n" "var viewport_point = get_global_transform_with_canvas() * local_point\n" "[/codeblock]" #: doc/classes/CanvasItem.xml msgid "" "Returns a copy of the given [param event] with its coordinates converted " "from global space to this [CanvasItem]'s local space. If not possible, " "returns the same [InputEvent] unchanged." msgstr "" "返回 [param event] 事件的副本,将其坐标从全局空间转换至该 [CanvasItem] 的局部" "空间。无法转换则原样返回 [InputEvent]。" #: doc/classes/CanvasItem.xml msgid "" "Moves this node below its siblings, usually causing the node to draw on top " "of its siblings. Does nothing if this node does not have a parent. See also " "[method Node.move_child]." msgstr "" "将该节点移至同级节点的下方,通常会导致该节点绘制在同级节点的上方。如果该节点" "没有父节点则不会发生任何事情。另见 [method Node.move_child]。" #: doc/classes/CanvasItem.xml msgid "" "Queues the [CanvasItem] to redraw. During idle time, if [CanvasItem] is " "visible, [constant NOTIFICATION_DRAW] is sent and [method _draw] is called. " "This only occurs [b]once[/b] per frame, even if this method has been called " "multiple times." msgstr "" "将该 [CanvasItem] 加入重绘队列。空闲时,如果 [CanvasItem] 可见,则会发送 " "[constant NOTIFICATION_DRAW] 并调用 [method _draw]。即便多次调用这个方法,每" "帧也都只会发生[b]一次[/b]绘制。" #: doc/classes/CanvasItem.xml msgid "" "Set the value of a shader uniform for this instance only ([url=$DOCS_URL/" "tutorials/shaders/shader_reference/shading_language.html#per-instance-" "uniforms]per-instance uniform[/url]). See also [method " "ShaderMaterial.set_shader_parameter] to assign a uniform on all instances " "using the same [ShaderMaterial].\n" "[b]Note:[/b] For a shader uniform to be assignable on a per-instance basis, " "it [i]must[/i] be defined with [code]instance uniform ...[/code] rather than " "[code]uniform ...[/code] in the shader code.\n" "[b]Note:[/b] [param name] is case-sensitive and must match the name of the " "uniform in the code exactly (not the capitalized name in the inspector)." msgstr "" "仅为该实例设置一个着色器 uniform 值([url=$DOCS_URL/tutorials/shaders/" "shader_reference/shading_language.html#per-instance-uniforms]每实例 uniform[/" "url]) 。另见 [method ShaderMaterial.set_shader_parameter] 以使用相同的 " "[ShaderMaterial] 在所有实例上分配一个 uniform。\n" "[b]注意:[/b]要在每个实例的基础上分配一个着色器 uniform,则[i]必须[/i]在着色" "器代码中,使用 [code]instance uniform ...[/code],而不是 [code]uniform ...[/" "code] 来定义。\n" "[b]注意:[/b][param name] 是区分大小写的,并且必须与代码中的 uniform 名称完全" "匹配(而不是检查器中大写的名称)。" #: doc/classes/CanvasItem.xml msgid "" "If [code]true[/code], the node will receive [constant " "NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever its local transform changes.\n" "[b]Note:[/b] Many canvas items such as [Bone2D] or [CollisionShape2D] " "automatically enable this in order to function correctly." msgstr "" "如果为 [code]true[/code],则该节点将在其局部变换发生改变时收到 [constant " "NOTIFICATION_LOCAL_TRANSFORM_CHANGED]。\n" "[b]注意:[/b][Bone2D]、[CollisionShape2D] 等许多画布项都会自动启用,从而正常" "工作。" #: doc/classes/CanvasItem.xml #, fuzzy msgid "" "If [code]true[/code], the node will receive [constant " "NOTIFICATION_TRANSFORM_CHANGED] whenever its global transform changes.\n" "[b]Note:[/b] Many canvas items such as [Camera2D] or [Light2D] automatically " "enable this in order to function correctly." msgstr "" "如果为 [code]true[/code],则该节点将在其全局变换发生改变时收到 [constant " "NOTIFICATION_TRANSFORM_CHANGED]。\n" "[b]注意:[/b][Camera2D]、[Light2D] 等许多画布项都会自动启用,从而正常工作。" #: doc/classes/CanvasItem.xml msgid "" "Set/clear individual bits on the rendering visibility layer. This simplifies " "editing this [CanvasItem]'s visibility layer." msgstr "" "设置或清除渲染可见层上的单个位。这简化了对该 [CanvasItem] 的可见层的编辑。" #: doc/classes/CanvasItem.xml msgid "" "Show the [CanvasItem] if it's currently hidden. This is equivalent to " "setting [member visible] to [code]true[/code].\n" "[b]Note:[/b] For controls that inherit [Popup], the correct way to make them " "visible is to call one of the multiple [code]popup*()[/code] functions " "instead." msgstr "" "如果该 [CanvasItem] 目前是隐藏的,则将其显示。相当于将 [member visible] 设为 " "[code]true[/code]。\n" "[b]注意:[/b]对于继承自 [Popup] 的控件,让它们可见的正确做法是换成调用各种 " "[code]popup*()[/code] 函数。" #: doc/classes/CanvasItem.xml msgid "" "The mode in which this node clips its children, acting as a mask.\n" "[b]Note:[/b] Clipping nodes cannot be nested or placed within a " "[CanvasGroup]. If an ancestor of this node clips its children or is a " "[CanvasGroup], then this node's clip mode should be set to [constant " "CLIP_CHILDREN_DISABLED] to avoid unexpected behavior." msgstr "" "该节点作为遮罩对子节点进行裁剪的模式。\n" "[b]注意:[/b]裁剪的节点无法嵌套,也不能位于 [CanvasGroup] 中。如果该节点的祖" "先节点裁剪了它的子级,或者祖先节点是 [CanvasGroup],那么这个节点的裁剪模式应" "当设为 [constant CLIP_CHILDREN_DISABLED],从而避免意外行为。" #: doc/classes/CanvasItem.xml msgid "" "The rendering layers in which this [CanvasItem] responds to [Light2D] nodes." msgstr "该 [CanvasItem] 的渲染层,用于响应 [Light2D] 节点。" #: doc/classes/CanvasItem.xml msgid "The material applied to this [CanvasItem]." msgstr "应用于这个 [CanvasItem] 的材质。" #: doc/classes/CanvasItem.xml msgid "" "The color applied to this [CanvasItem]. This property does affect child " "[CanvasItem]s, unlike [member self_modulate] which only affects the node " "itself." msgstr "" "应用于这个 [CanvasItem] 的颜色。这个属性会影响子级 [CanvasItem],与只会影响节" "点自身的 [member self_modulate] 不同。" #: doc/classes/CanvasItem.xml msgid "" "The color applied to this [CanvasItem]. This property does [b]not[/b] affect " "child [CanvasItem]s, unlike [member modulate] which affects both the node " "itself and its children.\n" "[b]Note:[/b] Internal children are also not affected by this property (see " "the [code]include_internal[/code] parameter in [method Node.add_child]). For " "built-in nodes this includes sliders in [ColorPicker], and the tab bar in " "[TabContainer]." msgstr "" "应用于这个 [CanvasItem] 的颜色。这个属性[b]不会[/b]影响子级 [CanvasItem],与" "会同时影响节点自身和子级的 [member modulate] 不同。\n" "[b]注意:[/b]内部子节点也不受这个属性的影响(见 [method Node.add_child] 方法" "的 [code]include_internal[/code] 参数)。内置节点的内部子节点包括 " "[ColorPicker] 中的滑块、[TabContainer] 中的选项卡栏等。" #: doc/classes/CanvasItem.xml msgid "If [code]true[/code], this node draws behind its parent." msgstr "如果为 [code]true[/code],则该节点绘制在其父节点后面。" #: doc/classes/CanvasItem.xml msgid "The filtering mode used to render this [CanvasItem]'s texture(s)." msgstr "渲染该 [CanvasItem] 的纹理时使用的过滤模式。" #: doc/classes/CanvasItem.xml msgid "" "The repeating mode used to render this [CanvasItem]'s texture(s). It affects " "what happens when the texture is sampled outside its extents, for example by " "setting a [member Sprite2D.region_rect] that is larger than the texture or " "assigning [Polygon2D] UV points outside the texture.\n" "[b]Note:[/b] [TextureRect] is not affected by [member texture_repeat], as it " "uses its own texture repeating implementation." msgstr "" "用于渲染该 [CanvasItem] 纹理的重复模式。它会影响在纹理范围之外采样时发生的情" "况,例如,设置比纹理大的 [member Sprite2D.region_rect] 或在纹理外部分配 " "[Polygon2D] UV 点。\n" "[b]注意:[/b][TextureRect] 不受 [member texture_repeat] 的影响,因为它使用自" "己的纹理重复实现。" #: doc/classes/CanvasItem.xml msgid "" "If [code]true[/code], this [CanvasItem] will [i]not[/i] inherit its " "transform from parent [CanvasItem]s. Its draw order will also be changed to " "make it draw on top of other [CanvasItem]s that do not have [member " "top_level] set to [code]true[/code]. The [CanvasItem] will effectively act " "as if it was placed as a child of a bare [Node]." msgstr "" "如果为 [code]true[/code],则该 [CanvasItem] [i]不会[/i]继承父级 [CanvasItem] " "的变换。它的绘制顺序也会发生改变,会在其他没有将 [member top_level] 设置为 " "[code]true[/code] 的 [CanvasItem] 之上绘制。效果和把该 [CanvasItem] 作为裸 " "[Node] 的子级一样。" #: doc/classes/CanvasItem.xml msgid "" "If [code]true[/code], the parent [CanvasItem]'s [member material] is used as " "this node's material." msgstr "" "如果为 [code]true[/code],则将父级 [CanvasItem] 的 [member material] 属性用作" "该节点的材质。" #: doc/classes/CanvasItem.xml msgid "" "The rendering layer in which this [CanvasItem] is rendered by [Viewport] " "nodes. A [Viewport] will render a [CanvasItem] if it and all its parents " "share a layer with the [Viewport]'s canvas cull mask." msgstr "" "[Viewport] 节点渲染该 [CanvasItem] 时所使用的渲染层。只有 [CanvasItem] 及其所" "有父级均与 [Viewport] 的画布剔除遮罩有交集,该 [Viewport] 才会渲染此 " "[CanvasItem]。" #: doc/classes/CanvasItem.xml msgid "" "If [code]true[/code], this [CanvasItem] may be drawn. Whether this " "[CanvasItem] is actually drawn depends on the visibility of all of its " "[CanvasItem] ancestors. In other words: this [CanvasItem] will be drawn when " "[method is_visible_in_tree] returns [code]true[/code] and all [CanvasItem] " "ancestors share at least one [member visibility_layer] with this " "[CanvasItem].\n" "[b]Note:[/b] For controls that inherit [Popup], the correct way to make them " "visible is to call one of the multiple [code]popup*()[/code] functions " "instead." msgstr "" "如果为 [code]true[/code],则允许绘制该 [CanvasItem]。实际是否对该 " "[CanvasItem] 进行绘制取决于该节点的所有 [CanvasItem] 祖级节点的可见性。换句话" "说:该 [CanvasItem] 只有在 [method is_visible_in_tree] 返回 [code]true[/" "code],并且所有 [CanvasItem] 祖级节点都至少与这个 [CanvasItem] 共享一个 " "[member visibility_layer]。\n" "[b]注意:[/b]对于继承了 [Popup] 的控件,使其可见的正确方法是调用多个 " "[code]popup*()[/code] 函数之一。" #: doc/classes/CanvasItem.xml msgid "" "If [code]true[/code], this and child [CanvasItem] nodes with a higher Y " "position are rendered in front of nodes with a lower Y position. If " "[code]false[/code], this and child [CanvasItem] nodes are rendered normally " "in scene tree order.\n" "With Y-sorting enabled on a parent node ('A') but disabled on a child node " "('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc.) " "render together on the same Y position as the child node ('B'). This allows " "you to organize the render order of a scene without changing the scene " "tree.\n" "Nodes sort relative to each other only if they are on the same [member " "z_index]." msgstr "" "如果为 [code]true[/code],则该节点及其子 [CanvasItem] 节点中 Y 位置较高的节点" "会渲染在 Y 位置较低的节点的前面。如果为 [code]false[/code],则该节点及其子 " "[CanvasItem] 节点会按照场景树的顺序正常渲染。\n" "如果父节点(“A”)启用了 Y 排序,而子节点(“B”)没有启用,那么子节点(“B”)会" "进行排序,但它自己的子节点(“C1”“C2”等)会渲染在与子节点(“B”)相同的 Y 位" "置。这样你就可以在不修改场景树的前提下组织场景的渲染顺序了。\n" "只有 [member z_index] 相同的节点才会互相进行排序。" #: doc/classes/CanvasItem.xml msgid "" "If [code]true[/code], this node's final Z index is relative to its parent's " "Z index.\n" "For example, if [member z_index] is [code]2[/code] and its parent's final Z " "index is [code]3[/code], then this node's final Z index will be [code]5[/" "code] ([code]2 + 3[/code])." msgstr "" "如果为 [code]true[/code],则该节点的最终 Z 索引是相对于父节点的 Z 索引而言" "的。\n" "例如 [member z_index] 为 [code]2[/code]、父节点的最终 Z 索引为 [code]3[/" "code],那么该节点的最终 Z 索引就是 [code]5[/code]([code]2 + 3[/code])。" #: doc/classes/CanvasItem.xml msgid "" "The order in which this node is drawn. A node with a higher Z index will " "display in front of others. Must be between [constant " "RenderingServer.CANVAS_ITEM_Z_MIN] and [constant " "RenderingServer.CANVAS_ITEM_Z_MAX] (inclusive).\n" "[b]Note:[/b] The Z index does [b]not[/b] affect the order in which " "[CanvasItem] nodes are processed or the way input events are handled. This " "is especially important to keep in mind for [Control] nodes." msgstr "" "节点的绘制顺序。Z 索引较高的节点会显示在其他节点的前面。必须在 [constant " "RenderingServer.CANVAS_ITEM_Z_MIN] 和 [constant " "RenderingServer.CANVAS_ITEM_Z_MAX] 之间(含两端)。\n" "[b]注意:[/b]Z 索引[b]不会[/b]影响 [CanvasItem] 节点的处理顺序和输入事件的处" "理顺序。[Control] 节点尤其需要注意这一点。" #: doc/classes/CanvasItem.xml msgid "" "Emitted when the [CanvasItem] must redraw, [i]after[/i] the related " "[constant NOTIFICATION_DRAW] notification, and [i]before[/i] [method _draw] " "is called.\n" "[b]Note:[/b] Deferred connections do not allow drawing through the " "[code]draw_*[/code] methods." msgstr "" "当该 [CanvasItem] 必须重绘时发出,发生在相关的 [constant NOTIFICATION_DRAW] " "通知[i]之后[/i],调用 [method _draw] [i]之前[/i]。\n" "[b]注意:[/b]延迟连接无法使用 [code]draw_*[/code] 方法进行绘制。" #: doc/classes/CanvasItem.xml msgid "" "Emitted when this node becomes hidden, i.e. it's no longer visible in the " "tree (see [method is_visible_in_tree])." msgstr "" "当该节点隐藏时发出,即不再在树中可见(见 [method is_visible_in_tree])。" #: doc/classes/CanvasItem.xml msgid "" "Emitted when the [CanvasItem]'s boundaries (position or size) change, or " "when an action took place that may have affected these boundaries (e.g. " "changing [member Sprite2D.texture])." msgstr "" "当 [CanvasItem] 的边界(位置或大小)发生变化,或者发生可能影响这些边界的操作" "(例如更改 [member Sprite2D.texture])时发出。" #: doc/classes/CanvasItem.xml msgid "" "Emitted when the [CanvasItem]'s visibility changes, either because its own " "[member visible] property changed or because its visibility in the tree " "changed (see [method is_visible_in_tree]).\n" "This signal is emitted [i]after[/i] the related [constant " "NOTIFICATION_VISIBILITY_CHANGED] notification." msgstr "" "在 [CanvasItem] 的可见性改变时发射,这种改变或是因为其自身的 [member " "visible] 属性发生了变化,或是因为其在树中的可见性发生了变化(见 [method " "is_visible_in_tree])。\n" "该信号在相关的 [constant NOTIFICATION_VISIBILITY_CHANGED] 通知[i]之后[/i]发" "出。" #: doc/classes/CanvasItem.xml msgid "" "Notification received when this node's global transform changes, if [method " "is_transform_notification_enabled] is [code]true[/code]. See also [method " "set_notify_transform] and [method get_transform].\n" "[b]Note:[/b] Many canvas items such as [Camera2D] or [CollisionObject2D] " "automatically enable this in order to function correctly." msgstr "" "[method is_transform_notification_enabled] 为 [code]true[/code] 时,节点的全" "局变换发生改变时收到的通知。另见 [method set_notify_transform] 和 [method " "get_transform]。\n" "[b]注意:[/b][Camera2D]、[CollisionObject2D] 等许多画布项会自动启用此功能以确" "保正常运行。" #: doc/classes/CanvasItem.xml msgid "" "Notification received when this node's transform changes, if [method " "is_local_transform_notification_enabled] is [code]true[/code]. This is not " "received when a parent [Node2D]'s transform changes. See also [method " "set_notify_local_transform].\n" "[b]Note:[/b] Many canvas items such as [Camera2D] or [CollisionShape2D] " "automatically enable this in order to function correctly." msgstr "" "[method is_local_transform_notification_enabled] 为 [code]true[/code] 时,节" "点的变换发生改变时收到的通知。父级 [Node2D] 的变换发生改变时不会收到该通知。" "另见 [method set_notify_local_transform]。\n" "[b]注意:[/b][Camera2D]、[CollisionShape2D] 等许多画布项会自动启用此功能以确" "保正常运行。" #: doc/classes/CanvasItem.xml msgid "The [CanvasItem] is requested to draw (see [method _draw])." msgstr "要求绘制该 [CanvasItem](见 [method _draw])。" #: doc/classes/CanvasItem.xml doc/classes/Node3D.xml msgid "" "Notification received when this node's visibility changes (see [member " "visible] and [method is_visible_in_tree]).\n" "This notification is received [i]before[/i] the related [signal " "visibility_changed] signal." msgstr "" "节点的可见性发生改变时收到的通知(见 [member visible] 和 [method " "is_visible_in_tree])。\n" "该通知会在相关 [signal visibility_changed] 信号[i]之前[/i]收到。" #: doc/classes/CanvasItem.xml msgid "The [CanvasItem] has entered the canvas." msgstr "该 [CanvasItem] 已进入画布。" #: doc/classes/CanvasItem.xml #, fuzzy msgid "" "The [CanvasItem] has exited the canvas.\n" "This notification is sent in reversed order." msgstr "该 [CanvasItem] 已退出画布。" #: doc/classes/CanvasItem.xml msgid "" "Notification received when this [CanvasItem] is registered to a new " "[World2D] (see [method get_world_2d])." msgstr "" "该 [CanvasItem] 注册至新的 [World2D] 时收到的通知(见 [method " "get_world_2d])。" #: doc/classes/CanvasItem.xml msgid "The [CanvasItem] will inherit the filter from its parent." msgstr "该 [CanvasItem] 将从其父级继承过滤器。" #: doc/classes/CanvasItem.xml doc/classes/RenderingServer.xml #: doc/classes/Viewport.xml doc/classes/VisualShaderNodeTextureParameter.xml msgid "" "The texture filter reads from the nearest pixel and blends between the " "nearest 2 mipmaps (or uses the nearest mipmap if [member " "ProjectSettings.rendering/textures/default_filters/" "use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture " "look pixelated from up close, and smooth from a distance.\n" "Use this for non-pixel art textures that may be viewed at a low scale (e.g. " "due to [Camera2D] zoom or sprite scaling), as mipmaps are important to " "smooth out pixels that are smaller than on-screen pixels." msgstr "" "纹理过滤从最近的像素读取并在最近的 2 个多级渐远纹理之间进行混合(或者如果 " "[member ProjectSettings.rendering/textures/default_filters/" "use_nearest_mipmap_filter] 为 [code]true[/code],则使用最近的多级渐远纹理)。" "这使得纹理从近处看起来像素化,从远处看起来平滑。\n" "将此用于可能以低缩放查看的非像素艺术纹理(例如,由于 [Camera2D] 缩放或精灵缩" "放),因为多级渐远纹理对于平滑小于屏幕像素的像素很重要。" #: doc/classes/CanvasItem.xml doc/classes/RenderingServer.xml #: doc/classes/Viewport.xml doc/classes/VisualShaderNodeTextureParameter.xml msgid "" "The texture filter blends between the nearest 4 pixels and between the " "nearest 2 mipmaps (or uses the nearest mipmap if [member " "ProjectSettings.rendering/textures/default_filters/" "use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture " "look smooth from up close, and smooth from a distance.\n" "Use this for non-pixel art textures that may be viewed at a low scale (e.g. " "due to [Camera2D] zoom or sprite scaling), as mipmaps are important to " "smooth out pixels that are smaller than on-screen pixels." msgstr "" "纹理过滤在最近的 4 个像素和最近的 2 个多级渐远纹理之间进行混合(或者如果 " "[member ProjectSettings.rendering/textures/default_filters/" "use_nearest_mipmap_filter] 为 [code]true[/code],则使用最近的多级渐远纹理)。" "这使得纹理从近处看起来平滑,从远处看起来也平滑。\n" "将此用于可能以低缩放查看的非像素艺术纹理(例如,由于 [Camera2D] 缩放或精灵缩" "放),因为多级渐远纹理对于平滑小于屏幕像素的像素很重要。" #: doc/classes/CanvasItem.xml msgid "" "The texture filter reads from the nearest pixel and blends between 2 mipmaps " "(or uses the nearest mipmap if [member ProjectSettings.rendering/textures/" "default_filters/use_nearest_mipmap_filter] is [code]true[/code]) based on " "the angle between the surface and the camera view. This makes the texture " "look pixelated from up close, and smooth from a distance. Anisotropic " "filtering improves texture quality on surfaces that are almost in line with " "the camera, but is slightly slower. The anisotropic filtering level can be " "changed by adjusting [member ProjectSettings.rendering/textures/" "default_filters/anisotropic_filtering_level].\n" "[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant " "TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate in this " "case." msgstr "" "纹理过滤从最近的像素读取并根据表面和相机视图之间的角度在 2 个多级渐远纹理之间" "进行混合(或者如果 [member ProjectSettings.rendering/textures/" "default_filters/use_nearest_mipmap_filter] 为 [code]true[/code],则使用最近的" "多级渐远纹理)。这使得纹理从近处看起来像素化,从远处看起来平滑。各向异性过滤" "提高了几乎与相机位于一条线的表面上的纹理质量,但速度稍慢。各向异性过滤级别可" "以通过调整 [member ProjectSettings.rendering/textures/default_filters/" "anisotropic_filtering_level] 来改变。\n" "[b]注意:[/b]该纹理过滤在 2D 项目中很少有用。[constant " "TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] 在这种情况下通常更合适。" #: doc/classes/CanvasItem.xml msgid "" "The texture filter blends between the nearest 4 pixels and blends between 2 " "mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/" "textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) " "based on the angle between the surface and the camera view. This makes the " "texture look smooth from up close, and smooth from a distance. Anisotropic " "filtering improves texture quality on surfaces that are almost in line with " "the camera, but is slightly slower. The anisotropic filtering level can be " "changed by adjusting [member ProjectSettings.rendering/textures/" "default_filters/anisotropic_filtering_level].\n" "[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant " "TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate in this case." msgstr "" "纹理过滤在最近的 4 个像素之间进行混合,并基于表面与相机视图之间的角度在 2 个" "多级渐远纹理之间进行混合(或者如果 [member ProjectSettings.rendering/" "textures/default_filters/use_nearest_mipmap_filter] 为 [code]true[/code],则" "使用最近的多级渐远纹理)。这使得纹理从近处看起来平滑,从远处看起来也平滑。各" "向异性过滤提高了几乎与相机位于一条线的表面上的纹理质量,但速度稍慢。各向异性" "过滤级别可以通过调整 [member ProjectSettings.rendering/textures/" "default_filters/anisotropic_filtering_level] 来改变。\n" "[b]注意:[/b]该纹理过滤在 2D 项目中很少有用。[constant " "TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] 在这种情况下通常更合适。" #: doc/classes/CanvasItem.xml msgid "" "The texture does not repeat. Sampling the texture outside its extents will " "result in \"stretching\" of the edge pixels. You can avoid this by ensuring " "a 1-pixel fully transparent border on each side of the texture." msgstr "" "纹理不会重复。在纹理范围之外采样会导致边缘像素“拉伸”。你可以通过确保在纹理两" "侧各有一个 1 像素的完全透明边框来避免这种情况。" #: doc/classes/CanvasItem.xml msgid "The texture repeats when exceeding the texture's size." msgstr "纹理会在超出纹理大小后重复。" #: doc/classes/CanvasItem.xml msgid "" "The texture repeats when the exceeding the texture's size in a \"2×2 tiled " "mode\". Repeated textures at even positions are mirrored." msgstr "" "纹理会在超出纹理大小后以“2×2 平铺模式”重复。偶数位置的重复纹理会被镜像。" #: doc/classes/CanvasItem.xml doc/classes/VisualShaderNodeTextureParameter.xml msgid "Represents the size of the [enum TextureRepeat] enum." msgstr "代表 [enum TextureRepeat] 枚举的大小。" #: doc/classes/CanvasItem.xml msgid "Children are drawn over this node and are not clipped." msgstr "子节点绘制在该节点之上,不会被裁剪。" #: doc/classes/CanvasItem.xml msgid "" "This node is used as a mask and is [b]not[/b] drawn. The mask is based on " "this node's alpha channel: Opaque pixels are kept, transparent pixels are " "discarded, and semi-transparent pixels are blended in according to their " "opacity. Children are clipped to this node's drawn area." msgstr "" "该节点用作遮罩,[b]不进行[/b]绘制。遮罩基于该节点的 Alpha 通道:保留不透明像" "素,丢弃透明像素,半透明像素根据不透明度混合。子节点受到该节点绘制区域的裁" "剪。" #: doc/classes/CanvasItem.xml msgid "" "This node is used as a mask and is also drawn. The mask is based on this " "node's alpha channel: Opaque pixels are kept, transparent pixels are " "discarded, and semi-transparent pixels are blended in according to their " "opacity. Children are clipped to the parent's drawn area." msgstr "" "该节点用作遮罩,也会进行绘制。遮罩基于该节点的 Alpha 通道:保留不透明像素,丢" "弃透明像素,半透明像素根据不透明度混合。子节点受到该节点绘制区域的裁剪。" #: doc/classes/CanvasItem.xml msgid "Represents the size of the [enum ClipChildrenMode] enum." msgstr "代表 [enum ClipChildrenMode] 枚举的大小。" #: doc/classes/CanvasItemMaterial.xml msgid "A material for [CanvasItem]s." msgstr "[CanvasItem]的材质。" #: doc/classes/CanvasItemMaterial.xml msgid "" "[CanvasItemMaterial]s provide a means of modifying the textures associated " "with a CanvasItem. They specialize in describing blend and lighting " "behaviors for textures. Use a [ShaderMaterial] to more fully customize a " "material's interactions with a [CanvasItem]." msgstr "" "[CanvasItemMaterial]提供了一种修改与CanvasItem相关联的纹理的方法。他们专注于" "描述纹理的混合和照明行为。使用[ShaderMaterial]可以更全面地自定义材质与" "[CanvasItem]的交互。" #: doc/classes/CanvasItemMaterial.xml msgid "" "The manner in which a material's rendering is applied to underlying textures." msgstr "将材质的渲染应用于基础纹理的方式。" #: doc/classes/CanvasItemMaterial.xml msgid "The manner in which material reacts to lighting." msgstr "材质对照明的反应方式。" #: doc/classes/CanvasItemMaterial.xml msgid "" "The number of columns in the spritesheet assigned as [Texture2D] for a " "[GPUParticles2D] or [CPUParticles2D].\n" "[b]Note:[/b] This property is only used and visible in the editor if [member " "particles_animation] is [code]true[/code]." msgstr "" "[GPUParticles2D] 或 [CPUParticles2D] 指定给 [Texture2D] 的精灵表中拥有的列" "数。\n" "[b]注意:[/b]该属性只有在 [member particles_animation] 为 [code]true[/code] " "时,才会在编辑器中被使用和可见。" #: doc/classes/CanvasItemMaterial.xml msgid "" "If [code]true[/code], the particles animation will loop.\n" "[b]Note:[/b] This property is only used and visible in the editor if [member " "particles_animation] is [code]true[/code]." msgstr "" "如果为 [code]true[/code],粒子动画将循环播放。\n" "[b]注意:[/b]该属性只有在 [member particles_animation]为 [code]true[/code] " "时,才会在编辑器中被使用和可见。" #: doc/classes/CanvasItemMaterial.xml msgid "" "The number of rows in the spritesheet assigned as [Texture2D] for a " "[GPUParticles2D] or [CPUParticles2D].\n" "[b]Note:[/b] This property is only used and visible in the editor if [member " "particles_animation] is [code]true[/code]." msgstr "" "[GPUParticles2D] 或 [CPUParticles2D] 指定给 [Texture2D] 的精灵表中拥有的行" "数。\n" "[b]注意:[/b]该属性只有在 [member particles_animation] 为 [code]true[/code] " "时,才会在编辑器中被使用和可见。" #: doc/classes/CanvasItemMaterial.xml msgid "" "If [code]true[/code], enable spritesheet-based animation features when " "assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member " "ParticleProcessMaterial.anim_speed_max] or [member " "CPUParticles2D.anim_speed_max] should also be set to a positive value for " "the animation to play.\n" "This property (and other [code]particles_anim_*[/code] properties that " "depend on it) has no effect on other types of nodes." msgstr "" "如果 [code]true[/code] ,在分配给 [GPUParticles2D] 和 [CPUParticles2D] 节点" "时,启用基于精灵表的动画功能。[member " "ParticleProcessMaterial.anim_speed_max] 或 [member " "CPUParticles2D.anim_speed_max] 也应该设置为正值,才能播放动画。\n" "这个属性(以及其他依赖它的 [code]particles_anim_*[/code] 属性)对其他类型的节" "点没有影响。" #: doc/classes/CanvasItemMaterial.xml msgid "" "Mix blending mode. Colors are assumed to be independent of the alpha " "(opacity) value." msgstr "混合混合模式。假设颜色与 Alpha 值(不透明度)无关。" #: doc/classes/CanvasItemMaterial.xml msgid "Additive blending mode." msgstr "添加混合模式。" #: doc/classes/CanvasItemMaterial.xml msgid "Subtractive blending mode." msgstr "减去混合模式。" #: doc/classes/CanvasItemMaterial.xml msgid "Multiplicative blending mode." msgstr "正片叠底混合模式。" #: doc/classes/CanvasItemMaterial.xml msgid "" "Mix blending mode. Colors are assumed to be premultiplied by the alpha " "(opacity) value." msgstr "混合混合模式。假定颜色已预先乘以 Alpha 值(不透明度)。" #: doc/classes/CanvasItemMaterial.xml msgid "" "Render the material using both light and non-light sensitive material " "properties." msgstr "使用光敏和非光敏材料属性渲染材质。" #: doc/classes/CanvasItemMaterial.xml msgid "Render the material as if there were no light." msgstr "将材质渲染成没有光的样子。" #: doc/classes/CanvasItemMaterial.xml msgid "Render the material as if there were only light." msgstr "将材质渲染成只有光的样子。" #: doc/classes/CanvasLayer.xml msgid "A node used for independent rendering of objects within a 2D scene." msgstr "用于 2D 场景中的对象的独立渲染的节点。" #: doc/classes/CanvasLayer.xml msgid "" "[CanvasItem]-derived nodes that are direct or indirect children of a " "[CanvasLayer] will be drawn in that layer. The layer is a numeric index that " "defines the draw order. The default 2D scene renders with index [code]0[/" "code], so a [CanvasLayer] with index [code]-1[/code] will be drawn below, " "and a [CanvasLayer] with index [code]1[/code] will be drawn above. This " "order will hold regardless of the [member CanvasItem.z_index] of the nodes " "within each layer.\n" "[CanvasLayer]s can be hidden and they can also optionally follow the " "viewport. This makes them useful for HUDs like health bar overlays (on " "layers [code]1[/code] and higher) or backgrounds (on layers [code]-1[/code] " "and lower).\n" "[b]Note:[/b] Embedded [Window]s are placed on layer [code]1024[/code]. " "[CanvasItem]s on layers [code]1025[/code] and higher appear in front of " "embedded windows.\n" "[b]Note:[/b] Each [CanvasLayer] is drawn on one specific [Viewport] and " "cannot be shared between multiple [Viewport]s, see [member custom_viewport]. " "When using multiple [Viewport]s, for example in a split-screen game, you " "need to create an individual [CanvasLayer] for each [Viewport] you want it " "to be drawn on." msgstr "" "[CanvasLayer] 的直接或间接子节点中,派生自 [CanvasItem] 的节点会在该图层中进" "行绘制。图层是定义绘制顺序的数字索引。默认 2D 场景使用的索引为 [code]0[/" "code],因此索引为 [code]-1[/code] 的 [CanvasLayer] 会在下方绘制,而索引为 " "[code]1[/code] 的 [CanvasLayer] 会在上方绘制。无论节点在图层中的 [member " "CanvasItem.z_index] 是多少,这一顺序都成立。\n" "[CanvasLayer] 可以隐藏,也可以跟随视口。因此常用于血条等 HUD(位于 [code]1[/" "code] 或更高的图层上)和背景(位于 [code]-1[/code] 或更低的图层上)。\n" "[b]注意:[/b]嵌入式 [Window] 位于 [code]1024[/code] 图层。位于 [code]1025[/" "code] 或更高图层的 [CanvasItem] 会显示在嵌入式窗口之上。\n" "[b]注意:[/b]每个 [CanvasLayer] 都是在一个特定的 [Viewport] 中绘制的,不能在" "多个 [Viewport] 之间共享,见 [member custom_viewport]。使用多个 [Viewport] " "时,例如分屏游戏中,你需要为每个想要绘制的 [Viewport] 创建一个单独的 " "[CanvasLayer]。" #: doc/classes/CanvasLayer.xml msgid "Canvas layers" msgstr "画布层" #: doc/classes/CanvasLayer.xml msgid "Returns the RID of the canvas used by this layer." msgstr "返回此层使用的画布的 RID。" #: doc/classes/CanvasLayer.xml msgid "" "Returns the transform from the [CanvasLayer]s coordinate system to the " "[Viewport]s coordinate system." msgstr "返回从 [CanvasLayer] 坐标系到 [Viewport] 坐标系的变换。" #: doc/classes/CanvasLayer.xml msgid "" "Hides any [CanvasItem] under this [CanvasLayer]. This is equivalent to " "setting [member visible] to [code]false[/code]." msgstr "" "隐藏该 [CanvasLayer] 下的所有 [CanvasItem]。相当于将 [member visible] 设为 " "[code]false[/code]。" #: doc/classes/CanvasLayer.xml msgid "" "Shows any [CanvasItem] under this [CanvasLayer]. This is equivalent to " "setting [member visible] to [code]true[/code]." msgstr "" "显示该 [CanvasLayer] 下的所有 [CanvasItem]。相当于将 [member visible] 设为 " "[code]true[/code]。" #: doc/classes/CanvasLayer.xml msgid "" "The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/" "code], uses the default viewport instead." msgstr "" "分配给该 [CanvasLayer] 的自定义 [Viewport] 节点。如果为 [code]null[/code],则" "使用默认的视口。" #: doc/classes/CanvasLayer.xml msgid "" "If enabled, the [CanvasLayer] maintains its position in world space. If " "disabled, the [CanvasLayer] stays in a fixed position on the screen.\n" "Together with [member follow_viewport_scale], this can be used for a " "pseudo-3D effect." msgstr "" "启用时,[CanvasLayer] 会保持在世界空间中的位置。禁用时,[CanvasLayer] 会保持" "在屏幕上的某个固定位置。\n" "与 [member follow_viewport_scale] 配合可以实现伪 3D 效果。" #: doc/classes/CanvasLayer.xml msgid "" "Scales the layer when using [member follow_viewport_enabled]. Layers moving " "into the foreground should have increasing scales, while layers moving into " "the background should have decreasing scales." msgstr "" "使用 [member follow_viewport_enabled] 时缩放图层。移入到前景的图层应具有增加" "的缩放,而移入到背景的图层应具有减小的缩放。" #: doc/classes/CanvasLayer.xml msgid "" "Layer index for draw order. Lower values are drawn behind higher values.\n" "[b]Note:[/b] If multiple CanvasLayers have the same layer index, " "[CanvasItem] children of one CanvasLayer are drawn behind the [CanvasItem] " "children of the other CanvasLayer. Which CanvasLayer is drawn in front is " "non-deterministic.\n" "[b]Note:[/b] The layer index should be between [constant " "RenderingServer.CANVAS_LAYER_MIN] and [constant " "RenderingServer.CANVAS_LAYER_MAX] (inclusive). Any other value will wrap " "around." msgstr "" "画布层的索引,用于确定绘制顺序。索引值小的画布层绘制在索引值大的画布层后" "面。\n" "[b]注意:[/b]如果多个 CanvasLayer 的画布层索引相同,一个 CanvasLayer 的 " "[CanvasItem] 子节点都会绘制在另一个 CanvasLayer 的 [CanvasItem] 子节点之后。" "哪个 CanvasLayer 画在前面并不一定。\n" "[b]注意:[/b]画布层索引应当在 [constant RenderingServer.CANVAS_LAYER_MIN] 和 " "[constant RenderingServer.CANVAS_LAYER_MAX] 之间(含两端)。其他值都会发生环" "绕。" #: doc/classes/CanvasLayer.xml msgid "The layer's base offset." msgstr "图层的基本偏移量。" #: doc/classes/CanvasLayer.xml msgid "The layer's rotation in radians." msgstr "图层的旋转弧度。" #: doc/classes/CanvasLayer.xml msgid "The layer's scale." msgstr "图层的缩放。" #: doc/classes/CanvasLayer.xml msgid "The layer's transform." msgstr "图层的变换。" #: doc/classes/CanvasLayer.xml msgid "" "If [code]false[/code], any [CanvasItem] under this [CanvasLayer] will be " "hidden.\n" "Unlike [member CanvasItem.visible], visibility of a [CanvasLayer] isn't " "propagated to underlying layers." msgstr "" "为 [code]false[/code] 时,该 [CanvasLayer] 下的所有 [CanvasItem] 都会被隐" "藏。\n" "与 [member CanvasItem.visible] 不同,[CanvasLayer] 的显示与否不会传播到其内部" "的层。" #: doc/classes/CanvasLayer.xml msgid "Emitted when visibility of the layer is changed. See [member visible]." msgstr "当该层的可见性发生变化时触发。请参阅 [member visible]。" #: doc/classes/CanvasModulate.xml msgid "A node that applies a color tint to a canvas." msgstr "将一种色调应用于一张画布的节点。" #: doc/classes/CanvasModulate.xml msgid "" "[CanvasModulate] applies a color tint to all nodes on a canvas. Only one can " "be used to tint a canvas, but [CanvasLayer]s can be used to render things " "independently." msgstr "" "[CanvasModulate] 将一种色调应用于一张画布上的所有节点。一张画布只有一个可用于" "为画布着色,但 [CanvasLayer] 可用于独立渲染事物。" #: doc/classes/CanvasModulate.xml doc/classes/DirectionalLight2D.xml #: doc/classes/Light2D.xml doc/classes/LightOccluder2D.xml #: doc/classes/PointLight2D.xml msgid "2D lights and shadows" msgstr "2D 灯光和阴影" #: doc/classes/CanvasModulate.xml msgid "The tint color to apply." msgstr "要应用的色调颜色。" #: doc/classes/CanvasTexture.xml msgid "Texture with optional normal and specular maps for use in 2D rendering." msgstr "用于 2D 渲染的纹理,带有可选的法线和镜面贴图。" #: doc/classes/CanvasTexture.xml msgid "" "[CanvasTexture] is an alternative to [ImageTexture] for 2D rendering. It " "allows using normal maps and specular maps in any node that inherits from " "[CanvasItem]. [CanvasTexture] also allows overriding the texture's filter " "and repeat mode independently of the node's properties (or the project " "settings).\n" "[b]Note:[/b] [CanvasTexture] cannot be used in 3D. It will not display " "correctly when applied to any [VisualInstance3D], such as [Sprite3D] or " "[Decal]. For physically-based materials in 3D, use [BaseMaterial3D] instead." msgstr "" "[CanvasTexture] 是用于 2D 渲染的 [ImageTexture] 的替代品。它允许在任何继承自 " "[CanvasItem] 的节点中使用法线贴图和镜面贴图。[CanvasTexture] 还允许独立于节点" "的属性(或项目设置)覆盖纹理的过滤模式和重复模式。\n" "[b]注意:[/b][CanvasTexture] 不能在 3D 中使用。当应用于任何 " "[VisualInstance3D],例如 [Sprite3D] 或 [Decal] 时,它将无法正确显示。对于 3D " "中基于物理的材质,请改用 [BaseMaterial3D]。" #: doc/classes/CanvasTexture.xml msgid "2D Lights and Shadows" msgstr "2D 灯光和阴影" #: doc/classes/CanvasTexture.xml msgid "" "The diffuse (color) texture to use. This is the main texture you want to set " "in most cases." msgstr "要使用的漫反射(颜色)纹理。这是你在大多数情况下要设置的主要纹理。" #: doc/classes/CanvasTexture.xml msgid "" "The normal map texture to use. Only has a visible effect if [Light2D]s are " "affecting this [CanvasTexture].\n" "[b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. " "See [url=http://wiki.polycount.com/wiki/" "Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for " "a comparison of normal map coordinates expected by popular engines." msgstr "" "要使用的法线贴图纹理。仅在有 [Light2D] 影响该 [CanvasTexture] 时才有可见的效" "果。\n" "[b]注意:[/b]Godot 期望法线贴图使用 X+、Y+、Z+ 坐标系。比较流行的引擎所期望的" "法线贴图坐标系见[url=http://wiki.polycount.com/wiki/" "Normal_Map_Technical_Details#Common_Swizzle_Coordinates]这个页面[/url]。" #: doc/classes/CanvasTexture.xml msgid "" "The multiplier for specular reflection colors. The [Light2D]'s color is also " "taken into account when determining the reflection color. Only has a visible " "effect if [Light2D]s are affecting this [CanvasTexture]." msgstr "" "镜面反射颜色的乘数。在确定反射颜色时,[Light2D] 的颜色也会被考虑在内。只有在 " "[Light2D] 影响到这个 [CanvasTexture] 时才有可见的效果。" #: doc/classes/CanvasTexture.xml msgid "" "The specular exponent for [Light2D] specular reflections. Higher values " "result in a more glossy/\"wet\" look, with reflections becoming more " "localized and less visible overall. The default value of [code]1.0[/code] " "disables specular reflections entirely. Only has a visible effect if " "[Light2D]s are affecting this [CanvasTexture]." msgstr "" "用于 [Light2D] 镜面反射的镜面指数。更高的值会产生更有光泽或更加“湿润”的外观," "反射变得更局部,且整体上不太明显。默认值为 [code]1.0[/code] ,将完全禁用镜面" "反射。只有在 [Light2D] 影响到这个 [CanvasTexture] 时才会有可见的效果。" #: doc/classes/CanvasTexture.xml msgid "" "The specular map to use for [Light2D] specular reflections. This should be a " "grayscale or colored texture, with brighter areas resulting in a higher " "[member specular_shininess] value. Using a colored [member specular_texture] " "allows controlling specular shininess on a per-channel basis. Only has a " "visible effect if [Light2D]s are affecting this [CanvasTexture]." msgstr "" "用于 [Light2D] 镜面反射的镜面贴图。这应该是一个灰度或彩色纹理,更亮的区域会产" "生更高的 [member specular_shininess] 值。使用彩色 [member specular_texture] " "允许在每个通道的基础上控制镜面反射光泽度。仅当 [Light2D] 影响该 " "[CanvasTexture] 时才有可见的效果。" #: doc/classes/CanvasTexture.xml msgid "The texture filtering mode to use when drawing this [CanvasTexture]." msgstr "绘制该 [CanvasTexture] 时所使用的纹理过滤模式。" #: doc/classes/CanvasTexture.xml msgid "The texture repeat mode to use when drawing this [CanvasTexture]." msgstr "绘制该 [CanvasTexture] 时所使用的纹理重复模式。" #: doc/classes/CapsuleMesh.xml msgid "Class representing a capsule-shaped [PrimitiveMesh]." msgstr "表示胶囊状 [PrimitiveMesh] 的类。" #: doc/classes/CapsuleMesh.xml msgid "" "Total height of the capsule mesh (including the hemispherical ends).\n" "[b]Note:[/b] The [member height] of a capsule must be at least twice its " "[member radius]. Otherwise, the capsule becomes a circle. If the [member " "height] is less than twice the [member radius], the properties adjust to a " "valid value." msgstr "" "胶囊体网格的总高度(包括半球形末端)。\n" "[b]注意:[/b]胶囊体的 [member height] 必须至少为其 [member radius] 的两倍。否" "则,胶囊体将变为圆形。如果 [member height] 小于 [member radius] 的两倍,则属" "性将调整为有效值。" #: doc/classes/CapsuleMesh.xml msgid "Number of radial segments on the capsule mesh." msgstr "胶囊网格上的径向线段数。" #: doc/classes/CapsuleMesh.xml msgid "" "Radius of the capsule mesh.\n" "[b]Note:[/b] The [member radius] of a capsule cannot be greater than half of " "its [member height]. Otherwise, the capsule becomes a circle. If the [member " "radius] is greater than half of the [member height], the properties adjust " "to a valid value." msgstr "" "胶囊体网格的半径。\n" "[b]注意:[/b]胶囊体的 [member radius] 不能大于其 [member height] 的一半。否" "则,胶囊体将变成圆形。如果 [member radius] 大于 [member height] 的一半,则属" "性将调整为有效值。" #: doc/classes/CapsuleMesh.xml msgid "Number of rings along the height of the capsule." msgstr "沿胶囊高度的环数。" #: doc/classes/CapsuleShape2D.xml msgid "A 2D capsule shape used for physics collision." msgstr "用于物理碰撞的 2D 胶囊形状。" #: doc/classes/CapsuleShape2D.xml msgid "" "A 2D capsule shape, intended for use in physics. Usually used to provide a " "shape for a [CollisionShape2D].\n" "[b]Performance:[/b] [CapsuleShape2D] is fast to check collisions against, " "but it is slower than [RectangleShape2D] and [CircleShape2D]." msgstr "" "2D 胶囊形状,旨在用于物理学。通常用于为 [CollisionShape2D] 提供形状。\n" "[b]性能:[/b][CapsuleShape2D] 可以快速检查碰撞,但比 [RectangleShape2D] 和 " "[CircleShape2D] 慢。" #: doc/classes/CapsuleShape2D.xml msgid "" "The capsule's full height, including the semicircles.\n" "[b]Note:[/b] The [member height] of a capsule must be at least twice its " "[member radius]. Otherwise, the capsule becomes a circle. If the [member " "height] is less than twice the [member radius], the properties adjust to a " "valid value." msgstr "" "胶囊的总高度,包括半圆。\n" "[b]注意:[/b]胶囊的 [member height] 必须至少为其 [member radius] 的两倍。否" "则,胶囊将变为圆形。如果 [member height] 小于 [member radius] 的两倍,则属性" "将调整为有效值。" #: doc/classes/CapsuleShape2D.xml msgid "" "The capsule's height, excluding the semicircles. This is the height of the " "central rectangular part in the middle of the capsule, and is the distance " "between the centers of the two semicircles. This is a wrapper for [member " "height]." msgstr "" "胶囊的高度,不包括两个半圆。这是胶囊中间矩形部分的高度,即两个半圆圆心之间的" "距离。这是对 [member height] 的封装。" #: doc/classes/CapsuleShape2D.xml msgid "" "The capsule's radius.\n" "[b]Note:[/b] The [member radius] of a capsule cannot be greater than half of " "its [member height]. Otherwise, the capsule becomes a circle. If the [member " "radius] is greater than half of the [member height], the properties adjust " "to a valid value." msgstr "" "胶囊的半径。\n" "[b]注意:[/b]胶囊的 [member radius] 不能大于其 [member height] 的一半。否则," "胶囊将变成圆形。如果 [member radius] 大于 [member height] 的一半,则属性将调" "整为有效值。" #: doc/classes/CapsuleShape3D.xml msgid "A 3D capsule shape used for physics collision." msgstr "用于物理碰撞的 3D 胶囊形状。" #: doc/classes/CapsuleShape3D.xml msgid "" "A 3D capsule shape, intended for use in physics. Usually used to provide a " "shape for a [CollisionShape3D].\n" "[b]Performance:[/b] [CapsuleShape3D] is fast to check collisions against. It " "is faster than [CylinderShape3D], but slower than [SphereShape3D] and " "[BoxShape3D]." msgstr "" "3D 胶囊形状,旨在用于物理学。通常用于为 [CollisionShape3D] 提供形状。\n" "[b]性能:[/b][CapsuleShape3D] 可以快速检查碰撞。比 [CylinderShape3D] 快,但" "比 [SphereShape3D] 和 [BoxShape3D] 慢。" #: doc/classes/CapsuleShape3D.xml doc/classes/SpringBoneCollisionCapsule3D.xml msgid "" "The capsule's full height, including the hemispheres.\n" "[b]Note:[/b] The [member height] of a capsule must be at least twice its " "[member radius]. Otherwise, the capsule becomes a sphere. If the [member " "height] is less than twice the [member radius], the properties adjust to a " "valid value." msgstr "" "胶囊体的总高度,包括半球。\n" "[b]注意:[/b]胶囊体的 [member height] 必须至少为其 [member radius] 的两倍。否" "则,胶囊体将变为球体。如果 [member height] 小于 [member radius] 的两倍,则属" "性将调整为有效值。" #: doc/classes/CapsuleShape3D.xml doc/classes/SpringBoneCollisionCapsule3D.xml msgid "" "The capsule's height, excluding the hemispheres. This is the height of the " "central cylindrical part in the middle of the capsule, and is the distance " "between the centers of the two hemispheres. This is a wrapper for [member " "height]." msgstr "" "胶囊的高度,不包括两个半球。这是胶囊中间圆柱部分的高度,即两个半球球心之间的" "距离。这是对 [member height] 的封装。" #: doc/classes/CapsuleShape3D.xml doc/classes/SpringBoneCollisionCapsule3D.xml msgid "" "The capsule's radius.\n" "[b]Note:[/b] The [member radius] of a capsule cannot be greater than half of " "its [member height]. Otherwise, the capsule becomes a sphere. If the [member " "radius] is greater than half of the [member height], the properties adjust " "to a valid value." msgstr "" "胶囊体的半径。\n" "[b]注意:[/b]胶囊体的 [member radius] 不能大于其 [member height] 的一半。否" "则,胶囊体将变为球体。如果 [member radius] 大于 [member height] 的一半,则属" "性将调整为有效值。" #: doc/classes/CCDIK3D.xml msgid "Rotation based cyclic coordinate descent inverse kinematics solver." msgstr "" #: doc/classes/CCDIK3D.xml msgid "" "[CCDIK3D] is rotation based IK, enabling fast and effective tracking even " "with large joint rotations. It's especially suitable for chains with " "limitations, providing smoother and more stable target tracking compared to " "[FABRIK3D].\n" "The resulting twist around the forward vector will always be kept from the " "previous pose.\n" "[b]Note:[/b] When the target is close to the root, it can cause unnatural " "movement, including joint flips and oscillations." msgstr "" #: doc/classes/CenterContainer.xml msgid "A container that keeps child controls in its center." msgstr "将子控件保持在其中心的容器。" #: doc/classes/CenterContainer.xml msgid "" "[CenterContainer] is a container that keeps all of its child controls in its " "center at their minimum size." msgstr "[CenterContainer] 是一种容器,它将其所有子控件以最小尺寸保持在其中心。" #: doc/classes/CenterContainer.xml msgid "" "If [code]true[/code], centers children relative to the [CenterContainer]'s " "top left corner." msgstr "" "如果为 [code]true[/code],会将子节点相对于 [CenterContainer] 的左上角居中。" #: doc/classes/ChainIK3D.xml #, fuzzy msgid "" "A [SkeletonModifier3D] to apply inverse kinematics to bone chains containing " "an arbitrary number of bones." msgstr "对骨骼链应用惯性摆动的 [SkeletonModifier3D]。" #: doc/classes/ChainIK3D.xml #, fuzzy msgid "" "Base class of [SkeletonModifier3D] that automatically generates a joint list " "from the bones between the root bone and the end bone." msgstr "" "[SkeletonModifier3D] 的基类,能够根据 [method get_reference_bone] 所获得骨骼" "的变换修改 [method set_apply_bone] 中设置的骨骼。" #: doc/classes/ChainIK3D.xml doc/classes/SpringBoneSimulator3D.xml #: doc/classes/TwoBoneIK3D.xml #, fuzzy msgid "" "Returns the end bone tail length of the bone chain when [method " "is_end_bone_extended] is [code]true[/code]." msgstr "" "当 [method is_end_bone_extended] 为 [code]true[/code] 时,返回骨骼链末端骨骼" "的尾部长度。" #: doc/classes/ChainIK3D.xml doc/classes/SpringBoneSimulator3D.xml msgid "" "Sets the end bone tail length of the bone chain when [method " "is_end_bone_extended] is [code]true[/code]." msgstr "" "当 [method is_end_bone_extended] 为 [code]true[/code] 时,设置骨骼链中末端骨" "骼的尾部长度。" #: doc/classes/ChainIK3D.xml #, fuzzy msgid "" "Sets the end bone name of the bone chain.\n" "[b]Note:[/b] The end bone must be the root bone or a child of the root bone. " "If they are the same, the tail must be extended by [method " "set_extend_end_bone] to modify the bone." msgstr "" "设置骨骼链中末端骨骼的名称。\n" "[b]注意:[/b] 末端骨骼必须是根骨骼或根骨骼的子骨骼。如果相同,则必须通过 " "[method set_extend_end_bone] 扩展尾部,使骨骼产生摆动。" #: doc/classes/ChainIK3D.xml doc/classes/SpringBoneSimulator3D.xml #, fuzzy msgid "" "If [param enabled] is [code]true[/code], the end bone is extended to have a " "tail.\n" "The extended tail config is allocated to the last element in the joint list. " "In other words, if you set [param enabled] to [code]false[/code], the config " "of the last element in the joint list has no effect in the simulated result." msgstr "" "如果 [param enabled] 为 [code]true[/code],则会延伸末端骨骼形成尾部。\n" "扩展的尾部配置会分配给关节列表中的最后一个元素。\n" "换句话说,如果将 [param enabled] 设置为 [code]false[/code],则关节列表中最后" "一个元素的配置在模拟结果中将没有效果。" #: doc/classes/CharacterBody2D.xml msgid "A 2D physics body specialized for characters moved by script." msgstr "专门用于通过脚本移动的角色的 2D 物理物体。" #: doc/classes/CharacterBody2D.xml msgid "" "[CharacterBody2D] is a specialized class for physics bodies that are meant " "to be user-controlled. They are not affected by physics at all, but they " "affect other physics bodies in their path. They are mainly used to provide " "high-level API to move objects with wall and slope detection ([method " "move_and_slide] method) in addition to the general collision detection " "provided by [method PhysicsBody2D.move_and_collide]. This makes it useful " "for highly configurable physics bodies that must move in specific ways and " "collide with the world, as is often the case with user-controlled " "characters.\n" "For game objects that don't require complex movement or collision detection, " "such as moving platforms, [AnimatableBody2D] is simpler to configure." msgstr "" "[CharacterBody2D] 是针对用户控制的物理体的特化类。它们不会受到物理的影响,但" "会影响路径上的其他物理体。除了由 [method PhysicsBody2D.move_and_collide] 提供" "的常见的碰撞检测之外,它们主要用于提供移动对象的高阶 API,能够检测墙壁和斜坡" "([method move_and_slide] 方法)。因此适用于需要高度可配置的物理体,因为通常" "是用户控制的角色,所以必须按照特定的方式移动、与世界发生碰撞。\n" "如果是移动平台等不需要复杂移动和碰撞检测的游戏对象,[AnimatableBody2D] 更方便" "配置。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "Kinematic character (2D)" msgstr "运动学角色(2D)" #: doc/classes/CharacterBody2D.xml msgid "Using CharacterBody2D" msgstr "使用 CharacterBody2D" #: doc/classes/CharacterBody2D.xml doc/classes/CollisionShape2D.xml #: doc/classes/RectangleShape2D.xml doc/classes/TileMap.xml #: doc/classes/TileMapLayer.xml doc/classes/TileSet.xml msgid "2D Kinematic Character Demo" msgstr "2D 运动学角色演示" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Allows to manually apply a snap to the floor regardless of the body's " "velocity. This function does nothing when [method is_on_floor] returns " "[code]true[/code]." msgstr "" "允许手动应用向地板的吸附,无论该物体的速度多大。[method is_on_floor] 返回 " "[code]true[/code] 时这个函数什么都不做。" #: doc/classes/CharacterBody2D.xml msgid "" "Returns the floor's collision angle at the last collision point according to " "[param up_direction], which is [constant Vector2.UP] by default. This value " "is always positive and only valid after calling [method move_and_slide] and " "when [method is_on_floor] returns [code]true[/code]." msgstr "" "返回地板在最近一次碰撞点的碰撞角度,依据为 [param up_direction],默认为 " "[constant Vector2.UP]。该值始终为正数,只有在调用了 [method move_and_slide] " "并且 [method is_on_floor] 返回值为 [code]true[/code] 时才有效。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns the collision normal of the floor at the last collision point. Only " "valid after calling [method move_and_slide] and when [method is_on_floor] " "returns [code]true[/code].\n" "[b]Warning:[/b] The collision normal is not always the same as the surface " "normal." msgstr "" "返回最近一次碰撞点的地面法线。只有在调用了 [method move_and_slide] 并且 " "[method is_on_floor] 返回值为 [code]true[/code] 时才有效。\n" "[b]警告:[/b]碰撞法线并不总是与表面法线相同。" #: doc/classes/CharacterBody2D.xml msgid "" "Returns the last motion applied to the [CharacterBody2D] during the last " "call to [method move_and_slide]. The movement can be split into multiple " "motions when sliding occurs, and this method return the last one, which is " "useful to retrieve the current direction of the movement." msgstr "" "返回最近一次调用 [method move_and_slide] 时施加给该 [CharacterBody2D] 的最后" "一次运动。如果发生了滑动,则该移动可以拆分为多次运动,此方法返回的是最后一" "次,可用于获取当前的移动方向。" #: doc/classes/CharacterBody2D.xml #, fuzzy msgid "" "Returns a [KinematicCollision2D] if a collision occurred. The returned value " "contains information about the latest collision that occurred during the " "last call to [method move_and_slide]. Returns [code]null[/code] if no " "collision occurred. See also [method get_slide_collision]." msgstr "" "返回 [KinematicCollision2D],包含最近一次调用 [method move_and_slide] 时发生" "的最后一次运动的相关信息。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns the linear velocity of the platform at the last collision point. " "Only valid after calling [method move_and_slide]." msgstr "" "返回位于最近一次碰撞点的平台线速度。仅在调用 [method move_and_slide] 后有效。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns the travel (position delta) that occurred during the last call to " "[method move_and_slide]." msgstr "返回最近一次调用 [method move_and_slide] 所产生的运动(位置增量)。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns the current real velocity since the last call to [method " "move_and_slide]. For example, when you climb a slope, you will move " "diagonally even though the velocity is horizontal. This method returns the " "diagonal movement, as opposed to [member velocity] which returns the " "requested velocity." msgstr "" "返回最近一次调用 [method move_and_slide] 之后的当前真实速度。例如,即便速度为" "水平方向,爬坡时你也会斜向移动。此方法返回的就是那个斜向移动,与返回请求速度" "的 [member velocity] 相对。" #: doc/classes/CharacterBody2D.xml #, fuzzy msgid "" "Returns a [KinematicCollision2D], which contains information about a " "collision that occurred during the last call to [method move_and_slide]. " "Since the body can collide several times in a single call to [method " "move_and_slide], you must specify the index of the collision in the range 0 " "to ([method get_slide_collision_count] - 1). See also [method " "get_last_slide_collision].\n" "[b]Example:[/b] Iterate through the collisions with a [code]for[/code] " "loop:\n" "[codeblocks]\n" "[gdscript]\n" "for i in get_slide_collision_count():\n" "\tvar collision = get_slide_collision(i)\n" "\tprint(\"Collided with: \", collision.get_collider().name)\n" "[/gdscript]\n" "[csharp]\n" "for (int i = 0; i < GetSlideCollisionCount(); i++)\n" "{\n" "\tKinematicCollision2D collision = GetSlideCollision(i);\n" "\tGD.Print(\"Collided with: \", (collision.GetCollider() as Node).Name);\n" "}\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回 [KinematicCollision2D],包含最近一次调用 [method move_and_slide] 时发生" "的碰撞信息。因为单次调用 [method move_and_slide] 可能发生多次碰撞,所以你必须" "指定碰撞索引,范围为 0 到 ([method get_slide_collision_count] - 1)。\n" "[b]示例:[/b]使用 [code]for[/code] 循环遍历碰撞:\n" "[codeblocks]\n" "[gdscript]\n" "for i in get_slide_collision_count():\n" "var collision = get_slide_collision(i)\n" "print(\"碰到了:\", collision.get_collider().name)\n" "[/gdscript]\n" "[csharp]\n" "for (int i = 0; i < GetSlideCollisionCount(); i++)\n" "{\n" "\tKinematicCollision2D collision = GetSlideCollision(i);\n" "\tGD.Print(\"碰到了:\", (collision.GetCollider() as Node).Name);\n" "}\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns the number of times the body collided and changed direction during " "the last call to [method move_and_slide]." msgstr "" "返回最近一次调用 [method move_and_slide] 时,该物体发生碰撞并改变方向的次数。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns the collision normal of the wall at the last collision point. Only " "valid after calling [method move_and_slide] and when [method is_on_wall] " "returns [code]true[/code].\n" "[b]Warning:[/b] The collision normal is not always the same as the surface " "normal." msgstr "" "返回最近一次碰撞点的墙面法线。只有在调用了 [method move_and_slide] 并且 " "[method is_on_wall] 返回值为 [code]true[/code] 时才有效。\n" "[b]警告:[/b]碰撞法线并不总是与表面法线相同。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns [code]true[/code] if the body collided with the ceiling on the last " "call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The " "[member up_direction] and [member floor_max_angle] are used to determine " "whether a surface is \"ceiling\" or not." msgstr "" "如果最近一次调用 [method move_and_slide] 时,该物体和天花板发生了碰撞,则返" "回 [code]true[/code]。否则返回 [code]false[/code]。决定表面是否为“天花板”的" "是 [member up_direction] 和 [member floor_max_angle]。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns [code]true[/code] if the body collided only with the ceiling on the " "last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. " "The [member up_direction] and [member floor_max_angle] are used to determine " "whether a surface is \"ceiling\" or not." msgstr "" "如果最近一次调用 [method move_and_slide] 时,该物体仅和天花板发生了碰撞,则返" "回 [code]true[/code]。否则返回 [code]false[/code]。决定表面是否为“天花板”的" "是 [member up_direction] 和 [member floor_max_angle]。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns [code]true[/code] if the body collided with the floor on the last " "call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The " "[member up_direction] and [member floor_max_angle] are used to determine " "whether a surface is \"floor\" or not." msgstr "" "如果最近一次调用 [method move_and_slide] 时,该物体和地板发生了碰撞,则返回 " "[code]true[/code]。否则返回 [code]false[/code]。决定表面是否为“地板”的是 " "[member up_direction] 和 [member floor_max_angle]。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns [code]true[/code] if the body collided only with the floor on the " "last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. " "The [member up_direction] and [member floor_max_angle] are used to determine " "whether a surface is \"floor\" or not." msgstr "" "如果最近一次调用 [method move_and_slide] 时,该物体仅和地板发生了碰撞,则返" "回 [code]true[/code]。否则返回 [code]false[/code]。决定表面是否为“地板”的是 " "[member up_direction] 和 [member floor_max_angle]。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns [code]true[/code] if the body collided with a wall on the last call " "of [method move_and_slide]. Otherwise, returns [code]false[/code]. The " "[member up_direction] and [member floor_max_angle] are used to determine " "whether a surface is \"wall\" or not." msgstr "" "如果最近一次调用 [method move_and_slide] 时,该物体和墙壁发生了碰撞,则返回 " "[code]true[/code]。否则返回 [code]false[/code]。决定表面是否为“墙壁”的是 " "[member up_direction] 和 [member floor_max_angle]。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Returns [code]true[/code] if the body collided only with a wall on the last " "call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The " "[member up_direction] and [member floor_max_angle] are used to determine " "whether a surface is \"wall\" or not." msgstr "" "如果最近一次调用 [method move_and_slide] 时,该物体仅和墙壁发生了碰撞,则返" "回 [code]true[/code]。否则返回 [code]false[/code]。决定表面是否为“墙壁”的是 " "[member up_direction] 和 [member floor_max_angle]。" #: doc/classes/CharacterBody2D.xml msgid "" "Moves the body based on [member velocity]. If the body collides with " "another, it will slide along the other body (by default only on floor) " "rather than stop immediately. If the other body is a [CharacterBody2D] or " "[RigidBody2D], it will also be affected by the motion of the other body. You " "can use this to make moving and rotating platforms, or to make nodes push " "other nodes.\n" "This method should be used in [method Node._physics_process] (or in a method " "called by [method Node._physics_process]), as it uses the physics step's " "[code]delta[/code] value automatically in calculations. Otherwise, the " "simulation will run at an incorrect speed.\n" "Modifies [member velocity] if a slide collision occurred. To get the latest " "collision call [method get_last_slide_collision], for detailed information " "about collisions that occurred, use [method get_slide_collision].\n" "When the body touches a moving platform, the platform's velocity is " "automatically added to the body motion. If a collision occurs due to the " "platform's motion, it will always be first in the slide collisions.\n" "The general behavior and available properties change according to the " "[member motion_mode].\n" "Returns [code]true[/code] if the body collided, otherwise, returns " "[code]false[/code]." msgstr "" "根据 [member velocity] 移动该物体。该物体如果与其他物体发生碰撞,则会沿着对方" "滑动(默认只在地板上滑动),不会立即停止移动。如果对方是 [CharacterBody2D] " "或 [RigidBody2D],还会受到对方运动的影响。可以用于制作移动、旋转的平台,也可" "用于推动其他节点。\n" "该方法在计算时会自动使用物理步骤的 [code]delta[/code],所以应当在 [method " "Node._physics_process](或 [method Node._physics_process] 中调用的方法)中使" "用。否则运行仿真会使用错误的速度。\n" "发生滑动碰撞时会改变 [member velocity]。要获取最后一次碰撞,请调用 [method " "get_last_slide_collision],要获取碰撞的更多信息,请使用 [method " "get_slide_collision]。\n" "该物体接触到移动平台时,平台的速度会自动加入到该物体的运动中。平台运动所造成" "的碰撞始终为所有滑动碰撞中的第一个。\n" "通用行为和可用属性会根据 [member motion_mode] 发生改变。\n" "如果该物体发生了碰撞,则返回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "If [code]true[/code], the body will be able to move on the floor only. This " "option avoids to be able to walk on walls, it will however allow to slide " "down along them." msgstr "" "如果为 [code]true[/code],则该物体将只能在地板上移动。此选项能够避免在墙壁上" "行走,但允许沿墙壁向下滑动。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "If [code]false[/code] (by default), the body will move faster on downward " "slopes and slower on upward slopes.\n" "If [code]true[/code], the body will always move at the same speed on the " "ground no matter the slope. Note that you need to use [member " "floor_snap_length] to stick along a downward slope at constant speed." msgstr "" "如果为 [code]false[/code](默认),则该物体在下坡时会移动得更快,在上坡时会移" "动得更慢。\n" "如果为 [code]true[/code],则无论坡度如何,该物体在地面上都会以相同的速度移" "动。请注意,你需要使用 [member floor_snap_length] 以恒定速度粘着至向下的斜" "坡。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Maximum angle (in radians) where a slope is still considered a floor (or a " "ceiling), rather than a wall, when calling [method move_and_slide]. The " "default value equals 45 degrees." msgstr "" "调用 [method move_and_slide] 时,斜坡仍被视为地板(或天花板)而不是墙壁的最大" "角度(单位为弧度)。默认值等于 45 度。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Sets a snapping distance. When set to a value different from [code]0.0[/" "code], the body is kept attached to slopes when calling [method " "move_and_slide]. The snapping vector is determined by the given distance " "along the opposite direction of the [member up_direction].\n" "As long as the snapping vector is in contact with the ground and the body " "moves against [member up_direction], the body will remain attached to the " "surface. Snapping is not applied if the body moves along [member " "up_direction], meaning it contains vertical rising velocity, so it will be " "able to detach from the ground when jumping or when the body is pushed up by " "something. If you want to apply a snap without taking into account the " "velocity, use [method apply_floor_snap]." msgstr "" "设置吸附距离。设为非 [code]0.0[/code] 值时,该物体在调用 [method " "move_and_slide] 时会保持附着到斜坡上。吸附向量会根据给定的距离和 [member " "up_direction] 反方向决定。\n" "只要吸附向量与地面有接触,该物体就会逆 [member up_direction] 移动,保持附着到" "表面。如果该物体是沿着 [member up_direction] 移动的,则不会应用吸附,这样跳跃" "时或者被其他物体推动时就能够不再附着地面。如果想要在应用吸附时无视速度,请使" "用 [method apply_floor_snap]。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "If [code]true[/code], the body will not slide on slopes when calling [method " "move_and_slide] when the body is standing still.\n" "If [code]false[/code], the body will slide on floor's slopes when [member " "velocity] applies a downward force." msgstr "" "如果为 [code]true[/code],则该物体静止时,调用 [method move_and_slide] 不会让" "它在斜坡上发生滑动。\n" "如果为 [code]false[/code],则 [member velocity] 施加向下的力时,该物体会在地" "板的斜坡上发生滑动。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Maximum number of times the body can change direction before it stops when " "calling [method move_and_slide]. Must be greater than zero." msgstr "" "调用 [method move_and_slide] 时,物体在停止之前可以改变方向的最大次数。必须大" "于零。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Sets the motion mode which defines the behavior of [method move_and_slide]." msgstr "设置运动模式,定义 [method move_and_slide] 的行为。" #: doc/classes/CharacterBody2D.xml msgid "" "Collision layers that will be included for detecting floor bodies that will " "act as moving platforms to be followed by the [CharacterBody2D]. By default, " "all floor bodies are detected and propagate their velocity." msgstr "" "用于检测地板物体的碰撞层,该地板物体会被用作 [CharacterBody2D] 所要跟随的移动" "平台。默认情况下会检测所有地板物体并传播其速度。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Sets the behavior to apply when you leave a moving platform. By default, to " "be physically accurate, when you leave the last platform velocity is applied." msgstr "" "设置离开移动平台时要应用的行为。为了达到物理准确,默认会应用你离开时最后的平" "台速度。" #: doc/classes/CharacterBody2D.xml msgid "" "Collision layers that will be included for detecting wall bodies that will " "act as moving platforms to be followed by the [CharacterBody2D]. By default, " "all wall bodies are ignored." msgstr "" "用于检测墙壁物体的碰撞层,该墙壁物体会被用作 [CharacterBody2D] 所要跟随的移动" "平台。默认情况下会忽略所有墙壁物体。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Extra margin used for collision recovery when calling [method " "move_and_slide].\n" "If the body is at least this close to another body, it will consider them to " "be colliding and will be pushed away before performing the actual motion.\n" "A higher value means it's more flexible for detecting collision, which helps " "with consistently detecting walls and floors.\n" "A lower value forces the collision algorithm to use more exact detection, so " "it can be used in cases that specifically require precision, e.g at very low " "scale to avoid visible jittering, or for stability with a stack of character " "bodies." msgstr "" "额外边距,用于在调用 [method move_and_slide] 时进行碰撞恢复。\n" "如果该物体与另一个物体至少有这么近,就会认为它们正在碰撞,并在执行实际运动前" "推开。\n" "值较高时,对碰撞的检测会更加灵活,有助于持续检测墙壁和地板。\n" "值较低时,会强制碰撞算法进行更精确的检测,因此可以在特别需要精度的情况下使" "用,例如在非常低的缩放下避免可见的抖动,或者为了让一堆角色物体的达到稳定。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "If [code]true[/code], during a jump against the ceiling, the body will " "slide, if [code]false[/code] it will be stopped and will fall vertically." msgstr "" "如果为 [code]true[/code],则该物体在跳到天花板时会滑动;如果为 [code]false[/" "code],则会停止并垂直下落。" #: doc/classes/CharacterBody2D.xml msgid "" "Vector pointing upwards, used to determine what is a wall and what is a " "floor (or a ceiling) when calling [method move_and_slide]. Defaults to " "[constant Vector2.UP]. As the vector will be normalized it can't be equal to " "[constant Vector2.ZERO], if you want all collisions to be reported as walls, " "consider using [constant MOTION_MODE_FLOATING] as [member motion_mode]." msgstr "" "指向上方的向量,用于在调用 [method move_and_slide] 时决定什么是墙壁、什么是地" "板(或者天花板)。默认为 [constant Vector2.UP]。因为会对该向量进行归一化,所" "以不能等于 [constant Vector2.ZERO],如果你想要让所有碰撞都被报告为墙壁,请考" "虑使用 [constant MOTION_MODE_FLOATING] 作为 [member motion_mode]。" #: doc/classes/CharacterBody2D.xml #, fuzzy msgid "" "Current velocity vector in pixels per second, used and modified during calls " "to [method move_and_slide].\n" "[b]Note:[/b] A common mistake is setting this property to the desired " "velocity multiplied by [code]delta[/code], which produces a motion vector in " "pixels." msgstr "" "当前的速度向量,单位为像素每秒,会在调用 [method move_and_slide] 时使用和修" "改。\n" "不应将该属性设置为乘以 [code]delta[/code] 的值,因为 [method move_and_slide] " "内部会乘。否则运行仿真会使用错误的速度。" #: doc/classes/CharacterBody2D.xml msgid "" "Minimum angle (in radians) where the body is allowed to slide when it " "encounters a wall. The default value equals 15 degrees. This property only " "affects movement when [member motion_mode] is [constant " "MOTION_MODE_FLOATING]." msgstr "" "物体遇到墙面时允许发生滑动的最小角度(单位为弧度)。默认值等于 15 度。只有在 " "[member motion_mode] 为 [constant MOTION_MODE_FLOATING] 时该属性才会影响运" "动。" #: doc/classes/CharacterBody2D.xml msgid "" "Apply when notions of walls, ceiling and floor are relevant. In this mode " "the body motion will react to slopes (acceleration/slowdown). This mode is " "suitable for sided games like platformers." msgstr "" "请在墙壁、天花板、地板等概念有意义时应用。在该模式下,物体运动会对斜坡作出反" "应(加减速)。该模式适合平台跳跃等侧视角游戏。" #: doc/classes/CharacterBody2D.xml msgid "" "Apply when there is no notion of floor or ceiling. All collisions will be " "reported as [code]on_wall[/code]. In this mode, when you slide, the speed " "will always be constant. This mode is suitable for top-down games." msgstr "" "请在没有地板和天花板等概念时应用。所有碰撞都会作为 [code]on_wall[/code](撞" "墙)汇报。在该模式下,滑动时的速度恒定。该模式适合俯视角游戏。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Add the last platform velocity to the [member velocity] when you leave a " "moving platform." msgstr "离开移动平台时,将最后的平台速度添加到 [member velocity] 中。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "" "Add the last platform velocity to the [member velocity] when you leave a " "moving platform, but any downward motion is ignored. It's useful to keep " "full jump height even when the platform is moving down." msgstr "" "离开移动平台时,将最后的平台速度添加到 [member velocity] 中,但是忽略向下的运" "动。如果想要在平台向下移动时保持完整的跳跃高度,就非常有用。" #: doc/classes/CharacterBody2D.xml doc/classes/CharacterBody3D.xml msgid "Do nothing when leaving a platform." msgstr "离开平台时什么也不做。" #: doc/classes/CharacterBody3D.xml msgid "A 3D physics body specialized for characters moved by script." msgstr "专门用于通过脚本移动的角色的 3D 物理物体。" #: doc/classes/CharacterBody3D.xml msgid "" "[CharacterBody3D] is a specialized class for physics bodies that are meant " "to be user-controlled. They are not affected by physics at all, but they " "affect other physics bodies in their path. They are mainly used to provide " "high-level API to move objects with wall and slope detection ([method " "move_and_slide] method) in addition to the general collision detection " "provided by [method PhysicsBody3D.move_and_collide]. This makes it useful " "for highly configurable physics bodies that must move in specific ways and " "collide with the world, as is often the case with user-controlled " "characters.\n" "For game objects that don't require complex movement or collision detection, " "such as moving platforms, [AnimatableBody3D] is simpler to configure." msgstr "" "[CharacterBody3D] 是针对用户控制的物理体的特化类。它们不会受到物理的影响,但" "会影响路径上的其他物理体。除了由 [method PhysicsBody3D.move_and_collide] 提供" "的常见的碰撞检测之外,它们主要用于提供移动对象的高阶 API,能够检测墙壁和斜坡" "([method move_and_slide] 方法)。因此适用于需要高度可配置的物理体,因为通常" "是用户控制的角色,所以必须按照特定的方式移动、与世界发生碰撞。\n" "如果是移动平台等不需要复杂移动和碰撞检测的游戏对象,[AnimatableBody3D] 更方便" "配置。" #: doc/classes/CharacterBody3D.xml msgid "" "Returns the floor's collision angle at the last collision point according to " "[param up_direction], which is [constant Vector3.UP] by default. This value " "is always positive and only valid after calling [method move_and_slide] and " "when [method is_on_floor] returns [code]true[/code]." msgstr "" "返回地板在最近一次碰撞点的碰撞角度,依据为 [param up_direction],默认为 " "[constant Vector3.UP]。该值始终为正数,只有在调用了 [method move_and_slide] " "并且 [method is_on_floor] 返回值为 [code]true[/code] 时才有效。" #: doc/classes/CharacterBody3D.xml msgid "" "Returns the last motion applied to the [CharacterBody3D] during the last " "call to [method move_and_slide]. The movement can be split into multiple " "motions when sliding occurs, and this method return the last one, which is " "useful to retrieve the current direction of the movement." msgstr "" "返回最近一次调用 [method move_and_slide] 时施加给该 [CharacterBody3D] 的最后" "一次运动。如果发生了滑动,则该移动可以拆分为多次运动,此方法返回的是最后一" "次,可用于获取当前的移动方向。" #: doc/classes/CharacterBody3D.xml #, fuzzy msgid "" "Returns a [KinematicCollision3D] if a collision occurred. The returned value " "contains information about the latest collision that occurred during the " "last call to [method move_and_slide]. Returns [code]null[/code] if no " "collision occurred. See also [method get_slide_collision]." msgstr "" "返回 [KinematicCollision3D],包含最近一次调用 [method move_and_slide] 时发生" "的最后一次运动的相关信息。" #: doc/classes/CharacterBody3D.xml msgid "" "Returns the angular velocity of the platform at the last collision point. " "Only valid after calling [method move_and_slide]." msgstr "" "返回位于最近一次碰撞点的平台角速度。仅在调用 [method move_and_slide] 后有效。" #: doc/classes/CharacterBody3D.xml #, fuzzy msgid "" "Returns a [KinematicCollision3D], which contains information about a " "collision that occurred during the last call to [method move_and_slide]. " "Since the body can collide several times in a single call to [method " "move_and_slide], you must specify the index of the collision in the range 0 " "to ([method get_slide_collision_count] - 1). See also [method " "get_last_slide_collision]." msgstr "" "返回 [KinematicCollision3D],包含最近一次调用 [method move_and_slide] 时发生" "的碰撞信息。因为单次调用 [method move_and_slide] 可能发生多次碰撞,所以你必须" "指定碰撞索引,范围为 0 到 ([method get_slide_collision_count] - 1)。" #: doc/classes/CharacterBody3D.xml msgid "" "Moves the body based on [member velocity]. If the body collides with " "another, it will slide along the other body rather than stop immediately. If " "the other body is a [CharacterBody3D] or [RigidBody3D], it will also be " "affected by the motion of the other body. You can use this to make moving " "and rotating platforms, or to make nodes push other nodes.\n" "This method should be used in [method Node._physics_process] (or in a method " "called by [method Node._physics_process]), as it uses the physics step's " "[code]delta[/code] value automatically in calculations. Otherwise, the " "simulation will run at an incorrect speed.\n" "Modifies [member velocity] if a slide collision occurred. To get the latest " "collision call [method get_last_slide_collision], for more detailed " "information about collisions that occurred, use [method " "get_slide_collision].\n" "When the body touches a moving platform, the platform's velocity is " "automatically added to the body motion. If a collision occurs due to the " "platform's motion, it will always be first in the slide collisions.\n" "Returns [code]true[/code] if the body collided, otherwise, returns " "[code]false[/code]." msgstr "" "根据 [member velocity] 移动该物体。该物体如果与其他物体发生碰撞,则会沿着对方" "滑动,不会立即停止移动。如果对方是 [CharacterBody3D] 或 [RigidBody3D],还会受" "到对方运动的影响。可以用于制作移动、旋转的平台,也可用于推动其他节点。\n" "该方法在计算时会自动使用物理步骤的 [code]delta[/code],所以应当在 [method " "Node._physics_process](或 [method Node._physics_process] 中调用的方法)中使" "用。否则运行仿真会使用错误的速度。\n" "发生滑动碰撞时会改变 [member velocity]。要获取最后一次碰撞,请调用 [method " "get_last_slide_collision],要获取碰撞的更多信息,请使用 [method " "get_slide_collision]。\n" "该物体接触到移动平台时,平台的速度会自动加入到该物体的运动中。平台运动所造成" "的碰撞始终为所有滑动碰撞中的第一个。\n" "如果该物体发生了碰撞,则返回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/CharacterBody3D.xml msgid "" "Collision layers that will be included for detecting floor bodies that will " "act as moving platforms to be followed by the [CharacterBody3D]. By default, " "all floor bodies are detected and propagate their velocity." msgstr "" "用于检测地板物体的碰撞层,该地板物体会被用作 [CharacterBody3D] 所要跟随的移动" "平台。默认情况下会检测所有地板物体并传播其速度。" #: doc/classes/CharacterBody3D.xml msgid "" "Collision layers that will be included for detecting wall bodies that will " "act as moving platforms to be followed by the [CharacterBody3D]. By default, " "all wall bodies are ignored." msgstr "" "用于检测墙壁物体的碰撞层,该墙壁物体会被用作 [CharacterBody3D] 所要跟随的移动" "平台。默认情况下会忽略所有墙壁物体。" #: doc/classes/CharacterBody3D.xml msgid "" "Vector pointing upwards, used to determine what is a wall and what is a " "floor (or a ceiling) when calling [method move_and_slide]. Defaults to " "[constant Vector3.UP]. As the vector will be normalized it can't be equal to " "[constant Vector3.ZERO], if you want all collisions to be reported as walls, " "consider using [constant MOTION_MODE_FLOATING] as [member motion_mode]." msgstr "" "指向上方的向量,用于在调用 [method move_and_slide] 时决定什么是墙壁、什么是地" "板(或者天花板)。默认为 [constant Vector3.UP]。因为会对该向量进行归一化,所" "以不能等于 [constant Vector3.ZERO],如果你想要让所有碰撞都被报告为墙壁,请考" "虑使用 [constant MOTION_MODE_FLOATING] 作为 [member motion_mode]。" #: doc/classes/CharacterBody3D.xml #, fuzzy msgid "" "Current velocity vector (typically meters per second), used and modified " "during calls to [method move_and_slide].\n" "[b]Note:[/b] A common mistake is setting this property to the desired " "velocity multiplied by [code]delta[/code], which produces a motion vector " "(typically in meters)." msgstr "" "当前的速度向量(单位通常为米每秒),会在调用 [method move_and_slide] 时使用和" "修改。\n" "不应将该属性设置为乘以 [code]delta[/code] 的值,因为 [method move_and_slide] " "内部会乘。否则运行仿真会使用错误的速度。" #: doc/classes/CharacterBody3D.xml msgid "" "Minimum angle (in radians) where the body is allowed to slide when it " "encounters a wall. The default value equals 15 degrees. When [member " "motion_mode] is [constant MOTION_MODE_GROUNDED], it only affects movement if " "[member floor_block_on_wall] is [code]true[/code]." msgstr "" "物体遇到墙面时允许发生滑动的最小角度(单位为弧度)。默认值等于 15 度。当 " "[member motion_mode] 为 [constant MOTION_MODE_GROUNDED] 时,只有 [member " "floor_block_on_wall] 为 [code]true[/code] 才会影响运动。" #: doc/classes/CharacterBody3D.xml msgid "" "Apply when notions of walls, ceiling and floor are relevant. In this mode " "the body motion will react to slopes (acceleration/slowdown). This mode is " "suitable for grounded games like platformers." msgstr "" "请在墙壁、天花板、地板等概念有意义时应用。在该模式下,物体运动会对斜坡作出反" "应(加减速)。该模式适合平台跳跃等地面游戏。" #: doc/classes/CharacterBody3D.xml msgid "" "Apply when there is no notion of floor or ceiling. All collisions will be " "reported as [code]on_wall[/code]. In this mode, when you slide, the speed " "will always be constant. This mode is suitable for games without ground like " "space games." msgstr "" "请在没有地板和天花板等概念时应用。所有碰撞都会作为 [code]on_wall[/code](撞" "墙)汇报。在该模式下,滑动时的速度恒定。该模式适合太空游戏等没有地面的游戏。" #: doc/classes/CharFXTransform.xml msgid "" "Controls how an individual character will be displayed in a [RichTextEffect]." msgstr "控制单个字符在 [RichTextEffect] 中的显示方式。" #: doc/classes/CharFXTransform.xml msgid "" "By setting various properties on this object, you can control how individual " "characters will be displayed in a [RichTextEffect]." msgstr "" "通过在此对象上设置各种属性,可以控制单个字符在 [RichTextEffect] 中的显示方" "式。" #: doc/classes/CharFXTransform.xml doc/classes/RichTextEffect.xml #: doc/classes/RichTextLabel.xml msgid "BBCode in RichTextLabel" msgstr "RichTextLabel 中的 BBCode" #: doc/classes/CharFXTransform.xml msgid "The color the character will be drawn with." msgstr "绘制字符所用的颜色。" #: doc/classes/CharFXTransform.xml msgid "" "The time elapsed since the [RichTextLabel] was added to the scene tree (in " "seconds). Time stops when the [RichTextLabel] is paused (see [member " "Node.process_mode]). Resets when the text in the [RichTextLabel] is " "changed.\n" "[b]Note:[/b] Time still passes while the [RichTextLabel] is hidden." msgstr "" "自 [RichTextLabel] 被添加到场景树以来经过的时间(单位:秒)。时间在 " "[RichTextLabel] 暂停时停止(参见 [member Node.process_mode])。在 " "[RichTextLabel] 中的文本改变时重置。\n" "[b]注意:[/b]当 [RichTextLabel] 被隐藏时,时间仍在流逝。" #: doc/classes/CharFXTransform.xml msgid "" "Contains the arguments passed in the opening BBCode tag. By default, " "arguments are strings; if their contents match a type such as [bool], [int] " "or [float], they will be converted automatically. Color codes in the form " "[code]#rrggbb[/code] or [code]#rgb[/code] will be converted to an opaque " "[Color]. String arguments may not contain spaces, even if they're quoted. If " "present, quotes will also be present in the final string.\n" "For example, the opening BBCode tag [code][example foo=hello bar=true baz=42 " "color=#ffffff][/code] will map to the following [Dictionary]:\n" "[codeblock]\n" "{\"foo\": \"hello\", \"bar\": true, \"baz\": 42, \"color\": Color(1, 1, 1, " "1)}\n" "[/codeblock]" msgstr "" "包含在开头的 BBCode 标记中传递的参数。默认情况下,参数是字符串。如果它们的内" "容与 [bool]、[int]、[float] 之类的类型匹配,它们将被自动转换。格式为 " "[code]#rrggbb[/code] 或 [code]#rgb[/code] 的颜色代码将转换为不透明的 " "[Color]。字符串参数即使使用引号也不能包含空格。如果存在,引号也将出现在最终字" "符串中。\n" "例如,开头的 BBCode 标签 [code][example foo = hello bar = true baz = 42 " "color =#ffffff][/code] 将映射到以下 [Dictionary]:\n" "[codeblock]\n" "{\"foo\": \"hello\", \"bar\": true, \"baz\": 42, \"color\": Color(1, 1, 1, " "1)}\n" "[/codeblock]" #: doc/classes/CharFXTransform.xml msgid "" "[TextServer] RID of the font used to render glyph, this value can be used " "with [code]TextServer.font_*[/code] methods to retrieve font information.\n" "[b]Note:[/b] Read-only. Setting this property won't affect drawing." msgstr "" "渲染字形所用字体的 [TextServer] RID,该值可以通过 [code]TextServer.font_*[/" "code] 方法来检索字体信息。\n" "[b]注意:[/b]只读。设置该属性不影响绘制。" #: doc/classes/CharFXTransform.xml msgid "" "Number of glyphs in the grapheme cluster. This value is set in the first " "glyph of a cluster.\n" "[b]Note:[/b] Read-only. Setting this property won't affect drawing." msgstr "" "字素簇中的字形数量。该值在簇的第一个字形中设置。\n" "[b]注意:[/b]只读。设置该属性不会影响绘制。" #: doc/classes/CharFXTransform.xml msgid "" "Glyph flags. See [enum TextServer.GraphemeFlag] for more info.\n" "[b]Note:[/b] Read-only. Setting this property won't affect drawing." msgstr "" "字形标志。详见 [enum TextServer.GraphemeFlag]。\n" "[b]注意:[/b]只读。设置该属性不会影响绘制。" #: doc/classes/CharFXTransform.xml msgid "" "Glyph index specific to the [member font]. If you want to replace this " "glyph, use [method TextServer.font_get_glyph_index] with [member font] to " "get a new glyph index for a single character." msgstr "" "特定于 [member font] 的字形索引。如果你想替换该字形,请使用 [member font] 调" "用 [method TextServer.font_get_glyph_index] 获取单个字符的新字形索引。" #: doc/classes/CharFXTransform.xml msgid "The position offset the character will be drawn with (in pixels)." msgstr "绘制字符的位置偏移量(单位:像素)。" #: doc/classes/CharFXTransform.xml msgid "" "If [code]true[/code], FX transform is called for outline drawing.\n" "[b]Note:[/b] Read-only. Setting this property won't affect drawing." msgstr "" "如果为 [code]true[/code],则调用 FX 变换进行轮廓绘制。\n" "[b]注意:[/b]只读。设置该属性不会影响绘制。" #: doc/classes/CharFXTransform.xml msgid "" "Absolute character range in the string, corresponding to the glyph.\n" "[b]Note:[/b] Read-only. Setting this property won't affect drawing." msgstr "" "该字符串中的绝对字符范围,对应于字形。\n" "[b]注意:[/b]只读。设置该属性不会影响绘制。" #: doc/classes/CharFXTransform.xml msgid "" "The character offset of the glyph, relative to the current [RichTextEffect] " "custom block.\n" "[b]Note:[/b] Read-only. Setting this property won't affect drawing." msgstr "" "该字形的字符偏移量,相对于当前 [RichTextEffect] 自定义块。\n" "[b]注意:[/b]只读。设置该属性不会影响绘制。" #: doc/classes/CharFXTransform.xml msgid "" "The current transform of the current glyph. It can be overridden (for " "example, by driving the position and rotation from a curve). You can also " "alter the existing value to apply transforms on top of other effects." msgstr "" "当前字形的当前变换。可以被覆盖(例如根据曲线来确定位置和旋转)。你还可以修改" "现有值,在其他效果的基础上应用变换。" #: doc/classes/CharFXTransform.xml msgid "" "If [code]true[/code], the character will be drawn. If [code]false[/code], " "the character will be hidden. Characters around hidden characters will " "reflow to take the space of hidden characters. If this is not desired, set " "their [member color] to [code]Color(1, 1, 1, 0)[/code] instead." msgstr "" "如果为 [code]true[/code],将绘制字符。如果为 [code]false[/code],则隐藏字符。" "隐藏字符周围的字符将回流以占用隐藏字符的空间。如果不希望这样做,可以将它们的 " "[member color] 设置为[code]Color(1, 1, 1, 0)[/code]。" #: doc/classes/CheckBox.xml doc/classes/CheckButton.xml msgid "A button that represents a binary choice." msgstr "代表二元选项的按钮。" #: doc/classes/CheckBox.xml msgid "" "[CheckBox] allows the user to choose one of only two possible options. It's " "similar to [CheckButton] in functionality, but it has a different " "appearance. To follow established UX patterns, it's recommended to use " "[CheckBox] when toggling it has [b]no[/b] immediate effect on something. For " "example, it could be used when toggling it will only do something once a " "confirmation button is pressed.\n" "See also [BaseButton] which contains common properties and methods " "associated with this node.\n" "When [member BaseButton.button_group] specifies a [ButtonGroup], [CheckBox] " "changes its appearance to that of a radio button and uses the various " "[code]radio_*[/code] theme properties." msgstr "" "[CheckBox] 允许用户在仅有的两个可能的选项中选择一个。它在功能上类似于 " "[CheckButton],但外观不同。为了遵循既定的 UX 模式,建议在切换而[b]不会[/b]立" "即对某些内容产生影响时使用 [CheckBox]。例如,切换后只会在按下确认按钮后才执行" "某些操作时,就可以使用它。\n" "另见 [BaseButton],其中包含与该节点相关的通用属性和方法。\n" "当 [member BaseButton.button_group] 指定 [ButtonGroup] 时,[CheckBox] 的外观" "将变为单选按钮,并使用各种 [code]radio_*[/code] 主题属性。" #: doc/classes/CheckBox.xml doc/classes/CheckButton.xml msgid "The color of the checked icon when the checkbox is pressed." msgstr "勾选图标的颜色,该 [CheckBox] 被按下时显示。" #: doc/classes/CheckBox.xml doc/classes/CheckButton.xml msgid "The color of the unchecked icon when the checkbox is not pressed." msgstr "未勾选图标的颜色,该 [CheckBox] 未被按下时显示。" #: doc/classes/CheckBox.xml msgid "The vertical offset used when rendering the check icons (in pixels)." msgstr "渲染勾选图标时使用的垂直偏移量(单位:像素)。" #: doc/classes/CheckBox.xml msgid "The check icon to display when the [CheckBox] is checked." msgstr "勾选图标,该 [CheckBox] 被勾选时显示。" #: doc/classes/CheckBox.xml msgid "" "The check icon to display when the [CheckBox] is checked and is disabled." msgstr "勾选图标,该 [CheckBox] 被勾选且被禁用时显示。" #: doc/classes/CheckBox.xml msgid "" "The check icon to display when the [CheckBox] is configured as a radio " "button and is checked." msgstr "勾选图标,该 [CheckBox] 被配置为单选按钮、被勾选时显示。" #: doc/classes/CheckBox.xml msgid "" "The check icon to display when the [CheckBox] is configured as a radio " "button, is disabled, and is unchecked." msgstr "勾选图标,该 [CheckBox] 被配置为单选按钮、被禁用且未勾选时显示。" #: doc/classes/CheckBox.xml msgid "" "The check icon to display when the [CheckBox] is configured as a radio " "button and is unchecked." msgstr "勾选图标,该 [CheckBox] 被配置为单选按钮、未勾选时显示。" #: doc/classes/CheckBox.xml msgid "The check icon to display when the [CheckBox] is unchecked." msgstr "勾选图标,该 [CheckBox] 未勾选时显示。" #: doc/classes/CheckBox.xml msgid "" "The check icon to display when the [CheckBox] is unchecked and is disabled." msgstr "勾选图标,该 [CheckBox] 未勾选且被禁用时显示。" #: doc/classes/CheckButton.xml msgid "" "[CheckButton] is a toggle button displayed as a check field. It's similar to " "[CheckBox] in functionality, but it has a different appearance. To follow " "established UX patterns, it's recommended to use [CheckButton] when toggling " "it has an [b]immediate[/b] effect on something. For example, it can be used " "when pressing it shows or hides advanced settings, without asking the user " "to confirm this action.\n" "See also [BaseButton] which contains common properties and methods " "associated with this node." msgstr "" "[CheckButton] 是一种显示为勾选字段的切换按钮。它在功能上类似于 [CheckBox],但" "外观不同。为了遵循既定的 UX 模式,建议在切换后会[b]立即[/b]生效时使用 " "[CheckButton]。例如,如果切换后立即启用/禁用设置而无需用户按下确认按钮时,就" "可以使用它。\n" "另见 [BaseButton],其中包含与该节点相关的通用属性和方法。" #: doc/classes/CheckButton.xml msgid "The vertical offset used when rendering the toggle icons (in pixels)." msgstr "渲染切换图标时使用的垂直偏移量(单位:像素)。" #: doc/classes/CheckButton.xml msgid "" "The icon to display when the [CheckButton] is checked (for left-to-right " "layouts)." msgstr "切换图标,该 [CheckButton] 被勾选时显示(用于从左至右布局)。" #: doc/classes/CheckButton.xml msgid "" "The icon to display when the [CheckButton] is checked and disabled (for left-" "to-right layouts)." msgstr "切换图标,该 [CheckButton] 被勾选且被禁用时显示(用于从左至右布局)。" #: doc/classes/CheckButton.xml msgid "" "The icon to display when the [CheckButton] is checked and disabled (for " "right-to-left layouts)." msgstr "切换图标,该 [CheckButton] 被勾选且被禁用时显示(用于从右至左布局)。" #: doc/classes/CheckButton.xml msgid "" "The icon to display when the [CheckButton] is checked (for right-to-left " "layouts)." msgstr "切换图标,该 [CheckButton] 被勾选时显示(用于从右至左布局)。" #: doc/classes/CheckButton.xml msgid "" "The icon to display when the [CheckButton] is unchecked (for left-to-right " "layouts)." msgstr "切换图标,该 [CheckButton] 未勾选时显示(用于从左至右布局)。" #: doc/classes/CheckButton.xml msgid "" "The icon to display when the [CheckButton] is unchecked and disabled (for " "left-to-right layouts)." msgstr "切换图标,该 [CheckButton] 未勾选且被禁用时显示(用于从左至右布局)。" #: doc/classes/CheckButton.xml msgid "" "The icon to display when the [CheckButton] is unchecked and disabled (for " "right-to-left layouts)." msgstr "切换图标,该 [CheckButton] 未勾选且被禁用时显示(用于从右至左布局)。" #: doc/classes/CheckButton.xml msgid "" "The icon to display when the [CheckButton] is unchecked (for right-to-left " "layouts)." msgstr "切换图标,该 [CheckButton] 未勾选时显示(用于从右至左布局)。" #: doc/classes/CircleShape2D.xml msgid "A 2D circle shape used for physics collision." msgstr "2D 圆形,旨在用于物理学。" #: doc/classes/CircleShape2D.xml msgid "" "A 2D circle shape, intended for use in physics. Usually used to provide a " "shape for a [CollisionShape2D].\n" "[b]Performance:[/b] [CircleShape2D] is fast to check collisions against. It " "is faster than [RectangleShape2D] and [CapsuleShape2D]." msgstr "" "2D 圆形,旨在用于物理学。通常用于为 [CollisionShape2D] 提供形状。\n" "[b]性能:[/b][CircleShape2D] 可以快速检测碰撞。比 [RectangleShape2D] 和 " "[CapsuleShape2D] 快。" #: doc/classes/CircleShape2D.xml msgid "The circle's radius." msgstr "圆的半径。" #: doc/classes/ClassDB.xml msgid "A class information repository." msgstr "类信息的存储库。" #: doc/classes/ClassDB.xml msgid "" "Provides access to metadata stored for every available engine class.\n" "[b]Note:[/b] Script-defined classes with [code]class_name[/code] are not " "part of [ClassDB], so they will not return reflection data such as a method " "or property list. However, [GDExtension]-defined classes [i]are[/i] part of " "[ClassDB], so they will return reflection data." msgstr "" "提供对引擎中所有可用类的元数据的访问。\n" "[b]注意:[/b]脚本使用 [code]class_name[/code] 定义的类并不属于 [ClassDB],因" "此不会返回方法列表、属性列表等反射数据。不过 [GDExtension] 定义的类[i]属于[/" "i] [ClassDB],因此会返回反射数据。" #: doc/classes/ClassDB.xml msgid "" "Returns [code]true[/code] if objects can be instantiated from the specified " "[param class], otherwise returns [code]false[/code]." msgstr "" "如果可以从指定的 [param class] 实例化对象,则返回 [code]true[/code],否则返" "回 [code]false[/code]。" #: doc/classes/ClassDB.xml msgid "Calls a static method on a class." msgstr "调用类的静态方法。" #: doc/classes/ClassDB.xml msgid "Returns whether the specified [param class] is available or not." msgstr "返回 [param class] 类是否可用。" #: doc/classes/ClassDB.xml msgid "Returns the API type of the specified [param class]." msgstr "返回 [param class] 类的 API 类型。" #: doc/classes/ClassDB.xml msgid "" "Returns an array with all the keys in [param enum] of [param class] or its " "ancestry." msgstr "" "返回一个数组,其中包含 [param class] 或其祖先的 [param enum] 中的所有键。" #: doc/classes/ClassDB.xml msgid "Returns an array with all the enums of [param class] or its ancestry." msgstr "返回一个数组,其中包含 [param class] 或其祖先的所有枚举。" #: doc/classes/ClassDB.xml msgid "" "Returns the value of the integer constant [param name] of [param class] or " "its ancestry. Always returns 0 when the constant could not be found." msgstr "" "返回 [param class] 或其父级的整数常量值 [param name]。如果找不到该常量,则总" "是返回0。" #: doc/classes/ClassDB.xml msgid "" "Returns which enum the integer constant [param name] of [param class] or its " "ancestry belongs to." msgstr "返回 [param class] 或其祖先的整数常量 [param name] 所属的枚举。" #: doc/classes/ClassDB.xml msgid "" "Returns an array with the names all the integer constants of [param class] " "or its ancestry." msgstr "返回包含 [param class] 或其父级全部整数常量的名称数组。" #: doc/classes/ClassDB.xml msgid "" "Returns the number of arguments of the method [param method] of [param " "class] or its ancestry if [param no_inheritance] is [code]false[/code]." msgstr "" "如果 [param no_inheritance] 为 [code]false[/code],则返回 [param class] 或其" "祖先的方法 [param method] 的参数数量。" #: doc/classes/ClassDB.xml msgid "" "Returns an array with all the methods of [param class] or its ancestry if " "[param no_inheritance] is [code]false[/code]. Every element of the array is " "a [Dictionary] with the following keys: [code]args[/code], " "[code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/" "code], [code]return: (class_name, hint, hint_string, name, type, usage)[/" "code].\n" "[b]Note:[/b] In exported release builds the debug info is not available, so " "the returned dictionaries will contain only method names." msgstr "" "如果 [param no_inheritance] 为 [code]false[/code],则返回包含 [param class] " "或其祖先的所有方法的数组。数组的每个元素都是一个 [Dictionary],包含以下键:" "[code]args[/code]、[code]default_args[/code]、[code]flags[/code]、[code]id[/" "code]、[code]name[/code]、[code]return: (class_name, hint, hint_string, " "name, type, usage)[/code]。\n" "[b]注意:[/b]在导出的发布版本中,调试信息不可用,因此返回的字典将仅包含方法名" "称。" #: doc/classes/ClassDB.xml msgid "" "Returns the value of [param property] of [param object] or its ancestry." msgstr "返回 [param object] 或其父级 [param property] 的属性值。" #: doc/classes/ClassDB.xml msgid "" "Returns the default value of [param property] of [param class] or its " "ancestor classes." msgstr "返回 [param class] 或其祖先类的 [param property] 的默认值。" #: doc/classes/ClassDB.xml msgid "Returns the getter method name of [param property] of [param class]." msgstr "返回 [param class] 类中 [param property] 属性的 getter 方法名。" #: doc/classes/ClassDB.xml msgid "" "Returns an array with all the properties of [param class] or its ancestry if " "[param no_inheritance] is [code]false[/code]." msgstr "" "如果 [param no_inheritance] 为 [code]false[/code],则返回包含 [param class] " "或其祖先的所有属性的数组。" #: doc/classes/ClassDB.xml msgid "Returns the setter method name of [param property] of [param class]." msgstr "返回 [param class] 类中 [param property] 属性的 setter 方法名。" #: doc/classes/ClassDB.xml msgid "" "Returns the [param signal] data of [param class] or its ancestry. The " "returned value is a [Dictionary] with the following keys: [code]args[/code], " "[code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/" "code], [code]return: (class_name, hint, hint_string, name, type, usage)[/" "code]." msgstr "" "返回 [param class] 或其祖先的 [param signal] 数据。返回值是具有以下键的 " "[Dictionary]:[code]args[/code]、[code]default_args[/code]、[code]flags[/" "code]、[code]id[/code]、[code]name[/code]、[code]return: (class_name, hint, " "hint_string, name, type, usage)[/code]。" #: doc/classes/ClassDB.xml msgid "" "Returns an array with all the signals of [param class] or its ancestry if " "[param no_inheritance] is [code]false[/code]. Every element of the array is " "a [Dictionary] as described in [method class_get_signal]." msgstr "" "如果 [param no_inheritance] 为 [code]false[/code],则返回包含 [param class] " "或其祖先的所有信号的数组。数组的每个元素都是一个如 [method class_get_signal] " "中所述的 [Dictionary]。" #: doc/classes/ClassDB.xml msgid "" "Returns whether [param class] or its ancestry has an enum called [param " "name] or not." msgstr "返回类 [param class] 或其祖类是否有名为 [param name] 的枚举。" #: doc/classes/ClassDB.xml msgid "" "Returns whether [param class] or its ancestry has an integer constant called " "[param name] or not." msgstr "返回类 [param class] 或其祖类是否有名为 [param name] 的整数常量。" #: doc/classes/ClassDB.xml msgid "" "Returns whether [param class] (or its ancestry if [param no_inheritance] is " "[code]false[/code]) has a method called [param method] or not." msgstr "" "返回类 [param class] 是否有名为 [param method] 的方法(如果 [param " "no_inheritance] 为 [code]false[/code] 则还会检查其祖类)。" #: doc/classes/ClassDB.xml msgid "" "Returns whether [param class] or its ancestry has a signal called [param " "signal] or not." msgstr "返回类 [param class] 或其祖类是否有名为 [param signal] 的信号。" #: doc/classes/ClassDB.xml msgid "Sets [param property] value of [param object] to [param value]." msgstr "将对象 [param object] 的 [param property] 属性值设置为 [param value]。" #: doc/classes/ClassDB.xml msgid "" "Returns the names of all engine classes available.\n" "[b]Note:[/b] Script-defined classes with [code]class_name[/code] are not " "included in this list. Use [method ProjectSettings.get_global_class_list] to " "get a list of script-defined classes instead." msgstr "" "返回引擎中所有可用类的名称。\n" "[b]注意:[/b]列表中不包含脚本使用 [code]class_name[/code] 定义的类。请使用 " "[method ProjectSettings.get_global_class_list] 获取脚本定义的类的列表。" #: doc/classes/ClassDB.xml msgid "" "Returns the names of all engine classes that directly or indirectly inherit " "from [param class]." msgstr "返回引擎中所有直接或间接继承自 [param class] 的类的名称。" #: doc/classes/ClassDB.xml msgid "Returns the parent class of [param class]." msgstr "返回 [param class] 的父类。" #: doc/classes/ClassDB.xml msgid "Creates an instance of [param class]." msgstr "创建 [param class] 的实例。" #: doc/classes/ClassDB.xml msgid "Returns whether this [param class] is enabled or not." msgstr "返回这个 [param class] 是否已启用。" #: doc/classes/ClassDB.xml msgid "" "Returns whether [param class] (or its ancestor classes if [param " "no_inheritance] is [code]false[/code]) has an enum called [param enum] that " "is a bitfield." msgstr "" "返回类 [param class] 是否有名为 [param enum] 的位域枚举(如果 [param " "no_inheritance] 为 [code]false[/code] 则还会检查其祖类)。" #: doc/classes/ClassDB.xml msgid "" "Returns whether [param inherits] is an ancestor of [param class] or not." msgstr "返回 [param inherits] 是否为 [param class] 的祖先。" #: doc/classes/ClassDB.xml msgid "Native Core class type." msgstr "原生核心类型。" #: doc/classes/ClassDB.xml msgid "Native Editor class type." msgstr "原生编辑器类型。" #: doc/classes/ClassDB.xml msgid "GDExtension class type." msgstr "GDExtension 类型。" #: doc/classes/ClassDB.xml msgid "GDExtension Editor class type." msgstr "GDExtension 编辑器类型。" #: doc/classes/ClassDB.xml msgid "Unknown class type." msgstr "未知类型。" #: doc/classes/CodeEdit.xml msgid "A multiline text editor designed for editing code." msgstr "多行文本编辑器,针对编辑代码而设计。" #: doc/classes/CodeEdit.xml msgid "" "CodeEdit is a specialized [TextEdit] designed for editing plain text code " "files. It has many features commonly found in code editors such as line " "numbers, line folding, code completion, indent management, and string/" "comment management.\n" "[b]Note:[/b] Regardless of locale, [CodeEdit] will by default always use " "left-to-right text direction to correctly display source code." msgstr "" "CodeEdit 是一种专门用于编辑纯文本代码文件的 [TextEdit]。它包含了许多代码编辑" "器中的常见功能,如行号、折行、代码补全、缩进管理以及字符串/注释管理。\n" "[b]注意:[/b]无论使用什么区域设置,[CodeEdit] 默认总是使用从左至右的文本方向" "来正确显示源代码。" #: doc/classes/CodeEdit.xml msgid "" "Override this method to define how the selected entry should be inserted. If " "[param replace] is [code]true[/code], any existing text should be replaced." msgstr "" "覆盖此方法以定义所选条目应如何插入。如果 [param replace] 为 [code]true[/" "code],任何现有的文本都应该被替换。" #: doc/classes/CodeEdit.xml msgid "" "Override this method to define what items in [param candidates] should be " "displayed.\n" "Both [param candidates] and the return is an [Array] of [Dictionary], see " "[method get_code_completion_option] for [Dictionary] content." msgstr "" "覆盖此方法以确定应该显示 [param candidates] 中的哪些项。\n" "参数 [param candidates] 和返回值都是一个 [Array] 的 [Dictionary],而 " "[Dictionary] 的键值,详见 [method get_code_completion_option]。" #: doc/classes/CodeEdit.xml msgid "" "Override this method to define what happens when the user requests code " "completion. If [param force] is [code]true[/code], any checks should be " "bypassed." msgstr "" "覆盖此方法以定义当用户请求代码完成时发生的情况。如果 [param force] 为 " "[code]true[/code],会绕过任何检查。" #: doc/classes/CodeEdit.xml msgid "" "Adds a brace pair.\n" "Both the start and end keys must be symbols. Only the start key has to be " "unique." msgstr "" "添加一对括号。\n" "开始和结束键都必须是符号。只有开始键必须是唯一的。" #: doc/classes/CodeEdit.xml msgid "" "Submits an item to the queue of potential candidates for the autocomplete " "menu. Call [method update_code_completion_options] to update the list.\n" "[param location] indicates location of the option relative to the location " "of the code completion query. See [enum CodeEdit.CodeCompletionLocation] for " "how to set this value.\n" "[b]Note:[/b] This list will replace all current candidates." msgstr "" "向自动补全菜单的潜在候选队列提交条目。请调用 [method " "update_code_completion_options] 来更新列表。\n" "[param location] 指示的是该选项相对于代码补全请求位置的位置。这个值如何设置" "见 [enum CodeEdit.CodeCompletionLocation]。\n" "[b]注意:[/b]这个列表将替换所有当前候选。" #: doc/classes/CodeEdit.xml msgid "" "Adds a comment delimiter from [param start_key] to [param end_key]. Both " "keys should be symbols, and [param start_key] must not be shared with other " "delimiters.\n" "If [param line_only] is [code]true[/code] or [param end_key] is an empty " "[String], the region does not carry over to the next line." msgstr "" "添加从 [param start_key] 到 [param end_key] 的注释分隔符。两个键都应该是符" "号,并且 [param start_key] 不得与其他分隔符共享。\n" "如果 [param line_only] 为 [code]true[/code] 或 [param end_key] 为空 " "[String],则该区块不会延续到下一行。" #: doc/classes/CodeEdit.xml msgid "" "Defines a string delimiter from [param start_key] to [param end_key]. Both " "keys should be symbols, and [param start_key] must not be shared with other " "delimiters.\n" "If [param line_only] is [code]true[/code] or [param end_key] is an empty " "[String], the region does not carry over to the next line." msgstr "" "定义从 [param start_key] 到 [param end_key] 的字符串分隔符。两个键都应该是符" "号,并且 [param start_key] 不得与其他分隔符共享。\n" "如果 [param line_only] 为 [code]true[/code] 或 [param end_key] 为空 " "[String],则该区块不会延续到下一行。" #: doc/classes/CodeEdit.xml msgid "" "Returns [code]true[/code] if the given line is foldable. A line is foldable " "if it is the start of a valid code region (see [method " "get_code_region_start_tag]), if it is the start of a comment or string " "block, or if the next non-empty line is more indented (see [method " "TextEdit.get_indent_level])." msgstr "" "如果给定的行可折叠则返回 [code]true[/code]。可折叠的情况有:这一行是有效代码" "区块的开头(见 [method get_code_region_start_tag]),这一行是注释或字符串块的" "开头,以及后续非空行的缩进程度更高(见 [method TextEdit.get_indent_level])。" #: doc/classes/CodeEdit.xml msgid "Cancels the autocomplete menu." msgstr "取消自动补全菜单。" #: doc/classes/CodeEdit.xml msgid "Clears all bookmarked lines." msgstr "清除所有书签行。" #: doc/classes/CodeEdit.xml msgid "Clears all breakpointed lines." msgstr "清除所有断点行。" #: doc/classes/CodeEdit.xml msgid "Removes all comment delimiters." msgstr "移除所有注释分隔符。" #: doc/classes/CodeEdit.xml msgid "Clears all executed lines." msgstr "清除所有已执行的行。" #: doc/classes/CodeEdit.xml msgid "Removes all string delimiters." msgstr "移除所有字符串分隔符。" #: doc/classes/CodeEdit.xml msgid "" "Inserts the selected entry into the text. If [param replace] is [code]true[/" "code], any existing text is replaced rather than merged." msgstr "" "将选定的条目插入到文本中。如果 [param replace] 为 [code]true[/code],任何现有" "的文本都会被替换,而不是被合并。" #: doc/classes/CodeEdit.xml msgid "" "Converts the indents of lines between [param from_line] and [param to_line] " "to tabs or spaces as set by [member indent_use_spaces].\n" "Values of [code]-1[/code] convert the entire text." msgstr "" "将 [param from_line] 和 [param to_line] 之间的行缩进,转换为 [member " "indent_use_spaces] 设置的制表符或空格。\n" "值均为 [code]-1[/code] 将转换整个文本。" #: doc/classes/CodeEdit.xml msgid "" "Creates a new code region with the selection. At least one single line " "comment delimiter have to be defined (see [method add_comment_delimiter]).\n" "A code region is a part of code that is highlighted when folded and can help " "organize your script.\n" "Code region start and end tags can be customized (see [method " "set_code_region_tags]).\n" "Code regions are delimited using start and end tags (respectively " "[code]region[/code] and [code]endregion[/code] by default) preceded by one " "line comment delimiter. (eg. [code]#region[/code] and [code]#endregion[/" "code])" msgstr "" "使用选区创建一个新的代码区块。必须至少定义一个单行注释分隔符(见 [method " "add_comment_delimiter])。\n" "代码区块是代码的一部分,它在折叠时会高亮显示,且可以帮助组织脚本。\n" "代码区块的开始和结束标记可以被自定义(见 [method set_code_region_tags])。\n" "代码区块使用开始和结束标记(默认情况下分别为 [code]region[/code] 和 " "[code]endregion[/code])进行分隔,前面有一个行注释分隔符。(例如 " "[code]#region[/code] 和 [code]#endregion[/code])" #: doc/classes/CodeEdit.xml msgid "Deletes all lines that are selected or have a caret on them." msgstr "删除所选行以及有光标停留的行。" #: doc/classes/CodeEdit.xml msgid "" "If there is no selection, indentation is inserted at the caret. Otherwise, " "the selected lines are indented like [method indent_lines]. Equivalent to " "the [member ProjectSettings.input/ui_text_indent] action. The indentation " "characters used depend on [member indent_use_spaces] and [member " "indent_size]." msgstr "" "如果没有选中内容,则在光标处插入缩进。否则会将所选行缩进一级,与 [method " "indent_lines] 类似。等价于 [member ProjectSettings.input/ui_text_indent] 动" "作。所使用的缩进字符取决于 [member indent_use_spaces] 和 [member " "indent_size]。" #: doc/classes/CodeEdit.xml msgid "" "Duplicates all lines currently selected with any caret. Duplicates the " "entire line beneath the current one no matter where the caret is within the " "line." msgstr "" "复制当前使用任何文本光标选择的所有行。无论文本光标位于行内的哪个位置,复制当" "前行所在的整行。" #: doc/classes/CodeEdit.xml msgid "" "Duplicates all selected text and duplicates all lines with a caret on them." msgstr "制作所有选中文本的副本并制作所有光标所在行的副本。" #: doc/classes/CodeEdit.xml msgid "" "Folds all lines that are possible to be folded (see [method can_fold_line])." msgstr "折叠所有可能被折叠的行(参见 [method can_fold_line])。" #: doc/classes/CodeEdit.xml msgid "Folds the given line, if possible (see [method can_fold_line])." msgstr "如果可能,折叠给定的行(参见 [method can_fold_line])。" #: doc/classes/CodeEdit.xml msgid "Gets the matching auto brace close key for [param open_key]." msgstr "获取 [param open_key] 相匹配的括号自动闭合键。" #: doc/classes/CodeEdit.xml msgid "Gets all bookmarked lines." msgstr "获取所有书签行。" #: doc/classes/CodeEdit.xml msgid "Gets all breakpointed lines." msgstr "获取所有断点行。" #: doc/classes/CodeEdit.xml msgid "" "Gets the completion option at [param index]. The return [Dictionary] has the " "following key-values:\n" "[code]kind[/code]: [enum CodeCompletionKind]\n" "[code]display_text[/code]: Text that is shown on the autocomplete menu.\n" "[code]insert_text[/code]: Text that is to be inserted when this item is " "selected.\n" "[code]font_color[/code]: Color of the text on the autocomplete menu.\n" "[code]icon[/code]: Icon to draw on the autocomplete menu.\n" "[code]default_value[/code]: Value of the symbol." msgstr "" "获取在 [param index] 处的补全选项。返回的 [Dictionary] 有以下键值。\n" "[code]kind[/code]:[enum CodeCompletionKind]\n" "[code]display_text[/code] :在自动补全菜单上显示的文本。\n" "[code]insert_text[/code] :当选中这个选项时要插入的文本。\n" "[code]font_color[/code]:自动补全菜单上文本的颜色。\n" "[code]icon[/code] :在自动补全菜单上绘制的图标。\n" "[code]default_value[/code]:符号的值。" #: doc/classes/CodeEdit.xml msgid "" "Gets all completion options, see [method get_code_completion_option] for " "return content." msgstr "获取所有补全选项,返回值见 [method get_code_completion_option]。" #: doc/classes/CodeEdit.xml msgid "Gets the index of the current selected completion option." msgstr "获取当前已选定补全项的索引。" #: doc/classes/CodeEdit.xml msgid "Returns the code region end tag (without comment delimiter)." msgstr "返回代码区块结束标签(不带注释分隔符)。" #: doc/classes/CodeEdit.xml msgid "Returns the code region start tag (without comment delimiter)." msgstr "返回代码区块开始标签(不带注释分隔符)。" #: doc/classes/CodeEdit.xml msgid "Gets the end key for a string or comment region index." msgstr "获取字符串或注释块索引的结束键。" #: doc/classes/CodeEdit.xml msgid "" "If [param line] [param column] is in a string or comment, returns the end " "position of the region. If not or no end could be found, both [Vector2] " "values will be [code]-1[/code]." msgstr "" "如果 [param line] [param column] 是在一个字符串或注释中,则返回该区域的结束位" "置。如果不在或未找到结束位置,则 [Vector2] 的两个值都将是 [code]-1[/code] 。" #: doc/classes/CodeEdit.xml msgid "Gets the start key for a string or comment region index." msgstr "获取字符串或注释块索引的开始键。" #: doc/classes/CodeEdit.xml msgid "" "If [param line] [param column] is in a string or comment, returns the start " "position of the region. If not or no start could be found, both [Vector2] " "values will be [code]-1[/code]." msgstr "" "如果 [param line] [param column] 是在一个字符串或注释中,则返回该区域的起始位" "置。如果不在或未找到开始位置,则 [Vector2] 的两个值都将是 [code]-1[/code] 。" #: doc/classes/CodeEdit.xml msgid "Gets all executing lines." msgstr "获取所有正在执行的行。" #: doc/classes/CodeEdit.xml msgid "Returns all lines that are currently folded." msgstr "返回当前所有折叠的行。" #: doc/classes/CodeEdit.xml msgid "" "Returns the full text with char [code]0xFFFF[/code] at the caret location." msgstr "返回在文本光标位置带有 [code]0xFFFF[/code] 字符的全文。" #: doc/classes/CodeEdit.xml msgid "" "Returns the full text with char [code]0xFFFF[/code] at the cursor location." msgstr "返回在鼠标光标处带有 [code]0xFFFF[/code] 字符的全文。" #: doc/classes/CodeEdit.xml msgid "" "Returns the full text with char [code]0xFFFF[/code] at the specified " "location." msgstr "返回在指定位置带有 [code]0xFFFF[/code] 字符的全文。" #: doc/classes/CodeEdit.xml msgid "Returns [code]true[/code] if close key [param close_key] exists." msgstr "如果关闭键 [param close_key] 存在,则返回 [code]true[/code]。" #: doc/classes/CodeEdit.xml msgid "Returns [code]true[/code] if open key [param open_key] exists." msgstr "如果打开键 [param open_key] 存在,则返回 [code]true[/code]。" #: doc/classes/CodeEdit.xml msgid "Returns [code]true[/code] if comment [param start_key] exists." msgstr "如果注释的 [param start_key] 存在,返回 [code]true[/code] 。" #: doc/classes/CodeEdit.xml msgid "Returns [code]true[/code] if string [param start_key] exists." msgstr "如果字符串的 [param start_key] 存在,返回 [code]true[/code] 。" #: doc/classes/CodeEdit.xml msgid "" "Indents all lines that are selected or have a caret on them. Uses spaces or " "a tab depending on [member indent_use_spaces]. See [method unindent_lines]." msgstr "" "缩进所有选中的行或光标所在的行。使用空格还是制表符取决于 [member " "indent_use_spaces]。见 [method unindent_lines]。" #: doc/classes/CodeEdit.xml msgid "" "Returns delimiter index if [param line] [param column] is in a comment. If " "[param column] is not provided, will return delimiter index if the entire " "[param line] is a comment. Otherwise [code]-1[/code]." msgstr "" "如果 [param line] [param column] 在一条注释中,则返回分隔符索引。如果没有提" "供 [param column],且整个 [param line] 是一条注释,则将返回分隔符索引。否则返" "回 [code]-1[/code]。" #: doc/classes/CodeEdit.xml msgid "" "Returns the delimiter index if [param line] [param column] is in a string. " "If [param column] is not provided, will return the delimiter index if the " "entire [param line] is a string. Otherwise [code]-1[/code]." msgstr "" "如果 [param line] [param column] 在一条字符串中,则返回分隔符索引。如果没有提" "供 [param column],且整个 [param line] 是一个字符串,则将返回分隔符索引。否则" "返回 [code]-1[/code]。" #: doc/classes/CodeEdit.xml msgid "" "Returns [code]true[/code] if the given line is bookmarked. See [method " "set_line_as_bookmarked]." msgstr "" "如果给定的行设置了书签,则返回 [code]true[/code]。见 [method " "set_line_as_bookmarked]。" #: doc/classes/CodeEdit.xml msgid "" "Returns [code]true[/code] if the given line is breakpointed. See [method " "set_line_as_breakpoint]." msgstr "" "如果给定的行设置了断点,则返回 [code]true[/code]。见 [method " "set_line_as_breakpoint]。" #: doc/classes/CodeEdit.xml msgid "" "Returns [code]true[/code] if the given line is a code region end. See " "[method set_code_region_tags]." msgstr "" "如果给定的行是代码区块的结尾,则返回 [code]true[/code]。见 [method " "set_code_region_tags]。" #: doc/classes/CodeEdit.xml msgid "" "Returns [code]true[/code] if the given line is a code region start. See " "[method set_code_region_tags]." msgstr "" "如果给定的行是代码区块的开头,则返回 [code]true[/code]。见 [method " "set_code_region_tags]。" #: doc/classes/CodeEdit.xml msgid "" "Returns [code]true[/code] if the given line is marked as executing. See " "[method set_line_as_executing]." msgstr "" "如果给定的行被标记为正在执行,则返回 [code]true[/code]。见 [method " "set_line_as_executing]。" #: doc/classes/CodeEdit.xml msgid "" "Returns [code]true[/code] if the given line is folded. See [method " "fold_line]." msgstr "如果给定的行已折叠,则返回 [code]true[/code]。见 [method fold_line]。" #: doc/classes/CodeEdit.xml msgid "Moves all lines down that are selected or have a caret on them." msgstr "将所选行以及有光标停留的行向下移动。" #: doc/classes/CodeEdit.xml msgid "Moves all lines up that are selected or have a caret on them." msgstr "将所选行以及有光标停留的行向上移动。" #: doc/classes/CodeEdit.xml msgid "Removes the comment delimiter with [param start_key]." msgstr "移除带有 [param start_key] 的注释分隔符。" #: doc/classes/CodeEdit.xml msgid "Removes the string delimiter with [param start_key]." msgstr "移除带有 [param start_key] 的字符串分隔符。" #: doc/classes/CodeEdit.xml msgid "" "Emits [signal code_completion_requested], if [param force] is [code]true[/" "code] will bypass all checks. Otherwise will check that the caret is in a " "word or in front of a prefix. Will ignore the request if all current options " "are of type file path, node path, or signal." msgstr "" "发出 [signal code_completion_requested],如果 [param force] 为 [code]true[/" "code] 则会绕过所有检查。否则,将检查光标是否在一个词中或在一个前缀的前面。如" "果当前所有选项都是文件路径、节点路径或信号类型,将忽略该请求。" #: doc/classes/CodeEdit.xml msgid "Sets the current selected completion option." msgstr "设置当前选定的补全选项。" #: doc/classes/CodeEdit.xml msgid "Sets the code hint text. Pass an empty string to clear." msgstr "设置代码提示文本。传递一个空字符串来清除。" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], the code hint will draw below the main caret. If " "[code]false[/code], the code hint will draw above the main caret. See " "[method set_code_hint]." msgstr "" "如果为 [code]true[/code],则会在主光标下方绘制代码提示。如果为 [code]false[/" "code],则会在主光标上方绘制代码提示。见 [method set_code_hint]。" #: doc/classes/CodeEdit.xml msgid "Sets the code region start and end tags (without comment delimiter)." msgstr "设置代码区块的开始和结束标签(不含注释分隔符)。" #: doc/classes/CodeEdit.xml msgid "" "Sets the given line as bookmarked. If [code]true[/code] and [member " "gutters_draw_bookmarks] is [code]true[/code], draws the [theme_item " "bookmark] icon in the gutter for this line. See [method " "get_bookmarked_lines] and [method is_line_bookmarked]." msgstr "" "为给定的行设置书签。如果为 [code]true[/code] 并且 [member " "gutters_draw_bookmarks] 为 [code]true[/code],则会在边栏中为该行绘制 " "[theme_item bookmark] 图标。见 [method get_bookmarked_lines] 和 [method " "is_line_bookmarked]。" #: doc/classes/CodeEdit.xml msgid "" "Sets the given line as a breakpoint. If [code]true[/code] and [member " "gutters_draw_breakpoints_gutter] is [code]true[/code], draws the [theme_item " "breakpoint] icon in the gutter for this line. See [method " "get_breakpointed_lines] and [method is_line_breakpointed]." msgstr "" "为给定的行设置断点。如果为 [code]true[/code] 并且 [member " "gutters_draw_breakpoints_gutter] 为 [code]true[/code],则会在边栏中为该行绘" "制 [theme_item breakpoint] 图标。见 [method get_breakpointed_lines] 和 " "[method is_line_breakpointed]。" #: doc/classes/CodeEdit.xml msgid "" "Sets the given line as executing. If [code]true[/code] and [member " "gutters_draw_executing_lines] is [code]true[/code], draws the [theme_item " "executing_line] icon in the gutter for this line. See [method " "get_executing_lines] and [method is_line_executing]." msgstr "" "将给定的行设置为正在执行。如果为 [code]true[/code] 并且 [member " "gutters_draw_executing_lines] 为 [code]true[/code],则会在边栏中为该行绘制 " "[theme_item executing_line] 图标。见 [method get_executing_lines] 和 [method " "is_line_executing]。" #: doc/classes/CodeEdit.xml msgid "Sets the symbol emitted by [signal symbol_validate] as a valid lookup." msgstr "将 [signal symbol_validate] 发出的符号设置为有效查找。" #: doc/classes/CodeEdit.xml msgid "Toggle the folding of the code block at the given line." msgstr "在给定行切换代码块的折叠。" #: doc/classes/CodeEdit.xml msgid "Toggle the folding of the code block on all lines with a caret on them." msgstr "在所有带有光标的行上切换代码块的折叠。" #: doc/classes/CodeEdit.xml msgid "Unfolds all lines that are folded." msgstr "展开所有已折叠的行。" #: doc/classes/CodeEdit.xml msgid "" "Unfolds the given line if it is folded or if it is hidden under a folded " "line." msgstr "如果给定的行处于折叠状态,或被隐藏在折叠行下,则展开该行。" #: doc/classes/CodeEdit.xml msgid "" "Unindents all lines that are selected or have a caret on them. Uses spaces " "or a tab depending on [member indent_use_spaces]. Equivalent to the [member " "ProjectSettings.input/ui_text_dedent] action. See [method indent_lines]." msgstr "" "将所选行或光标所在行取消一级缩进。会根据 [member indent_use_spaces] 决定使用" "空格还是制表符。等价于 [member ProjectSettings.input/ui_text_dedent] 动作。" "见 [method indent_lines]。" #: doc/classes/CodeEdit.xml msgid "" "Submits all completion options added with [method " "add_code_completion_option]. Will try to force the autocomplete menu to " "popup, if [param force] is [code]true[/code].\n" "[b]Note:[/b] This will replace all current candidates." msgstr "" "提交所有用 [method add_code_completion_option] 添加的补全选项。如果 [param " "force] 是 [code]true[/code],将尝试强制弹出自动补全菜单 。\n" "[b]注意:[/b]这将取代所有当前的候补选项。" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], uses [member auto_brace_completion_pairs] to " "automatically insert the closing brace when the opening brace is inserted by " "typing or autocompletion. Also automatically removes the closing brace when " "using backspace on the opening brace." msgstr "" "如果为 [code]true[/code],则当左括号被键入或被自动补全插入时,使用 [member " "auto_brace_completion_pairs] 自动插入右括号。对左括号使用退格键时,也会自动移" "除右括号。" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], highlights brace pairs when the caret is on either " "one, using [member auto_brace_completion_pairs]. If matching, the pairs will " "be underlined. If a brace is unmatched, it is colored with [theme_item " "brace_mismatch_color]." msgstr "" "如果为 [code]true[/code],则当光标在一对括号中任何一个的位置时,使用 [member " "auto_brace_completion_pairs] 将其高亮。配对的括号将添加下划线。如果无法配对," "则会使用 [theme_item brace_mismatch_color] 着色。" #: doc/classes/CodeEdit.xml msgid "" "Sets the brace pairs to be autocompleted. For each entry in the dictionary, " "the key is the opening brace and the value is the closing brace that matches " "it. A brace is a [String] made of symbols. See [member " "auto_brace_completion_enabled] and [member " "auto_brace_completion_highlight_matching]." msgstr "" "将括号对设置为自动补全。字典元素中,键是左括号、值是对应的右括号。括号是由符" "号构成的 [String]。见 [member auto_brace_completion_enabled] 和 [member " "auto_brace_completion_highlight_matching]。" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], the [member ProjectSettings.input/" "ui_text_completion_query] action requests code completion. To handle it, see " "[method _request_code_completion] or [signal code_completion_requested]." msgstr "" "如果为 [code]true[/code],则 [member ProjectSettings.input/" "ui_text_completion_query] 动作会请求进行代码补全。处理请求见 [method " "_request_code_completion] 或 [signal code_completion_requested]。" #: doc/classes/CodeEdit.xml msgid "Sets prefixes that will trigger code completion." msgstr "设置将触发代码补全的前缀。" #: doc/classes/CodeEdit.xml msgid "" "Sets the comment delimiters. All existing comment delimiters will be removed." msgstr "设置注释分隔符。将删除所有的现有注释分隔符。" #: doc/classes/CodeEdit.xml msgid "" "Sets the string delimiters. All existing string delimiters will be removed." msgstr "设置字符串分隔符。将删除所有的现有字符串分隔符。" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], bookmarks are drawn in the gutter. This gutter is " "shared with breakpoints and executing lines. See [method " "set_line_as_bookmarked]." msgstr "" "如果为 [code]true[/code],则在边栏中绘制书签。该边栏与断点和执行行共享。见 " "[method set_line_as_bookmarked]." #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], breakpoints are drawn in the gutter. This gutter is " "shared with bookmarks and executing lines. Clicking the gutter will toggle " "the breakpoint for the line, see [method set_line_as_breakpoint]." msgstr "" "如果为 [code]true[/code],则在边栏中绘制断点。该边栏与书签和执行行共享。点击" "边栏会开关对应行的断点,见 [method set_line_as_breakpoint]." #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], executing lines are marked in the gutter. This gutter " "is shared with breakpoints and bookmarks. See [method set_line_as_executing]." msgstr "" "如果为 [code]true[/code],则在边栏中绘制执行行。该边栏与断点和书签共享。见 " "[method set_line_as_executing]." #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], the fold gutter is drawn. In this gutter, the " "[theme_item can_fold_code_region] icon is drawn for each foldable line (see " "[method can_fold_line]) and the [theme_item folded_code_region] icon is " "drawn for each folded line (see [method is_line_folded]). These icons can be " "clicked to toggle the fold state, see [method toggle_foldable_line]. [member " "line_folding] must be [code]true[/code] to show icons." msgstr "" "如果为 [code]true[/code],则会绘制折叠栏。该边栏会为每个能够折叠的行绘制 " "[theme_item can_fold_code_region] 图标(见 [method can_fold_line]),已折叠的" "行则绘制 [theme_item folded_code_region] 图标(见 [method is_line_folded])。" "点击这些图标可以开关折叠状态,见 [method toggle_foldable_line]。[member " "line_folding] 为 [code]true[/code] 才会显示图标。" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], the line number gutter is drawn. Line numbers start at " "[code]1[/code] and are incremented for each line of text. Clicking and " "dragging in the line number gutter will select entire lines of text." msgstr "" "如果为 [code]true[/code],则会绘制行号栏。行号从 [code]1[/code] 开始,逐行递" "增。在行号栏中点击并拖动会选中整行文本。" #: doc/classes/CodeEdit.xml msgid "The minimum width in digits reserved for the line number gutter." msgstr "" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], line numbers drawn in the gutter are zero padded based " "on the total line count. Requires [member gutters_draw_line_numbers] to be " "set to [code]true[/code]." msgstr "" "如果为 [code]true[/code],在边栏中绘制的行号会根据总行数用零填充。[member " "gutters_draw_line_numbers] 须为 [code]true[/code]。" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], an extra indent is automatically inserted when a new " "line is added and a prefix in [member indent_automatic_prefixes] is found. " "If a brace pair opening key is found, the matching closing brace will be " "moved to another new line (see [member auto_brace_completion_pairs])." msgstr "" "如果为 [code]true[/code],添加新行并且存在 [member " "indent_automatic_prefixes] 中的前缀时会自动插入一级额外的缩进。如果存在括号对" "中的左括号,就会将对应的右括号移动到新的一行(见 [member " "auto_brace_completion_pairs])。" #: doc/classes/CodeEdit.xml msgid "" "Prefixes to trigger an automatic indent. Used when [member indent_automatic] " "is set to [code]true[/code]." msgstr "" "触发自动缩进的前缀。[member indent_automatic] 为 [code]true[/code] 时使用。" #: doc/classes/CodeEdit.xml msgid "" "Size of the tabulation indent (one [kbd]Tab[/kbd] press) in characters. If " "[member indent_use_spaces] is enabled the number of spaces to use." msgstr "" "制表缩进的大小(按一次 [kbd]Tab[/kbd]),以字符为单位。如果启用 [member " "indent_use_spaces],则代表使用的空格数。" #: doc/classes/CodeEdit.xml msgid "Use spaces instead of tabs for indentation." msgstr "使用空格代替制表符进行缩进。" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], lines can be folded. Otherwise, line folding methods " "like [method fold_line] will not work and [method can_fold_line] will always " "return [code]false[/code]. See [member gutters_draw_fold_gutter]." msgstr "" "如果为 [code]true[/code],则可以折叠行。否则 [method fold_line] 等与行折叠相" "关的方法将无法工作,并且 [method can_fold_line] 将始终返回 [code]false[/" "code]。见 [member gutters_draw_fold_gutter]。" #: doc/classes/CodeEdit.xml msgid "" "Draws vertical lines at the provided columns. The first entry is considered " "a main hard guideline and is drawn more prominently." msgstr "" "在提供的列上绘制垂直线。第一个条目被认为是主要的硬参考线,会绘制得更显眼。" #: doc/classes/CodeEdit.xml msgid "" "Set when a validated word from [signal symbol_validate] is clicked, the " "[signal symbol_lookup] should be emitted." msgstr "" "设置当来自 [signal symbol_validate] 的验证词被点击时,应发出 [signal " "symbol_lookup]。" #: doc/classes/CodeEdit.xml msgid "" "If [code]true[/code], the [signal symbol_hovered] signal is emitted when " "hovering over a word." msgstr "" "如果为 [code]true[/code],则悬停在单词上时会发出 [signal symbol_hovered] 信" "号。" #: doc/classes/CodeEdit.xml msgid "" "Emitted when a breakpoint is added or removed from a line. If the line is " "removed via backspace, a signal is emitted at the old line." msgstr "" "为某一行添加或移除断点时触发。如果通过退格键移除该行,则会在原行处触发一次信" "号。" #: doc/classes/CodeEdit.xml msgid "" "Emitted when the user requests code completion. This signal will not be sent " "if [method _request_code_completion] is overridden or [member " "code_completion_enabled] is [code]false[/code]." msgstr "" "在用户请求代码补全时发出。如果 [method _request_code_completion] 被覆盖或者 " "[member code_completion_enabled] 为 [code]false[/code],则不会发送该信号。" #: doc/classes/CodeEdit.xml msgid "" "Emitted when the user hovers over a symbol. Unlike [signal " "Control.mouse_entered], this signal is not emitted immediately, but when the " "cursor is over the symbol for [member ProjectSettings.gui/timers/" "tooltip_delay_sec] seconds.\n" "[b]Note:[/b] [member symbol_tooltip_on_hover] must be [code]true[/code] for " "this signal to be emitted." msgstr "" "当用户在符号上悬停时发出。该信号与 [signal Control.mouse_entered] 不同,不会" "立即发出,而是需要光标在符号上停留 [member ProjectSettings.gui/timers/" "tooltip_delay_sec] 秒。\n" "[b]注意:[/b][member symbol_tooltip_on_hover] 为 [code]true[/code] 时才会发出" "该信号。" #: doc/classes/CodeEdit.xml msgid "Emitted when the user has clicked on a valid symbol." msgstr "用户点击有效符号时发出。" #: doc/classes/CodeEdit.xml msgid "" "Emitted when the user hovers over a symbol. The symbol should be validated " "and responded to, by calling [method set_symbol_lookup_word_as_valid].\n" "[b]Note:[/b] [member symbol_lookup_on_click] must be [code]true[/code] for " "this signal to be emitted." msgstr "" "用户将鼠标悬停在符号上时发出。应该通过调用 [method " "set_symbol_lookup_word_as_valid] 对该符号进行验证和响应。\n" "[b]注意:[/b][member symbol_lookup_on_click] 必须为 [code]true[/code] 才会发" "出该信号。" #: doc/classes/CodeEdit.xml msgid "Marks the option as a class." msgstr "将该选项标记为类。" #: doc/classes/CodeEdit.xml msgid "Marks the option as a function." msgstr "将该选项标记为函数。" #: doc/classes/CodeEdit.xml msgid "Marks the option as a Godot signal." msgstr "将该选项标记为 Godot 信号。" #: doc/classes/CodeEdit.xml msgid "Marks the option as a variable." msgstr "将该选项标记为变量。" #: doc/classes/CodeEdit.xml msgid "Marks the option as a member." msgstr "将该选项标记为成员。" #: doc/classes/CodeEdit.xml msgid "Marks the option as an enum entry." msgstr "将该选项标记为枚举条目。" #: doc/classes/CodeEdit.xml msgid "Marks the option as a constant." msgstr "将该选项标记为常量。" #: doc/classes/CodeEdit.xml msgid "Marks the option as a Godot node path." msgstr "将该选项标记为 Godot 节点路径。" #: doc/classes/CodeEdit.xml msgid "Marks the option as a file path." msgstr "将该选项标记为文件路径。" #: doc/classes/CodeEdit.xml msgid "Marks the option as unclassified or plain text." msgstr "将该选项标记为未分类或纯文本。" #: doc/classes/CodeEdit.xml doc/classes/ScriptLanguageExtension.xml msgid "" "The option is local to the location of the code completion query - e.g. a " "local variable. Subsequent value of location represent options from the " "outer class, the exact value represent how far they are (in terms of inner " "classes)." msgstr "" "该选项是相对于代码补全查询位置的 - 例如局部变量。位置的后续值表示选项来自外部" "类,确切的值表示它们的距离(就内部类而言)。" #: doc/classes/CodeEdit.xml doc/classes/ScriptLanguageExtension.xml msgid "" "The option is from the containing class or a parent class, relative to the " "location of the code completion query. Perform a bitwise OR with the class " "depth (e.g. [code]0[/code] for the local class, [code]1[/code] for the " "parent, [code]2[/code] for the grandparent, etc.) to store the depth of an " "option in the class or a parent class." msgstr "" "该选项来自于所在的类或父类,相对于代码补全查询的位置。请使用类的深度进行按位 " "OR(或)运算(例如 [code]0[/code] 表示当前类,[code]1[/code] 表示父类," "[code]2[/code] 表示父类的父类等),从而在当前类或父类中存储选项的深度。" #: doc/classes/CodeEdit.xml doc/classes/ScriptLanguageExtension.xml msgid "" "The option is from user code which is not local and not in a derived class " "(e.g. Autoload Singletons)." msgstr "该选项来自用户代码,不是局部,也不是派生类(例如自动加载单例)。" #: doc/classes/CodeEdit.xml doc/classes/ScriptLanguageExtension.xml msgid "" "The option is from other engine code, not covered by the other enum " "constants - e.g. built-in classes." msgstr "该选项来自其他引擎代码,未被其他枚举常量覆盖 - 例如内置类。" #: doc/classes/CodeEdit.xml msgid "[Color] of the bookmark icon for bookmarked lines." msgstr "书签图标的 [Color],用于标记了书签的行。" #: doc/classes/CodeEdit.xml msgid "[Color] of the text to highlight mismatched braces." msgstr "用于高亮不匹配括号文本的 [Color]。" #: doc/classes/CodeEdit.xml msgid "[Color] of the breakpoint icon for bookmarked lines." msgstr "书签行的断点图标的 [Color]。" #: doc/classes/CodeEdit.xml msgid "[Color] for all icons related to line folding." msgstr "所有与折叠行相关的图标的 [Color]。" #: doc/classes/CodeEdit.xml msgid "Sets the background [Color] for the code completion popup." msgstr "设置代码补全弹出窗口的背景色 [Color]。" #: doc/classes/CodeEdit.xml msgid "" "Background highlight [Color] for matching text in code completion options." msgstr "用于匹配代码补全选项中的文本的背景高亮的 [Color]。" #: doc/classes/CodeEdit.xml msgid "[Color] of the scrollbar in the code completion popup." msgstr "代码补全弹出窗口中滚动条的 [Color]。" #: doc/classes/CodeEdit.xml msgid "[Color] of the scrollbar in the code completion popup when hovered." msgstr "代码补全弹出窗口中滚动条在悬停状态的 [Color]。" #: doc/classes/CodeEdit.xml msgid "" "Background highlight [Color] for the current selected option item in the " "code completion popup." msgstr "代码补全弹出窗口中,当前选定选项的背景高亮的 [Color]。" #: doc/classes/CodeEdit.xml msgid "[Color] of the executing icon for executing lines." msgstr "执行行执行图标的 [Color]。" #: doc/classes/CodeEdit.xml msgid "[Color] of background line highlight for folded code region." msgstr "折叠代码区块的背景行高亮 [Color]。" #: doc/classes/CodeEdit.xml msgid "" "[Color] of the main line length guideline, secondary guidelines will have " "50% alpha applied." msgstr "主行长度参考线的 [Color],次要参考线将应用 50% 的 Alpha。" #: doc/classes/CodeEdit.xml msgid "Sets the [Color] of line numbers." msgstr "设置行号的颜色 [Color]。" #: doc/classes/CodeEdit.xml msgid "" "Max number of options to display in the code completion popup at any one " "time." msgstr "同时在代码补全弹出窗口中显示的最大选项数。" #: doc/classes/CodeEdit.xml msgid "" "Max width of options in the code completion popup. Options longer than this " "will be cut off." msgstr "代码补全弹出窗口中选项的最大宽度。超过此长度的选项将被截断。" #: doc/classes/CodeEdit.xml msgid "Width of the scrollbar in the code completion popup." msgstr "代码补全弹出窗口中滚动条的宽度。" #: doc/classes/CodeEdit.xml msgid "" "Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked " "lines." msgstr "设置书签行的自定义 [Texture2D],会在书签栏中绘制。" #: doc/classes/CodeEdit.xml msgid "" "Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed " "lines." msgstr "设置断点行的自定义 [Texture2D],会在断点栏中绘制。" #: doc/classes/CodeEdit.xml msgid "" "Sets a custom [Texture2D] to draw in the line folding gutter when a line can " "be folded." msgstr "设置可折叠行的自定义 [Texture2D],会在折叠行栏中绘制。" #: doc/classes/CodeEdit.xml msgid "" "Sets a custom [Texture2D] to draw in the line folding gutter when a code " "region can be folded." msgstr "设置一个自定义 [Texture2D],以在代码区块可以折叠时在行折叠栏中绘制。" #: doc/classes/CodeEdit.xml msgid "" "Background panel for the color preview box in autocompletion (visible when " "the color is translucent)." msgstr "自动补全时颜色预览框的背景面板(颜色半透明时可见)。" #: doc/classes/CodeEdit.xml msgid "Icon to draw in the executing gutter for executing lines." msgstr "执行行的图标,会在执行栏中绘制。" #: doc/classes/CodeEdit.xml msgid "" "Sets a custom [Texture2D] to draw in the line folding gutter when a line is " "folded and can be unfolded." msgstr "" "设置一个自定义 [Texture2D],以在行被折叠且可以展开时,在行折叠边栏中绘制。" #: doc/classes/CodeEdit.xml msgid "" "Sets a custom [Texture2D] to draw in the line folding gutter when a code " "region is folded and can be unfolded." msgstr "" "设置一个自定义 [Texture2D],以在代码区块被折叠且可以展开时,在行折叠边栏中绘" "制。" #: doc/classes/CodeEdit.xml msgid "Sets a custom [Texture2D] to draw at the end of a folded line." msgstr "设置要绘制在折叠行末尾的一个自定义 [Texture2D]。" #: doc/classes/CodeEdit.xml msgid "[StyleBox] for the code completion popup." msgstr "用于代码补全弹窗的 [StyleBox]。" #: doc/classes/CodeHighlighter.xml msgid "A syntax highlighter intended for code." msgstr "用于代码的语法高亮器。" #: doc/classes/CodeHighlighter.xml msgid "" "By adjusting various properties of this resource, you can change the colors " "of strings, comments, numbers, and other text patterns inside a [TextEdit] " "control." msgstr "" "通过调整该资源的各种属性,可以更改 [TextEdit] 控件内的字符串、注释、数字和其" "他文本图案的颜色。" #: doc/classes/CodeHighlighter.xml msgid "" "Adds a color region (such as for comments or strings) from [param start_key] " "to [param end_key]. Both keys should be symbols, and [param start_key] must " "not be shared with other delimiters.\n" "If [param line_only] is [code]true[/code] or [param end_key] is an empty " "[String], the region does not carry over to the next line." msgstr "" "添加从 [param start_key] 到 [param end_key] 的颜色区块(例如注释或字符串)。" "两个键都应该是符号,并且 [param start_key] 不得与其他分隔符共享。\n" "如果 [param line_only] 为 [code]true[/code] 或 [param end_key] 为空 " "[String],则该区块不会延续到下一行。" #: doc/classes/CodeHighlighter.xml msgid "" "Sets the color for a keyword.\n" "The keyword cannot contain any symbols except '_'." msgstr "" "设置关键字的颜色。\n" "关键字不能包含除“_”之外的任何符号。" #: doc/classes/CodeHighlighter.xml msgid "" "Sets the color for a member keyword.\n" "The member keyword cannot contain any symbols except '_'.\n" "It will not be highlighted if preceded by a '.'." msgstr "" "设置成员关键字的颜色。\n" "成员关键字不能包含除“_”之外的任何符号。\n" "如果前面有“.”,则不会高亮显示。" #: doc/classes/CodeHighlighter.xml msgid "Removes all color regions." msgstr "移除所有颜色区域。" #: doc/classes/CodeHighlighter.xml msgid "Removes all keywords." msgstr "移除所有关键字。" #: doc/classes/CodeHighlighter.xml msgid "Removes all member keywords." msgstr "移除所有成员关键字。" #: doc/classes/CodeHighlighter.xml msgid "Returns the color for a keyword." msgstr "返回某个关键字的颜色。" #: doc/classes/CodeHighlighter.xml msgid "Returns the color for a member keyword." msgstr "返回某个成员关键字的颜色。" #: doc/classes/CodeHighlighter.xml msgid "" "Returns [code]true[/code] if the start key exists, else [code]false[/code]." msgstr "如果开始键存在则返回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/CodeHighlighter.xml msgid "" "Returns [code]true[/code] if the keyword exists, else [code]false[/code]." msgstr "如果关键字存在则返回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/CodeHighlighter.xml msgid "" "Returns [code]true[/code] if the member keyword exists, else [code]false[/" "code]." msgstr "" "如果成员关键字存在则返回 [code]true[/code],否则返回 [code]false[/code]。" #: doc/classes/CodeHighlighter.xml msgid "Removes the color region that uses that start key." msgstr "移除使用该开始键的颜色区域。" #: doc/classes/CodeHighlighter.xml msgid "Removes the keyword." msgstr "移除关键字。" #: doc/classes/CodeHighlighter.xml msgid "Removes the member keyword." msgstr "移除成员关键字。" #: doc/classes/CodeHighlighter.xml msgid "" "Sets the color regions. All existing regions will be removed. The " "[Dictionary] key is the region start and end key, separated by a space. The " "value is the region color." msgstr "" "设置颜色区域。现有区域都将被移除。[Dictionary] 的键为该区域的开始键和结束键," "用空格隔开。对应的值为区域的颜色。" #: doc/classes/CodeHighlighter.xml msgid "" "Sets color for functions. A function is a non-keyword string followed by a " "'('." msgstr "设置函数的颜色。函数是后跟“(”的非关键字字符串。" #: doc/classes/CodeHighlighter.xml msgid "" "Sets the keyword colors. All existing keywords will be removed. The " "[Dictionary] key is the keyword. The value is the keyword color." msgstr "" "设置关键字的颜色。现有关键字都将被移除。[Dictionary] 的键为关键字。对应的值为" "关键字的颜色。" #: doc/classes/CodeHighlighter.xml msgid "" "Sets the member keyword colors. All existing member keyword will be removed. " "The [Dictionary] key is the member keyword. The value is the member keyword " "color." msgstr "" "设置成员关键字的颜色。现有成员关键字都将被移除。[Dictionary] 的键为成员关键" "字。对应的值为成员关键字的颜色。" #: doc/classes/CodeHighlighter.xml msgid "" "Sets color for member variables. A member variable is non-keyword, non-" "function string proceeded with a '.'." msgstr "设置成员变量的颜色。成员变量是以“.”开头的非关键字、非函数字符串。" #: doc/classes/CodeHighlighter.xml msgid "Sets the color for numbers." msgstr "设置数字的颜色。" #: doc/classes/CodeHighlighter.xml msgid "Sets the color for symbols." msgstr "设置符号的颜色。" #: doc/classes/CollisionObject2D.xml msgid "Abstract base class for 2D physics objects." msgstr "2D 物理对象的抽象基类。" #: doc/classes/CollisionObject2D.xml msgid "" "Abstract base class for 2D physics objects. [CollisionObject2D] can hold any " "number of [Shape2D]s for collision. Each shape must be assigned to a " "[i]shape owner[/i]. Shape owners are not nodes and do not appear in the " "editor, but are accessible through code using the [code]shape_owner_*[/code] " "methods.\n" "[b]Note:[/b] Only collisions between objects within the same canvas " "([Viewport] canvas or [CanvasLayer]) are supported. The behavior of " "collisions between objects in different canvases is undefined." msgstr "" "2D 物理对象的抽象基类。[CollisionObject2D] 能够容纳任意数量的 [Shape2D] 用作" "碰撞形状。每个形状必须分配给一个[i]形状所有者[/i]。形状所有者不是节点,也不会" "出现在编辑器中,但可以通过代码使用 [code]shape_owner_*[/code] 方法访问。\n" "[b]注意:[/b]仅支持相同画布中不同对象的碰撞([Viewport] 画布或 " "[CanvasLayer])。不同画布中的对象之间的碰撞行为是未定义的。" #: doc/classes/CollisionObject2D.xml msgid "" "Accepts unhandled [InputEvent]s. [param shape_idx] is the child index of the " "clicked [Shape2D]. Connect to [signal input_event] to easily pick up these " "events.\n" "[b]Note:[/b] [method _input_event] requires [member input_pickable] to be " "[code]true[/code] and at least one [member collision_layer] bit to be set." msgstr "" "接收未处理的 [InputEvent]。[param shape_idx] 是被点击的 [Shape2D] 的子索引。" "连接到 [signal input_event] 即可轻松获取这些事件。\n" "[b]注意:[/b][method _input_event] 要求 [member input_pickable] 为 " "[code]true[/code],并且至少要设置一个 [member collision_layer] 位。" #: doc/classes/CollisionObject2D.xml msgid "" "Called when the mouse pointer enters any of this object's shapes. Requires " "[member input_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be set. Note that moving between different shapes " "within a single [CollisionObject2D] won't cause this function to be called." msgstr "" "当鼠标指针进入该实体的任何形状时调用。要求 [member input_pickable] 为 " "[code]true[/code] 并且至少设置了一个 [member collision_layer] 位。请注意,在" "单个 [CollisionObject2D] 中的不同形状之间移动,不会导致该函数被调用。" #: doc/classes/CollisionObject2D.xml msgid "" "Called when the mouse pointer exits all this object's shapes. Requires " "[member input_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be set. Note that moving between different shapes " "within a single [CollisionObject2D] won't cause this function to be called." msgstr "" "当鼠标指针退出该实体的所有形状时调用。要求 [member input_pickable] 为 " "[code]true[/code] 并且至少设置了一个 [member collision_layer] 位。请注意,在" "单个 [CollisionObject2D] 中的不同形状之间移动,不会导致该函数被调用。" #: doc/classes/CollisionObject2D.xml msgid "" "Called when the mouse pointer enters any of this object's shapes or moves " "from one shape to another. [param shape_idx] is the child index of the newly " "entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] " "and at least one [member collision_layer] bit to be called." msgstr "" "当鼠标指针进入该实体的任何形状或从一个形状移动到另一个形状时调用。[param " "shape_idx] 是新进入的 [Shape2D] 的子索引。要求 [member input_pickable] 为 " "[code]true[/code] 并且要至少设置一个 [member collision_layer] 位。" #: doc/classes/CollisionObject2D.xml msgid "" "Called when the mouse pointer exits any of this object's shapes. [param " "shape_idx] is the child index of the exited [Shape2D]. Requires [member " "input_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be called." msgstr "" "当鼠标指针离开该实体的任何形状时调用。[param shape_idx] 是退出的 [Shape2D] 的" "子索引。要求 [member input_pickable] 为 [code]true[/code] 并且至少要设置一个 " "[member collision_layer] 位。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "" "Creates a new shape owner for the given object. Returns [code]owner_id[/" "code] of the new owner for future reference." msgstr "" "为给定对象创建一个新的形状所有者。返回 [code]owner_id[/code]的新所有者,供将" "来引用。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml #: modules/csg/doc_classes/CSGShape3D.xml #: modules/gridmap/doc_classes/GridMap.xml doc/classes/SoftBody3D.xml msgid "" "Returns whether or not the specified layer of the [member collision_layer] " "is enabled, given a [param layer_number] between 1 and 32." msgstr "" "返回 [member collision_layer] 中是否启用了指定的层,给定的 [param " "layer_number] 应在 1 和 32 之间。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml #: modules/csg/doc_classes/CSGShape3D.xml #: modules/gridmap/doc_classes/GridMap.xml doc/classes/RayCast2D.xml #: doc/classes/RayCast3D.xml doc/classes/ShapeCast2D.xml #: doc/classes/ShapeCast3D.xml doc/classes/SoftBody3D.xml msgid "" "Returns whether or not the specified layer of the [member collision_mask] is " "enabled, given a [param layer_number] between 1 and 32." msgstr "" "返回 [member collision_mask] 中是否启用了指定的层,给定的 [param " "layer_number] 应在 1 和 32 之间。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "Returns the object's [RID]." msgstr "返回对象的 [RID]。" #: doc/classes/CollisionObject2D.xml msgid "" "Returns the [code]one_way_collision_margin[/code] of the shape owner " "identified by given [param owner_id]." msgstr "" "返回由给定 [param owner_id] 标识的形状所有者的 " "[code]one_way_collision_margin[/code]。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "" "Returns an [Array] of [code]owner_id[/code] identifiers. You can use these " "ids in other methods that take [code]owner_id[/code] as an argument." msgstr "" "返回一个 [code]owner_id[/code] 标识符的 [Array]。你可以在其他使用 " "[code]owner_id[/code] 作为参数的方法中使用这些 ID。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "If [code]true[/code], the shape owner and its shapes are disabled." msgstr "如果为 [code]true[/code],则禁用形状所有者及其形状。" #: doc/classes/CollisionObject2D.xml msgid "" "Returns [code]true[/code] if collisions for the shape owner originating from " "this [CollisionObject2D] will not be reported to collided with " "[CollisionObject2D]s." msgstr "" "返回 [code]true[/code],如果源于这个 [CollisionObject2D] 的形状所有者的碰撞不" "会被报告给 [CollisionObject2D]。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "Removes the given shape owner." msgstr "移除给定形状的所有者。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml #: modules/csg/doc_classes/CSGShape3D.xml #: modules/gridmap/doc_classes/GridMap.xml doc/classes/SoftBody3D.xml msgid "" "Based on [param value], enables or disables the specified layer in the " "[member collision_layer], given a [param layer_number] between 1 and 32." msgstr "" "根据 [param value],启用或禁用 [member collision_layer] 中指定的层,给定的 " "[param layer_number] 应在 1 和 32 之间。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml #: modules/csg/doc_classes/CSGShape3D.xml #: modules/gridmap/doc_classes/GridMap.xml doc/classes/RayCast2D.xml #: doc/classes/RayCast3D.xml doc/classes/ShapeCast2D.xml #: doc/classes/ShapeCast3D.xml doc/classes/SoftBody3D.xml msgid "" "Based on [param value], enables or disables the specified layer in the " "[member collision_mask], given a [param layer_number] between 1 and 32." msgstr "" "根据 [param value],启用或禁用 [member collision_mask] 中指定的层,给定的 " "[param layer_number] 应在 1 和 32 之间。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "Returns the [code]owner_id[/code] of the given shape." msgstr "返回指定形状的 [code]owner_id[/code]。" #: doc/classes/CollisionObject2D.xml msgid "Adds a [Shape2D] to the shape owner." msgstr "给形状所有者添加一个 [Shape2D]。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "Removes all shapes from the shape owner." msgstr "移除形状所有者的所有形状。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "Returns the parent object of the given shape owner." msgstr "返回给定形状所有者的父对象。" #: doc/classes/CollisionObject2D.xml msgid "Returns the [Shape2D] with the given ID from the given shape owner." msgstr "从给定形状所有者返回具有给定 ID 的 [Shape2D]。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "Returns the number of shapes the given shape owner contains." msgstr "返回给定形状所有者包含的形状数量。" #: doc/classes/CollisionObject2D.xml msgid "" "Returns the child index of the [Shape2D] with the given ID from the given " "shape owner." msgstr "从给定形状所有者返回具有给定 ID 的 [Shape2D] 的子索引。" #: doc/classes/CollisionObject2D.xml msgid "Returns the shape owner's [Transform2D]." msgstr "返回形状所有者的 [Transform2D]。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "Removes a shape from the given shape owner." msgstr "从给定的形状所有者中移除一个形状。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "If [code]true[/code], disables the given shape owner." msgstr "如果为 [code]true[/code],则禁用给定的形状所有者。" #: doc/classes/CollisionObject2D.xml msgid "" "If [param enable] is [code]true[/code], collisions for the shape owner " "originating from this [CollisionObject2D] will not be reported to collided " "with [CollisionObject2D]s." msgstr "" "如果 [param enable] 为 [code]true[/code],则源自该 [CollisionObject2D] 的形状" "所有者的碰撞将不会被报告为与 [CollisionObject2D] 发生碰撞。" #: doc/classes/CollisionObject2D.xml msgid "" "Sets the [code]one_way_collision_margin[/code] of the shape owner identified " "by given [param owner_id] to [param margin] pixels." msgstr "" "将由给定 [param owner_id] 标识的形状所有者的 [code]one_way_collision_margin[/" "code] 设置为 [param margin] 像素。" #: doc/classes/CollisionObject2D.xml msgid "Sets the [Transform2D] of the given shape owner." msgstr "设置给定形状所有者的 [Transform2D]。" #: doc/classes/CollisionObject2D.xml msgid "" "The physics layers this CollisionObject2D is in. Collision objects can exist " "in one or more of 32 different layers. See also [member collision_mask].\n" "[b]Note:[/b] Object A can detect a contact with object B only if object B is " "in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/" "physics/physics_introduction.html#collision-layers-and-masks]Collision " "layers and masks[/url] in the documentation for more information." msgstr "" "此 CollisionObject2D 所在的物理层。碰撞对象可以存在于 32 个不同层中的一个或多" "个中。另见 [member collision_mask]。\n" "[b]注意:[/b]只有当对象 B 在对象 A 扫描的任何层中时,对象 A 才能检测到与对象 " "B 的接触。有关更多信息,请参阅文档中的[url=$DOCS_URL/tutorials/physics/" "physics_introduction.html#collision-layers-and-masks]《碰撞层与掩码》[/url]。" #: doc/classes/CollisionObject2D.xml msgid "" "The physics layers this CollisionObject2D scans. Collision objects can scan " "one or more of 32 different layers. See also [member collision_layer].\n" "[b]Note:[/b] Object A can detect a contact with object B only if object B is " "in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/" "physics/physics_introduction.html#collision-layers-and-masks]Collision " "layers and masks[/url] in the documentation for more information." msgstr "" "此 CollisionObject2D 扫描的物理层。碰撞对象可以扫描 32 个不同层中的一个或多" "个。另见 [member collision_layer]。\n" "[b]注意:[/b]只有当对象 B 在对象 A 扫描的任何层中时,对象 A 才能检测到与对象 " "B 的接触。有关更多信息,请参阅文档中的[url=$DOCS_URL/tutorials/physics/" "physics_introduction.html#collision-layers-and-masks]《碰撞层与掩码》[/url]。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml #: modules/gridmap/doc_classes/GridMap.xml msgid "" "The priority used to solve colliding when occurring penetration. The higher " "the priority is, the lower the penetration into the object will be. This can " "for example be used to prevent the player from breaking through the " "boundaries of a level." msgstr "" "发生穿透时用于解决碰撞的优先级。优先级越高,对物体的穿透度就越低。例如,可以" "用来防止玩家突破关卡的边界。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml #: doc/classes/SoftBody3D.xml msgid "" "Defines the behavior in physics when [member Node.process_mode] is set to " "[constant Node.PROCESS_MODE_DISABLED]." msgstr "" "定义 [member Node.process_mode] 为 [constant Node.PROCESS_MODE_DISABLED] 时的" "物理行为。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml msgid "" "If [code]true[/code], this object is pickable. A pickable object can detect " "the mouse pointer entering/leaving, and if the mouse is inside it, report " "input events. Requires at least one [member collision_layer] bit to be set." msgstr "" "如果为 [code]true[/code] 则可拾取该对象。可拾取的对象可以检测到鼠标指针的进入" "和离开,鼠标位于其中时会报告输入事件。要求至少设置一个 [member " "collision_layer] 位。" #: doc/classes/CollisionObject2D.xml msgid "" "Emitted when an input event occurs. Requires [member input_pickable] to be " "[code]true[/code] and at least one [member collision_layer] bit to be set. " "See [method _input_event] for details." msgstr "" "发生输入事件时发出。要求 [member input_pickable] 为 [code]true[/code] 并且至" "少设置了一个 [member collision_layer] 位。详见 [method _input_event]。" #: doc/classes/CollisionObject2D.xml msgid "" "Emitted when the mouse pointer enters any of this object's shapes. Requires " "[member input_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be set. Note that moving between different shapes " "within a single [CollisionObject2D] won't cause this signal to be emitted.\n" "[b]Note:[/b] Due to the lack of continuous collision detection, this signal " "may not be emitted in the expected order if the mouse moves fast enough and " "the [CollisionObject2D]'s area is small. This signal may also not be emitted " "if another [CollisionObject2D] is overlapping the [CollisionObject2D] in " "question." msgstr "" "当鼠标指针进入该对象的任何形状时发出。要求 [member input_pickable] 为 " "[code]true[/code] 并且至少设置了一个 [member collision_layer] 位。请注意,在" "单个 [CollisionObject2D] 中的不同形状之间移动,不会导致发出该信号。\n" "[b]注意:[/b]由于缺少连续的碰撞检测,如果鼠标移动得足够快并且 " "[CollisionObject2D] 的区域很小,则该信号可能不会按预期的顺序发出。如果另一个 " "[CollisionObject2D] 与所讨论的 [CollisionObject2D] 重叠,则也可能不会发出该信" "号。" #: doc/classes/CollisionObject2D.xml msgid "" "Emitted when the mouse pointer exits all this object's shapes. Requires " "[member input_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be set. Note that moving between different shapes " "within a single [CollisionObject2D] won't cause this signal to be emitted.\n" "[b]Note:[/b] Due to the lack of continuous collision detection, this signal " "may not be emitted in the expected order if the mouse moves fast enough and " "the [CollisionObject2D]'s area is small. This signal may also not be emitted " "if another [CollisionObject2D] is overlapping the [CollisionObject2D] in " "question." msgstr "" "当鼠标指针离开该对象的所有形状时发出。要求 [member input_pickable] 为 " "[code]true[/code] 并且至少设置了一个 [member collision_layer] 位。请注意,在" "单个 [CollisionObject2D] 中的不同形状之间移动,不会导致发出该信号。\n" "[b]注意:[/b]由于缺少连续的碰撞检测,如果鼠标移动得足够快并且 " "[CollisionObject2D] 的区域很小,则该信号可能不会按预期的顺序发出。如果另一个 " "[CollisionObject2D] 与所讨论的 [CollisionObject2D] 重叠,则也可能不会发出该信" "号。" #: doc/classes/CollisionObject2D.xml msgid "" "Emitted when the mouse pointer enters any of this object's shapes or moves " "from one shape to another. [param shape_idx] is the child index of the newly " "entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] " "and at least one [member collision_layer] bit to be set." msgstr "" "当鼠标指针进入该实体的任何形状或从一种形状移动到另一种形状时发出。[param " "shape_idx] 是新进入的 [Shape2D] 的子索引。要求 [member input_pickable] 为 " "[code]true[/code] 并且至少设置一个 [member collision_layer] 位。" #: doc/classes/CollisionObject2D.xml msgid "" "Emitted when the mouse pointer exits any of this object's shapes. [param " "shape_idx] is the child index of the exited [Shape2D]. Requires [member " "input_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be set." msgstr "" "当鼠标指针离开该实体的任何形状时发出。[param shape_idx] 是退出的 [Shape2D] 的" "子索引。要求 [member input_pickable] 为 [code]true[/code] 并且至少设置一个 " "[member collision_layer] 位。" #: doc/classes/CollisionObject2D.xml msgid "" "When [member Node.process_mode] is set to [constant " "Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all " "physics interactions with this [CollisionObject2D].\n" "Automatically re-added to the physics simulation when the [Node] is " "processed again." msgstr "" "当 [member Node.process_mode] 被设置为 [constant Node.PROCESS_MODE_DISABLED] " "时,从物理仿真中移除,停止与此 [CollisionObject2D] 的所有物理交互。\n" "当该 [Node] 再次被处理时,会自动重新加入到物理仿真中。" #: doc/classes/CollisionObject2D.xml msgid "" "When [member Node.process_mode] is set to [constant " "Node.PROCESS_MODE_DISABLED], make the body static. Doesn't affect [Area2D]. " "[PhysicsBody2D] can't be affected by forces or other bodies while static.\n" "Automatically set [PhysicsBody2D] back to its original mode when the [Node] " "is processed again." msgstr "" "当 [member Node.process_mode] 被设置为 [constant Node.PROCESS_MODE_DISABLED] " "时,使物体进入静态模式。不影响 [Area2D]。处于静态模式的 [PhysicsBody2D] 不会" "受到力和其他物体的影响。\n" "当该 [Node] 再次被处理时,会自动将 [PhysicsBody2D] 设置回其原始模式。" #: doc/classes/CollisionObject2D.xml doc/classes/CollisionObject3D.xml #: doc/classes/SoftBody3D.xml msgid "" "When [member Node.process_mode] is set to [constant " "Node.PROCESS_MODE_DISABLED], do not affect the physics simulation." msgstr "" "当 [member Node.process_mode] 被设置为 [constant Node.PROCESS_MODE_DISABLED] " "时,不影响物理仿真。" #: doc/classes/CollisionObject3D.xml msgid "Abstract base class for 3D physics objects." msgstr "3D 物理对象的抽象基类。" #: doc/classes/CollisionObject3D.xml msgid "" "Abstract base class for 3D physics objects. [CollisionObject3D] can hold any " "number of [Shape3D]s for collision. Each shape must be assigned to a " "[i]shape owner[/i]. Shape owners are not nodes and do not appear in the " "editor, but are accessible through code using the [code]shape_owner_*[/code] " "methods.\n" "[b]Warning:[/b] With a non-uniform scale, this node will likely not behave " "as expected. It is advised to keep its scale the same on all axes and adjust " "its collision shape(s) instead." msgstr "" "3D 物理对象的抽象基类。[CollisionObject3D] 能够容纳任意数量的 [Shape3D] 用作" "碰撞形状。每个形状必须分配给一个[i]形状所有者[/i]。形状所有者不是节点,也不会" "出现在编辑器中,但可以通过代码使用 [code]shape_owner_*[/code] 方法访问。\n" "[b]警告:[/b]如果使用非均一缩放,则该节点可能无法按预期工作。建议让所有轴上的" "缩放保持一致,可以用对碰撞形状的调整来代替非均一缩放。" #: doc/classes/CollisionObject3D.xml msgid "" "Receives unhandled [InputEvent]s. [param event_position] is the location in " "world space of the mouse pointer on the surface of the shape with index " "[param shape_idx] and [param normal] is the normal vector of the surface at " "that point. Connect to the [signal input_event] signal to easily pick up " "these events.\n" "[b]Note:[/b] [method _input_event] requires [member input_ray_pickable] to " "be [code]true[/code] and at least one [member collision_layer] bit to be set." msgstr "" "接收未处理的 [InputEvent]。[param event_position] 是鼠标指针在索引为 [param " "shape_idx] 的形状表面上的世界空间位置,[param normal] 是该点表面的法向量。连" "接到 [signal input_event] 信号即可轻松获取这些事件。\n" "[b]注意:[/b][method _input_event] 要求 [member input_ray_pickable] 为 " "[code]true[/code],并且至少要设置一个 [member collision_layer] 位。" #: doc/classes/CollisionObject3D.xml msgid "" "Called when the mouse pointer enters any of this object's shapes. Requires " "[member input_ray_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be set. Note that moving between different shapes " "within a single [CollisionObject3D] won't cause this function to be called." msgstr "" "当鼠标指针进入该实体的任何形状时调用。要求 [member input_ray_pickable] 为 " "[code]true[/code] 并且至少设置一个 [member collision_layer] 位。请注意,在单" "个 [CollisionObject3D] 中的不同形状之间移动,不会导致该函数被调用。" #: doc/classes/CollisionObject3D.xml msgid "" "Called when the mouse pointer exits all this object's shapes. Requires " "[member input_ray_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be set. Note that moving between different shapes " "within a single [CollisionObject3D] won't cause this function to be called." msgstr "" "当鼠标指针离开该实体的所有形状时调用。要求 [member input_ray_pickable] 为 " "[code]true[/code] 并且至少设置一个 [member collision_layer] 位。请注意,在单" "个 [CollisionObject3D] 中的不同形状之间移动,不会导致该函数被调用。" #: doc/classes/CollisionObject3D.xml msgid "Adds a [Shape3D] to the shape owner." msgstr "向形状所有者添加 [Shape3D]。" #: doc/classes/CollisionObject3D.xml msgid "Returns the [Shape3D] with the given ID from the given shape owner." msgstr "返回形状所有者中具有给定 ID 的 [Shape3D]。" #: doc/classes/CollisionObject3D.xml msgid "" "Returns the child index of the [Shape3D] with the given ID from the given " "shape owner." msgstr "返回形状所有者中具有给定 ID 的 [Shape3D] 的子索引。" #: doc/classes/CollisionObject3D.xml msgid "Returns the shape owner's [Transform3D]." msgstr "返回形状所有者的 [Transform3D]。" #: doc/classes/CollisionObject3D.xml msgid "Sets the [Transform3D] of the given shape owner." msgstr "设置给定形状所有者的 [Transform3D]。" #: doc/classes/CollisionObject3D.xml msgid "" "The physics layers this CollisionObject3D [b]is in[/b]. Collision objects " "can exist in one or more of 32 different layers. See also [member " "collision_mask].\n" "[b]Note:[/b] Object A can detect a contact with object B only if object B is " "in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/" "physics/physics_introduction.html#collision-layers-and-masks]Collision " "layers and masks[/url] in the documentation for more information." msgstr "" "该 CollisionObject3D [b]所在的[/b]物理层。碰撞对象可以存在于 32 个不同层中的" "一层或多层。另见 [member collision_mask]。\n" "[b]注意:[/b]只有当对象 B 位于对象 A 扫描的任何层中时,对象 A 才能检测到与对" "象 B 的接触。有关更多信息,请参阅文档中的[url=$DOCS_URL/tutorials/physics/" "physics_introduction.html#collision-layers-and-masks]《碰撞层和掩码》[/url]。" #: doc/classes/CollisionObject3D.xml msgid "" "The physics layers this CollisionObject3D [b]scans[/b]. Collision objects " "can scan one or more of 32 different layers. See also [member " "collision_layer].\n" "[b]Note:[/b] Object A can detect a contact with object B only if object B is " "in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/" "physics/physics_introduction.html#collision-layers-and-masks]Collision " "layers and masks[/url] in the documentation for more information." msgstr "" "该 CollisionObject3D [b]扫描的[/b]物理层。碰撞对象可以扫描 32 个不同层中的一" "层或多层。另见 [member collision_layer]。\n" "[b]注意:[/b]只有当对象 B 位于对象 A 扫描的任何层中时,对象 A 才能检测到与对" "象 B 的接触。有关更多信息,请参阅文档中的[url=$DOCS_URL/tutorials/physics/" "physics_introduction.html#collision-layers-and-masks]《碰撞层和掩码》[/url]。" #: doc/classes/CollisionObject3D.xml msgid "" "If [code]true[/code], the [CollisionObject3D] will continue to receive input " "events as the mouse is dragged across its shapes." msgstr "" "如果为 [code]true[/code],则当鼠标拖过其形状时,[CollisionObject3D] 将继续接" "收输入事件。" #: doc/classes/CollisionObject3D.xml msgid "" "Emitted when the object receives an unhandled [InputEvent]. [param " "event_position] is the location in world space of the mouse pointer on the " "surface of the shape with index [param shape_idx] and [param normal] is the " "normal vector of the surface at that point." msgstr "" "当对象收到未处理的 [InputEvent] 时发出。[param event_position] 是鼠标指针在索" "引为 [param shape_idx] 的形状表面上的世界空间位置,[param normal] 是表面在该" "点的法向量。" #: doc/classes/CollisionObject3D.xml msgid "" "Emitted when the mouse pointer enters any of this object's shapes. Requires " "[member input_ray_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be set.\n" "[b]Note:[/b] Due to the lack of continuous collision detection, this signal " "may not be emitted in the expected order if the mouse moves fast enough and " "the [CollisionObject3D]'s area is small. This signal may also not be emitted " "if another [CollisionObject3D] is overlapping the [CollisionObject3D] in " "question." msgstr "" "当鼠标指针进入该对象的任何形状时发出。要求 [member input_ray_pickable] 为 " "[code]true[/code] 并且至少设置了一个 [member collision_layer] 位。\n" "[b]注意:[/b]由于缺少连续的碰撞检测,如果鼠标移动得足够快并且 " "[CollisionObject3D] 的区域很小,则该信号可能不会按预期的顺序发出。如果另一个 " "[CollisionObject3D] 与所讨论的 [CollisionObject3D] 重叠,则也可能不会发出该信" "号。" #: doc/classes/CollisionObject3D.xml msgid "" "Emitted when the mouse pointer exits all this object's shapes. Requires " "[member input_ray_pickable] to be [code]true[/code] and at least one [member " "collision_layer] bit to be set.\n" "[b]Note:[/b] Due to the lack of continuous collision detection, this signal " "may not be emitted in the expected order if the mouse moves fast enough and " "the [CollisionObject3D]'s area is small. This signal may also not be emitted " "if another [CollisionObject3D] is overlapping the [CollisionObject3D] in " "question." msgstr "" "当鼠标指针离开该对象的所有形状时发出。要求 [member input_ray_pickable] 为 " "[code]true[/code] 并且至少设置了一个 [member collision_layer] 位。\n" "[b]注意:[/b]由于缺少连续的碰撞检测,如果鼠标移动得足够快并且 " "[CollisionObject3D] 的区域很小,则该信号可能不会按预期的顺序发出。如果另一个 " "[CollisionObject3D] 与所讨论的 [CollisionObject3D] 重叠,则也可能不会发出该信" "号。" #: doc/classes/CollisionObject3D.xml msgid "" "When [member Node.process_mode] is set to [constant " "Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all " "physics interactions with this [CollisionObject3D].\n" "Automatically re-added to the physics simulation when the [Node] is " "processed again." msgstr "" "当 [member Node.process_mode] 被设置为 [constant Node.PROCESS_MODE_DISABLED] " "时,从物理仿真中移除,停止与此 [CollisionObject3D] 的所有物理交互。\n" "当该 [Node] 再次被处理时,会自动重新加入到物理仿真中。" #: doc/classes/CollisionObject3D.xml msgid "" "When [member Node.process_mode] is set to [constant " "Node.PROCESS_MODE_DISABLED], make the body static. Doesn't affect [Area3D]. " "[PhysicsBody3D] can't be affected by forces or other bodies while static.\n" "Automatically set [PhysicsBody3D] back to its original mode when the [Node] " "is processed again." msgstr "" "当 [member Node.process_mode] 被设置为 [constant Node.PROCESS_MODE_DISABLED] " "时,使实体静态化。不影响 [Area3D]。[PhysicsBody3D] 在静态时不会受到力或其他实" "体的影响。\n" "当该 [Node] 再次被处理时,自动将 [PhysicsBody3D] 设置回其原始模式。" #: doc/classes/CollisionPolygon2D.xml msgid "A node that provides a polygon shape to a [CollisionObject2D] parent." msgstr "向 [CollisionObject2D] 父级提供多边形形状的节点。" #: doc/classes/CollisionPolygon2D.xml #, fuzzy msgid "" "A node that provides a polygon shape to a [CollisionObject2D] parent and " "allows it to be edited. The polygon can be concave or convex. This can give " "a detection shape to an [Area2D], turn a [PhysicsBody2D] into a solid " "object, or give a hollow shape to a [StaticBody2D].\n" "[b]Warning:[/b] A non-uniformly scaled [CollisionPolygon2D] will likely not " "behave as expected. Make sure to keep its scale the same on all axes and " "adjust its polygon instead." msgstr "" "向 [CollisionObject2D] 父级提供多边形形状的节点,允许对形状进行编辑,可以是凹" "多边形也可以是凸多边形。该节点可以为 [Area2D] 提供检测形状,将 " "[PhysicsBody2D] 变成实体对象,为 [StaticBody2D] 提供空心形状。\n" "[b]警告:[/b]非均匀缩放的 [CollisionShape2D] 可能不会按预期运行。请确保在所有" "轴上保持其缩放相同,可改为调整其多边形形状。" #: doc/classes/CollisionPolygon2D.xml msgid "Collision build mode." msgstr "碰撞构建模式。" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], no collisions will be detected. This property should " "be changed with [method Object.set_deferred]." msgstr "" "如果为 [code]true[/code],则不会检测到碰撞。该属性应使用 [method " "Object.set_deferred] 进行更改。" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " "[CollisionPolygon2D]'s rotation, will collide with other objects.\n" "[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " "child of an [Area2D] node." msgstr "" "如果为 [code]true[/code],则只有面朝上的边缘才会与其他对象发生碰撞,方向是相" "对于 [CollisionPolygon2D] 的旋转而言的。\n" "[b]注意:[/b]如果这个 [CollisionPolygon2D] 是 [Area2D] 节点的子节点,则这个属" "性无效。" #: doc/classes/CollisionPolygon2D.xml msgid "" "The margin used for one-way collision (in pixels). Higher values will make " "the shape thicker, and work better for colliders that enter the polygon at a " "high velocity." msgstr "" "用于单向碰撞的边距(以像素为单位)。较高的值将使形状更厚,并且对于以高速进入" "多边形的对撞机来说效果更好。" #: doc/classes/CollisionPolygon2D.xml msgid "" "The polygon's list of vertices. Each point will be connected to the next, " "and the final point will be connected to the first.\n" "[b]Note:[/b] The returned vertices are in the local coordinate space of the " "given [CollisionPolygon2D]." msgstr "" "多边形的顶点列表。每个点都与下一个点相连,最后一个点与第一个点相连。\n" "[b]注意:[/b]返回的顶点位于给定的 [CollisionPolygon2D] 的局部坐标空间中。" #: doc/classes/CollisionPolygon2D.xml msgid "" "Collisions will include the polygon and its contained area. In this mode the " "node has the same effect as several [ConvexPolygonShape2D] nodes, one for " "each convex shape in the convex decomposition of the polygon (but without " "the overhead of multiple nodes)." msgstr "" "碰撞包含多边形及其内部区域。在这个模式下,该节点的效果与使用若干 " "[ConvexPolygonShape2D] 节点相同,其中的每个节点都包含该多边形凸分解后的凸形状" "(但不会有使用多个节点的负担)。" #: doc/classes/CollisionPolygon2D.xml msgid "" "Collisions will only include the polygon edges. In this mode the node has " "the same effect as a single [ConcavePolygonShape2D] made of segments, with " "the restriction that each segment (after the first one) starts where the " "previous one ends, and the last one ends where the first one starts (forming " "a closed but hollow polygon)." msgstr "" "碰撞仅包含多边形的边缘。在这个模式下,该节点的效果与单个由若干线段组成的 " "[ConcavePolygonShape2D] 相同,其中(第一条以后的)每条线段都从上一条的终点开" "始,最后一条线段在第一条的起点结束(构成闭合但中空的多边形)。" #: doc/classes/CollisionPolygon3D.xml msgid "" "A node that provides a thickened polygon shape (a prism) to a " "[CollisionObject3D] parent." msgstr "向 [CollisionObject3D] 父级提供加厚多边形形状(角柱体)的节点。" #: doc/classes/CollisionPolygon3D.xml #, fuzzy msgid "" "A node that provides a thickened polygon shape (a prism) to a " "[CollisionObject3D] parent and allows it to be edited. The polygon can be " "concave or convex. This can give a detection shape to an [Area3D] or turn a " "[PhysicsBody3D] into a solid object.\n" "[b]Warning:[/b] A non-uniformly scaled [CollisionShape3D] will likely not " "behave as expected. Make sure to keep its scale the same on all axes and " "adjust its shape resource instead." msgstr "" "向 [CollisionObject3D] 父级提供加厚多边形形状(角柱体)的节点,能够为这个形状" "提供编辑的方法。该多边形可以是凹多边形,也可以是凸多边形。能够为 [Area3D] 提" "供检测形状,也能够将 [PhysicsBody3D] 变为实体。\n" "[b]警告:[/b]非均匀缩放的 [CollisionShape3D] 应该无法按预期工作。请确保它在所" "有轴上的缩放是一致的,可以用对形状资源的调整来代替非均匀缩放。" #: doc/classes/CollisionPolygon3D.xml doc/classes/CollisionShape2D.xml #: doc/classes/CollisionShape3D.xml msgid "" "The collision shape color that is displayed in the editor, or in the running " "project if [b]Debug > Visible Collision Shapes[/b] is checked at the top of " "the editor.\n" "[b]Note:[/b] The default value is [member ProjectSettings.debug/shapes/" "collision/shape_color]. The [code]Color(0, 0, 0, 0)[/code] value documented " "here is a placeholder, and not the actual default debug color." msgstr "" "碰撞形状的颜色,在编辑器中显示,勾选编辑器顶部的 [b]调试 > 显示碰撞形状[/b] " "时也会在运行项目时显示。\n" "[b]注意:[/b]默认值为 [member ProjectSettings.debug/shapes/collision/" "shape_color]。这里记录的 [code]Color(0, 0, 0, 0)[/code] 值是占位符,不是实际" "的默认调试颜色。" #: doc/classes/CollisionPolygon3D.xml doc/classes/CollisionShape3D.xml msgid "" "If [code]true[/code], when the shape is displayed, it will show a solid fill " "color in addition to its wireframe." msgstr "如果为 [code]true[/code],则显示形状时除了显示线框外还会显示填充颜色。" #: doc/classes/CollisionPolygon3D.xml msgid "" "Length that the resulting collision extends in either direction " "perpendicular to its 2D polygon." msgstr "产生的碰撞沿着与 2D 多边形垂直的任意方向深入的长度。" #: doc/classes/CollisionPolygon3D.xml msgid "" "If [code]true[/code], no collision will be produced. This property should be " "changed with [method Object.set_deferred]." msgstr "" "如果为 [code]true[/code],则不会产生碰撞。该属性应使用 [method " "Object.set_deferred] 进行更改。" #: doc/classes/CollisionPolygon3D.xml msgid "" "The collision margin for the generated [Shape3D]. See [member " "Shape3D.margin] for more details." msgstr "生成的 [Shape3D] 的碰撞边距。详见 [member Shape3D.margin]。" #: doc/classes/CollisionPolygon3D.xml msgid "Array of vertices which define the 2D polygon in the local XY plane." msgstr "在局部 XY 平面中定义 2D 多边形的顶点数组。" #: doc/classes/CollisionShape2D.xml msgid "A node that provides a [Shape2D] to a [CollisionObject2D] parent." msgstr "向 [CollisionObject2D] 父级提供 [Shape2D] 的节点。" #: doc/classes/CollisionShape2D.xml #, fuzzy msgid "" "A node that provides a [Shape2D] to a [CollisionObject2D] parent and allows " "it to be edited. This can give a detection shape to an [Area2D] or turn a " "[PhysicsBody2D] into a solid object." msgstr "" "向 [CollisionObject2D] 父级提供 [Shape2D] 并允许对其进行编辑的节点。这可以为 " "[Area2D] 提供检测形状或将 [PhysicsBody2D] 转变为实体对象。" #: doc/classes/CollisionShape2D.xml doc/classes/CollisionShape3D.xml msgid "" "A disabled collision shape has no effect in the world. This property should " "be changed with [method Object.set_deferred]." msgstr "" "禁用的碰撞形状在世界中没有影响。这个属性应该用 [method Object.set_deferred] " "改变。" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " "(top or bottom).\n" "[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " "child of an [Area2D] node." msgstr "" "设置此碰撞形状是否仅应检测到一侧(顶部或底部)的碰撞。\n" "[b]注意:[/b]如果这个 [CollisionShape2D] 是 [Area2D] 节点的子节点,则这个属性" "无效。" #: doc/classes/CollisionShape2D.xml msgid "" "The margin used for one-way collision (in pixels). Higher values will make " "the shape thicker, and work better for colliders that enter the shape at a " "high velocity." msgstr "" "用于单向碰撞的边距(以像素为单位)。较高的值将使形状更厚,并且对于高速进入形" "状的对撞机来说效果更好。" #: doc/classes/CollisionShape2D.xml doc/classes/CollisionShape3D.xml msgid "The actual shape owned by this collision shape." msgstr "该碰撞形状拥有的实际形状。" #: doc/classes/CollisionShape3D.xml msgid "A node that provides a [Shape3D] to a [CollisionObject3D] parent." msgstr "向 [CollisionObject3D] 父级提供 [Shape3D] 的节点。" #: doc/classes/CollisionShape3D.xml #, fuzzy msgid "" "A node that provides a [Shape3D] to a [CollisionObject3D] parent and allows " "it to be edited. This can give a detection shape to an [Area3D] or turn a " "[PhysicsBody3D] into a solid object.\n" "[b]Warning:[/b] A non-uniformly scaled [CollisionShape3D] will likely not " "behave as expected. Make sure to keep its scale the same on all axes and " "adjust its [member shape] resource instead." msgstr "" "向 [CollisionObject3D] 父级提供 [Shape3D] 并能够对其进行编辑的节点。可以为 " "[Area3D] 提供检测形状,也可以将 [PhysicsBody3D] 变为实体对象。\n" "[b]警告:[/b]非均匀缩放的 [CollisionShape3D] 可能无法按预期运行。请保持在所有" "轴上使用相同的缩放,需要时可以更改其 [member shape] 资源代替。" #: doc/classes/CollisionShape3D.xml msgid "" "Sets the collision shape's shape to the addition of all its convexed " "[MeshInstance3D] siblings geometry." msgstr "将碰撞形状的形状设置为其所有凸面 [MeshInstance3D] 同级几何体的相加。" #: doc/classes/CollisionShape3D.xml modules/gridmap/doc_classes/GridMap.xml #: doc/classes/ShapeCast3D.xml msgid "Use [signal Resource.changed] instead." msgstr "请改用 [signal Resource.changed]。" #: doc/classes/CollisionShape3D.xml modules/gridmap/doc_classes/GridMap.xml #: doc/classes/RenderingDevice.xml doc/classes/RenderingServer.xml #: doc/classes/ShapeCast3D.xml doc/classes/TextEdit.xml #: doc/classes/TextServer.xml msgid "This method does nothing." msgstr "这个方法什么也不做。" #: doc/classes/Color.xml msgid "A color represented in RGBA format." msgstr "以 RGBA 格式表示的颜色。" #: doc/classes/Color.xml #, fuzzy msgid "" "A color represented in RGBA format by a red ([member r]), green ([member " "g]), blue ([member b]), and alpha ([member a]) component. Each component is " "a 32-bit floating-point value, usually ranging from [code]0.0[/code] to " "[code]1.0[/code]. Some properties (such as [member CanvasItem.modulate]) may " "support values greater than [code]1.0[/code], for overbright or HDR (High " "Dynamic Range) colors.\n" "Colors can be created in a number of ways: By the various [Color] " "constructors, by static methods such as [method from_hsv], and by using a " "name from the set of standardized colors based on [url=https://" "en.wikipedia.org/wiki/X11_color_names]X11 color names[/url] with the " "addition of [constant TRANSPARENT].\n" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "color_constants.png]Color constants cheatsheet[/url]\n" "Although [Color] may be used to store values of any encoding, the red " "([member r]), green ([member g]), and blue ([member b]) properties of " "[Color] are expected by Godot to be encoded using the [url=https://" "en.wikipedia.org/wiki/SRGB#Transfer_function_(%22gamma%22)]nonlinear sRGB " "transfer function[/url] unless otherwise stated. This color encoding is used " "by many traditional art and web tools, making it easy to match colors " "between Godot and these tools. Godot uses [url=https://en.wikipedia.org/wiki/" "Rec._709]Rec. ITU-R BT.709[/url] color primaries, which are used by the sRGB " "standard.\n" "All physical simulation, such as lighting calculations, and colorimetry " "transformations, such as [method get_luminance], must be performed on " "linearly encoded values to produce correct results. When performing these " "calculations, convert [Color] to and from linear encoding using [method " "srgb_to_linear] and [method linear_to_srgb].\n" "[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/" "code] if it is equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). " "Otherwise, a Color will always evaluate to [code]true[/code]." msgstr "" "由红([member r])、绿([member g])、蓝([member b])和 alpha([member a])" "分量表示的 RGBA 格式的颜色。每个分量都是一个 32 位浮点值,通常介于 " "[code]0.0[/code] 到 [code]1.0[/code] 之间。某些属性(例如 [member " "CanvasItem.modulate])可能支持大于 [code]1.0[/code] 的值,用于表示过亮或 HDR" "(High Dynamic Range,高动态范围)颜色。\n" "创建颜色的方法有很多:可以使用 [Color] 的各种构造函数,[method from_hsv] 等静" "态方法,以及使用基于 [url=https://en.wikipedia.org/wiki/X11_color_names]X11 " "颜色名称[/url]的标准化颜色集外加 [constant TRANSPARENT]。GDScript 还提供了 " "[method @GDScript.Color8],使用的是 [code]0[/code] 到 [code]255[/code] 之间的" "整数,且不支持过亮的颜色。\n" "颜色数据可以使用不同的色彩空间和编码进行存储。[method srgb_to_linear] 和 " "[method linear_to_srgb] 方法可以在非线性 sRGB 编码和线性 RGB 编码之间进行转" "换。\n" "[b]注意:[/b]在布尔上下文中,等于 [code]Color(0, 0, 0, 1)[/code](不透明的黑" "色)的 Color 将被评估为 [code]false[/code]。否则,Color 将始终被评估为 " "[code]true[/code]。\n" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "color_constants.png]Color 常量速查表[/url]" #: doc/classes/Color.xml doc/classes/ColorPickerButton.xml msgid "2D GD Paint Demo" msgstr "2D GD 画图演示" #: doc/classes/Color.xml doc/classes/ColorPicker.xml msgid "Tween Interpolation Demo" msgstr "补间插值演示" #: doc/classes/Color.xml doc/classes/ColorPickerButton.xml msgid "GUI Drag And Drop Demo" msgstr "GUI 拖放演示" #: doc/classes/Color.xml msgid "" "Constructs a default [Color] from opaque black. This is the same as " "[constant BLACK].\n" "[b]Note:[/b] In C#, this constructs a [Color] with all of its components set " "to [code]0.0[/code] (transparent black)." msgstr "" "用不透明的黑色构造默认的 [Color],与 [constant BLACK] 相同。\n" "[b]注意:[/b]在 C# 中构造的是所有分量都为 [code]0.0[/code] 的颜色(透明黑)。" #: doc/classes/Color.xml msgid "" "Constructs a [Color] from the existing color, with [member a] set to the " "given [param alpha] value.\n" "[codeblocks]\n" "[gdscript]\n" "var red = Color(Color.RED, 0.2) # 20% opaque red.\n" "[/gdscript]\n" "[csharp]\n" "var red = new Color(Colors.Red, 0.2f); // 20% opaque red.\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "从现有的颜色构造 [Color],[member a] 设置为给定的 [param alpha] 值。\n" "[codeblocks]\n" "[gdscript]\n" "var red = Color(Color.RED, 0.2) # 20% 不透明红色。\n" "[/gdscript]\n" "[csharp]\n" "var red = new Color(Colors.Red, 0.2f); // 20% 不透明红色。\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "Constructs a [Color] as a copy of the given [Color]." msgstr "构造给定 [Color] 的副本。" #: doc/classes/Color.xml msgid "" "Constructs a [Color] either from an HTML color code or from a standardized " "color name. The supported color names are the same as the constants." msgstr "" "从 HTML 颜色代码或标准化的颜色名称中构建 [Color]。支持的颜色名称与常量名相" "同。" #: doc/classes/Color.xml msgid "" "Constructs a [Color] either from an HTML color code or from a standardized " "color name, with [param alpha] on the range of 0.0 to 1.0. The supported " "color names are the same as the constants." msgstr "" "从 HTML 颜色代码或标准化的颜色名称中构建 [Color],[param alpha] 的范围为 0.0 " "到 1.0。支持的颜色名称与常量名相同。" #: doc/classes/Color.xml #, fuzzy msgid "" "Constructs a [Color] from RGB values, typically between 0.0 and 1.0. [member " "a] is set to 1.0.\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(0.2, 1.0, 0.7) # Similar to `Color.from_rgba8(51, 255, " "178, 255)`\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, " "255, 178, 255)`\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "从通常介于 0.0 和 1.0 之间的 RGB 值构造一个 [Color]。[member a] 被设置为 " "1.0。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(0.2, 1.0, 0.7) # 类似于 `Color8(51, 255, 178, 255)`\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(0.2f, 1.0f, 0.7f); // 类似于 `Color.Color8(51, 255, " "178, 255)`\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml #, fuzzy msgid "" "Constructs a [Color] from RGBA values, typically between 0.0 and 1.0.\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color.from_rgba8(51, " "255, 178, 204)`\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to " "`Color.Color8(51, 255, 178, 255, 204)`\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "从通常介于 0.0 和 1.0 之间的 RGBA 值构造一个 [Color]。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(0.2, 1.0, 0.7, 0.8) # 类似于 `Color8(51, 255, 178, 204)`\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // 类似于 `Color.Color8(51, " "255, 178, 255, 204)`\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns a new color resulting from overlaying this color over the given " "color. In a painting program, you can imagine it as the [param over] color " "painted over this color (including alpha).\n" "[codeblocks]\n" "[gdscript]\n" "var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50%\n" "var fg = Color(1.0, 0.0, 0.0, 0.5) # Red with alpha of 50%\n" "var blended_color = bg.blend(fg) # Brown with alpha of 75%\n" "[/gdscript]\n" "[csharp]\n" "var bg = new Color(0.0f, 1.0f, 0.0f, 0.5f); // Green with alpha of 50%\n" "var fg = new Color(1.0f, 0.0f, 0.0f, 0.5f); // Red with alpha of 50%\n" "Color blendedColor = bg.Blend(fg); // Brown with alpha of 75%\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回将该颜色混合到给定颜色上所产生的新颜色。在绘画程序中,你可以将其想象为在" "该颜色(包括 alpha)上绘制的 [param over] 颜色。\n" "[codeblocks]\n" "[gdscript]\n" "var bg = Color(0.0, 1.0, 0.0, 0.5) # 50% 不透明的绿色\n" "var fg = Color(1.0, 0.0, 0.0, 0.5) # 50% 不透明的红色\n" "var blended_color = bg.blend(fg) # 75% 不透明的棕色\n" "[/gdscript]\n" "[csharp]\n" "var bg = new Color(0.0f, 1.0f, 0.0f, 0.5f); // 50% 不透明的绿色\n" "var fg = new Color(1.0f, 0.0f, 0.0f, 0.5f); // 50% 不透明的红色\n" "Color blendedColor = bg.Blend(fg); // 75% 不透明的棕色\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns a new color with all components clamped between the components of " "[param min] and [param max], by running [method @GlobalScope.clamp] on each " "component." msgstr "" "通过在每个分量上运行 [method @GlobalScope.clamp],返回一种新颜色,其中所有分" "量都被钳制在 [param min] 和 [param max] 的分量之间。" #: doc/classes/Color.xml msgid "" "Returns a new color resulting from making this color darker by the specified " "[param amount] (ratio from 0.0 to 1.0). See also [method lightened].\n" "[codeblocks]\n" "[gdscript]\n" "var green = Color(0.0, 1.0, 0.0)\n" "var darkgreen = green.darkened(0.2) # 20% darker than regular green\n" "[/gdscript]\n" "[csharp]\n" "var green = new Color(0.0f, 1.0f, 0.0f);\n" "Color darkgreen = green.Darkened(0.2f); // 20% darker than regular green\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回通过指定 [param amount](从 0.0 到 1.0 的比率)使该颜色变暗而产生的新颜" "色。另见 [method lightened]。\n" "[codeblocks]\n" "[gdscript]\n" "var green = Color(0.0, 1.0, 0.0)\n" "var darkgreen = green.darkened(0.2) # 比普通的绿色深 20%\n" "[/gdscript]\n" "[csharp]\n" "var green = new Color(0.0f, 1.0f, 0.0f);\n" "Color darkgreen = green.Darkened(0.2f); // 比普通的绿色深 20%\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Constructs a color from an [url=https://en.wikipedia.org/wiki/" "HSL_and_HSV]HSV profile[/url]. The hue ([param h]), saturation ([param s]), " "and value ([param v]) are typically between 0.0 and 1.0.\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8)\n" "[/gdscript]\n" "[csharp]\n" "var color = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f);\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "根据 [url=https://zh.wikipedia.org/wiki/" "HSL%E5%92%8CHSV%E8%89%B2%E5%BD%A9%E7%A9%BA%E9%97%B4]HSV 配置[/url]构建颜色。" "色相([param h])、饱和度([param s])和值([param v])通常在 0.0 和 1.0 之" "间。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8)\n" "[/gdscript]\n" "[csharp]\n" "var color = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f);\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Constructs a color from an [url=https://bottosson.github.io/posts/" "colorpicker/]OK HSL profile[/url]. The hue ([param h]), saturation ([param " "s]), and lightness ([param l]) are typically between 0.0 and 1.0.\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8)\n" "[/gdscript]\n" "[csharp]\n" "var color = Color.FromOkHsl(0.58f, 0.5f, 0.79f, 0.8f);\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "根据 [url=https://bottosson.github.io/posts/colorpicker/]OK HSL 配置[/url]构" "建颜色。色相([param h])、饱和度([param s])和亮度([param l])通常在 0.0 " "和 1.0 之间。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8)\n" "[/gdscript]\n" "[csharp]\n" "var color = Color.FromOkHsl(0.58f, 0.5f, 0.79f, 0.8f);\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns a [Color] constructed from red ([param r8]), green ([param g8]), " "blue ([param b8]), and optionally alpha ([param a8]) integer channels, each " "divided by [code]255.0[/code] for their final value.\n" "[codeblock]\n" "var red = Color.from_rgba8(255, 0, 0) # Same as Color(1, 0, 0).\n" "var dark_blue = Color.from_rgba8(0, 0, 51) # Same as Color(0, 0, " "0.2).\n" "var my_color = Color.from_rgba8(306, 255, 0, 102) # Same as Color(1.2, 1, 0, " "0.4).\n" "[/codeblock]\n" "[b]Note:[/b] Due to the lower precision of [method from_rgba8] compared to " "the standard [Color] constructor, a color created with [method from_rgba8] " "will generally not be equal to the same color created with the standard " "[Color] constructor. Use [method is_equal_approx] for comparisons to avoid " "issues with floating-point precision error." msgstr "" "返回一个由整数红通道([param r8])、整数绿通道([param g8])、整数蓝通道" "([param b8])和可选的整数 Alpha 通道([param a8])构造的 [Color],每个通道的" "最终值都是除以 [code]255.0[/code] 后得到的。\n" "[codeblock]\n" "var red = Color.from_rgba8(255, 0, 0) # 与 Color(1, 0, 0) 相" "同。\n" "var dark_blue = Color.from_rgba8(0, 0, 51) # 与 Color(0, 0, 0.2) 相" "同。\n" "var my_color = Color.from_rgba8(306, 255, 0, 102) # 与 Color(1.2, 1, 0, 0.4) " "相同。\n" "[/codeblock]\n" "[b]注意:[/b]因为 [method from_rgba8] 的精度比标准 [Color] 构造函数低,所以使" "用 [method from_rgba8] 创建的颜色通常与使用标准 [Color] 构造函数创建的相同颜" "色不相等。请使用 [method Color.is_equal_approx] 进行比较,避免浮点数精度误" "差。" #: doc/classes/Color.xml msgid "" "Decodes a [Color] from an RGBE9995 format integer. See [constant " "Image.FORMAT_RGBE9995]." msgstr "" "从 RGBE9995 格式的整数解码 [Color]。见 [constant Image.FORMAT_RGBE9995]。" #: doc/classes/Color.xml msgid "" "Creates a [Color] from the given string, which can be either an HTML color " "code or a named color (case-insensitive). Returns [param default] if the " "color cannot be inferred from the string.\n" "If you want to create a color from String in a constant expression, use the " "equivalent constructor instead (i.e. [code]Color(\"color string\")[/code])." msgstr "" "从给定的字符串创建 [Color],该字符串可以是 HTML 颜色代码,也可以是颜色名称" "(不区分大小写)。如果无法从字符串中推断出颜色,则返回 [param default]。\n" "如果你想要在常量表达式中使用 String 创建颜色,请改用对应的构造函数(即 " "[code]Color(\"颜色字符串\")[/code])。" #: doc/classes/Color.xml #, fuzzy msgid "" "Returns the light intensity of the color, as a value between 0.0 and 1.0 " "(inclusive). This is useful when determining light or dark color. Colors " "with a luminance smaller than 0.5 can be generally considered dark.\n" "[b]Note:[/b] [method get_luminance] relies on the color using linear " "encoding to return an accurate relative luminance value. If the color uses " "the default nonlinear sRGB encoding, use [method srgb_to_linear] to convert " "it to linear encoding first." msgstr "" "将颜色的光照强度返回为一个介于 0.0 和 1.0(包含)之间的值。这在确定浅色或深色" "时很有用。亮度小于 0.5 的颜色通常可以认为是深色。\n" "[b]注意:[/b][method get_luminance] 依赖于线性色彩空间中的颜色,以返回准确的" "相对亮度值。如果颜色在 sRGB 色彩空间,请先使用 [method srgb_to_linear] 将其转" "换为线性色彩空间。" #: doc/classes/Color.xml msgid "" "Returns the [Color] associated with the provided [param hex] integer in 32-" "bit RGBA format (8 bits per channel). This method is the inverse of [method " "to_rgba32].\n" "In GDScript and C#, the [int] is best visualized with hexadecimal notation " "([code]\"0x\"[/code] prefix, making it [code]\"0xRRGGBBAA\"[/code]).\n" "[codeblocks]\n" "[gdscript]\n" "var red = Color.hex(0xff0000ff)\n" "var dark_cyan = Color.hex(0x008b8bff)\n" "var my_color = Color.hex(0xbbefd2a4)\n" "[/gdscript]\n" "[csharp]\n" "var red = new Color(0xff0000ff);\n" "var dark_cyan = new Color(0x008b8bff);\n" "var my_color = new Color(0xbbefd2a4);\n" "[/csharp]\n" "[/codeblocks]\n" "If you want to use hex notation in a constant expression, use the equivalent " "constructor instead (i.e. [code]Color(0xRRGGBBAA)[/code])." msgstr "" "返回与提供的整数 [param hex] 相关联的 [Color],使用 32 位 RGBA 格式(每通道 " "8 位)。该方法是 [method to_rgba32] 的逆方法。\n" "在 GDScript 和 C# 中,展示该 [int] 的最好方法是十六进制表示法(使用 [code]" "\"0x\"[/code] 前缀,得到 [code]\"0xRRGGBBAA\"[/code])。\n" "[codeblocks]\n" "[gdscript]\n" "var red = Color.hex(0xff0000ff)\n" "var dark_cyan = Color.hex(0x008b8bff)\n" "var my_color = Color.hex(0xbbefd2a4)\n" "[/gdscript]\n" "[csharp]\n" "var red = new Color(0xff0000ff);\n" "var dark_cyan = new Color(0x008b8bff);\n" "var my_color = new Color(0xbbefd2a4);\n" "[/csharp]\n" "[/codeblocks]\n" "如果你想要在常量表达式中使用十六进制表示,请改用对应的构造函数(即 " "[code]Color(0xRRGGBBAA)[/code])。" #: doc/classes/Color.xml msgid "" "Returns the [Color] associated with the provided [param hex] integer in 64-" "bit RGBA format (16 bits per channel). This method is the inverse of [method " "to_rgba64].\n" "In GDScript and C#, the [int] is best visualized with hexadecimal notation " "([code]\"0x\"[/code] prefix, making it [code]\"0xRRRRGGGGBBBBAAAA\"[/code])." msgstr "" "返回与提供的整数 [param hex] 相关联的 [Color],使用 64 位 RGBA 格式(每通道 " "8 位)。该方法是 [method to_rgba64] 的逆方法。\n" "在 GDScript 和 C# 中,展示该 [int] 的最好方法是十六进制表示法(使用 [code]" "\"0x\"[/code] 前缀,得到 [code]\"0xRRRRGGGGBBBBAAAA\"[/code])。" #: doc/classes/Color.xml msgid "" "Returns a new color from [param rgba], an HTML hexadecimal color string. " "[param rgba] is not case-sensitive, and may be prefixed by a hash sign " "([code]#[/code]).\n" "[param rgba] must be a valid three-digit or six-digit hexadecimal color " "string, and may contain an alpha channel value. If [param rgba] does not " "contain an alpha channel value, an alpha channel value of 1.0 is applied. If " "[param rgba] is invalid, returns an empty color.\n" "[codeblocks]\n" "[gdscript]\n" "var blue = Color.html(\"#0000ff\") # blue is Color(0.0, 0.0, 1.0, 1.0)\n" "var green = Color.html(\"#0F0\") # green is Color(0.0, 1.0, 0.0, 1.0)\n" "var col = Color.html(\"663399cc\") # col is Color(0.4, 0.2, 0.6, 0.8)\n" "[/gdscript]\n" "[csharp]\n" "var blue = Color.FromHtml(\"#0000ff\"); // blue is Color(0.0, 0.0, 1.0, " "1.0)\n" "var green = Color.FromHtml(\"#0F0\"); // green is Color(0.0, 1.0, 0.0, " "1.0)\n" "var col = Color.FromHtml(\"663399cc\"); // col is Color(0.4, 0.2, 0.6, 0.8)\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "从 HTML 十六进制颜色字符串 [param rgba] 返回一个新颜色。[param rgba] 不区分大" "小写,可以使用哈希符号([code]#[/code])作为前缀。\n" "[param rgba] 必须是有效的三位或六位十六进制颜色字符串,并且可以包含 alpha 通" "道值。如果 [param rgba] 不包含 alpha 通道值,则应用 alpha 通道值 1.0。如果 " "[param rgba] 无效,则返回一个空颜色。\n" "[codeblocks]\n" "[gdscript]\n" "var blue = Color.html(\"#0000ff\") # blue 为 Color(0.0, 0.0, 1.0, 1.0)\n" "var green = Color.html(\"#0F0\") # green 为 Color(0.0, 1.0, 0.0, 1.0)\n" "var col = Color.html(\"663399cc\") # col 为 Color(0.4, 0.2, 0.6, 0.8)\n" "[/gdscript]\n" "[csharp]\n" "var blue = Color.FromHtml(\"#0000ff\"); // blue 为 Color(0.0, 0.0, 1.0, " "1.0)\n" "var green = Color.FromHtml(\"#0F0\"); // green 为 Color(0.0, 1.0, 0.0, " "1.0)\n" "var col = Color.FromHtml(\"663399cc\"); // col 为 Color(0.4, 0.2, 0.6, 0.8)\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns [code]true[/code] if [param color] is a valid HTML hexadecimal color " "string. The string must be a hexadecimal value (case-insensitive) of either " "3, 4, 6 or 8 digits, and may be prefixed by a hash sign ([code]#[/code]). " "This method is identical to [method String.is_valid_html_color].\n" "[codeblocks]\n" "[gdscript]\n" "Color.html_is_valid(\"#55aaFF\") # Returns true\n" "Color.html_is_valid(\"#55AAFF20\") # Returns true\n" "Color.html_is_valid(\"55AAFF\") # Returns true\n" "Color.html_is_valid(\"#F2C\") # Returns true\n" "\n" "Color.html_is_valid(\"#AABBC\") # Returns false\n" "Color.html_is_valid(\"#55aaFF5\") # Returns false\n" "[/gdscript]\n" "[csharp]\n" "Color.HtmlIsValid(\"#55AAFF\"); // Returns true\n" "Color.HtmlIsValid(\"#55AAFF20\"); // Returns true\n" "Color.HtmlIsValid(\"55AAFF\"); // Returns true\n" "Color.HtmlIsValid(\"#F2C\"); // Returns true\n" "\n" "Color.HtmlIsValid(\"#AABBC\"); // Returns false\n" "Color.HtmlIsValid(\"#55aaFF5\"); // Returns false\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "如果 [param color] 是一个有效的 HTML 十六进制颜色字符串,则返回 [code]true[/" "code]。该字符串必须是一个由 3、4、6 或 8 位数字组成的十六进制值(不区分大小" "写),并且可以以井号 ([code]#[/code]) 作为前缀。该方法与 [method " "String.is_valid_html_color] 相同。\n" "[codeblocks]\n" "[gdscript]\n" "Color.html_is_valid(\"#55aaFF\") # 返回 true\n" "Color.html_is_valid(\"#55AAFF20\") # 返回 true\n" "Color.html_is_valid(\"55AAFF\") # 返回 true\n" "Color.html_is_valid(\"#F2C\") # 返回 true\n" "\n" "Color.html_is_valid(\"#AABBC\") # 返回 false\n" "Color.html_is_valid(\"#55aaFF5\") # 返回 false\n" "[/gdscript]\n" "[csharp]\n" "Color.HtmlIsValid(\"#55AAFF\"); // 返回 true\n" "Color.HtmlIsValid(\"#55AAFF20\"); // 返回 true\n" "Color.HtmlIsValid(\"55AAFF\"); // 返回 true\n" "Color.HtmlIsValid(\"#F2C\"); // 返回 true\n" "\n" "Color.HtmlIsValid(\"#AABBC\"); // 返回 false\n" "Color.HtmlIsValid(\"#55aaFF5\"); // 返回 false\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns the color with its [member r], [member g], and [member b] components " "inverted ([code](1 - r, 1 - g, 1 - b, a)[/code]).\n" "[codeblocks]\n" "[gdscript]\n" "var black = Color.WHITE.inverted()\n" "var color = Color(0.3, 0.4, 0.9)\n" "var inverted_color = color.inverted() # Equivalent to `Color(0.7, 0.6, " "0.1)`\n" "[/gdscript]\n" "[csharp]\n" "var black = Colors.White.Inverted();\n" "var color = new Color(0.3f, 0.4f, 0.9f);\n" "Color invertedColor = color.Inverted(); // Equivalent to `new Color(0.7f, " "0.6f, 0.1f)`\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回将 [member r]、[member g]、[member b] 分量翻转后的颜色([code](1 - r, 1 " "- g, 1 - b, a)[/code])。\n" "[codeblocks]\n" "[gdscript]\n" "var black = Color.WHITE.inverted()\n" "var color = Color(0.3, 0.4, 0.9)\n" "var inverted_color = color.inverted() # 等价于 `Color(0.7, 0.6, 0.1)`\n" "[/gdscript]\n" "[csharp]\n" "var black = Colors.White.Inverted();\n" "var color = new Color(0.3f, 0.4f, 0.9f);\n" "Color invertedColor = color.Inverted(); // 等价于 `new Color(0.7f, 0.6f, " "0.1f)`\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns [code]true[/code] if this color and [param to] are approximately " "equal, by running [method @GlobalScope.is_equal_approx] on each component." msgstr "" "如果该颜色和 [param to] 近似相等,则返回 [code]true[/code],判断近似相等的方" "法是通过在每个分量上运行 [method @GlobalScope.is_equal_approx]。" #: doc/classes/Color.xml msgid "" "Returns the linear interpolation between this color's components and [param " "to]'s components. The interpolation factor [param weight] should be between " "0.0 and 1.0 (inclusive). See also [method @GlobalScope.lerp].\n" "[codeblocks]\n" "[gdscript]\n" "var red = Color(1.0, 0.0, 0.0)\n" "var aqua = Color(0.0, 1.0, 0.8)\n" "\n" "red.lerp(aqua, 0.2) # Returns Color(0.8, 0.2, 0.16)\n" "red.lerp(aqua, 0.5) # Returns Color(0.5, 0.5, 0.4)\n" "red.lerp(aqua, 1.0) # Returns Color(0.0, 1.0, 0.8)\n" "[/gdscript]\n" "[csharp]\n" "var red = new Color(1.0f, 0.0f, 0.0f);\n" "var aqua = new Color(0.0f, 1.0f, 0.8f);\n" "\n" "red.Lerp(aqua, 0.2f); // Returns Color(0.8f, 0.2f, 0.16f)\n" "red.Lerp(aqua, 0.5f); // Returns Color(0.5f, 0.5f, 0.4f)\n" "red.Lerp(aqua, 1.0f); // Returns Color(0.0f, 1.0f, 0.8f)\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回将该颜色的分量和 [param to] 的分量进行线性插值的结果。插值系数 [param " "weight] 应该在 0.0 和 1.0 之间(闭区间)。另见 [method @GlobalScope.lerp]。\n" "[codeblocks]\n" "[gdscript]\n" "var red = Color(1.0, 0.0, 0.0)\n" "var aqua = Color(0.0, 1.0, 0.8)\n" "\n" "red.lerp(aqua, 0.2) # 返回 Color(0.8, 0.2, 0.16)\n" "red.lerp(aqua, 0.5) # 返回 Color(0.5, 0.5, 0.4)\n" "red.lerp(aqua, 1.0) # 返回 Color(0.0, 1.0, 0.8)\n" "[/gdscript]\n" "[csharp]\n" "var red = new Color(1.0f, 0.0f, 0.0f);\n" "var aqua = new Color(0.0f, 1.0f, 0.8f);\n" "\n" "red.Lerp(aqua, 0.2f); // 返回 Color(0.8f, 0.2f, 0.16f)\n" "red.Lerp(aqua, 0.5f); // 返回 Color(0.5f, 0.5f, 0.4f)\n" "red.Lerp(aqua, 1.0f); // 返回 Color(0.0f, 1.0f, 0.8f)\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns a new color resulting from making this color lighter by the " "specified [param amount], which should be a ratio from 0.0 to 1.0. See also " "[method darkened].\n" "[codeblocks]\n" "[gdscript]\n" "var green = Color(0.0, 1.0, 0.0)\n" "var light_green = green.lightened(0.2) # 20% lighter than regular green\n" "[/gdscript]\n" "[csharp]\n" "var green = new Color(0.0f, 1.0f, 0.0f);\n" "Color lightGreen = green.Lightened(0.2f); // 20% lighter than regular green\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回通过指定 [param amount](从 0.0 到 1.0 的比率)使该颜色变亮而产生的新颜" "色。另见 [method darkened]。\n" "[codeblocks]\n" "[gdscript]\n" "var green = Color(0.0, 1.0, 0.0)\n" "var light_green = green.lightened(0.2) # 比普通的绿色要淡 20%\n" "[/gdscript]\n" "[csharp]\n" "var green = new Color(0.0f, 1.0f, 0.0f);\n" "Color lightGreen = green.Lightened(0.2f); // 比普通的绿色要淡 20%\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml #, fuzzy msgid "" "Returns a copy of the color that is encoded using the [url=https://" "en.wikipedia.org/wiki/SRGB]nonlinear sRGB transfer function[/url]. This " "method requires the original color to use linear encoding. See also [method " "srgb_to_linear] which performs the opposite operation.\n" "[b]Note:[/b] The color's alpha channel ([member a]) is not affected. The " "alpha channel is always stored with linear encoding, regardless of the color " "space of the other color channels." msgstr "" "返回转换到 [url=https://en.wikipedia.org/wiki/SRGB]sRGB[/url] 色彩空间的颜" "色。该方法假定原始颜色位于线性色彩空间中。另见执行相反操作的 [method " "srgb_to_linear]。\n" "[b]注意:[/b]颜色的 Alpha 通道 [member a] 不受影响。Alpha 通道始终使用线性编" "码,与其他颜色通道所使用的色彩空间无关。" #: doc/classes/Color.xml #, fuzzy msgid "" "Returns a copy of the color that uses linear encoding. This method requires " "the original color to be encoded using the [url=https://en.wikipedia.org/" "wiki/SRGB]nonlinear sRGB transfer function[/url]. See also [method " "linear_to_srgb] which performs the opposite operation.\n" "[b]Note:[/b] The color's alpha channel ([member a]) is not affected. The " "alpha channel is always stored with linear encoding, regardless of the color " "space of the other color channels." msgstr "" "返回转换到线性色彩空间的颜色。该方法假定原始颜色已经在 sRGB 色彩空间中。另请" "参见执行相反操作的 [method linear_to_srgb]。\n" "[b]注意:[/b]颜色的 Alpha 通道 [member a] 不受影响。Alpha 通道始终使用线性编" "码,与其他颜色通道所使用的色彩空间无关。" #: doc/classes/Color.xml msgid "" "Returns the color converted to a 32-bit integer in ABGR format (each " "component is 8 bits). ABGR is the reversed version of the default RGBA " "format.\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_abgr32()) # Prints 4281565439\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1.0f, 0.5f, 0.2f);\n" "GD.Print(color.ToAbgr32()); // Prints 4281565439\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回转换为 ABGR 格式(每个分量为 8 位)的 32 位整数的颜色。ABGR 是默认 RGBA " "格式的反转版本。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_abgr32()) # 输出 4281565439\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1.0f, 0.5f, 0.2f);\n" "GD.Print(color.ToAbgr32()); // 输出 4281565439\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns the color converted to a 64-bit integer in ABGR format (each " "component is 16 bits). ABGR is the reversed version of the default RGBA " "format.\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_abgr64()) # Prints -225178692812801\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1.0f, 0.5f, 0.2f);\n" "GD.Print(color.ToAbgr64()); // Prints -225178692812801\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回转换为 ABGR 格式(每个分量为 16 位)的 64 位整数的颜色。ABGR 是默认 RGBA " "格式的反转版本。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_abgr64()) # 输出 -225178692812801\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1.0f, 0.5f, 0.2f);\n" "GD.Print(color.ToAbgr64()); // 输出 -225178692812801\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns the color converted to a 32-bit integer in ARGB format (each " "component is 8 bits). ARGB is more compatible with DirectX.\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_argb32()) # Prints 4294934323\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1.0f, 0.5f, 0.2f);\n" "GD.Print(color.ToArgb32()); // Prints 4294934323\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回转换为 ARGB 格式(每个分量为 8 位)的 32 位整数的颜色。ARGB 与 DirectX 更" "兼容。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_argb32()) # 输出 4294934323\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1.0f, 0.5f, 0.2f);\n" "GD.Print(color.ToArgb32()); // 输出 4294934323\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns the color converted to a 64-bit integer in ARGB format (each " "component is 16 bits). ARGB is more compatible with DirectX.\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_argb64()) # Prints -2147470541\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1.0f, 0.5f, 0.2f);\n" "GD.Print(color.ToArgb64()); // Prints -2147470541\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回转换为 ARGB 格式(每个分量为 16 位)的 64 位整数的颜色。ARGB 与 DirectX " "更兼容。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_argb64()) # 输出 -2147470541\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1.0f, 0.5f, 0.2f);\n" "GD.Print(color.ToArgb64()); // 输出 -2147470541\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns the color converted to an HTML hexadecimal color [String] in RGBA " "format, without the hash ([code]#[/code]) prefix.\n" "Setting [param with_alpha] to [code]false[/code], excludes alpha from the " "hexadecimal string, using RGB format instead of RGBA format.\n" "[codeblocks]\n" "[gdscript]\n" "var white = Color(1, 1, 1, 0.5)\n" "var with_alpha = white.to_html() # Returns \"ffffff7f\"\n" "var without_alpha = white.to_html(false) # Returns \"ffffff\"\n" "[/gdscript]\n" "[csharp]\n" "var white = new Color(1, 1, 1, 0.5f);\n" "string withAlpha = white.ToHtml(); // Returns \"ffffff7f\"\n" "string withoutAlpha = white.ToHtml(false); // Returns \"ffffff\"\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回将该颜色转换为 RGBA 格式的 HTML 十六进制颜色 [String],不带([code]#[/" "code])前缀。\n" "将 [param with_alpha] 设置为 [code]false[/code],会从十六进制字符串中排除 " "alpha,使用 RGB 格式而不是 RGBA 格式。\n" "[codeblocks]\n" "[gdscript]\n" "var white = Color(1, 1, 1, 0.5)\n" "var with_alpha = white.to_html() # 返回 \"ffffff7f\"\n" "var without_alpha = white.to_html(false) # 返回 \"ffffff\"\n" "[/gdscript]\n" "[csharp]\n" "var white = new Color(1, 1, 1, 0.5f);\n" "string withAlpha = white.ToHtml(); // 返回 \"ffffff7f\"\n" "string withoutAlpha = white.ToHtml(false); // 返回 \"ffffff\"\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns the color converted to a 32-bit integer in RGBA format (each " "component is 8 bits). RGBA is Godot's default format. This method is the " "inverse of [method hex].\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_rgba32()) # Prints 4286526463\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1, 0.5f, 0.2f);\n" "GD.Print(color.ToRgba32()); // Prints 4286526463\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回转换为 RGBA 格式(每个分量为 8 位)的 32 位整数的颜色。RGBA 是 Godot 的默" "认格式。该方法是 [method hex] 的逆方法。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_rgba32()) # 输出 4286526463\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1, 0.5f, 0.2f);\n" "GD.Print(color.ToRgba32()); // 输出 4286526463\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml msgid "" "Returns the color converted to a 64-bit integer in RGBA format (each " "component is 16 bits). RGBA is Godot's default format. This method is the " "inverse of [method hex64].\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_rgba64()) # Prints -140736629309441\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1, 0.5f, 0.2f);\n" "GD.Print(color.ToRgba64()); // Prints -140736629309441\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "返回转换为 RGBA 格式(每个分量为 16 位)的 64 位整数的颜色。RGBA 是 Godot 的" "默认格式。该方法是 [method hex64] 的逆方法。\n" "[codeblocks]\n" "[gdscript]\n" "var color = Color(1, 0.5, 0.2)\n" "print(color.to_rgba64()) # 输出 -140736629309441\n" "[/gdscript]\n" "[csharp]\n" "var color = new Color(1, 0.5f, 0.2f);\n" "GD.Print(color.ToRgba64()); // 输出 -140736629309441\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Color.xml #, fuzzy msgid "" "The color's alpha component, typically on the range of 0 to 1. A value of 0 " "means that the color is fully transparent. A value of 1 means that the color " "is fully opaque.\n" "[b]Note:[/b] The alpha channel is always stored with linear encoding, " "regardless of the encoding of the other color channels. The [method " "linear_to_srgb] and [method srgb_to_linear] methods do not affect the alpha " "channel." msgstr "" "颜色的 Alpha 分量,通常在 0 到 1 的范围内。取值为 0 表示颜色完全透明。取值为 " "1 表示颜色完全不透明。\n" "[b]注意:[/b]Alpha 通道始终按照线性编码存储,与其他颜色通道的色彩空间无关。" "[method linear_to_srgb] 和 [method srgb_to_linear] 等方法不影响 Alpha 通道。" #: doc/classes/Color.xml msgid "Wrapper for [member a] that uses the range 0 to 255, instead of 0 to 1." msgstr "对 [member a] 的封装,使用 0 到 255 的范围而不是 0 到 1。" #: doc/classes/Color.xml msgid "The color's blue component, typically on the range of 0 to 1." msgstr "颜色的蓝色分量,一般在 0 到 1 的范围内。" #: doc/classes/Color.xml msgid "Wrapper for [member b] that uses the range 0 to 255, instead of 0 to 1." msgstr "对 [member b] 的封装,使用 0 到 255 的范围而不是 0 到 1。" #: doc/classes/Color.xml msgid "The color's green component, typically on the range of 0 to 1." msgstr "颜色的绿色分量,一般在 0 到 1 的范围内。" #: doc/classes/Color.xml msgid "Wrapper for [member g] that uses the range 0 to 255, instead of 0 to 1." msgstr "对 [member g] 的封装,使用 0 到 255 的范围而不是 0 到 1。" #: doc/classes/Color.xml msgid "The HSV hue of this color, on the range 0 to 1." msgstr "这个颜色的 HSV 色相,范围是 0 到 1。" #: doc/classes/Color.xml msgid "The OKHSL hue of this color, on the range 0 to 1." msgstr "这个颜色的 OKHSL 色相,范围是 0 到 1。" #: doc/classes/Color.xml msgid "The OKHSL lightness of this color, on the range 0 to 1." msgstr "这个颜色的 OKHSL 亮度,范围为 0 到 1。" #: doc/classes/Color.xml msgid "The OKHSL saturation of this color, on the range 0 to 1." msgstr "这个颜色的 OKHSL 饱和度,范围为 0 到 1。" #: doc/classes/Color.xml msgid "The color's red component, typically on the range of 0 to 1." msgstr "颜色的红色分量,通常在 0 到 1 的范围内。" #: doc/classes/Color.xml msgid "Wrapper for [member r] that uses the range 0 to 255, instead of 0 to 1." msgstr "对 [member r] 的封装,使用 0 到 255 的范围而不是 0 到 1。" #: doc/classes/Color.xml msgid "The HSV saturation of this color, on the range 0 to 1." msgstr "这个颜色的 HSV 饱和度,范围为 0 到 1。" #: doc/classes/Color.xml msgid "The HSV value (brightness) of this color, on the range 0 to 1." msgstr "这个颜色的 HSV 值(亮度),范围为 0 至 1。" #: doc/classes/Color.xml msgid "Alice blue color." msgstr "爱丽丝蓝。" #: doc/classes/Color.xml msgid "Antique white color." msgstr "古董白。" #: doc/classes/Color.xml msgid "Aqua color." msgstr "水色。" #: doc/classes/Color.xml msgid "Aquamarine color." msgstr "海蓝色。" #: doc/classes/Color.xml msgid "Azure color." msgstr "天蓝色。" #: doc/classes/Color.xml msgid "Beige color." msgstr "米黄色。" #: doc/classes/Color.xml msgid "Bisque color." msgstr "橘黄色。" #: doc/classes/Color.xml msgid "Black color. In GDScript, this is the default value of any color." msgstr "黑色。在 GDScript 中,这是所有颜色的默认值。" #: doc/classes/Color.xml msgid "Blanched almond color." msgstr "杏仁白色。" #: doc/classes/Color.xml msgid "Blue color." msgstr "蓝色。" #: doc/classes/Color.xml msgid "Blue violet color." msgstr "蓝紫色的颜色。" #: doc/classes/Color.xml msgid "Brown color." msgstr "棕色。" #: doc/classes/Color.xml msgid "Burlywood color." msgstr "硬木色。" #: doc/classes/Color.xml msgid "Cadet blue color." msgstr "军服蓝。" #: doc/classes/Color.xml msgid "Chartreuse color." msgstr "黄褐色。" #: doc/classes/Color.xml msgid "Chocolate color." msgstr "巧克力色。" #: doc/classes/Color.xml msgid "Coral color." msgstr "珊瑚色。" #: doc/classes/Color.xml msgid "Cornflower blue color." msgstr "矢车菊蓝色。" #: doc/classes/Color.xml msgid "Cornsilk color." msgstr "玉米须色。" #: doc/classes/Color.xml msgid "Crimson color." msgstr "绯红的颜色。" #: doc/classes/Color.xml msgid "Cyan color." msgstr "青色。" #: doc/classes/Color.xml msgid "Dark blue color." msgstr "深蓝色。" #: doc/classes/Color.xml msgid "Dark cyan color." msgstr "深青色。" #: doc/classes/Color.xml msgid "Dark goldenrod color." msgstr "深色菊科植物的颜色。" #: doc/classes/Color.xml msgid "Dark gray color." msgstr "深灰色。" #: doc/classes/Color.xml msgid "Dark green color." msgstr "深绿色。" #: doc/classes/Color.xml msgid "Dark khaki color." msgstr "深卡其色。" #: doc/classes/Color.xml msgid "Dark magenta color." msgstr "深洋红色。" #: doc/classes/Color.xml msgid "Dark olive green color." msgstr "深橄榄绿色。" #: doc/classes/Color.xml msgid "Dark orange color." msgstr "深橙色。" #: doc/classes/Color.xml msgid "Dark orchid color." msgstr "深色的兰花色。" #: doc/classes/Color.xml msgid "Dark red color." msgstr "深红色。" #: doc/classes/Color.xml msgid "Dark salmon color." msgstr "深鲑鱼色。" #: doc/classes/Color.xml msgid "Dark sea green color." msgstr "深海绿色。" #: doc/classes/Color.xml msgid "Dark slate blue color." msgstr "深板蓝的颜色。" #: doc/classes/Color.xml msgid "Dark slate gray color." msgstr "暗石板灰色。" #: doc/classes/Color.xml msgid "Dark turquoise color." msgstr "深绿松石色。" #: doc/classes/Color.xml msgid "Dark violet color." msgstr "深紫罗兰色。" #: doc/classes/Color.xml msgid "Deep pink color." msgstr "深粉色。" #: doc/classes/Color.xml msgid "Deep sky blue color." msgstr "深邃的天蓝色。" #: doc/classes/Color.xml msgid "Dim gray color." msgstr "暗灰色。" #: doc/classes/Color.xml msgid "Dodger blue color." msgstr "道奇蓝色。" #: doc/classes/Color.xml msgid "Firebrick color." msgstr "耐火砖红色。" #: doc/classes/Color.xml msgid "Floral white color." msgstr "花白色。" #: doc/classes/Color.xml msgid "Forest green color." msgstr "森林绿色。" #: doc/classes/Color.xml msgid "Fuchsia color." msgstr "洋红色。" #: doc/classes/Color.xml msgid "Gainsboro color." msgstr "庚斯伯勒灰色。" #: doc/classes/Color.xml msgid "Ghost white color." msgstr "幽灵白颜色。" #: doc/classes/Color.xml msgid "Gold color." msgstr "金色。" #: doc/classes/Color.xml msgid "Goldenrod color." msgstr "金菊色。" #: doc/classes/Color.xml msgid "Gray color." msgstr "灰色。" #: doc/classes/Color.xml msgid "Green color." msgstr "绿色。" #: doc/classes/Color.xml msgid "Green yellow color." msgstr "绿黄色。" #: doc/classes/Color.xml msgid "Honeydew color." msgstr "蜜露色。" #: doc/classes/Color.xml msgid "Hot pink color." msgstr "亮粉色。" #: doc/classes/Color.xml msgid "Indian red color." msgstr "印度红色。" #: doc/classes/Color.xml msgid "Indigo color." msgstr "靛青色。" #: doc/classes/Color.xml msgid "Ivory color." msgstr "象牙色。" #: doc/classes/Color.xml msgid "Khaki color." msgstr "卡其色。" #: doc/classes/Color.xml msgid "Lavender color." msgstr "薰衣草色。" #: doc/classes/Color.xml msgid "Lavender blush color." msgstr "薰衣草紫红色。" #: doc/classes/Color.xml msgid "Lawn green color." msgstr "草坪绿色。" #: doc/classes/Color.xml msgid "Lemon chiffon color." msgstr "柠檬雪纺色。" #: doc/classes/Color.xml msgid "Light blue color." msgstr "浅蓝色。" #: doc/classes/Color.xml msgid "Light coral color." msgstr "浅珊瑚色。" #: doc/classes/Color.xml msgid "Light cyan color." msgstr "淡青色。" #: doc/classes/Color.xml msgid "Light goldenrod color." msgstr "亮金菊黄色。" #: doc/classes/Color.xml msgid "Light gray color." msgstr "浅灰色。" #: doc/classes/Color.xml msgid "Light green color." msgstr "浅绿色。" #: doc/classes/Color.xml msgid "Light pink color." msgstr "浅粉色。" #: doc/classes/Color.xml msgid "Light salmon color." msgstr "浅鲑鱼色。" #: doc/classes/Color.xml msgid "Light sea green color." msgstr "浅海绿色。" #: doc/classes/Color.xml msgid "Light sky blue color." msgstr "浅天蓝色。" #: doc/classes/Color.xml msgid "Light slate gray color." msgstr "浅板岩灰色。" #: doc/classes/Color.xml msgid "Light steel blue color." msgstr "浅钢蓝色。" #: doc/classes/Color.xml msgid "Light yellow color." msgstr "浅黄色。" #: doc/classes/Color.xml msgid "Lime color." msgstr "青柠色。" #: doc/classes/Color.xml msgid "Lime green color." msgstr "石灰绿色。" #: doc/classes/Color.xml msgid "Linen color." msgstr "亚麻色。" #: doc/classes/Color.xml msgid "Magenta color." msgstr "洋红色。" #: doc/classes/Color.xml msgid "Maroon color." msgstr "栗色。" #: doc/classes/Color.xml msgid "Medium aquamarine color." msgstr "中等海蓝宝石色。" #: doc/classes/Color.xml msgid "Medium blue color." msgstr "中蓝色。" #: doc/classes/Color.xml msgid "Medium orchid color." msgstr "中等兰色。" #: doc/classes/Color.xml msgid "Medium purple color." msgstr "中等紫色。" #: doc/classes/Color.xml msgid "Medium sea green color." msgstr "中海绿色。" #: doc/classes/Color.xml msgid "Medium slate blue color." msgstr "中等板岩蓝色。" #: doc/classes/Color.xml msgid "Medium spring green color." msgstr "中等春天绿色。" #: doc/classes/Color.xml msgid "Medium turquoise color." msgstr "中等绿松石色。" #: doc/classes/Color.xml msgid "Medium violet red color." msgstr "中等紫红色。" #: doc/classes/Color.xml msgid "Midnight blue color." msgstr "午夜蓝色。" #: doc/classes/Color.xml msgid "Mint cream color." msgstr "薄荷奶油色。" #: doc/classes/Color.xml msgid "Misty rose color." msgstr "朦胧的玫瑰色。" #: doc/classes/Color.xml msgid "Moccasin color." msgstr "鹿皮鞋颜色。" #: doc/classes/Color.xml msgid "Navajo white color." msgstr "纳瓦白。" #: doc/classes/Color.xml msgid "Navy blue color." msgstr "藏青色。" #: doc/classes/Color.xml msgid "Old lace color." msgstr "旧蕾丝色。" #: doc/classes/Color.xml msgid "Olive color." msgstr "橄榄色。" #: doc/classes/Color.xml msgid "Olive drab color." msgstr "暗淡橄榄色。" #: doc/classes/Color.xml msgid "Orange color." msgstr "橙色。" #: doc/classes/Color.xml msgid "Orange red color." msgstr "橘红色。" #: doc/classes/Color.xml msgid "Orchid color." msgstr "兰花色。" #: doc/classes/Color.xml msgid "Pale goldenrod color." msgstr "淡金色。" #: doc/classes/Color.xml msgid "Pale green color." msgstr "淡绿色。" #: doc/classes/Color.xml msgid "Pale turquoise color." msgstr "淡绿松石色。" #: doc/classes/Color.xml msgid "Pale violet red color." msgstr "淡紫红色。" #: doc/classes/Color.xml msgid "Papaya whip color." msgstr "木瓜鞭色。" #: doc/classes/Color.xml msgid "Peach puff color." msgstr "桃花粉。" #: doc/classes/Color.xml msgid "Peru color." msgstr "秘鲁色。" #: doc/classes/Color.xml msgid "Pink color." msgstr "粉红色。" #: doc/classes/Color.xml msgid "Plum color." msgstr "梅花色。" #: doc/classes/Color.xml msgid "Powder blue color." msgstr "浅蓝色。" #: doc/classes/Color.xml msgid "Purple color." msgstr "紫色。" #: doc/classes/Color.xml msgid "Rebecca purple color." msgstr "丽贝卡紫色。" #: doc/classes/Color.xml msgid "Red color." msgstr "红色。" #: doc/classes/Color.xml msgid "Rosy brown color." msgstr "玫瑰棕。" #: doc/classes/Color.xml msgid "Royal blue color." msgstr "宝蓝色。" #: doc/classes/Color.xml msgid "Saddle brown color." msgstr "鞍棕色。" #: doc/classes/Color.xml msgid "Salmon color." msgstr "鲑鱼色。" #: doc/classes/Color.xml msgid "Sandy brown color." msgstr "沙褐色。" #: doc/classes/Color.xml msgid "Sea green color." msgstr "海绿色。" #: doc/classes/Color.xml msgid "Seashell color." msgstr "贝壳色。" #: doc/classes/Color.xml msgid "Sienna color." msgstr "西恩娜色。" #: doc/classes/Color.xml msgid "Silver color." msgstr "银色。" #: doc/classes/Color.xml msgid "Sky blue color." msgstr "天蓝色。" #: doc/classes/Color.xml msgid "Slate blue color." msgstr "石板蓝色。" #: doc/classes/Color.xml msgid "Slate gray color." msgstr "石板灰。" #: doc/classes/Color.xml msgid "Snow color." msgstr "雪白。" #: doc/classes/Color.xml msgid "Spring green color." msgstr "春绿。" #: doc/classes/Color.xml msgid "Steel blue color." msgstr "钢蓝色。" #: doc/classes/Color.xml msgid "Tan color." msgstr "棕褐色。" #: doc/classes/Color.xml msgid "Teal color." msgstr "青色。" #: doc/classes/Color.xml msgid "Thistle color." msgstr "蓟色。" #: doc/classes/Color.xml msgid "Tomato color." msgstr "番茄色。" #: doc/classes/Color.xml msgid "Transparent color (white with zero alpha)." msgstr "透明色(Alpha 为零的白色)。" #: doc/classes/Color.xml msgid "Turquoise color." msgstr "松石绿。" #: doc/classes/Color.xml msgid "Violet color." msgstr "紫罗兰色。" #: doc/classes/Color.xml msgid "Web gray color." msgstr "网格灰。" #: doc/classes/Color.xml msgid "Web green color." msgstr "网络绿。" #: doc/classes/Color.xml msgid "Web maroon color." msgstr "网络栗。" #: doc/classes/Color.xml msgid "Web purple color." msgstr "网络紫。" #: doc/classes/Color.xml msgid "Wheat color." msgstr "小麦色。" #: doc/classes/Color.xml msgid "White color." msgstr "白色。" #: doc/classes/Color.xml msgid "White smoke color." msgstr "白烟色。" #: doc/classes/Color.xml msgid "Yellow color." msgstr "黄色。" #: doc/classes/Color.xml msgid "Yellow green color." msgstr "黄绿色。" #: doc/classes/Color.xml msgid "" "Returns [code]true[/code] if the colors are not exactly equal.\n" "[b]Note:[/b] Due to floating-point precision errors, consider using [method " "is_equal_approx] instead, which is more reliable." msgstr "" "如果颜色不完全相等,则返回 [code]true[/code]。\n" "[b]注意:[/b]由于浮点数精度误差,请考虑改用 [method is_equal_approx],会更可" "靠。" #: doc/classes/Color.xml msgid "" "Multiplies each component of the [Color] by the components of the given " "[Color]." msgstr "将该 [Color] 的每个分量乘以给定 [Color] 的对应分量。" #: doc/classes/Color.xml msgid "Multiplies each component of the [Color] by the given [float]." msgstr "将该 [Color] 的每个分量乘以给定的 [float]。" #: doc/classes/Color.xml msgid "Multiplies each component of the [Color] by the given [int]." msgstr "将该 [Color] 的每个分量乘以给定的 [int]。" #: doc/classes/Color.xml msgid "" "Adds each component of the [Color] with the components of the given [Color]." msgstr "将该 [Color] 的每个分量加上给定 [Color] 的对应分量。" #: doc/classes/Color.xml msgid "" "Subtracts each component of the [Color] by the components of the given " "[Color]." msgstr "将该 [Color] 的每个分量减去给定 [Color] 的对应分量。" #: doc/classes/Color.xml msgid "" "Divides each component of the [Color] by the components of the given [Color]." msgstr "将该 [Color] 的每个分量除以给定 [Color] 的每个分量。" #: doc/classes/Color.xml msgid "Divides each component of the [Color] by the given [float]." msgstr "将该 [Color] 的每个分量除以给定的 [float]。" #: doc/classes/Color.xml msgid "Divides each component of the [Color] by the given [int]." msgstr "将该 [Color] 的每个分量除以给定的 [int]。" #: doc/classes/Color.xml msgid "" "Returns [code]true[/code] if the colors are exactly equal.\n" "[b]Note:[/b] Due to floating-point precision errors, consider using [method " "is_equal_approx] instead, which is more reliable." msgstr "" "如果颜色完全相同,则返回 [code]true[/code]。\n" "[b]注意:[/b]由于浮点精度误差,请考虑改用更可靠的 [method is_equal_approx]。" #: doc/classes/Color.xml msgid "" "Access color components using their index. [code][0][/code] is equivalent to " "[member r], [code][1][/code] is equivalent to [member g], [code][2][/code] " "is equivalent to [member b], and [code][3][/code] is equivalent to [member " "a]." msgstr "" "使用索引访问颜色分量。[code][0][/code] 相当于 [member r],[code][1][/code] 相" "当于 [member g],[code][2][/code] 相当于 [member b],[code][3][/code] 相当于 " "[member a]." #: doc/classes/Color.xml doc/classes/float.xml doc/classes/int.xml #: doc/classes/Plane.xml doc/classes/Quaternion.xml doc/classes/Vector2.xml #: doc/classes/Vector2i.xml doc/classes/Vector3.xml doc/classes/Vector3i.xml #: doc/classes/Vector4.xml doc/classes/Vector4i.xml msgid "" "Returns the same value as if the [code]+[/code] was not there. Unary [code]+" "[/code] does nothing, but sometimes it can make your code more readable." msgstr "" "返回与 [code]+[/code] 不存在时相同的值。单目 [code]+[/code] 没有作用,但有时" "可以使你的代码更具可读性。" #: doc/classes/Color.xml msgid "" "Inverts the given color. This is equivalent to [code]Color.WHITE - c[/code] " "or [code]Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)[/code]. Unlike with " "[method inverted], the [member a] component is inverted, too." msgstr "" "反转给定的颜色。这相当于 [code]Color.WHITE - c[/code] 或 [code]Color(1 - " "c.r, 1 - c.g, 1 - c.b, 1 - c.a)[/code]。与 [method inverted] 不同,[member " "a] 分量也将被反转。" #: doc/classes/ColorPalette.xml msgid "" "A resource class for managing a palette of colors, which can be loaded and " "saved using [ColorPicker]." msgstr "用于管理调色板的资源类,可以用 [ColorPicker] 来加载和保存。" #: doc/classes/ColorPalette.xml msgid "" "The [ColorPalette] resource is designed to store and manage a collection of " "colors. This resource is useful in scenarios where a predefined set of " "colors is required, such as for creating themes, designing user interfaces, " "or managing game assets. The built-in [ColorPicker] control can also make " "use of [ColorPalette] without additional code." msgstr "" "[ColorPalette] 资源可用于存储和管理颜色的合集。常用于需要一组预设颜色的场景," "例如创建主题、设计用户界面、管理游戏资产等。内置的 [ColorPicker] 控件无需额外" "编写代码就可以使用 [ColorPalette]。" #: doc/classes/ColorPalette.xml msgid "A [PackedColorArray] containing the colors in the palette." msgstr "包含调色板中颜色的 [PackedColorArray]。" #: doc/classes/ColorPicker.xml msgid "A widget that provides an interface for selecting or modifying a color." msgstr "提供用于选择或修改颜色的界面的小工具。" #: doc/classes/ColorPicker.xml msgid "" "A widget that provides an interface for selecting or modifying a color. It " "can optionally provide functionalities like a color sampler (eyedropper), " "color modes, and presets.\n" "[b]Note:[/b] This control is the color picker widget itself. You can use a " "[ColorPickerButton] instead if you need a button that brings up a " "[ColorPicker] in a popup." msgstr "" "提供用于选择或修改颜色的界面的小工具。还可以提供取色器(吸管)、颜色模式、预" "设等功能。\n" "[b]注意:[/b]这个控件就是取色器本身。如果你需要一个能够弹出 [ColorPicker] 窗" "口的按钮,可以改用 [ColorPickerButton]。" #: doc/classes/ColorPicker.xml msgid "" "Adds the given color to a list of color presets. The presets are displayed " "in the color picker and the user will be able to select them.\n" "[b]Note:[/b] The presets list is only for [i]this[/i] color picker." msgstr "" "将给定的颜色添加到颜色预设列表中。预设会显示在取色器中,可以被用户选择。\n" "[b]注意:[/b]预设列表仅适用于[i]这个[/i]取色器。" #: doc/classes/ColorPicker.xml msgid "" "Adds the given color to a list of color recent presets so that it can be " "picked later. Recent presets are the colors that were picked recently, a new " "preset is automatically created and added to recent presets when you pick a " "new color.\n" "[b]Note:[/b] The recent presets list is only for [i]this[/i] color picker." msgstr "" "将给定的颜色添加到近期颜色预设列表中,以便以后可以选择它。近期预设是最近选择" "的颜色,当选择新颜色时,会自动创建新的预设并将其添加到近期预设中。\n" "[b]注意:[/b]近期预设列表仅适用于[i]这个[/i]取色器。" #: doc/classes/ColorPicker.xml msgid "" "Removes the given color from the list of color presets of this color picker." msgstr "从这个取色器的颜色预设列表中移除给定的颜色。" #: doc/classes/ColorPicker.xml msgid "" "Removes the given color from the list of color recent presets of this color " "picker." msgstr "从这个取色器的颜色近期预设列表中移除给定的颜色。" #: doc/classes/ColorPicker.xml msgid "Returns the list of colors in the presets of the color picker." msgstr "返回取色器的预设颜色列表。" #: doc/classes/ColorPicker.xml msgid "Returns the list of colors in the recent presets of the color picker." msgstr "返回取色器的近期预设中的颜色列表。" #: doc/classes/ColorPicker.xml msgid "" "If [code]true[/code], it's possible to add presets under Swatches. If " "[code]false[/code], the button to add presets is disabled." msgstr "" "如果为 [code]true[/code],则可以在色板下添加预设。如果为 [code]false[/code]," "添加预设的按钮将被禁用。" #: doc/classes/ColorPicker.xml doc/classes/ColorPickerButton.xml msgid "The currently selected color." msgstr "当前选择的颜色。" #: doc/classes/ColorPicker.xml msgid "The currently selected color mode." msgstr "当前选择的颜色模式。" #: doc/classes/ColorPicker.xml msgid "If [code]true[/code], the color mode buttons are visible." msgstr "如果为 [code]true[/code],则颜色模式按钮可见。" #: doc/classes/ColorPicker.xml msgid "" "If [code]true[/code], the color will apply only after the user releases the " "mouse button, otherwise it will apply immediately even in mouse motion event " "(which can cause performance issues)." msgstr "" "如果为 [code]true[/code],只有在用户松开鼠标按钮后才会应用颜色,否则即使在鼠" "标移动事件中也会立即应用(会造成性能问题)。" #: doc/classes/ColorPicker.xml msgid "If [code]true[/code], shows an alpha channel slider (opacity)." msgstr "如果为 [code]true[/code],则显示 Alpha 通道滑块(不透明度)。" #: doc/classes/ColorPicker.xml #, fuzzy msgid "" "If [code]true[/code], shows an intensity slider. The intensity is applied as " "follows: convert the color to linear encoding, multiply it by [code]2 ** " "intensity[/code], and then convert it back to nonlinear sRGB encoding." msgstr "" "如果为 [code]true[/code] 则显示强度滑块。强度的应用方法为:将颜色在线性 RGB " "空间中乘以 [code]2 ** intensity[/code],然后转换回 sRGB。" #: doc/classes/ColorPicker.xml msgid "If [code]true[/code], the hex color code input field is visible." msgstr "如果为 [code]true[/code],则十六进制颜色代码输入框可见。" #: doc/classes/ColorPicker.xml msgid "The shape of the color space view." msgstr "色彩空间视图的形状。" #: doc/classes/ColorPicker.xml msgid "" "If [code]true[/code], the Swatches and Recent Colors presets are visible." msgstr "如果为 [code]true[/code],则色板和近期颜色预设可见。" #: doc/classes/ColorPicker.xml msgid "If [code]true[/code], the color sampler and color preview are visible." msgstr "如果为 [code]true[/code],则颜色采样器和颜色预览可见。" #: doc/classes/ColorPicker.xml msgid "If [code]true[/code], the color sliders are visible." msgstr "如果为 [code]true[/code],则颜色滑块可见。" #: doc/classes/ColorPicker.xml msgid "Emitted when the color is changed." msgstr "更改颜色时发出。" #: doc/classes/ColorPicker.xml msgid "Emitted when a preset is added." msgstr "添加预设时发出。" #: doc/classes/ColorPicker.xml msgid "Emitted when a preset is removed." msgstr "移除预设时发出。" #: doc/classes/ColorPicker.xml msgid "" "Allows editing the color with Red/Green/Blue sliders in sRGB color space." msgstr "允许使用红、绿、蓝滑块在 sRGB 色彩空间中编辑颜色。" #: doc/classes/ColorPicker.xml msgid "Allows editing the color with Hue/Saturation/Value sliders." msgstr "允许使用色相、饱和度、明度滑块编辑颜色。" #: doc/classes/ColorPicker.xml msgid "This is replaced by [constant MODE_LINEAR]." msgstr "由 [constant MODE_LINEAR] 代替。" #: doc/classes/ColorPicker.xml msgid "" "Allows editing the color with Red/Green/Blue sliders in linear color space." msgstr "允许使用红、绿、蓝滑块在线性色彩空间中编辑颜色。" #: doc/classes/ColorPicker.xml msgid "" "Allows editing the color with Hue/Saturation/Lightness sliders.\n" "OKHSL is a new color space similar to HSL but that better match perception " "by leveraging the Oklab color space which is designed to be simple to use, " "while doing a good job at predicting perceived lightness, chroma and hue.\n" "[url=https://bottosson.github.io/posts/colorpicker/]Okhsv and Okhsl color " "spaces[/url]" msgstr "" "允许使用色相/饱和度/亮度滑块编辑颜色。\n" "OKHSL 是一种类似于 HSL 的新色彩空间,但通过利用设计简单易用的 Oklab 色彩空间" "更好地匹配感知,同时在预测感知亮度、色度和色调方面做得很好。\n" "[url=https://bottosson.github.io/posts/colorpicker/]Okhsv 和 Okhsl 色彩空间[/" "url]" #: doc/classes/ColorPicker.xml msgid "HSV Color Model rectangle color space." msgstr "HSV 颜色模型矩形色彩空间。" #: doc/classes/ColorPicker.xml msgid "HSV Color Model rectangle color space with a wheel." msgstr "HSV 颜色模型矩形色彩空间,带轮。" #: doc/classes/ColorPicker.xml msgid "HSV Color Model circle color space. Use Saturation as a radius." msgstr "HSV 颜色模型圆形色彩空间。半径为饱和度。" #: doc/classes/ColorPicker.xml msgid "HSL OK Color Model circle color space." msgstr "HSL OK 颜色模型圆形色彩空间。" #: doc/classes/ColorPicker.xml msgid "" "The color space shape and the shape select button are hidden. Can't be " "selected from the shapes popup." msgstr "色彩空间形状和形状选择按钮被隐藏。不能从形状弹出窗口中选择。" #: doc/classes/ColorPicker.xml msgid "OKHSL Color Model rectangle with constant lightness." msgstr "具有恒定亮度的 OKHSL 颜色模型矩形。" #: doc/classes/ColorPicker.xml msgid "OKHSL Color Model rectangle with constant saturation." msgstr "具有恒定饱和度的 OKHSL 颜色模型矩形。" #: doc/classes/ColorPicker.xml msgid "" "Color of rectangle or circle drawn when a picker shape part is focused but " "not editable via keyboard or joypad. Displayed [i]over[/i] the picker shape, " "so a partially transparent color should be used to ensure the picker shape " "remains visible." msgstr "" "当选择器的形状部分获得焦点但无法通过键盘或手柄编辑时,矩形或圆形的绘制颜色。" "该颜色显示在选择器形状[i]上方[/i],因此应使用部分透明的颜色,确保选择器形状仍" "然可见。" #: doc/classes/ColorPicker.xml msgid "" "Overrides the [theme_item Slider.center_grabber] theme property of the " "sliders." msgstr "覆盖滑块的 [theme_item Slider.center_grabber] 主题属性。" #: doc/classes/ColorPicker.xml msgid "The width of the hue selection slider." msgstr "色相选择滑块的宽度。" #: doc/classes/ColorPicker.xml msgid "The minimum width of the color labels next to sliders." msgstr "滑块旁颜色标签的最小宽度。" #: doc/classes/ColorPicker.xml msgid "The margin around the [ColorPicker]." msgstr "[ColorPicker] 周围的边距。" #: doc/classes/ColorPicker.xml msgid "The height of the saturation-value selection box." msgstr "饱和值选择框的高度。" #: doc/classes/ColorPicker.xml msgid "The width of the saturation-value selection box." msgstr "饱和度选择框的宽度。" #: doc/classes/ColorPicker.xml msgid "The icon for the \"Add Preset\" button." msgstr "“添加预设”按钮的图标。" #: doc/classes/ColorPicker.xml msgid "The texture for the arrow grabber." msgstr "箭头抓取器的纹理。" #: doc/classes/ColorPicker.xml msgid "Custom texture for the hue selection slider on the right." msgstr "右侧的色相选择滑块的自定义纹理。" #: doc/classes/ColorPicker.xml msgid "The icon for the button that switches color text to hexadecimal." msgstr "用于将颜色文本切换为十六进制的按钮的图标。" #: doc/classes/ColorPicker.xml msgid "The icon for color preset drop down menu when expanded." msgstr "颜色预设下拉菜单展开时使用的图标。" #: doc/classes/ColorPicker.xml msgid "The icon for color preset drop down menu when folded." msgstr "颜色预设下拉菜单折叠时使用的图标。" #: doc/classes/ColorPicker.xml msgid "The icon for color preset option menu." msgstr "颜色预设菜单的图标。" #: doc/classes/ColorPicker.xml msgid "" "The indicator used to signalize that the color value is outside the 0-1 " "range." msgstr "该指示器用于指示颜色值在 0-1 范围之外。" #: doc/classes/ColorPicker.xml msgid "" "The image displayed over the color box/circle (depending on the [member " "picker_shape]), marking the currently selected color." msgstr "" "显示在颜色框/圆(取决于 [member picker_shape])上的图像,标记当前选择的颜色。" #: doc/classes/ColorPicker.xml msgid "The fill image displayed behind the picker cursor." msgstr "拾取器光标后显示的填充图像。" #: doc/classes/ColorPicker.xml msgid "" "Background panel for the color preview box (visible when the color is " "translucent)." msgstr "颜色预览框的背景面板(颜色为半透明时可见)。" #: doc/classes/ColorPicker.xml msgid "" "The icon for the revert button (visible on the middle of the \"old\" color " "when it differs from the currently selected color). This icon is modulated " "with a dark color if the \"old\" color is bright enough, so the icon should " "be bright to ensure visibility in both scenarios." msgstr "" "恢复按钮的图标(“旧”颜色与当前选中颜色不同时会在其中间显示)。如果“旧”颜色足" "够亮,那么这个图标会和暗色进行调制,这样图标应该就能够在不同的情况下都保持可" "见。" #: doc/classes/ColorPicker.xml msgid "The icon for the screen color picker button." msgstr "屏幕取色器按钮的图标。" #: doc/classes/ColorPicker.xml msgid "The icon for circular picker shapes." msgstr "圆形拾取器形状的图标。" #: doc/classes/ColorPicker.xml msgid "The icon for rectangular picker shapes." msgstr "矩形拾取器形状的图标。" #: doc/classes/ColorPicker.xml msgid "The icon for rectangular wheel picker shapes." msgstr "矩形轮拾取器形状的图标。" #: doc/classes/ColorPicker.xml msgid "" "The [StyleBox] used when the circle-shaped part of the picker is focused. " "Displayed [i]over[/i] the picker shape, so a partially transparent " "[StyleBox] should be used to ensure the picker shape remains visible. A " "[StyleBox] that represents an outline or an underline works well for this " "purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] " "resource. Note that disabling the focus visual effect will harm keyboard/" "controller navigation usability, so this is not recommended for " "accessibility reasons." msgstr "" "拾取器的圆形部分处于聚焦状态时使用的 [StyleBox]。显示在拾取器形状[i]之上[/" "i],所以应该使用部分透明的 [StyleBox],确保拾取器形状仍然可见。代表轮廓或下划" "线的 [StyleBox] 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 " "[StyleBoxEmpty] 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的" "可用性,所以出于可访问性的原因,不建议这样做。" #: doc/classes/ColorPicker.xml msgid "" "The [StyleBox] used when the rectangle-shaped part of the picker is focused. " "Displayed [i]over[/i] the picker shape, so a partially transparent " "[StyleBox] should be used to ensure the picker shape remains visible. A " "[StyleBox] that represents an outline or an underline works well for this " "purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] " "resource. Note that disabling the focus visual effect will harm keyboard/" "controller navigation usability, so this is not recommended for " "accessibility reasons." msgstr "" "拾取器的矩形部分处于聚焦状态时使用的 [StyleBox]。显示在拾取器形状[i]之上[/" "i],所以应该使用部分透明的 [StyleBox],确保拾取器形状仍然可见。代表轮廓或下划" "线的 [StyleBox] 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 " "[StyleBoxEmpty] 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的" "可用性,所以出于可访问性的原因,不建议这样做。" #: doc/classes/ColorPicker.xml msgid "" "The [StyleBox] used for the old color sample part when it is focused. " "Displayed [i]over[/i] the sample, so a partially transparent [StyleBox] " "should be used to ensure the picker shape remains visible. A [StyleBox] that " "represents an outline or an underline works well for this purpose. To " "disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note " "that disabling the focus visual effect will harm keyboard/controller " "navigation usability, so this is not recommended for accessibility reasons." msgstr "" "旧颜色样本部分处于聚焦状态时使用的 [StyleBox]。显示在样本[i]之上[/i],所以应" "该使用部分透明的 [StyleBox],确保拾取器形状仍然可见。代表轮廓或下划线的 " "[StyleBox] 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 " "[StyleBoxEmpty] 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的" "可用性,所以出于可访问性的原因,不建议这样做。" #: doc/classes/ColorPickerButton.xml msgid "A button that brings up a [ColorPicker] when pressed." msgstr "点击后会显示 [ColorPicker] 的按钮。" #: doc/classes/ColorPickerButton.xml msgid "" "Encapsulates a [ColorPicker], making it accessible by pressing a button. " "Pressing the button will toggle the [ColorPicker]'s visibility.\n" "See also [BaseButton] which contains common properties and methods " "associated with this node.\n" "[b]Note:[/b] By default, the button may not be wide enough for the color " "preview swatch to be visible. Make sure to set [member " "Control.custom_minimum_size] to a big enough value to give the button enough " "space." msgstr "" "封装一个 [ColorPicker],按下按钮即可访问该控件。按下按钮会切换 [ColorPicker] " "的可见性。\n" "另见 [BaseButton],其中包含与该节点关联的通用属性和方法。\n" "[b]注意:[/b]默认情况下,按钮的宽度可能不足以使颜色预览色板可见。确保将 " "[member Control.custom_minimum_size] 设置为足够大的值,以便为按钮提供足够的空" "间。" #: doc/classes/ColorPickerButton.xml msgid "" "Returns the [ColorPicker] that this node toggles.\n" "[b]Warning:[/b] This is a required internal node, removing and freeing it " "may cause a crash. If you wish to hide it or any of its children, use their " "[member CanvasItem.visible] property." msgstr "" "返回此节点所切换的 [ColorPicker]。\n" "[b]警告:[/b]这是一个必需的内部节点,移除和释放它可能会导致崩溃。如果你希望隐" "藏它或其所有子项,请使用其 [member CanvasItem.visible] 属性。" #: doc/classes/ColorPickerButton.xml msgid "" "Returns the control's [PopupPanel] which allows you to connect to popup " "signals. This allows you to handle events when the ColorPicker is shown or " "hidden.\n" "[b]Warning:[/b] This is a required internal node, removing and freeing it " "may cause a crash. If you wish to hide it or any of its children, use their " "[member Window.visible] property." msgstr "" "返回该控件的 [PopupPanel],它允许连接到其弹出信号。这允许在显示或隐藏 " "ColorPicker 时处理事件。\n" "[b]警告:[/b]这是一个必需的内部节点,移除和释放它可能会导致崩溃。如果希望隐藏" "它或它的任何子项,请使用它们的 [member Window.visible] 属性。" #: doc/classes/ColorPickerButton.xml msgid "" "If [code]true[/code], the alpha channel in the displayed [ColorPicker] will " "be visible." msgstr "" "如果为 [code]true[/code],则显示的 [ColorPicker] 中的 Alpha 通道将可见。" #: doc/classes/ColorPickerButton.xml msgid "" "If [code]true[/code], the intensity slider in the displayed [ColorPicker] " "will be visible." msgstr "如果为 [code]true[/code],则显示的 [ColorPicker] 中的强度滑块将可见。" #: doc/classes/ColorPickerButton.xml msgid "Emitted when the color changes." msgstr "颜色改变时发出。" #: doc/classes/ColorPickerButton.xml msgid "" "Emitted when the [ColorPicker] is created (the button is pressed for the " "first time)." msgstr "创建 [ColorPicker] 时(第一次按下按钮)发出。" #: doc/classes/ColorPickerButton.xml msgid "Emitted when the [ColorPicker] is closed." msgstr "当 [ColorPicker] 关闭时发出。" #: doc/classes/ColorPickerButton.xml msgid "The background of the color preview rect on the button." msgstr "颜色预览的背景将在按钮上显示。" #: doc/classes/ColorRect.xml msgid "A control that displays a solid color rectangle." msgstr "显示单色矩形的控件。" #: doc/classes/ColorRect.xml msgid "" "Displays a rectangle filled with a solid [member color]. If you need to " "display the border alone, consider using a [Panel] instead." msgstr "" "显示一个用纯色 [member color] 填充的矩形。如果你需要单独显示边框,请考虑改用 " "[Panel]。" #: doc/classes/ColorRect.xml msgid "The fill color of the rectangle." msgstr "该矩形的填充颜色。" #: doc/classes/Compositor.xml msgid "" "More customization of the rendering pipeline will be added in the future." msgstr "未来将添加更多渲染管道的定制。" #: doc/classes/Compositor.xml msgid "Stores attributes used to customize how a Viewport is rendered." msgstr "存储用于自定义视口渲染方式的属性。" #: doc/classes/Compositor.xml msgid "" "The compositor resource stores attributes used to customize how a [Viewport] " "is rendered." msgstr "合成器资源存储用于自定义 [Viewport] 渲染方式的属性。" #: doc/classes/Compositor.xml doc/classes/CompositorEffect.xml msgid "The Compositor" msgstr "合成器" #: doc/classes/Compositor.xml msgid "" "The custom [CompositorEffect]s that are applied during rendering of " "viewports using this compositor." msgstr "使用该合成器的视口在进行渲染时应用的自定义 [CompositorEffect]。" #: doc/classes/CompositorEffect.xml msgid "" "The implementation may change as more of the rendering internals are exposed " "over time." msgstr "随着时间的推移,更多的渲染内部结构会被暴露,实现可能会发生变化。" #: doc/classes/CompositorEffect.xml msgid "This resource allows for creating a custom rendering effect." msgstr "用于创建自定义渲染效果的资源。" #: doc/classes/CompositorEffect.xml msgid "" "This resource defines a custom rendering effect that can be applied to " "[Viewport]s through the viewports' [Environment]. You can implement a " "callback that is called during rendering at a given stage of the rendering " "pipeline and allows you to insert additional passes. Note that this callback " "happens on the rendering thread. CompositorEffect is an abstract base class " "and must be extended to implement specific rendering logic." msgstr "" "这种资源定义的是自定义渲染效果,可以通过视口的 [Environment] 应用到 " "[Viewport] 上。可以实现在渲染管道的给定阶段进行渲染期间调用的回调,并允许插入" "其他阶段。请注意,该回调是在渲染线程上执行的。CompositorEffect 是抽象基类,实" "现特定的渲染逻辑必须对该类进行扩展。" #: doc/classes/CompositorEffect.xml msgid "" "Implement this function with your custom rendering code. [param " "effect_callback_type] should always match the effect callback type you've " "specified in [member effect_callback_type]. [param render_data] provides " "access to the rendering state, it is only valid during rendering and should " "not be stored." msgstr "" "请使用自定义的渲染代码实现该方法。[param effect_callback_type] 应当与 " "[member effect_callback_type] 中指定的效果回调类型一致。可以通过 [param " "render_data] 访问渲染状态,这个状态只有在渲染时有效,不应该存储。" #: doc/classes/CompositorEffect.xml msgid "" "If [code]true[/code] and MSAA is enabled, this will trigger a color buffer " "resolve before the effect is run.\n" "[b]Note:[/b] In [method _render_callback], to access the resolved buffer " "use:\n" "[codeblock]\n" "var render_scene_buffers = render_data.get_render_scene_buffers()\n" "var color_buffer = render_scene_buffers.get_texture(\"render_buffers\", " "\"color\")\n" "[/codeblock]" msgstr "" "如果为 [code]true[/code] 并且启用了 MSAA,则会在执行该效果之前触发颜色缓冲的" "解析。\n" "[b]注意:[/b]要在 [method _render_callback] 中访问解析后的缓冲,请使用:\n" "[codeblock]\n" "var render_scene_buffers = render_data.get_render_scene_buffers()\n" "var color_buffer = render_scene_buffers.get_texture(\"render_buffers\", " "\"color\")\n" "[/codeblock]" #: doc/classes/CompositorEffect.xml msgid "" "If [code]true[/code] and MSAA is enabled, this will trigger a depth buffer " "resolve before the effect is run.\n" "[b]Note:[/b] In [method _render_callback], to access the resolved buffer " "use:\n" "[codeblock]\n" "var render_scene_buffers = render_data.get_render_scene_buffers()\n" "var depth_buffer = render_scene_buffers.get_texture(\"render_buffers\", " "\"depth\")\n" "[/codeblock]" msgstr "" "如果为 [code]true[/code] 并且启用了 MSAA,则会在执行该效果之前触发深度缓冲的" "解析。\n" "[b]注意:[/b]要在 [method _render_callback] 中访问解析后的缓冲,请使用:\n" "[codeblock]\n" "var render_scene_buffers = render_data.get_render_scene_buffers()\n" "var depth_buffer = render_scene_buffers.get_texture(\"render_buffers\", " "\"depth\")\n" "[/codeblock]" #: doc/classes/CompositorEffect.xml msgid "" "The type of effect that is implemented, determines at what stage of " "rendering the callback is called." msgstr "实现的效果类型,决定在渲染的哪个阶段调用回调。" #: doc/classes/CompositorEffect.xml msgid "" "If [code]true[/code] this rendering effect is applied to any viewport it is " "added to." msgstr "如果为 [code]true[/code],则该渲染效果会应用到所有相关视口。" #: doc/classes/CompositorEffect.xml msgid "" "If [code]true[/code] this triggers motion vectors being calculated during " "the opaque render state.\n" "[b]Note:[/b] In [method _render_callback], to access the motion vector " "buffer use:\n" "[codeblock]\n" "var render_scene_buffers = render_data.get_render_scene_buffers()\n" "var motion_buffer = render_scene_buffers.get_velocity_texture()\n" "[/codeblock]" msgstr "" "如果为 [code]true[/code],则会在不透明渲染状态下触发运动向量的计算。\n" "[b]注意:[/b]要在 [method _render_callback] 中访问运动向量缓冲,请使用:\n" "[codeblock]\n" "var render_scene_buffers = render_data.get_render_scene_buffers()\n" "var motion_buffer = render_scene_buffers.get_velocity_texture()\n" "[/codeblock]" #: doc/classes/CompositorEffect.xml msgid "" "If [code]true[/code] this triggers normal and roughness data to be output " "during our depth pre-pass, only applicable for the Forward+ renderer.\n" "[b]Note:[/b] In [method _render_callback], to access the roughness buffer " "use:\n" "[codeblock]\n" "var render_scene_buffers = render_data.get_render_scene_buffers()\n" "var roughness_buffer = " "render_scene_buffers.get_texture(\"forward_clustered\", " "\"normal_roughness\")\n" "[/codeblock]\n" "The raw normal and roughness buffer is stored in an optimized format, " "different than the one available in Spatial shaders. When sampling the " "buffer, a conversion function must be applied. Use this function, copied " "from [url=https://github.com/godotengine/godot/blob/" "da5f39889f155658cef7f7ec3cc1abb94e17d815/servers/rendering/renderer_rd/" "shaders/forward_clustered/scene_forward_clustered_inc.glsl#L334-L341]here[/" "url]:\n" "[codeblock]\n" "vec4 normal_roughness_compatibility(vec4 p_normal_roughness) {\n" "\tfloat roughness = p_normal_roughness.w;\n" "\tif (roughness > 0.5) {\n" "\t\troughness = 1.0 - roughness;\n" "\t}\n" "\troughness /= (127.0 / 255.0);\n" "\treturn vec4(normalize(p_normal_roughness.xyz * 2.0 - 1.0) * 0.5 + 0.5, " "roughness);\n" "}\n" "[/codeblock]" msgstr "" "如果为 [code]true[/code],则会在深度预阶段中输出法线和粗糙度数据,仅适用于 " "Forward+ 渲染器。\n" "[b]注意:[/b]在 [method _render_callback] 中访问粗糙度缓冲:\n" "[codeblock]\n" "var render_scene_buffers = render_data.get_render_scene_buffers()\n" "var roughness_buffer = " "render_scene_buffers.get_texture(\"forward_clustered\", " "\"normal_roughness\")\n" "[/codeblock]\n" "原始的法线和粗糙度缓冲使用优化格式存储,与空间着色器中的格式不同。对缓冲采样" "时必须应用转换函数。请使用从[url=https://github.com/godotengine/godot/blob/" "da5f39889f155658cef7f7ec3cc1abb94e17d815/servers/rendering/renderer_rd/" "shaders/forward_clustered/scene_forward_clustered_inc.glsl#L334-L341]这里[/" "url]复制的函数:\n" "[codeblock]\n" "vec4 normal_roughness_compatibility(vec4 p_normal_roughness) {\n" "\tfloat roughness = p_normal_roughness.w;\n" "\tif (roughness > 0.5) {\n" "\t\troughness = 1.0 - roughness;\n" "\t}\n" "\troughness /= (127.0 / 255.0);\n" "\treturn vec4(normalize(p_normal_roughness.xyz * 2.0 - 1.0) * 0.5 + 0.5, " "roughness);\n" "}\n" "[/codeblock]" #: doc/classes/CompositorEffect.xml msgid "" "If [code]true[/code] this triggers specular data being rendered to a " "separate buffer and combined after effects have been applied, only " "applicable for the Forward+ renderer." msgstr "" "如果为 [code]true[/code],则会触发镜面反射数据渲染至独立缓冲,在应用效果后进" "行混合,仅适用于 Forward+ 渲染器。" #: doc/classes/CompositorEffect.xml doc/classes/RenderingServer.xml msgid "" "The callback is called before our opaque rendering pass, but after depth " "prepass (if applicable)." msgstr "回调在不透明渲染阶段之前调用,但在深度前置阶段之后(如果适用)。" #: doc/classes/CompositorEffect.xml doc/classes/RenderingServer.xml msgid "" "The callback is called after our opaque rendering pass, but before our sky " "is rendered." msgstr "回调在不透明渲染阶段之后调用,但在渲染天空之前。" #: doc/classes/CompositorEffect.xml doc/classes/RenderingServer.xml msgid "" "The callback is called after our sky is rendered, but before our back " "buffers are created (and if enabled, before subsurface scattering and/or " "screen space reflections)." msgstr "" "回调在渲染天空之后调用,但在创建后台缓冲之前(如果启用,则在次表面散射和/或屏" "幕空间反射之前)。" #: doc/classes/CompositorEffect.xml doc/classes/RenderingServer.xml msgid "" "The callback is called before our transparent rendering pass, but after our " "sky is rendered and we've created our back buffers." msgstr "回调在透明渲染阶段之前调用,但在渲染天空和创建后台缓冲区之后。" #: doc/classes/CompositorEffect.xml doc/classes/RenderingServer.xml msgid "" "The callback is called after our transparent rendering pass, but before any " "built-in post-processing effects and output to our render target." msgstr "回调在透明渲染阶段之后调用,但在内置后期效果和输出到渲染目标之前。" #: doc/classes/CompositorEffect.xml msgid "Represents the size of the [enum EffectCallbackType] enum." msgstr "代表 [enum EffectCallbackType] 枚举的大小。" #: doc/classes/CompressedCubemap.xml msgid "An optionally compressed [Cubemap]." msgstr "可选压缩的 [Cubemap] 。" #: doc/classes/CompressedCubemap.xml msgid "" "A cubemap that is loaded from a [code].ccube[/code] file. This file format " "is internal to Godot; it is created by importing other image formats with " "the import system. [CompressedCubemap] can use one of 4 compression " "methods:\n" "- Lossless (WebP or PNG, uncompressed on the GPU)\n" "- Lossy (WebP, uncompressed on the GPU)\n" "- VRAM Compressed (compressed on the GPU)\n" "- VRAM Uncompressed (uncompressed on the GPU)\n" "- Basis Universal (compressed on the GPU. Lower file sizes than VRAM " "Compressed, but slower to compress and lower quality than VRAM Compressed)\n" "Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. " "The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the " "required storage on disk, but they will not reduce memory usage on the GPU " "as the texture is sent to the GPU uncompressed.\n" "Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed " "textures are faster to load compared to textures using lossless or lossy " "compression. VRAM compression can exhibit noticeable artifacts and is " "intended to be used for 3D rendering, not 2D.\n" "See [Cubemap] for a general description of cubemaps." msgstr "" "一种从 [code].ccube[/code] 文件加载的立方体贴图。这种文件格式是 Godot 内部使" "用的;它是通过导入系统导入其他图像格式创建的。[CompressedCubemap] 可以使用 4 " "种压缩方法中的一种:\n" "- 无损(WebP 或 PNG,在 GPU 上不压缩)\n" "- 有损(WebP,在 GPU 上不压缩)\n" "- VRAM 压缩(在 GPU 上压缩)\n" "- VRAM 未压缩(在 GPU 上不压缩)\n" "- Basis Universal(在 GPU 上压缩。与 VRAM 压缩相比,文件更小,但压缩速度更" "慢、质量更低)\n" "只有 [b]VRAM 压缩[/b]实际上减少了 GPU 上的内存使用。[b]无损[/b]和[b]有损[/b]" "压缩方法将减少磁盘上所需的存储空间,但它们不会减少 GPU 上的内存使用,因为纹理" "未经压缩地被发送到 GPU。\n" "使用 [b]VRAM 压缩[/b]还可以缩短加载时间,因为与使用无损或有损压缩的纹理相比," "VRAM 压缩的纹理加载速度更快。VRAM 压缩会表现出明显的伪影,并且它旨在用于 3D " "渲染,而不是 2D。\n" "有关立方体贴图的一般描述,请参阅 [Cubemap]。" #: doc/classes/CompressedCubemapArray.xml msgid "An optionally compressed [CubemapArray]." msgstr "一个可选压缩的 [CubemapArray] 。" #: doc/classes/CompressedCubemapArray.xml msgid "" "A cubemap array that is loaded from a [code].ccubearray[/code] file. This " "file format is internal to Godot; it is created by importing other image " "formats with the import system. [CompressedCubemapArray] can use one of 4 " "compression methods:\n" "- Lossless (WebP or PNG, uncompressed on the GPU)\n" "- Lossy (WebP, uncompressed on the GPU)\n" "- VRAM Compressed (compressed on the GPU)\n" "- VRAM Uncompressed (uncompressed on the GPU)\n" "- Basis Universal (compressed on the GPU. Lower file sizes than VRAM " "Compressed, but slower to compress and lower quality than VRAM Compressed)\n" "Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. " "The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the " "required storage on disk, but they will not reduce memory usage on the GPU " "as the texture is sent to the GPU uncompressed.\n" "Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed " "textures are faster to load compared to textures using lossless or lossy " "compression. VRAM compression can exhibit noticeable artifacts and is " "intended to be used for 3D rendering, not 2D.\n" "See [CubemapArray] for a general description of cubemap arrays." msgstr "" "一种从 [code].ccubearray[/code] 文件加载的立方体贴图数组。这种文件格式是 " "Godot 内部使用的;它是通过导入系统导入其他图像格式创建的。" "[CompressedCubemapArray] 可以使用 4 种压缩方法中的一种:\n" "- 无损(WebP 或 PNG,在 GPU 上不压缩)\n" "- 有损(WebP,在 GPU 上不压缩)\n" "- VRAM 压缩(在 GPU 上压缩)\n" "- VRAM 未压缩(在 GPU 上不压缩)\n" "- Basis Universal(在 GPU 上压缩。与 VRAM 压缩相比,文件更小,但压缩速度更" "慢、质量更低)\n" "只有 [b]VRAM 压缩[/b]实际上减少了 GPU 上的内存使用。[b]无损[/b]和[b]有损[/b]" "压缩方法将减少磁盘上所需的存储空间,但它们不会减少 GPU 上的内存使用,因为纹理" "未经压缩地被发送到 GPU。\n" "使用 [b]VRAM 压缩[/b]还可以缩短加载时间,因为与使用无损或有损压缩的纹理相比," "VRAM 压缩的纹理加载速度更快。VRAM 压缩会表现出明显的伪影,并且它旨在用于 3D " "渲染,而不是 2D。\n" "有关立方体贴图数组的一般说明,请参阅 [CubemapArray]。" #: doc/classes/CompressedTexture2D.xml msgid "Texture with 2 dimensions, optionally compressed." msgstr "二维纹理,可选择压缩。" #: doc/classes/CompressedTexture2D.xml msgid "" "A texture that is loaded from a [code].ctex[/code] file. This file format is " "internal to Godot; it is created by importing other image formats with the " "import system. [CompressedTexture2D] can use one of 4 compression methods " "(including a lack of any compression):\n" "- Lossless (WebP or PNG, uncompressed on the GPU)\n" "- Lossy (WebP, uncompressed on the GPU)\n" "- VRAM Compressed (compressed on the GPU)\n" "- VRAM Uncompressed (uncompressed on the GPU)\n" "- Basis Universal (compressed on the GPU. Lower file sizes than VRAM " "Compressed, but slower to compress and lower quality than VRAM Compressed)\n" "Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. " "The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the " "required storage on disk, but they will not reduce memory usage on the GPU " "as the texture is sent to the GPU uncompressed.\n" "Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed " "textures are faster to load compared to textures using lossless or lossy " "compression. VRAM compression can exhibit noticeable artifacts and is " "intended to be used for 3D rendering, not 2D." msgstr "" "一种从 [code].ctex[/code] 文件加载的纹理。这种文件格式是 Godot 内部使用的;它" "是通过导入系统导入其他图像格式创建的。[CompressedTexture2D] 可以使用 4 种压缩" "方法中的一种(包括没有任何压缩):\n" "- 无损(WebP 或 PNG,在 GPU 上不压缩)\n" "- 有损(WebP,在 GPU 上不压缩)\n" "- VRAM 压缩(在 GPU 上压缩)\n" "- VRAM 未压缩(在 GPU 上不压缩)\n" "- Basis Universal(在 GPU 上压缩。与 VRAM 压缩相比,文件更小,但压缩速度更" "慢、质量更低)\n" "只有 [b]VRAM 压缩[/b]实际上减少了 GPU 上的内存使用。[b]无损[/b]和[b]有损[/b]" "压缩方法将减少磁盘上所需的存储空间,但它们不会减少 GPU 上的内存使用,因为纹理" "未经压缩地被发送到 GPU。\n" "使用 [b]VRAM 压缩[/b]还可以缩短加载时间,因为与使用无损或有损压缩的纹理相比," "VRAM 压缩的纹理加载速度更快。VRAM 压缩会表现出明显的伪影,并且它旨在用于 3D " "渲染,而不是 2D。" #: doc/classes/CompressedTexture2D.xml doc/classes/CompressedTexture3D.xml msgid "Loads the texture from the specified [param path]." msgstr "从指定的路径 [param path] 加载纹理。" #: doc/classes/CompressedTexture2D.xml msgid "The [CompressedTexture2D]'s file path to a [code].ctex[/code] file." msgstr "该 [CompressedTexture2D] 的文件路径,指向 [code].ctex[/code] 文件。" #: doc/classes/CompressedTexture2DArray.xml msgid "Array of 2-dimensional textures, optionally compressed." msgstr "二维纹理的数组,可选择压缩。" #: doc/classes/CompressedTexture2DArray.xml msgid "" "A texture array that is loaded from a [code].ctexarray[/code] file. This " "file format is internal to Godot; it is created by importing other image " "formats with the import system. [CompressedTexture2DArray] can use one of 4 " "compression methods:\n" "- Lossless (WebP or PNG, uncompressed on the GPU)\n" "- Lossy (WebP, uncompressed on the GPU)\n" "- VRAM Compressed (compressed on the GPU)\n" "- VRAM Uncompressed (uncompressed on the GPU)\n" "- Basis Universal (compressed on the GPU. Lower file sizes than VRAM " "Compressed, but slower to compress and lower quality than VRAM Compressed)\n" "Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. " "The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the " "required storage on disk, but they will not reduce memory usage on the GPU " "as the texture is sent to the GPU uncompressed.\n" "Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed " "textures are faster to load compared to textures using lossless or lossy " "compression. VRAM compression can exhibit noticeable artifacts and is " "intended to be used for 3D rendering, not 2D.\n" "See [Texture2DArray] for a general description of texture arrays." msgstr "" "一种从 [code].ctexarray[/code] 文件加载的纹理数组。这种文件格式是 Godot 内部" "使用的;它是通过导入系统导入其他图像格式创建的。[CompressedTexture2DArray] 可" "以使用 4 种压缩方法中的一种:\n" "- 无损(WebP 或 PNG,在 GPU 上不压缩)\n" "- 有损(WebP,在 GPU 上不压缩)\n" "- VRAM 压缩(在 GPU 上压缩)\n" "- VRAM 未压缩(在 GPU 上不压缩)\n" "- Basis Universal(在 GPU 上压缩。与 VRAM 压缩相比,文件更小,但压缩速度更" "慢、质量更低)\n" "只有 [b]VRAM 压缩[/b]实际上减少了 GPU 上的内存使用。[b]无损[/b]和[b]有损[/b]" "压缩方法将减少磁盘上所需的存储空间,但它们不会减少 GPU 上的内存使用,因为纹理" "未经压缩地被发送到 GPU。\n" "使用 [b]VRAM 压缩[/b]还可以缩短加载时间,因为与使用无损或有损压缩的纹理相比," "VRAM 压缩的纹理加载速度更快。VRAM 压缩会表现出明显的伪影,并且它旨在用于 3D " "渲染,而不是 2D。\n" "有关纹理数组的一般描述,请参阅 [Texture2DArray]。" #: doc/classes/CompressedTexture3D.xml msgid "Texture with 3 dimensions, optionally compressed." msgstr "三维纹理,可选择压缩。" #: doc/classes/CompressedTexture3D.xml msgid "" "[CompressedTexture3D] is the VRAM-compressed counterpart of " "[ImageTexture3D]. The file extension for [CompressedTexture3D] files is " "[code].ctex3d[/code]. This file format is internal to Godot; it is created " "by importing other image formats with the import system.\n" "[CompressedTexture3D] uses VRAM compression, which allows to reduce memory " "usage on the GPU when rendering the texture. This also improves loading " "times, as VRAM-compressed textures are faster to load compared to textures " "using lossless compression. VRAM compression can exhibit noticeable " "artifacts and is intended to be used for 3D rendering, not 2D.\n" "See [Texture3D] for a general description of 3D textures." msgstr "" "[CompressedTexture3D] 是 [ImageTexture3D] 的 VRAM 压缩对应物。" "[CompressedTexture3D] 文件的文件扩展名为 [code].ctex3d[/code]。这种文件格式" "是 Godot 内部使用的;它是通过导入系统导入其他图像格式创建的。\n" "[CompressedTexture3D] 使用 VRAM 压缩,这可以在渲染纹理时减少 GPU 的内存使用" "量。这也缩短了加载时间,因为与使用无损压缩的纹理相比,VRAM 压缩的纹理加载速度" "更快。VRAM 压缩会表现出明显的伪影,并且它旨在用于 3D 渲染,而不是 2D。\n" "有关 3D 纹理的一般描述,请参阅 [Texture3D]。" #: doc/classes/CompressedTexture3D.xml msgid "The [CompressedTexture3D]'s file path to a [code].ctex3d[/code] file." msgstr "该 [CompressedTexture3D] 的文件路径,指向 [code].ctex3d[/code] 文件。" #: doc/classes/CompressedTextureLayered.xml msgid "Base class for texture arrays that can optionally be compressed." msgstr "可压缩纹理数组的基类。" #: doc/classes/CompressedTextureLayered.xml msgid "" "Base class for [CompressedTexture2DArray] and [CompressedTexture3D]. Cannot " "be used directly, but contains all the functions necessary for accessing the " "derived resource types. See also [TextureLayered]." msgstr "" "[CompressedTexture2DArray] 和 [CompressedTexture3D] 的基类。不能直接使用,但" "包含了访问派生资源类型所需的所有函数。另见 [TextureLayered]。" #: doc/classes/CompressedTextureLayered.xml msgid "Loads the texture at [param path]." msgstr "加载位于 [param path] 的纹理。" #: doc/classes/CompressedTextureLayered.xml msgid "The path the texture should be loaded from." msgstr "加载纹理所使用的路径。" #: doc/classes/ConcavePolygonShape2D.xml msgid "A 2D polyline shape used for physics collision." msgstr "用于物理碰撞的 2D 多线段形状。" #: doc/classes/ConcavePolygonShape2D.xml msgid "" "A 2D polyline shape, intended for use in physics. Used internally in " "[CollisionPolygon2D] when it's in [constant " "CollisionPolygon2D.BUILD_SEGMENTS] mode.\n" "Being just a collection of interconnected line segments, " "[ConcavePolygonShape2D] is the most freely configurable single 2D shape. It " "can be used to form polygons of any nature, or even shapes that don't " "enclose an area. However, [ConcavePolygonShape2D] is [i]hollow[/i] even if " "the interconnected line segments do enclose an area, which often makes it " "unsuitable for physics or detection.\n" "[b]Note:[/b] When used for collision, [ConcavePolygonShape2D] is intended to " "work with static [CollisionShape2D] nodes like [StaticBody2D] and will " "likely not behave well for [CharacterBody2D]s or [RigidBody2D]s in a mode " "other than Static.\n" "[b]Warning:[/b] Physics bodies that are small have a chance to clip through " "this shape when moving fast. This happens because on one frame, the physics " "body may be on the \"outside\" of the shape, and on the next frame it may be " "\"inside\" it. [ConcavePolygonShape2D] is hollow, so it won't detect a " "collision.\n" "[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape2D] is the " "slowest 2D collision shape to check collisions against. Its use should " "generally be limited to level geometry. If the polyline is closed, " "[CollisionPolygon2D]'s [constant CollisionPolygon2D.BUILD_SOLIDS] mode can " "be used, which decomposes the polygon into convex ones; see " "[ConvexPolygonShape2D]'s documentation for instructions." msgstr "" "一种 2D 折线形状,用于物理运算。当 [CollisionPolygon2D] 处于 [constant " "CollisionPolygon2D.BUILD_SEGMENTS] 模式时,会在其内部使用。\n" "作为一组相互连接线段,[ConcavePolygonShape2D] 是最自由的可配置的单一 2D 形" "状。它可以用于形成任何性质的多边形,甚至是不封闭区域的形状。然而,即使相互连" "接的线段确实封闭了一个区域,[ConcavePolygonShape2D] 仍然是[i]中空的[/i],这常" "常使其不适用于物理模拟或碰撞检测。\n" "[b]注意:[/b]当用于碰撞计算时,[ConcavePolygonShape2D] 旨在与 [StaticBody2D] " "等静态 [CollisionShape2D] 节点一起使用,并且对于 [CharacterBody2D] 或 " "[RigidBody2D],在除静态模式之外的其他模式下可能表现不佳。\n" "[b]警告:[/b]较小的物理物体在快速移动时有机会穿过该形状。发生这种情况是因为在" "一帧上,物理物体可能位于形状的“外部”,而在下一帧上,它可能位于形状的“内部”。" "由于[ConcavePolygonShape2D] 是中空的,因此它不会检测到碰撞。\n" "[b]性能:[/b]由于其复杂性, [ConcavePolygonShape2D] 是检测碰撞最慢的 2D 碰撞" "形状。它的使用一般仅限于关卡几何体。如果折线是闭合的,可以使用 " "[CollisionPolygon2D] 的 [constant CollisionPolygon2D.BUILD_SOLIDS] 模式,它会" "将多边形分解成凸多边形;相关说明请参阅 [ConvexPolygonShape2D] 文档。" #: doc/classes/ConcavePolygonShape2D.xml msgid "" "The array of points that make up the [ConcavePolygonShape2D]'s line " "segments. The array (of length divisible by two) is naturally divided into " "pairs (one pair for each segment); each pair consists of the starting point " "of a segment and the endpoint of a segment." msgstr "" "顶点数组,构成 [ConcavePolygonShape2D] 的线段。该(长度能被二整除的)数组自然" "两两分组(每组代表一条线段);每组都由一条线段的起点和终点构成。" #: doc/classes/ConcavePolygonShape3D.xml msgid "A 3D trimesh shape used for physics collision." msgstr "用于物理碰撞的 3D 三角网格形状。" #: doc/classes/ConcavePolygonShape3D.xml msgid "" "A 3D trimesh shape, intended for use in physics. Usually used to provide a " "shape for a [CollisionShape3D].\n" "Being just a collection of interconnected triangles, [ConcavePolygonShape3D] " "is the most freely configurable single 3D shape. It can be used to form " "polyhedra of any nature, or even shapes that don't enclose a volume. " "However, [ConcavePolygonShape3D] is [i]hollow[/i] even if the interconnected " "triangles do enclose a volume, which often makes it unsuitable for physics " "or detection.\n" "[b]Note:[/b] When used for collision, [ConcavePolygonShape3D] is intended to " "work with static [CollisionShape3D] nodes like [StaticBody3D] and will " "likely not behave well for [CharacterBody3D]s or [RigidBody3D]s in a mode " "other than Static.\n" "[b]Warning:[/b] Physics bodies that are small have a chance to clip through " "this shape when moving fast. This happens because on one frame, the physics " "body may be on the \"outside\" of the shape, and on the next frame it may be " "\"inside\" it. [ConcavePolygonShape3D] is hollow, so it won't detect a " "collision.\n" "[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the " "slowest 3D collision shape to check collisions against. Its use should " "generally be limited to level geometry. For convex geometry, " "[ConvexPolygonShape3D] should be used. For dynamic physics bodies that need " "concave collision, several [ConvexPolygonShape3D]s can be used to represent " "its collision by using convex decomposition; see [ConvexPolygonShape3D]'s " "documentation for instructions." msgstr "" "一种用于物理模拟的 3D 三角网格形状。通常用于为 [CollisionShape3D] 提供形" "状。\n" "作为一组相互连接的三角形, [ConcavePolygonShape3D] 是最自由的可配置的单一 3D " "形状。它可以用于形成任何性质的多面体,甚至是不封闭体积的形状。然而,即使相互" "连接的三角形封闭了一个体积, [ConvexPolygonShape3D] 仍然是[i]中空[/i]的,这常" "常使其不适用于物理模拟或碰撞检测。\n" "[b]注意:[/b]当用于碰撞计算时, [ConcavePolygonShape3D] 旨在与 " "[StaticBody3D] 等静态 [CollisionShape3D] 节点一起使用 。并且对于 " "[CharacterBody3D] 或 [RigidBody3D],在除静态模式之外的其他模式下可能表现不" "佳。\n" "[b]警告:[/b]较小的物理物体在快速移动时有机会穿过该形状。发生这种情况是因为在" "一帧上,物理物体可能位于形状的“外部”,而在下一帧上,它可能位于形状的“内部”。" "由于[ConcavePolygonShape3D] 是中空的,因此它不会检测到碰撞。\n" "[b]性能:[/b]由于其复杂性, [ConcavePolygonShape3D] 是检测碰撞最慢的 3D 碰撞" "形状。它的使用一般仅限于关卡几何体。对于凸几何体,应使用 " "[ConvexPolygonShape3D] 。对于需要凹碰撞的动态物体,可以使用多个 " "[ConvexPolygonShape3D] 通过凸分解来表示其碰撞;相关说明请参阅 " "[ConvexPolygonShape3D] 文档。" #: doc/classes/ConcavePolygonShape3D.xml msgid "" "Returns the faces of the trimesh shape as an array of vertices. The array " "(of length divisible by three) is naturally divided into triples; each " "triple of vertices defines a triangle." msgstr "" "以顶点数组的形式返回三角网格形状中的面。该(长度能被三整除的)数组自然三三分" "组;每组中的三个顶点定义一个三角形。" #: doc/classes/ConcavePolygonShape3D.xml msgid "" "Sets the faces of the trimesh shape from an array of vertices. The [param " "faces] array should be composed of triples such that each triple of vertices " "defines a triangle." msgstr "" "根据顶点数组设置三角网格形状的面。[param faces] 数组应更多由若干三元组构成," "每三个顶点定义一个三角形。" #: doc/classes/ConcavePolygonShape3D.xml msgid "" "If set to [code]true[/code], collisions occur on both sides of the concave " "shape faces. Otherwise they occur only along the face normals." msgstr "" "如果设置为 [code]true[/code],则碰撞会发生在凹形面的两侧。否则,它们只会沿着" "面法线发生。" #: doc/classes/ConeTwistJoint3D.xml msgid "" "A physics joint that connects two 3D physics bodies in a way that simulates " "a ball-and-socket joint." msgstr "以模拟球窝关节的方式连接两个 3D 物理物体的物理关节。" #: doc/classes/ConeTwistJoint3D.xml msgid "" "A physics joint that connects two 3D physics bodies in a way that simulates " "a ball-and-socket joint. The twist axis is initiated as the X axis of the " "[ConeTwistJoint3D]. Once the physics bodies swing, the twist axis is " "calculated as the middle of the X axes of the joint in the local space of " "the two physics bodies. Useful for limbs like shoulders and hips, lamps " "hanging off a ceiling, etc." msgstr "" "以模拟球窝关节的方式连接两个 3D 物理物体的物理关节。扭转轴被初始化为 " "[ConeTwistJoint3D] 的 X 轴。一旦物理体摆动,扭转轴将被计算为两个物理体局部空" "间中关节的 X 轴的中间值。可用作肩膀、臀部等肢体,也可以用作从天花板荡下的灯之" "类的对象。" #: doc/classes/ConeTwistJoint3D.xml doc/classes/HingeJoint3D.xml #: doc/classes/PinJoint3D.xml msgid "Returns the value of the specified parameter." msgstr "返回指定参数的值。" #: doc/classes/ConeTwistJoint3D.xml doc/classes/HingeJoint3D.xml #: doc/classes/PinJoint3D.xml msgid "Sets the value of the specified parameter." msgstr "设置指定参数的值。" #: doc/classes/ConeTwistJoint3D.xml doc/classes/PhysicsServer3D.xml msgid "" "The speed with which the swing or twist will take place.\n" "The higher, the faster." msgstr "" "摆动或扭转的速度。\n" "越高,速度越快。" #: doc/classes/ConeTwistJoint3D.xml doc/classes/PhysicsServer3D.xml msgid "" "Defines, how fast the swing- and twist-speed-difference on both sides gets " "synced." msgstr "定义两侧的摆动速度和扭转速度差异同步的速度。" #: doc/classes/ConeTwistJoint3D.xml msgid "" "The ease with which the joint starts to twist. If it's too low, it takes " "more force to start twisting the joint." msgstr "关节开始扭转的难易程度。如果太低,则需要更多的力才能开始扭转关节。" #: doc/classes/ConeTwistJoint3D.xml doc/classes/PhysicsServer3D.xml msgid "" "Swing is rotation from side to side, around the axis perpendicular to the " "twist axis.\n" "The swing span defines, how much rotation will not get corrected along the " "swing axis.\n" "Could be defined as looseness in the [ConeTwistJoint3D].\n" "If below 0.05, this behavior is locked." msgstr "" "摆动是围绕垂直于扭转轴的轴线,从一边到另一边的旋转。\n" "摆动跨度定义了沿摆动轴旋转多少不会得到校正。\n" "可以被定义为 [ConeTwistJoint3D] 中的松动。\n" "如果低于 0.05,该行为将被锁定。" #: doc/classes/ConeTwistJoint3D.xml doc/classes/PhysicsServer3D.xml msgid "" "Twist is the rotation around the twist axis, this value defined how far the " "joint can twist.\n" "Twist is locked if below 0.05." msgstr "" "扭转是绕扭转轴的旋转,此值定义了关节可以扭转多远。\n" "如果低于 0.05,则扭转被锁定。" #: doc/classes/ConeTwistJoint3D.xml doc/classes/Generic6DOFJoint3D.xml #: doc/classes/HingeJoint3D.xml doc/classes/Light3D.xml #: doc/classes/SliderJoint3D.xml msgid "Represents the size of the [enum Param] enum." msgstr "代表 [enum Param] 枚举的大小。" #: doc/classes/ConfigFile.xml msgid "Helper class to handle INI-style files." msgstr "用于处理 INI 样式文件的辅助类。" #: doc/classes/ConfigFile.xml msgid "" "This helper class can be used to store [Variant] values on the filesystem " "using INI-style formatting. The stored values are identified by a section " "and a key:\n" "[codeblock lang=text]\n" "[section]\n" "some_key=42\n" "string_example=\"Hello World3D!\"\n" "a_vector=Vector3(1, 0, 2)\n" "[/codeblock]\n" "The stored data can be saved to or parsed from a file, though ConfigFile " "objects can also be used directly without accessing the filesystem.\n" "The following example shows how to create a simple [ConfigFile] and save it " "on disc:\n" "[codeblocks]\n" "[gdscript]\n" "# Create new ConfigFile object.\n" "var config = ConfigFile.new()\n" "\n" "# Store some values.\n" "config.set_value(\"Player1\", \"player_name\", \"Steve\")\n" "config.set_value(\"Player1\", \"best_score\", 10)\n" "config.set_value(\"Player2\", \"player_name\", \"V3geta\")\n" "config.set_value(\"Player2\", \"best_score\", 9001)\n" "\n" "# Save it to a file (overwrite if already exists).\n" "config.save(\"user://scores.cfg\")\n" "[/gdscript]\n" "[csharp]\n" "// Create new ConfigFile object.\n" "var config = new ConfigFile();\n" "\n" "// Store some values.\n" "config.SetValue(\"Player1\", \"player_name\", \"Steve\");\n" "config.SetValue(\"Player1\", \"best_score\", 10);\n" "config.SetValue(\"Player2\", \"player_name\", \"V3geta\");\n" "config.SetValue(\"Player2\", \"best_score\", 9001);\n" "\n" "// Save it to a file (overwrite if already exists).\n" "config.Save(\"user://scores.cfg\");\n" "[/csharp]\n" "[/codeblocks]\n" "This example shows how the above file could be loaded:\n" "[codeblocks]\n" "[gdscript]\n" "var score_data = {}\n" "var config = ConfigFile.new()\n" "\n" "# Load data from a file.\n" "var err = config.load(\"user://scores.cfg\")\n" "\n" "# If the file didn't load, ignore it.\n" "if err != OK:\n" "\treturn\n" "\n" "# Iterate over all sections.\n" "for player in config.get_sections():\n" "\t# Fetch the data for each section.\n" "\tvar player_name = config.get_value(player, \"player_name\")\n" "\tvar player_score = config.get_value(player, \"best_score\")\n" "\tscore_data[player_name] = player_score\n" "[/gdscript]\n" "[csharp]\n" "var score_data = new Godot.Collections.Dictionary();\n" "var config = new ConfigFile();\n" "\n" "// Load data from a file.\n" "Error err = config.Load(\"user://scores.cfg\");\n" "\n" "// If the file didn't load, ignore it.\n" "if (err != Error.Ok)\n" "{\n" "\treturn;\n" "}\n" "\n" "// Iterate over all sections.\n" "foreach (String player in config.GetSections())\n" "{\n" "\t// Fetch the data for each section.\n" "\tvar player_name = (String)config.GetValue(player, \"player_name\");\n" "\tvar player_score = (int)config.GetValue(player, \"best_score\");\n" "\tscore_data[player_name] = player_score;\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "Any operation that mutates the ConfigFile such as [method set_value], " "[method clear], or [method erase_section], only changes what is loaded in " "memory. If you want to write the change to a file, you have to save the " "changes with [method save], [method save_encrypted], or [method " "save_encrypted_pass].\n" "Keep in mind that section and property names can't contain spaces. Anything " "after a space will be ignored on save and on load.\n" "ConfigFiles can also contain manually written comment lines starting with a " "semicolon ([code];[/code]). Those lines will be ignored when parsing the " "file. Note that comments will be lost when saving the ConfigFile. This can " "still be useful for dedicated server configuration files, which are " "typically never overwritten without explicit user action.\n" "[b]Note:[/b] The file extension given to a ConfigFile does not have any " "impact on its formatting or behavior. By convention, the [code].cfg[/code] " "extension is used here, but any other extension such as [code].ini[/code] is " "also valid. Since neither [code].cfg[/code] nor [code].ini[/code] are " "standardized, Godot's ConfigFile formatting may differ from files written by " "other programs." msgstr "" "该辅助类可用于使用 INI 样式格式在文件系统上存储 [Variant] 值。存储的值由一个" "小节和一个键标识:\n" "[codeblock lang=text]\n" "[section]\n" "some_key=42\n" "string_example=\"Hello World3D!\"\n" "a_vector=Vector3(1, 0, 2)\n" "[/codeblock]\n" "存储的数据可以被保存到文件中或从文件中解析出来,尽管 ConfigFile 对象也可以直" "接使用而无需访问文件系统。\n" "以下示例显示了如何创建一个简单的 [ConfigFile] 并将其保存在磁盘上:\n" "[codeblocks]\n" "[gdscript]\n" "# 创建新的 ConfigFile 对象。\n" "var config = ConfigFile.new()\n" "\n" "# 存储一些值。\n" "config.set_value(\"Player1\", \"player_name\", \"Steve\")\n" "config.set_value(\"Player1\", \"best_score\", 10)\n" "config.set_value(\"Player2\", \"player_name\", \"V3geta\")\n" "config.set_value(\"Player2\", \"best_score\", 9001)\n" "\n" "# 将其保存到文件中(如果已存在则覆盖)。\n" "config.save(\"user://scores.cfg\")\n" "[/gdscript]\n" "[csharp]\n" "// 创建新的 ConfigFile 对象。\n" "var config = new ConfigFile();\n" "\n" "// 存储一些值。\n" "config.SetValue(\"Player1\", \"player_name\", \"Steve\");\n" "config.SetValue(\"Player1\", \"best_score\", 10);\n" "config.SetValue(\"Player2\", \"player_name\", \"V3geta\");\n" "config.SetValue(\"Player2\", \"best_score\", 9001);\n" "\n" "// 将其保存到文件中(如果已存在则覆盖)。\n" "config.Save(\"user://scores.cfg\");\n" "[/csharp]\n" "[/codeblocks]\n" "该示例展示了如何加载上面的文件:\n" "[codeblocks]\n" "[gdscript]\n" "var score_data = {}\n" "var config = ConfigFile.new()\n" "\n" "# 从文件加载数据。\n" "var err = config.load(\"user://scores.cfg\")\n" "\n" "# 如果文件没有加载,忽略它。\n" "if err != OK:\n" "\treturn\n" "\n" "# 迭代所有小节。\n" "for player in config.get_sections():\n" "\t# 获取每个小节的数据。\n" "\tvar player_name = config.get_value(player, \"player_name\")\n" "\tvar player_score = config.get_value(player, \"best_score\")\n" "\tscore_data[player_name] = player_score\n" "[/gdscript]\n" "[csharp]\n" "var score_data = new Godot.Collections.Dictionary();\n" "var config = new ConfigFile();\n" "\n" "// 从文件加载数据。\n" "Error err = config.Load(\"user://scores.cfg\");\n" "\n" "// 如果文件没有加载,忽略它。\n" "if (err != Error.Ok)\n" "{\n" "\treturn;\n" "}\n" "\n" "// 迭代所有小节。\n" "foreach (String player in config.GetSections())\n" "{\n" "\t// 获取每个小节的数据。\n" "\tvar player_name = (String)config.GetValue(player, \"player_name\");\n" "\tvar player_score = (int)config.GetValue(player, \"best_score\");\n" "\tscore_data[player_name] = player_score;\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "[method set_value]、[method clear]、[method erase_section] 等修改 ConfigFile " "的操作只会改变内存中所加载的内容。如果要将更改写入文件,则必须使用 [method " "save]、[method save_encrypted] 或 [method save_encrypted_pass] 保存更改。\n" "请记住,小节和属性名称不能包含空格。保存和加载时将忽略空格后的任何内容。\n" "ConfigFile 还可以包含以分号([code];[/code])开头的手动编写的注释行。解析文件" "时将忽略这些行。请注意,保存 ConfigFile 时注释将丢失。注释对于专用服务器配置" "文件仍然很有用,如果没有明确的用户操作,这些文件通常永远不会被覆盖。\n" "[b]注意:[/b]为 ConfigFile 指定的文件扩展名对其格式或行为没有任何影响。按照惯" "例,此处使用 [code].cfg[/code] 扩展名,但 [code].ini[/code] 等任何其他扩展名" "也有效。由于 [code].cfg[/code] 和 [code].ini[/code] 都不是标准化的格式," "Godot 的 ConfigFile 格式可能与其他程序编写的文件不同。" #: doc/classes/ConfigFile.xml msgid "Removes the entire contents of the config." msgstr "移除配置的全部内容。" #: doc/classes/ConfigFile.xml msgid "" "Obtain the text version of this config file (the same text that would be " "written to a file)." msgstr "获得该配置文件的文本版本(与写入文件的文本相同)。" #: doc/classes/ConfigFile.xml msgid "" "Deletes the specified section along with all the key-value pairs inside. " "Raises an error if the section does not exist." msgstr "删除指定小节以及其中的所有键值对。如果该小节不存在,则会引发错误。" #: doc/classes/ConfigFile.xml msgid "" "Deletes the specified key in a section. Raises an error if either the " "section or the key do not exist." msgstr "删除小节中的指定键。如果该小节或键不存在,则会引发错误。" #: doc/classes/ConfigFile.xml msgid "" "Returns an array of all defined key identifiers in the specified section. " "Raises an error and returns an empty array if the section does not exist." msgstr "" "返回指定小节中所有已定义键标识符的数组。如果该小节不存在,则会引发错误并返回" "一个空数组。" #: doc/classes/ConfigFile.xml msgid "Returns an array of all defined section identifiers." msgstr "返回所有已定义小节的标识符的数组。" #: doc/classes/ConfigFile.xml msgid "" "Returns the current value for the specified section and key. If either the " "section or the key do not exist, the method returns the fallback [param " "default] value. If [param default] is not specified or set to [code]null[/" "code], an error is also raised." msgstr "" "返回指定小节和键的当前值。如果该小节或键不存在,则该方法返回后备值 [param " "default]。如果未指定 [param default] 或将其设置为 [code]null[/code],则会引发" "一个错误。" #: doc/classes/ConfigFile.xml msgid "Returns [code]true[/code] if the specified section exists." msgstr "如果指定的小节存在,则返回 [code]true[/code]。" #: doc/classes/ConfigFile.xml msgid "Returns [code]true[/code] if the specified section-key pair exists." msgstr "如果指定的小节-键对存在,则返回 [code]true[/code]。" #: doc/classes/ConfigFile.xml msgid "" "Loads the config file specified as a parameter. The file's contents are " "parsed and loaded in the [ConfigFile] object which the method was called " "on.\n" "Returns [constant OK] on success, or one of the other [enum Error] values if " "the operation failed." msgstr "" "加载指定为参数的配置文件。解析文件的内容并将其加载到调用该方法的 " "[ConfigFile] 对象中。\n" "成功时返回 [constant OK],操作失败时返回其他 [enum Error] 值。" #: doc/classes/ConfigFile.xml msgid "" "Loads the encrypted config file specified as a parameter, using the provided " "[param key] to decrypt it. The file's contents are parsed and loaded in the " "[ConfigFile] object which the method was called on.\n" "Returns [constant OK] on success, or one of the other [enum Error] values if " "the operation failed." msgstr "" "加载指定为参数的加密配置文件,使用提供的 [param key] 对其解密。解析文件的内容" "并将其加载到调用该方法的 [ConfigFile] 对象中。\n" "成功时返回 [constant OK],操作失败时返回其他 [enum Error] 值。" #: doc/classes/ConfigFile.xml msgid "" "Loads the encrypted config file specified as a parameter, using the provided " "[param password] to decrypt it. The file's contents are parsed and loaded in " "the [ConfigFile] object which the method was called on.\n" "Returns [constant OK] on success, or one of the other [enum Error] values if " "the operation failed." msgstr "" "加载作为参数的加密配置文件,使用提供的 [param password] 解密。该文件的内容被" "解析并加载到调用该方法的 [ConfigFile] 对象中。\n" "成功时返回 [constant OK],操作失败时返回其他 [enum Error] 值。" #: doc/classes/ConfigFile.xml msgid "" "Parses the passed string as the contents of a config file. The string is " "parsed and loaded in the ConfigFile object which the method was called on.\n" "Returns [constant OK] on success, or one of the other [enum Error] values if " "the operation failed." msgstr "" "将传递的字符串解析为配置文件的内容。该字符串被解析并加载到调用该方法的 " "ConfigFile 对象中。\n" "成功时返回 [constant OK],操作失败时返回其他 [enum Error] 值。" #: doc/classes/ConfigFile.xml msgid "" "Saves the contents of the [ConfigFile] object to the file specified as a " "parameter. The output file uses an INI-style structure.\n" "Returns [constant OK] on success, or one of the other [enum Error] values if " "the operation failed." msgstr "" "将 [ConfigFile] 对象的内容保存到指定为参数的文件中。输出文件使用 INI 样式的结" "构。\n" "成功时返回 [constant OK],操作失败时返回其他 [enum Error] 值。" #: doc/classes/ConfigFile.xml msgid "" "Saves the contents of the [ConfigFile] object to the AES-256 encrypted file " "specified as a parameter, using the provided [param key] to encrypt it. The " "output file uses an INI-style structure.\n" "Returns [constant OK] on success, or one of the other [enum Error] values if " "the operation failed." msgstr "" "使用提供的 [param key] 将 [ConfigFile] 对象的内容保存到作为参数指定的 " "AES-256 加密文件中。输出文件使用 INI 样式的结构。\n" "成功时返回 [constant OK],操作失败时返回其他 [enum Error] 值。" #: doc/classes/ConfigFile.xml msgid "" "Saves the contents of the [ConfigFile] object to the AES-256 encrypted file " "specified as a parameter, using the provided [param password] to encrypt it. " "The output file uses an INI-style structure.\n" "Returns [constant OK] on success, or one of the other [enum Error] values if " "the operation failed." msgstr "" "将 [ConfigFile] 对象的内容保存到作为参数指定的 AES-256 加密文件中,使用提供" "的 [param password] 进行加密。输出文件使用 INI 风格的结构。\n" "成功时返回 [constant OK],操作失败时返回其他 [enum Error] 值。" #: doc/classes/ConfigFile.xml msgid "" "Assigns a value to the specified key of the specified section. If either the " "section or the key do not exist, they are created. Passing a [code]null[/" "code] value deletes the specified key if it exists, and deletes the section " "if it ends up empty once the key has been removed." msgstr "" "为指定小节的指定键赋值。如果小节或键不存在,则创建它们。如果指定的键存在,传" "递 [code]null[/code] 值就会移除指定的键,如果键被移除后,小节最终是空的,就会" "移除小节。" #: doc/classes/ConfirmationDialog.xml msgid "A dialog used for confirmation of actions." msgstr "用于确认动作的对话框。" #: doc/classes/ConfirmationDialog.xml #, fuzzy msgid "" "A dialog used for confirmation of actions. This window is similar to " "[AcceptDialog], but pressing its Cancel button can have a different outcome " "from pressing the OK button. The order of the two buttons varies depending " "on the host OS.\n" "To get cancel action, you can use:\n" "[codeblocks]\n" "[gdscript]\n" "get_cancel_button().pressed.connect(_on_canceled)\n" "[/gdscript]\n" "[csharp]\n" "GetCancelButton().Pressed += OnCanceled;\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Note:[/b] [AcceptDialog] is invisible by default. To make it visible, " "call one of the [code]popup_*[/code] methods from [Window] on the node, such " "as [method Window.popup_centered_clamped]." msgstr "" "用于确认动作的对话框。这个窗口类似于 [AcceptDialog],但按下“取消”按钮和按下" "“确定”按钮的效果是不同的。这两个按钮的顺序取决于主机操作系统。\n" "要获得取消操作,你可以使用:\n" "[codeblocks]\n" "[gdscript]\n" "get_cancel_button().pressed.connect(_on_canceled)\n" "[/gdscript]\n" "[csharp]\n" "GetCancelButton().Pressed += OnCanceled;\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/ConfirmationDialog.xml msgid "" "Returns the cancel button.\n" "[b]Warning:[/b] This is a required internal node, removing and freeing it " "may cause a crash. If you wish to hide it or any of its children, use their " "[member CanvasItem.visible] property." msgstr "" "返回取消按钮。\n" "[b]警告:[/b]这是一个必需的内部节点,移除并释放它可能会导致崩溃。如果你希望隐" "藏它或其任何子项,请使用其 [member CanvasItem.visible] 属性。" #: doc/classes/ConfirmationDialog.xml msgid "" "The text displayed by the cancel button (see [method get_cancel_button])." msgstr "取消按钮显示的文本(见 [method get_cancel_button])。" #: doc/classes/Container.xml msgid "Base class for all GUI containers." msgstr "所有 GUI 容器的基类。" #: doc/classes/Container.xml msgid "" "Base class for all GUI containers. A [Container] automatically arranges its " "child controls in a certain way. This class can be inherited to make custom " "container types." msgstr "" "所有 GUI 容器的基础节点。[Container] 包含其他控件,并自动以某种方式排列它们。" "可以继承此类来生成自定义的容器类。" #: doc/classes/Container.xml msgid "" "Implement to return a list of allowed horizontal [enum Control.SizeFlags] " "for child nodes. This doesn't technically prevent the usages of any other " "size flags, if your implementation requires that. This only limits the " "options available to the user in the Inspector dock.\n" "[b]Note:[/b] Having no size flags is equal to having [constant " "Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed." msgstr "" "实现以返回子节点允许的水平 [enum Control.SizeFlags] 列表。这在技术上并不妨碍" "任何其他大小标志的使用,如果你的实现需要这样做。这只会限制检查器停靠面板中用" "户可用的选项。\n" "[b]注意:[/b]没有大小标志等同于有 [constant Control.SIZE_SHRINK_BEGIN]。因" "此,该值始终是隐式允许的。" #: doc/classes/Container.xml msgid "" "Implement to return a list of allowed vertical [enum Control.SizeFlags] for " "child nodes. This doesn't technically prevent the usages of any other size " "flags, if your implementation requires that. This only limits the options " "available to the user in the Inspector dock.\n" "[b]Note:[/b] Having no size flags is equal to having [constant " "Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed." msgstr "" "实现以返回子节点允许的垂直 [enum Control.SizeFlags] 列表。这在技术上并不妨碍" "任何其他大小标志的使用,如果你的实现需要这样做。这只会限制检查器停靠面板中用" "户可用的选项。\n" "[b]注意:[/b]没有大小标志等同于有 [constant Control.SIZE_SHRINK_BEGIN]。因" "此,该值始终是隐式允许的。" #: doc/classes/Container.xml msgid "" "Fit a child control in a given rect. This is mainly a helper for creating " "custom container classes." msgstr "在给定的矩形中适配子控件。这主要是用于创建自定义容器类的辅助工具。" #: doc/classes/Container.xml msgid "" "Queue resort of the contained children. This is called automatically anyway, " "but can be called upon request." msgstr "将子节点的重排加入队列。虽然会被自动调用,但也可以在需要时手动调用。" #: doc/classes/Container.xml msgid "Emitted when children are going to be sorted." msgstr "子节点将要被排序时发出。" #: doc/classes/Container.xml msgid "Emitted when sorting the children is needed." msgstr "需要对子节点进行排序时发出。" #: doc/classes/Container.xml msgid "" "Notification just before children are going to be sorted, in case there's " "something to process beforehand." msgstr "在子节点将要被排序之前通知,以防有事情需要事先处理。" #: doc/classes/Container.xml msgid "" "Notification for when sorting the children, it must be obeyed immediately." msgstr "对子节点进行排序时的通知,必须立即服从。" #: doc/classes/Control.xml msgid "" "Base class for all GUI controls. Adapts its position and size based on its " "parent control." msgstr "所有 GUI 控件的基类。根据其父控件调整其位置和大小。" #: doc/classes/Control.xml #, fuzzy msgid "" "Base class for all UI-related nodes. [Control] features a bounding rectangle " "that defines its extents, an anchor position relative to its parent control " "or the current viewport, and offsets relative to the anchor. The offsets " "update automatically when the node, any of its parents, or the screen size " "change.\n" "For more information on Godot's UI system, anchors, offsets, and containers, " "see the related tutorials in the manual. To build flexible UIs, you'll need " "a mix of UI elements that inherit from [Control] and [Container] nodes.\n" "[b]Note:[/b] Since both [Node2D] and [Control] inherit from [CanvasItem], " "they share several concepts from the class such as the [member " "CanvasItem.z_index] and [member CanvasItem.visible] properties.\n" "[b]User Interface nodes and input[/b]\n" "Godot propagates input events via viewports. Each [Viewport] is responsible " "for propagating [InputEvent]s to their child nodes. As the [member " "SceneTree.root] is a [Window], this already happens automatically for all UI " "elements in your game.\n" "Input events are propagated through the [SceneTree] from the root node to " "all child nodes by calling [method Node._input]. For UI elements " "specifically, it makes more sense to override the virtual method [method " "_gui_input], which filters out unrelated input events, such as by checking z-" "order, [member mouse_filter], focus, or if the event was inside of the " "control's bounding box.\n" "Call [method accept_event] so no other node receives the event. Once you " "accept an input, it becomes handled so [method Node._unhandled_input] will " "not process it.\n" "Only one [Control] node can be in focus. Only the node in focus will receive " "events. To get the focus, call [method grab_focus]. [Control] nodes lose " "focus when another node grabs it, or if you hide the node in focus. Focus " "will not be represented visually if gained via mouse/touch input, only " "appearing with keyboard/gamepad input (for accessibility), or via [method " "grab_focus].\n" "Set [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a " "[Control] node to ignore mouse or touch events. You'll need it if you place " "an icon on top of a button.\n" "[Theme] resources change the control's appearance. The [member theme] of a " "[Control] node affects all of its direct and indirect children (as long as a " "chain of controls is uninterrupted). To override some of the theme items, " "call one of the [code]add_theme_*_override[/code] methods, like [method " "add_theme_font_override]. You can also override theme items in the " "Inspector.\n" "[b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you " "can't access their values using [method Object.get] and [method Object.set]. " "Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/" "code] methods provided by this class." msgstr "" "所有 UI 相关节点的基类。[Control] 具有定义其范围的边界矩形,相对于父控件或当" "前视口的锚点位置,以及相对于锚点的偏移。当节点、任何父节点或屏幕尺寸发生变化" "时,偏移就会自动更新。\n" "更多关于 Godot 的 UI 系统、锚点、偏移和容器的信息,请参阅手册中的相关教程。要" "构建灵活的 UI,你需要混合使用从 [Control] 和 [Container] 节点继承的 UI 元" "素。\n" "[b]注意:[/b][Node2D] 和 [Control] 都继承自 [CanvasItem],它们都具有该类的 " "[member CanvasItem.z_index]、[member CanvasItem.visible] 等属性。\n" "[b]用户界面节点与输入[/b]\n" "Godot 使用视口来传播输入事件。视口负责将 [InputEvent] 传播给它的子节点。因为 " "[member SceneTree.root] 是 [Window],所以游戏中的所有 UI 元素都会自动进行传" "播。\n" "输入事件通过调用 [method Node._input] 在 [SceneTree] 中传播,从根节点传播到所" "有子节点。对 UI 元素而言,覆盖的最好是 [method _gui_input],可以过滤掉无关的" "输入事件,例如它会对 Z 顺序、[member mouse_filter]、焦点、事件是否在该控件的" "边界框内等条件进行检查。\n" "请调用 [method accept_event],这样其他节点就不会收到该事件。输入被接受后,就" "会被标记为已处理,[method Node._unhandled_input] 不会对它进行处理。\n" "只能有一个 [Control] 节点处于焦点。只有处于焦点的节点才会接收到事件。要获得焦" "点,请调用 [method grab_focus]。导致 [Control] 节点失去焦点的情况有:其他节点" "获得了焦点、隐藏了聚焦节点。\n" "将 [member mouse_filter] 设置为 [constant MOUSE_FILTER_IGNORE] 可以让 " "[Control] 节点忽略鼠标或触摸事件。如果你在按钮上放了一个图标,就会需要用" "到。\n" "[Theme] 资源会更改控件的外观。[Control] 节点的 [member theme] 会影响所有直接" "和间接子级节点(只要控件链没有被打断)。要覆盖某些主题项,请调用 " "[code]add_theme_*_override[/code] 方法,例如 [method " "add_theme_font_override]。你也可以在检查器中覆盖主题项。\n" "[b]注意:[/b]主题项[i]不是[/i] [Object] 的属性。这意味着你无法使用 [method " "Object.get] 和 [method Object.set] 访问它们的值。请改用这个类的 " "[code]get_theme_*[/code] 和 [code]add_theme_*_override[/code] 方法。" #: doc/classes/Control.xml msgid "GUI documentation index" msgstr "GUI 文档索引" #: doc/classes/Control.xml msgid "Control node gallery" msgstr "控件节点一览" #: doc/classes/Control.xml doc/classes/SceneTree.xml msgid "Multiple resolutions" msgstr "多分辨率" #: doc/classes/Control.xml msgid "All GUI Demos" msgstr "所有 GUI 演示" #: doc/classes/Control.xml msgid "" "Return the description of the keyboard shortcuts and other contextual help " "for this control." msgstr "返回键盘快捷键的描述以及针对该控件的其他上下文帮助信息。" #: doc/classes/Control.xml msgid "" "Godot calls this method to test if [param data] from a control's [method " "_get_drag_data] can be dropped at [param at_position]. [param at_position] " "is local to this control.\n" "This method should only be used to test the data. Process the data in " "[method _drop_data].\n" "[b]Note:[/b] If the drag was initiated by a keyboard shortcut or [method " "accessibility_drag], [param at_position] is set to [constant Vector2.INF], " "and the currently selected item/text position should be used as the drop " "position.\n" "[codeblocks]\n" "[gdscript]\n" "func _can_drop_data(position, data):\n" "\t# Check position if it is relevant to you\n" "\t# Otherwise, just check data\n" "\treturn typeof(data) == TYPE_DICTIONARY and data.has(\"expected\")\n" "[/gdscript]\n" "[csharp]\n" "public override bool _CanDropData(Vector2 atPosition, Variant data)\n" "{\n" "\t// Check position if it is relevant to you\n" "\t// Otherwise, just check data\n" "\treturn data.VariantType == Variant.Type.Dictionary && " "data.AsGodotDictionary().ContainsKey(\"expected\");\n" "}\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "Godot 调用这个方法来检查是否能够将来自某个控件 [method _get_drag_data] 方法" "的 [param data] 放置到 [param at_position] 位置。[param at_position] 使用的是" "这个控件的局部坐标系。\n" "这个方法只应对数据进行检查。处理数据请在 [method _drop_data] 中进行。\n" "[b]注意:[/b]如果拖动是由键盘快捷键或 [method accessibility_drag] 发起的,则 " "[param at_position] 会被设置为 [constant Vector2.INF],且应当使用当前选中项/" "文本的位置作为放置位置。\n" "[codeblocks]\n" "[gdscript]\n" "func _can_drop_data(position, data):\n" "\t# 如果和位置相关就检查 position\n" "\t# 否则只检查 data 即可\n" "\treturn typeof(data) == TYPE_DICTIONARY and data.has(\"expected\")\n" "[/gdscript]\n" "[csharp]\n" "public override bool _CanDropData(Vector2 atPosition, Variant data)\n" "{\n" "\t// 如果和位置相关就检查 position\n" "\t// 否则只检查 data 即可\n" "\treturn data.VariantType == Variant.Type.Dictionary && " "data.AsGodotDictionary().ContainsKey(\"expected\");\n" "}\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Control.xml msgid "" "Godot calls this method to pass you the [param data] from a control's " "[method _get_drag_data] result. Godot first calls [method _can_drop_data] to " "test if [param data] is allowed to drop at [param at_position] where [param " "at_position] is local to this control.\n" "[b]Note:[/b] If the drag was initiated by a keyboard shortcut or [method " "accessibility_drag], [param at_position] is set to [constant Vector2.INF], " "and the currently selected item/text position should be used as the drop " "position.\n" "[codeblocks]\n" "[gdscript]\n" "func _can_drop_data(position, data):\n" "\treturn typeof(data) == TYPE_DICTIONARY and data.has(\"color\")\n" "\n" "func _drop_data(position, data):\n" "\tvar color = data[\"color\"]\n" "[/gdscript]\n" "[csharp]\n" "public override bool _CanDropData(Vector2 atPosition, Variant data)\n" "{\n" "\treturn data.VariantType == Variant.Type.Dictionary && " "data.AsGodotDictionary().ContainsKey(\"color\");\n" "}\n" "\n" "public override void _DropData(Vector2 atPosition, Variant data)\n" "{\n" "\tColor color = data.AsGodotDictionary()[\"color\"].AsColor();\n" "}\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "Godot 调用该方法把 [param data] 传给你,这是从某个控件的 [method " "_get_drag_data] 获得的结果。Godot 首先会调用 [method _can_drop_data] 来检查是" "否允许把 [param data] 放置到 [param at_position],这里的 [param at_position] " "使用的是这个控件的局部坐标系。\n" "[b]注意:[/b]如果拖动是由键盘快捷键或 [method accessibility_drag] 发起的,则 " "[param at_position] 会被设置为 [constant Vector2.INF],且应当使用当前选中项/" "文本的位置作为放置位置。\n" "[codeblocks]\n" "[gdscript]\n" "func _can_drop_data(position, data):\n" "\treturn typeof(data) == TYPE_DICTIONARY and data.has(\"color\")\n" "\n" "func _drop_data(position, data):\n" "\tvar color = data[\"color\"]\n" "[/gdscript]\n" "[csharp]\n" "public override bool _CanDropData(Vector2 atPosition, Variant data)\n" "{\n" "\treturn data.VariantType == Variant.Type.Dictionary && " "data.AsGodotDictionary().ContainsKey(\"color\");\n" "}\n" "\n" "public override void _DropData(Vector2 atPosition, Variant data)\n" "{\n" "\tColor color = data.AsGodotDictionary()[\"color\"].AsColor();\n" "}\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Control.xml msgid "" "Override this method to return a human-readable description of the position " "of the child [param node] in the custom container, added to the [member " "accessibility_name]." msgstr "" "覆盖该方法以返回子 [param node] 在自定义容器中的位置的人类可读描述,并将其添" "加到 [member accessibility_name]。" #: doc/classes/Control.xml msgid "" "Godot calls this method to get data that can be dragged and dropped onto " "controls that expect drop data. Returns [code]null[/code] if there is no " "data to drag. Controls that want to receive drop data should implement " "[method _can_drop_data] and [method _drop_data]. [param at_position] is " "local to this control. Drag may be forced with [method force_drag].\n" "A preview that will follow the mouse that should represent the data can be " "set with [method set_drag_preview]. A good time to set the preview is in " "this method.\n" "[b]Note:[/b] If the drag was initiated by a keyboard shortcut or [method " "accessibility_drag], [param at_position] is set to [constant Vector2.INF], " "and the currently selected item/text position should be used as the drag " "position.\n" "[codeblocks]\n" "[gdscript]\n" "func _get_drag_data(position):\n" "\tvar mydata = make_data() # This is your custom method generating the drag " "data.\n" "\tset_drag_preview(make_preview(mydata)) # This is your custom method " "generating the preview of the drag data.\n" "\treturn mydata\n" "[/gdscript]\n" "[csharp]\n" "public override Variant _GetDragData(Vector2 atPosition)\n" "{\n" "\tvar myData = MakeData(); // This is your custom method generating the drag " "data.\n" "\tSetDragPreview(MakePreview(myData)); // This is your custom method " "generating the preview of the drag data.\n" "\treturn myData;\n" "}\n" "[/csharp]\n" "[/codeblocks]" msgstr "" "Godot 调用该方法来获取数据,该数据可以被拖放到那些期望放置数据的控件上。如果" "没有要拖动的数据,则返回 [code]null[/code]。想要接收放置数据的控件应该实现 " "[method _can_drop_data] 和 [method _drop_data]。[param at_position] 是该控件" "的局部位置。可以使用 [method force_drag] 强制拖动。\n" "可以使用 [method set_drag_preview] 设置代表数据跟随鼠标移动的预览。设置预览的" "不错时机就是在这个方法中。\n" "[b]注意:[/b]如果拖动是由键盘快捷键或 [method accessibility_drag] 发起的,则 " "[param at_position] 会被设置为 [constant Vector2.INF],且应当使用当前选中项/" "文本的位置作为拖动位置。\n" "[codeblocks]\n" "[gdscript]\n" "func _get_drag_data(position):\n" "\tvar mydata = make_data() # This is your custom method generating the drag " "data.\n" "\tset_drag_preview(make_preview(mydata)) # 这是你生成拖动数据预览的自定义方" "法。\n" "\treturn mydata\n" "[/gdscript]\n" "[csharp]\n" "public override Variant _GetDragData(Vector2 atPosition)\n" "{\n" "\tvar myData = MakeData(); // This is your custom method generating the drag " "data.\n" "\tSetDragPreview(MakePreview(myData)); // 这是你生成拖动数据预览的自定义方" "法。\n" "\treturn myData;\n" "}\n" "[/csharp]\n" "[/codeblocks]" #: doc/classes/Control.xml msgid "" "Virtual method to be implemented by the user. Returns the minimum size for " "this control. Alternative to [member custom_minimum_size] for controlling " "minimum size via code. The actual minimum size will be the max value of " "these two (in each axis separately).\n" "If not overridden, defaults to [constant Vector2.ZERO].\n" "[b]Note:[/b] This method will not be called when the script is attached to a " "[Control] node that already overrides its minimum size (e.g. [Label], " "[Button], [PanelContainer] etc.). It can only be used with most basic GUI " "nodes, like [Control], [Container], [Panel] etc." msgstr "" "由用户实现的虚方法。返回此控件的最小大小。替代 [member custom_minimum_size]," "以用于通过代码控制最小尺寸。实际的最小尺寸将是这两者的最大值(分别在每个轴" "上)。\n" "如果未覆盖,则默认为 [constant Vector2.ZERO]。\n" "[b]注意:[/b]当脚本被附加到已经覆盖其最小大小的 [Control] 节点(例如 " "[Label]、[Button]、[PanelContainer] 等)时,该方法将不会被调用。它只能用于最" "基本的 GUI 节点,如 [Control]、[Container]、[Panel] 等。" #: doc/classes/Control.xml msgid "" "Virtual method to be implemented by the user. Returns the tooltip text for " "the position [param at_position] in control's local coordinates, which will " "typically appear when the cursor is resting over this control. See [method " "get_tooltip].\n" "[b]Note:[/b] If this method returns an empty [String] and [method " "_make_custom_tooltip] is not overridden, no tooltip is displayed." msgstr "" "用户实现的虚方法。返回位于控件局部坐标系中 [param at_position] 位置的工具提示" "文本,工具提示一般会在鼠标停留在该控件上时显示。见 [method get_tooltip]。\n" "[b]注意:[/b]如果返回的是空 [String] 并且未覆盖 [method " "_make_custom_tooltip],则不会显示工具提示。" #: doc/classes/Control.xml msgid "" "Virtual method to be implemented by the user. Override this method to handle " "and accept inputs on UI elements. See also [method accept_event].\n" "[b]Example:[/b] Click on the control to print a message:\n" "[codeblocks]\n" "[gdscript]\n" "func _gui_input(event):\n" "\tif event is InputEventMouseButton:\n" "\t\tif event.button_index == MOUSE_BUTTON_LEFT and event.pressed:\n" "\t\t\tprint(\"I've been clicked D:\")\n" "[/gdscript]\n" "[csharp]\n" "public override void _GuiInput(InputEvent @event)\n" "{\n" "\tif (@event is InputEventMouseButton mb)\n" "\t{\n" "\t\tif (mb.ButtonIndex == MouseButton.Left && mb.Pressed)\n" "\t\t{\n" "\t\t\tGD.Print(\"I've been clicked D:\");\n" "\t\t}\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "If the [param event] inherits [InputEventMouse], this method will [b]not[/b] " "be called when:\n" "- the control's [member mouse_filter] is set to [constant " "MOUSE_FILTER_IGNORE];\n" "- the control is obstructed by another control on top, that doesn't have " "[member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];\n" "- the control's parent has [member mouse_filter] set to [constant " "MOUSE_FILTER_STOP] or has accepted the event;\n" "- the control's parent has [member clip_contents] enabled and the [param " "event]'s position is outside the parent's rectangle;\n" "- the [param event]'s position is outside the control (see [method " "_has_point]).\n" "[b]Note:[/b] The [param event]'s position is relative to this control's " "origin." msgstr "" "由用户实现的虚方法。使用此方法处理和接受 UI 元素上的输入。另见 [method " "accept_event]。\n" "[b]示例:[/b]点击控件时输出一段消息:\n" "[codeblocks]\n" "[gdscript]\n" "func _gui_input(event):\n" "\tif event is InputEventMouseButton:\n" "\t\tif event.button_index == MOUSE_BUTTON_LEFT and event.pressed:\n" "\t\t\tprint(\"我已被点击 D:\")\n" "[/gdscript]\n" "[csharp]\n" "public override void _GuiInput(InputEvent @event)\n" "{\n" "\tif (@event is InputEventMouseButton mb)\n" "\t{\n" "\t\tif (mb.ButtonIndex == MouseButton.Left && mb.Pressed)\n" "\t\t{\n" "\t\t\tGD.Print(\"我已被点击 D:\");\n" "\t\t}\n" "\t}\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "如果 [param event] 继承自 [InputEventMouse],则符合下列条件时[b]不会[/b]调用" "该方法:\n" "- 控件的 [member mouse_filter] 为 [constant MOUSE_FILTER_IGNORE];\n" "- 控件被上方的其他控件阻挡,且该控件没有将 [member mouse_filter] 设置为 " "[constant MOUSE_FILTER_IGNORE];\n" "- 控件父节点的 [member mouse_filter] 为 [constant MOUSE_FILTER_STOP] 或已接受" "该事件;\n" "- 控件父节点启用了 [member clip_contents] 且 [param event] 的位置在父节点矩形" "范围之外;\n" "- [param event] 的位置在控件范围之外(见 [method _has_point])。\n" "[b]注意:[/b][param event] 的位置相对于该控件的原点。" #: doc/classes/Control.xml msgid "" "Virtual method to be implemented by the user. Returns whether the given " "[param point] is inside this control.\n" "If not overridden, default behavior is checking if the point is within " "control's Rect.\n" "[b]Note:[/b] If you want to check if a point is inside the control, you can " "use [code]Rect2(Vector2.ZERO, size).has_point(point)[/code]." msgstr "" "由用户实现的虚方法。返回给定的 [param point] 是否在该控件内。\n" "如果没有被覆盖,则默认行为是检查该点是否在控件的 Rect 内。\n" "[b]注意:[/b]如果要检查一个点是否在该控件内部,可以使用 " "[code]Rect2(Vector2.ZERO, size).has_point(point)[/code]。" #: doc/classes/Control.xml #, fuzzy msgid "" "Virtual method to be implemented by the user. Returns a [Control] node that " "should be used as a tooltip instead of the default one. [param for_text] is " "the return value of [method get_tooltip].\n" "The returned node must be of type [Control] or Control-derived. It can have " "child nodes of any type. It is freed when the tooltip disappears, so make " "sure you always provide a new instance (if you want to use a pre-existing " "node from your scene tree, you can duplicate it and pass the duplicated " "instance). When [code]null[/code] or a non-Control node is returned, the " "default tooltip will be used instead.\n" "The returned node will be added as child to a [PopupPanel], so you should " "only provide the contents of that panel. That [PopupPanel] can be themed " "using [method Theme.set_stylebox] for the type [code]\"TooltipPanel\"[/code] " "(see [member tooltip_text] for an example).\n" "[b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure " "it's fully visible, you might want to set its [member custom_minimum_size] " "to some non-zero value.\n" "[b]Note:[/b] The node (and any relevant children) should have their [member " "CanvasItem.visible] set to [code]true[/code] when returned, otherwise, the " "viewport that instantiates it will not be able to calculate its minimum size " "reliably.\n" "[b]Note:[/b] If overridden, this method is called even if [method " "get_tooltip] returns an empty string. When this happens with the default " "tooltip, it is not displayed. To copy this behavior, return [code]null[/" "code] in this method when [param for_text] is empty.\n" "[b]Example:[/b] Use a constructed node as a tooltip:\n" "[codeblocks]\n" "[gdscript]\n" "func _make_custom_tooltip(for_text):\n" "\tvar label = Label.new()\n" "\tlabel.text = for_text\n" "\treturn label\n" "[/gdscript]\n" "[csharp]\n" "public override Control _MakeCustomTooltip(string forText)\n" "{\n" "\tvar label = new Label();\n" "\tlabel.Text = forText;\n" "\treturn label;\n" "}\n" "[/csharp]\n" "[/codeblocks]\n" "[b]Example:[/b] Use a scene instance as a tooltip:\n" "[codeblocks]\n" "[gdscript]\n" "func _make_custom_tooltip(for_text):\n" "\tvar tooltip = preload(\"res://some_tooltip_scene.tscn\").instantiate()\n" "\ttooltip.get_node(\"Label\").text = for_text\n" "\treturn tooltip\n" "[/gdscript]\n" "[csharp]\n" "public override Control _MakeCustomTooltip(string forText)\n" "{\n" "\tNode tooltip = ResourceLoader.Load(\"res://" "some_tooltip_scene.tscn\").Instantiate();\n" "\ttooltip.GetNode