Skip to content

Commit

Permalink
资源编辑器部分
Browse files Browse the repository at this point in the history
  • Loading branch information
LiarOnce committed Jun 1, 2024
1 parent 4cbbe4d commit 6880e51
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
{
"Also see: {}Using Extension Options{}":"另请参阅:{}使用扩展选项{}",
"Android Extensions":"Android 扩展",
"Any code entered into the \"Code Injection\" window will need to be separated into distinct XML groups, as shown in the screenshot above. The XML tag you use for a group will determine where the code is injected into your application.":"任何输入到 \"代码注入 \"窗口的代码都需要被分成不同的XML组,如上面的截图所示。你在组中使用的XML标签将决定代码被注入到你的应用程序的位置。",
"Code Injection":"代码注入",
"Conditional Injection":"条件注入",
"Custom Files":"自定义文件",
"File Injection":"文件注入",
"For information on your creating native extensions for Android, see {}Source Examples{}.":"关于你为Android创建本地扩展的信息,请参见{}示例代码{}。",
"Here you can give the following details:":"在这里,你可以提供以下细节:",
"Inside a code injection group, use {}toInject{} with the required option in {}condition{}:":"在代码注入组中,使用 {}toInject{},并在 {}condition{} 中使用所需选项:",
"Once you have set this up correctly, you will need to add the files required for your extension package to work. To do this you need to click on the buttons at the bottom, either {}Add SDK{} or {}Add Source{} and then browse to the files you wish to add. Added files will be stored in the {}AndroidSource{} directory along with your extension. You can open this location at any time by right clicking {} on the extension and selecting {}Open in Explorer{}.":"一旦你设置正确,你将需要添加你的扩展包工作所需的文件。要做到这一点,你需要点击底部的按钮,{}添加SDK{}或{}添加源代码{},然后浏览你想添加的文件。添加的文件将和你的扩展名一起存储在{}Android Source{}目录中。你可以在任何时候通过右键点击{} 扩展名,选择{}在资源管理器中打开{},来打开这个位置。",
"Source Files":"源文件",
"The following tags are available for the Android platform:":"以下标签可用于安卓平台。",
"The functions and constants are added using {}placeholder {}files to group them together, so you\u0027d add a placeholder and then define the functions and macros as explained in the previous section. To add the rest of the files though you would need to first tick the {}Android {}check-box in the {}Extra Platforms{} section of the editor, which will open up the extension\u0027s Android Properties:":"函数和常量是用{}占位符{}文件来添加的,所以你要添加一个占位符,然后按照上一节的解释定义函数和宏。要添加其余的文件,你需要首先在编辑器的{}Extra Platforms{} 部分勾选{}Android {}check-box,这将打开扩展的Android属性。",
"The runtime location where the code is injected will depend on the type of the tag:":"注入代码的运行时位置取决于标记的类型:",
"The {}${YYAndroidMyInjectionTag}{} part here will be replaced with the contents of the {}<YYAndroidMyInjectionTag> </YYAndroidMyInjectionTag>{} group from the extension\u0027s Code Injection window.":"此处的 {}${YYAndroidMyInjectionTag}{} 部分将替换为扩展的代码注入窗口中的 {}<YYAndroidMyInjectionTag> </YYAndroidMyInjectionTag>{}",
"This will only inject the code between the {}toInject{} tags when the option {}YYEXTOPT_MyExtension_ShouldInject{} is equal to {}\"FooBar\"{}. This allows you to match against a value of any type, as this check is done at compile time when all extension option values are provided as strings.":"当选项 {}YYEXTOPT_MyExtension_ShouldInject{} 等于 {}\"FooBar\"{} 时,这将仅在 {}toInject{} 标记之间注入代码。这允许您匹配任何类型的值,因为当所有扩展选项值都作为字符串提供时,此检查将在编译时完成。",
"This will only inject the code between the {}toInject{} tags when the option {}YYEXTOPT_MyExtension_ShouldInject{} is {}true{}. The option should be of the {}Boolean{} type.":"这将仅在选项 {}YYEXTOPT_MyExtension_ShouldInject{} 为 {}true{} 时在 {}toInject{} 标记之间注入代码。该选项应为 {}Boolean{} 类型。",
"To create an extension for Android you have to do it in two parts. The first part would be to add the extension itself, along with the required files, and the second is to create the functions and macros/constants that the extension requires.":"要为Android创建一个扩展,你必须分两部分进行。第一部分是添加扩展本身,以及所需的文件,第二部分是创建扩展所需的函数和宏/常量。",
"Usage Tips":"使用提示",
"You can also check against a specific value by specifying it in the {}match{} attribute:":"您还可以通过在 {}match{} 属性中指定特定值来检查该值:",
"You can create a folder called \"ProjectFiles\" in the folder of your extension (alongside its {}.yy{} file). Any files placed in this folder will be moved to the root of the generated Android project at compile time, and can also take injection tags as described above.":"您可以在扩展名的文件夹中创建一个名为 \"ProjectFiles\" 的文件夹 (与其 {}.yy{} 文件一起)。放置在此文件夹中的任何文件将在编译时移动到生成的 Android 项目的根目录,并且还可以如上所述地使用注入标记。",
"You can inject code conditionally, depending on the value of one of the {}Extension Options{}.":"您可以有条件地注入代码,具体取决于{}扩展选项{}之一的值。",
"You can use the following syntax to create code injection groups:":"你可以使用以下语法来创建代码注入组。",
"You can use {}YYAndroidLogcat{} to use custom logging tags with {}Logcat{}. Set up your tag with a priority level, e.g.:{} {} {}<YYAndroidLogcat>{}{} {}myDebugTag:V{}{} {}</YYAndroidLogcat>{}{} {} In your extension, use a logging function to log a message with this tag, e.g. {}Log.i(\"myDebugTag\", \"Hello World\");{} ":"您可以使用 {}YYAndroidLogcat{}将自定义日志标签与 {}Logcat{} 一起使用。设置您的标签的优先级,例如:{} {} {}&ltYYAndroidLogcat&gt{}{} {}myDebugTag:V{}{} {}&lt/YYAndroidLogcat&gt{}{} {} \n在您的扩展中,使用日志记录功能记录带有此标签的消息,例如{}Log.i(\"myDebugTag\", \"Hello World\");{} ",
"{}Android Permissions{}: Here you can add in any extra permissions that your extension requires. What these permissions are will depend entirely on the use that the extension has, and so you should {}check the documentation supplied by Google{} for the Android platform, or, if you are using a third party SDK, the documentation that comes with the SDK. To add a new permission you need to click on the {} button to add a placeholder permission, and then do a double {} click on that to edit it to what is required. You can remove permissions using the {} button.":"{}Android 权限{}:在这里,你可以添加你的扩展需要的任何额外权限。这些权限完全取决于扩展的用途,因此你应该检查{}谷歌提供的安卓平台的文档{},或者,如果你使用的是第三方SDK,则是SDK附带的文档。要添加一个新的权限,你需要点击{} 按钮来添加一个占位符权限,然后在上面做双击{} ,将其编辑成所需的内容。你可以使用{} 按钮删除权限。",
"{}Class Name{}: Your extension can have multiple classes, with each class having its own functions and constants, so you should give it a name that reflects its purpose.":"{}类名{} : 您的扩展可以有多个类,每个类都有自己的函数和常量,所以您应该给它一个反映其用途的名称。",
"{}Code Injection{}: Here you can add any code to be injected (added) into your Android application when your game is built for testing or final release. Make sure to revise this (and your permissions) carefully before submitting any games to the store, as incorrect settings will cause your game to be failed for submission. See the section below for more information.":"{}代码注入{}:在这里你可以添加任何代码,以便在你的游戏被构建为测试或最终发布时注入(添加)到你的Android应用程序中。在向商店提交任何游戏之前,请确保仔细修改这个(和你的权限),因为不正确的设置会导致你的游戏提交失败。更多信息见下面的章节。",
"{}NOTE{} These paths are only for VM; for YYC, injected code will go into the {}{RUNTIME}\\yyc\\{} directory, where the paths may or may not be equivalent to those for VM.":"{}注意{} 这些路径仅适用于VM;对于YYC,注入的代码将进入{}{RUNTIME}/yyc{}目录,其中的路径可能与VM的路径不同。"
"{}NOTE{} These paths are only for VM; for YYC, injected code will go into the {}{RUNTIME}\\yyc\\{} directory, where the paths may or may not be equivalent to those for VM.":"{}注意{} 这些路径仅适用于VM;对于YYC,注入的代码将进入{}{RUNTIME}/yyc{}目录,其中的路径可能与VM的路径不同。",
"{}{}IMPORTANT{}{} You can create your own tags for this use. Such custom tags must start with {}YYAndroid{}.":"{}{}重要{}{} 您可以为此创建自己的标签。此类自定义标签必须以 {}YYAndroid{} 开头。"
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"Using the conventions above, you would swap out the {}<{}Name{}>{} part for the name of the base file that you are adding the proxy files for.":"使用上述惯例,你要把{}<{}Name{}>{}部分换成你要添加代理文件的基础文件的名称。",
"When working with multiple target platforms, it is worth noting that you can create a single extension with only one set of functions/macros which will work on {}all {}platforms. This is achieved by adding only one of the link libraries to your game as an extension and placing the other(s) into the list of {}Proxy Files{} in the {}Extension Properties{} window.":"当使用多个目标平台时,值得注意的是,你可以创建一个只有一套函数/宏的单一扩展,它将在{}所有{}平台上工作。这可以通过在你的游戏中只添加一个链接库作为扩展,并将其他链接库放入{}扩展属性{}窗口的{}代理文件{}列表中来实现。",
"You can also click on the {} cog icon next to an option to give it an optional {}Display Name{} and {}Description{} (that appears as a tooltip on hovering on the Display Name).":"你也可以点击一个选项旁边的 {} 齿轮图标,给它一个可选的{}显示名称{}和{}描述{}(在悬停在显示名称上时以工具提示出现)。",
"You can also retrieve your extension options in your {}Compiler Batch Files / Scripts{} and during {}Conditional Injection{} by using the identifier {}YYEXTOPT_<ExtensionName>_<OptionName>{}. Keep in mind that since these are executed at compile time, values for the extension options will be retrieved as strings.":"您还可以使用标识符{4}YYEXTOPT_<扩展名>_<选项名>{5}在{2}条件注入{3}期间和{}编译器批处理文件/目录{}中检索扩展选项。请记住,由于这些选项是在编译时执行的,因此扩展选项的值将作为字符串检索。",
"You can also retrieve your extension options in your {}Compiler Batch Files / Scripts{} by using the name {}YYEXTOPT_<ExtensionName>_<OptionName>{}.":"你也可以在你的 {}编译器批处理文件/脚本{} 中通过使用{}YYEXTOPT_<扩展名>_<选项名>{}来检索你的扩展选项。",
"You can retrieve the values of an extension\u0027s options at runtime by using the {}Extension Functions{}.":"你可以通过使用 {}扩展函数{}在运行时检索扩展的选项值。",
"You can see that we have given the function a {}Name{}, which is what you would use when calling the function in your project; note that this name doesn\u0027t have to match the one used in the extension -- you can name it anything you like and then use the {}External Name{} field to link it to the actual name defined in the extension:{}":"你可以看到,我们给了这个函数一个{}Name{},这是你在项目中调用这个函数时要使用的;注意,这个名字不一定要和扩展中使用的名字一致--你可以给它起任何你喜欢的名字,然后用{}External Name{}字段将它和扩展中定义的实际名字联系起来:{}",
Expand All @@ -72,6 +73,6 @@
"{}You can give each extension option a name, a default value, and a data type. The name is what you would use internally in your extension code to retrieve the option\u0027s value.":"{}你可以给每个扩展选项一个名称,一个默认值,和一个数据类型。名称是你在扩展代码中内部使用的,用来检索该选项的值。",
"{}{}IMPORTANT{}{} All platforms support the Init function call, {}but not all platforms will perform the Final function call.{} This is because certain platforms will simply close the app without giving any notice or time for this function to be called. The platforms mostly affected by this are {}iOS{}, {}Android{}, {}HTML5{}, {}PlayStation {}and {}Xbox{}.":"{}{}重要{}{} 所有平台都支持 Init 函数调用,{}但不是所有平台都会执行 Final 函数调用。{}这是因为某些平台会直接关闭应用程序,而不给任何通知或时间让这个函数被调用。受此影响的平台主要是 {}iOS{}、{}Android{}、{}HTML5{}、{}PlayStation{} 和 {}Xbox{}。",
"{}{}NOTE{}{} Adding a file to an extension copies it to the project directory, meaning that any further changes must be made to that copy for them to be visible in-game. You can find the copy by right-clicking on your extension in the Asset Browser and selecting \"Open in Explorer\".":"{}{}注意{}{}:将文件添加到扩展名中会将其复制到项目目录中,这意味着任何进一步的修改都必须在该副本中进行,以便在游戏中看到它们。你可以在资源浏览器中右键点击你的扩展名,并选择\"在资源管理器中打开\"来找到该副本。",
"{}{}NOTE{}{} If the function is part of a native extension for Windows, Mac or Ubuntu ({}dll{}, {}dylib{} or {}so{} respectively) and it has more than four arguments, {}all arguments must be of the same type{}.":"{}{}注意{}{}   如果函数是Windows、Mac或Ubuntu的原生扩展的一部分(分别为dll、dylib等),并且它有四个以上的参数,则所有参数必须是相同类型的。",
"{}{}NOTE{}{} If the function is part of a native extension for Windows, Mac or Ubuntu ({}dll{}, {}dylib{} or {}so{} respectively) and it has more than four arguments, {}all arguments must be of the same type{}.":"{}{}注意{}{} 如果函数是Windows、Mac或Ubuntu的原生扩展的一部分(分别为dll、dylib等),并且它有四个以上的参数,则所有参数必须是相同类型的。",
"{}{}NOTE{}{} You can use the extension version number in {}Compiler Batch Files / Scripts{} as well, using the name {}GMEXT_<ExtensionName>_version{}.":"{}{}注意{}{} 您也可以在{}编译器批处理文件/脚本{}中使用扩展版本号,使用名称 {}GMEXT_<ExtensionName>_version{}。"
}
Loading

0 comments on commit 6880e51

Please sign in to comment.