diff --git a/language/zh/global.json b/language/zh/global.json index 9791c59b3..f8d468a91 100644 --- a/language/zh/global.json +++ b/language/zh/global.json @@ -44,6 +44,7 @@ "Addressing Variables In Other Instances":"在其他实例中处理变量", "Alignment":"对齐", "All Element Types":"所有元素类型", + "Alpha Testing":"Alpha测试", "An absolute value is one where the sign of the value is ignored, essentially converting all values into positive ones or zero. So - for example - an absolute value for -10 would be 10.":"绝对值是指忽略该值的符号的值,实际上将所有值都转换为正值或零。因此例如-10的绝对值为10。", "An algorithm is basically a set of instructions or rules designed to solve a definite problem. The problem can be simple like adding two numbers or a complex one, such as converting a video file from one format to another or compressing audio into a smaller file size..":"算法基本上是一组旨在解决确定问题的指令或规则。问题可能很简单,例如将两个数字相加或将其复杂化,例如将视频文件从一种格式转换为另一种格式,或者将音频压缩为较小的文件大小。", "An argument (also known as a parameter) is a value that is passed into a function. For example, the GameMaker Language function \u0027sqr(num)\u0027 is a function that will give you the square of a number that you provide as the argument, eg: \u0027a = sqr(4);\u0027 Here the argument is 4, and the function will return 16, which is stored in the variable \u0027a\u0027.":"也称为参数(parameter argument)是传递给函数的值。例如,GameMaker语言函数\u0027sqr(num)\u0027是将给您提供作为参数的数字平方的函数,例如:\u0027a=sqr(4);\u0027这里的参数是4,函数将返回16,该值存储在变量“ a”中。", @@ -97,8 +98,10 @@ "AudioLFOType Enum":"AudioLFOType 枚举", "Auto Tiles":"自动图块", "Autocapitalization Type":"自动大写类型", + "Backface Culling":"背面剔除", "Background":"背景", "Background Element Type":"背景元素类型", + "Background Elements":"背景元素", "Background Layers":"背景图层", "Base Types":"基本类型", "Basic Code Structure":"基本代码结构", @@ -125,6 +128,7 @@ "CPU overhead measures the amount of work a computer\u0027s central processing unit can perform and the percentage of that capacity that\u0027s used by individual computing tasks.":"CPU开销衡量的是计算机中央处理器可以执行的工作量以及单个计算任务所使用的容量百分比。", "Cameras And Display":"相机及显示", "Cameras And View Ports":"相机和视口", + "Cameras And Viewports":"相机和视口", "Clipping Masks":"剪切蒙版", "Cloning A Repository":"克隆一个仓库", "Cloud":"云", @@ -140,6 +144,7 @@ "Colour And Alpha":"颜色和 Alpha", "Command Line Parameters":"命令行参数", "Commenting Code":"代码注释", + "Common":"常见的", "Compatibility Functions":"兼容性函数", "Compatibility Scripts":"兼容性脚本", "Compiler Batch Files / Scripts":"编译器批处理文件/脚本", @@ -186,6 +191,7 @@ "Decimal Value":"十进制值", "Default (old to new)":"默认(从旧到新)", "Defining Inputs":"定义输入", + "Depth and Stencil Buffer":"深度和模板缓冲区", "Description":"描述", "Device Input":"设备输入", "Dialog":"对话框", @@ -250,6 +256,7 @@ "Example 2: Negative Length":"示例2:负长度", "Example 2: Negative Offset & Stride":"示例 2:负偏移量和负偏移量跨步", "Example 2: Optimised Removal of the Same Variable in Many Items":"示例 2:在多个项中优化删除相同变量", + "Example 2: Optional Properties":"示例 2:可选属性", "Example 2: Playing a sound on an emitter (similar to audio_play_sound_on)":"示例 2:在发射器上播放声音 (类似于 audio_play_sound_on)", "Example 2: Pretty Print":"示例2:美化输出", "Example 2: Progressively Drawing a Line":"示例 2:逐步绘制一条线", @@ -263,6 +270,7 @@ "Example 2: Animated Sprite That Starts Playing at Sub-image":"示例2:在子图像处开始播放的动画精灵", "Example 2: Finding the top-left corner position of a tile":"示例2:查找拼贴的左上角位置", "Example 3 (Using An Array):":"示例 3( 使用数组):", + "Example 3: Asset & Instance Properties":"示例 3:资产和资产实例属性", "Example 3: Complex Reference":"示例 3:复杂引用", "Example 3: Deleting a range":"示例3:删除范围", "Example 3: Groups of Vertices":"示例 3:顶点组", @@ -274,6 +282,7 @@ "Example 4: Interleaving Data from Multiple Buffers":"示例 4:交错来自多个缓冲区的数据", "Example:":"例子:", "Example: Basic Use":"示例:基本使用", + "Example: Displaying a Depth Texture":"示例:显示深度纹理", "Example: Particle System Following an Instance":"示例:跟随实例的粒子系统", "Example: Sprite View for an Instance\u0027s Sprite":"示例:一个实例的精灵的精灵视图", "Expressions And Operators":"表达式和运算符", @@ -303,6 +312,7 @@ "Flex Panels":"柔性面板", "Flick Event":"轻击事件", "Floating point numbers are numbers that contain decimal points. For example, the numbers 5.5, 0.001, and -2,345.6789 are floating point numbers. Numbers that do not have decimal places are called integers (e.g. 2, 56, 1400).":"浮点数是包含浮点小数的数字。例如,数字5.5、0.001和-2,345.6789是浮点数。没有小数位的数字称为整数。", + "Fog":"雾", "Font Editor Preferences":"字体编辑器首选项", "Font Range Constant":"字体范围常数", "Fonts":"字体", @@ -417,6 +427,7 @@ "Layer Element Info Struct":"层元素信息结构", "Layer Properties":"图层属性", "Layer Types And Properties":"图层类型和属性", + "Layers":"层(Layers)", "Legacy Code Editor Preferences":"旧版代码编辑器首选项", "Level":"等级", "Licencing & Logging In":"许可及登录", @@ -438,6 +449,7 @@ "Maths And Numbers":"数学与数字", "Matrix Array":"矩阵数列", "Matrix Functions":"矩阵函数", + "Matrix Index Constant":"矩阵索引常数", "Member":"成员", "Menus":"菜单", "Message":"信息", @@ -570,6 +582,7 @@ "Secondary Particles":"二次粒子", "Sequence Direction Constant":"序列方向常量", "Sequence Element Type":"序列元素类型", + "Sequence Elements":"序列元素", "Sequence Events, Moments and Broadcast Messages":"事件、时刻和广播消息的序列", "Sequence Layers":"序列图层", "Sequences":"序列", @@ -606,6 +619,7 @@ "Spline Editor":"样条线编辑器", "Sprite Editor Preferences":"精灵编辑器首选项", "Sprite Element Type":"精灵元素类型", + "Sprite Elements":"精灵元素", "Sprite Information":"精灵信息", "Sprite Instance Variables":"精灵实例变量", "Sprite Layers":"精灵图层", @@ -619,6 +633,7 @@ "Static Variables":"静态变量", "Stats And Leaderboards":"统计数据和排行榜", "Status Value":"状态值", + "Stencil Op Constant":"模板操作常数", "Step Event":"步事件", "String":"字符串(String)", "String Escape Characters":"字符串转义字符", @@ -644,6 +659,7 @@ "Texel (or texture element) is the fundamental unit of texture space, much like a pixel is the fundamental element of picture space. Textures are represented by arrays of Texels, just as pictures are represented by arrays of pixels. When texturing a 3D surface (a process known as texture mapping) the renderer maps texels to appropriate pixels in the output picture.":"Texel(或纹理元素)是纹理空间的基本单位,就像像素是图片空间的基本元素一样。纹理由纹素阵列表示,就像图片由像素阵列表示一样。对3D表面进行纹理化(一种称为纹理贴图的过程)时,渲染器将纹理像素映射到输出图片中的适当像素。", "Text":"文本", "Text Editor Preferences":"文本编辑器首选项", + "Text Elements":"文本元素", "Text Files":"文本文件", "Text Rendering (Regular)":"文本呈现(常规)", "Text Rendering (SDF Enabled)":"文本呈现(启用 SDF)", @@ -659,6 +675,7 @@ "The Code Editor":"代码编辑器", "The Debug Overlay":"The Debug Overlay (调试覆盖视图)", "The Debugger":"调试器", + "The Depth And Stencil Buffer":"深度和模板缓冲区", "The Device Manager":"设备管理器", "The Dope Sheet is the visual representation of the sequence timeline, and where you can add, remove and edit the different asset keys and parameter keys that affect how the different tracks in the sequence will behave over time.":"关键帧清单“摄影表”是序列时间轴的直观表示,您可以在其中添加,删除和编辑不同的资源键和参数键,这些键会影响序列中不同音轨随时间的行为。", "The Edit Menu":"编辑菜单", @@ -713,7 +730,9 @@ "This stands for Hue, Saturation and Value and is a way of expressing a colour usually using values from 0 to 255. The hue is the colour hue value, the saturation is amount of the colour to be used, and the value is the brightness of the colour. ":"它代表“色相”,“饱和度”和“明度”,是一种通常使用0到255之间的值表示颜色的方式。色相是色相值,饱和度是要使用的颜色量,而明度是颜色明暗。", "Tile Element Type":"平铺元素类型", "Tile Map Element Type":"平铺地图元素类型", + "Tile Map Elements":"平铺地图元素", "Tile Map Layers":"贴图层", + "Tile Mask Constant":"平铺掩模常数", "Tile Set Editor Preferences":"图块集编辑器首选项", "Tile Sets":"图块集", "Tilesets":"图块", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/asset_get_index.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/asset_get_index.json index 589ab99d1..5391996e2 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/asset_get_index.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/asset_get_index.json @@ -1,5 +1,6 @@ { "If the asset is not found, the function will return a value of -1, otherwise it will return the unique index ID for the asset being checked. This ID can then be used in other functions as you would any other index value, like the {}{}sprite_index{}{} or the {}{}path_index{}{}, for example. Please note that although this function can be used to reference assets from strings (see example below), you should always make sure that the asset exists before using it otherwise you may get errors that will crash your game.":"如果未找到资产,该函数将返回值 -1,否则将返回正在检查的资产的唯一索引 ID。然后,该 ID 可以在其他函数中使用,就像使用任何其他索引值一样,例如{}{}sprite_index{}{}或{}{}path_index{}{}。请注意,虽然此函数可用于从字符串引用资产(请参见下面的示例),但您应始终确保该资产在使用前存在,否则可能会出现导致游戏崩溃的错误。", + "The above code will get an object asset from a string, and if that asset exists, create an instance of the object in the game.":"上面的代码将从字符串中获取对象资源,如果该资源存在,则在游戏中创建该对象的实例。", "The above code will get an object index from a string, and if that index exists, create an instance of the object in the game.":"上面的代码将从一个字符串中获取一个对象索引,如果该索引存在,则在游戏中创建该对象的实例。", "The name of the game asset to get the index of (a string).":"获取 (一个字符串) 的索引的游戏资源的名称。", "This function gets the unique identifying index for a game asset from its name.":"此函数从游戏资产的名称中获取其唯一标识索引。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Buffers/Audio_Buffers.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Buffers/Audio_Buffers.json index d947a3b01..f8b2d582d 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Buffers/Audio_Buffers.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Buffers/Audio_Buffers.json @@ -1,5 +1,6 @@ { "Another feature of buffered audio is that you can use a buffer to create a queue of audio which can then be streamed to the device running your project. An audio queue takes a regular buffer which you have previously filled with audio data, and enables you to \"point\" to parts of it and tell {}GameMaker{} to stream the audio in a given order from that buffer. The available functions for audio queues are:":"缓冲音频的另一个函数是,您可以使用缓冲区创建音频队列,然后将其传输到运行项目的设备。音频队列采用您之前已填充音频数据的常规缓冲区,并使您能够\"指向\"它的一部分,并告诉{}GameMaker{}以给定的顺序从该缓冲区流式传输音频。音频队列的可用函数包括:", + "Audio Buffer Queues":"音频缓冲区队列", "Audio Buffers":"音频缓冲区", "Audio buffers will also permit you to record sound from any of the available sources (like microphones or the OS), which can then be queued and streamed using the above functions (for example). Recording audio will trigger an {}Audio Recording Asynchronous Event{} which will contain specific information about what is being recorded.{} {} For recording audio, the following functions are available: ":"音频缓冲区还允许您录制来自任何可用源(如麦克风或操作系统)的声音,然后可以使用上述函数(例如)排队和流式传输。录制音频将触发{}音频录制异步事件{},该事件将包含关于正在录制的内容的特定信息。{}{}录音函数如下:", "Note that once you have created a sound from an audio buffer, you are {}not{} creating a new sound in memory, but rather pointing to the position within the buffer where the sound is stored. You should not change this buffer after a sound has been associated with it otherwise you will get unexpected results, and you cannot delete the buffer while a sound is associated with it. Instead, free the sound (or sounds) first then delete the buffer.":"请注意,从音频缓冲区创建声音后,您{}不会{}在内存中创建新声音,而是指向缓冲区内存储声音的位置。在声音与该缓冲区关联后,不应更改该缓冲区,否则会得到意外结果,并且在声音与该缓冲区关联时无法删除该缓冲区。相反,首先释放声音(或多个声音),然后删除缓冲区。", @@ -7,6 +8,7 @@ "Note that once you have created a sound from an audio buffer, you are {}not{} creating a new sound in memory, but rather pointing to the position within the buffer where the sound is stored. You should not change this buffer after a sound has been associated with it otherwise you will get unexpected results, and you cannot delete the buffer while a sound is associated with it. Instead, free the sound (or sounds) first then delete the buffer. Once you have created your new audio resource from a buffer, you can use its index value in any of the regular audio functions to play it, change its gain or pitch, pause it, etc. Note that the buffer used to load the audio {}can only support PCM sounds{}, so formats like OGG will not be supported.":"请注意,一旦您从音频缓冲区创建了一个声音,您就不是{}{}在内存中创建一个新的声音,而是指向缓冲区中存储声音的位置。在声音与此缓冲区关联后,不应更改此缓冲区,否则会出现意外结果,并且在声音与此缓冲区关联时,不能删除此缓冲区。相反,首先释放声音(或声音),然后删除缓冲区。一旦你从缓冲区创建了新的音频资源,你可以在任何常规音频函数中使用它的索引值来播放它,改变它的增益或音调,暂停它,等等。请注意,用于加载音频的缓冲区{}只能支持PCM声音{},因此像OGG这样的格式将不受支持。", "Once a queue has been created, you can then use the returned queue index just as you would the sound index for any normal sound to play it, pause it, restart it, or change it\u0027s gain and pitch. The only thing you cannot do is get the track length or set the track position, but other than that, an audio queue can be used just like any other sound. You should also note that some of the audio queue functions will also trigger an {}Audio Playback Asynchronous Event{}.":"创建队列后,您可以像使用任何正常声音的声音索引一样使用返回的队列索引来播放、暂停、重新启动或更改其增益和音调。唯一做不到的是获取音轨长度或设置音轨位置,但除此之外,音频队列可以像任何其他声音一样使用。您还应该注意,一些音频队列函数也会触发{}音频回放异步事件{}。", "Once you have created your new audio resource from a buffer, you can use its index value in any of the regular audio functions to play it, change its gain or pitch, pause it, etc. Note that the buffer used to load the audio {}can only support PCM sounds{}, so formats like OGG will not be supported.":"从缓冲区创建新的音频资源后,您可以在任何常规音频函数中使用其索引值来播放它、更改其增益或音调、暂停它等。请注意,用于加载音频的缓冲区{ }只能支持 PCM 声音{},因此不支持 OGG 等格式。", + "Recording":"记录", "You can use {}audio buffers{} to load, save and manipulate audio files within your games. These buffers are created beforehand using the appropriate {}buffer functions{} and then you can use the following functions to create a sound to use in your project:":"您可以使用{}音频缓冲区{}加载、保存和操作游戏中的音频文件。这些缓冲区是事先使用适当的{}缓冲区函数{}创建的,然后可以使用以下函数创建项目中使用的声音:", "{}{}NOTE{} {}Most platforms {}except HTML5{} support recording audio in some form, but that does not mean that all devices will permit it, even if the platform does, so you should always check that the {}{}{}audio_get_recorder_count(){}{}{} function returns a value greater than 0 to verify that recording devices are available before using the rest of the recording functions.":"{}{}注意{}{}除 HTML5{}以外的大多数平台{}都支持以某种形式录制音频,但这并不意味着所有设备都会允许录制,即使平台允许,因此您应始终检查{}{}{}audio_get_recorder_count(){}{}{}函数返回大于0的值,以在使用其余录制函数之前验证录音设备是否可用。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/Audio_Emitters.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/Audio_Emitters.json index aa063d8e8..7f1c83216 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/Audio_Emitters.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/Audio_Emitters.json @@ -49,5 +49,6 @@ "{}GameMaker{} automatically updates the position of such an emitter. It does not update the velocity of an audio track emitter but this is something you can do yourself by calling {}audio_emitter_velocity{} in one of the {}Sequence Step Events{}.":"{}GameMaker{}自动更新此发射器的位置。它不更新音轨发射器的速度,但您可以通过在{}序列步骤事件{}之一中调用{}audio_emitter_velocity{}自行执行此操作。", "{}{}IMPORTANT{}{} That a sound is being \"played\" does not necessarily mean that it will be heard by the listener. Sounds that have stopped playing, that are too far away from the listener or that have a gain set that is too low (or that are played on an emitter that has a gain set that is too low) will not be audible.":"{}{}重要{}{}声音正在\"播放\"并不一定意味着收听者将听到该声音。停止播放的声音、离收听者太远的声音、或增益设置过低的声音(或在增益设置过低的发射器上播放的声音)将无法听到。", "{}{}NOTE{}{} If you want to make sure sounds can no longer be heard past the maximum distance you should set one of the falloff models that end in {}_scaled{}.":"{}{}注意{}{}如果要确保声音不再超过最大距离,则应设置以{}_scaled{}结尾的衰减模型之一。", + "{}{}NOTE{}{} The {}velocity{} of an audio emitter is expressed in {}pixels per step{}.":"{}{} 注意{}{} 音频发射器的 {} 速度 {} 以 {} 每步像素数 {} 表示。", "{}{}NOTE{}{} The {}velocity{} of an audio emitter is expressed in {}pixels per step{}.{}{}{}{}":"{}{}注意{}{}音频发射器的{}速度{}以每步{}像素表示{}。{}{}{}{}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_gain.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_gain.json index 0250f9605..d5160cb28 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_gain.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_gain.json @@ -2,7 +2,11 @@ "The above code sets the variable \"gain\" to different values and then uses that same variable to set the gain of the emitter indexed in the variable \"s_emit\".":"上述代码将变量\" Gain \"设置为不同的值,然后使用相同的变量来设置发射器的增益,该发射器在变量\" S_Emit \"中索引。", "The index of the emitter to change.":"要更改的发射器的索引。", "The maximum gain (default 1).":"最大增益(默认值为1)。", + "The perceived volume for a sound can change depending on the {}fall-off value{} and the position it has relative to the {}listener{}, but by setting the gain with this function, the full volume will never exceed the specified gain value. The image below illustrates how gain affects the volume of the emitter when fall-off is greater than 0:":"声音的感知音量可能会根据 {} 衰减值 {} 及其相对于 {} 听者 {} 的位置而变化,但通过使用此函数设置增益,总音量永远不会超过指定值获得价值。下图说明了当衰减大于 0 时增益如何影响发射器的音量:", + "This function sets the maximum gain (volume) for the sound.":"此功能设置声音的最大增益 (音量)。", "This function sets the maximum gain (volume) for the sound. The perceived volume for a sound can change depending on the {}fall-off value{} and the position it has relative to the {}listener{}, but by setting the gain with this function, the full volume will never exceed the specified gain value. The image below illustrates how gain affects the volume of the emitter when fall-off is greater than 0:":"此函数设置声音的最大增益(音量)。声音的感知音量可以根据{}衰减值{}及其相对于{}listener{}的位置而变化,但通过使用此函数设置增益,最大音量将永远不会超过指定的增益值。下图说明了当衰减大于0时,增益如何影响发射器的音量:", "{}This function will change the volume of the sound while it is being played as well all subsequent sounds played through the given emitter. Note that on some platforms you can have a gain of greater than 1, although a value of 1 is considered \"full volume\" and anything greater may introduce audio clipping or distortion.":"{}此函数将改变播放时声音的音量,以及通过给定发射器播放的所有后续声音。请注意,在某些平台上,增益可以大于1,但1被视为\"全音量\",任何较大值都可能导致音频削波或失真。", - "{}{}NOTE{} {}the final volume will also be influenced by the global audio gain that has been set by the function {}{}{}audio_master_gain(){}{}{}.":"{}{}注意{}{}最终音量也将受到函数{}{}{}audio_master_gain(){}{}{}{}设置的全局音频增益的影响。" + "{}{}NOTE{} {}the final volume will also be influenced by the global audio gain that has been set by the function {}{}{}audio_master_gain(){}{}{}.":"{}{}注意{}{}最终音量也将受到函数{}{}{}audio_master_gain(){}{}{}{}设置的全局音频增益的影响。", + "{}{}NOTE{}{} A{}udio devices and/or operating systems can sometimes attempt to change the audio\u0027s amplitude {}in order to protect the user from what would otherwise be very loud sounds{}, for example by {}normalising {}the audio stream or by clipping the amplitude to 1. How this is handled is specific to the audio device or OS that\u0027s handling your game\u0027s audio. As a result, increasing gains might have an inconsistent effect.{}":"{}{} 注意{}{} 音频设备和 / 或操作系统有时会尝试更改音频的幅度 {} 以保护用户免受非常大的声音的影响 {},例如,{} 标准化 {} 音频流或将幅度削波为 1。处理方式取决于处理游戏音频的音频设备或操作系统。因此,增加增益可能会产生不一致的效果。{}", + "{}{}NOTE{}{} The final volume will also be influenced by the global audio gain that has been set by the function {}{}audio_master_gain{}{}.":"{}{} 注意{}{} 最终音量还会受到函数 {}{}audio_master_gain{}{} 设置的全局音频增益的影响。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_play_sound_on.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_play_sound_on.json index 39dfaf127..1f0c449eb 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_play_sound_on.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_play_sound_on.json @@ -30,5 +30,6 @@ "{}{}OPTIONAL{}{} The time (in seconds) to set the start point to. Values beyond the end of the sound are clamped to its length.":"{}{}可选{}{} 设置起始点的时间(以秒为单位)。超出声音末端的值被限制到其长度。", "{}{}OPTIONAL{}{} The time (in seconds) to set the start point to. Values longer than the length of the given sound are ignored.":"{}{}可选{}{} 设置起点的时间(以秒为单位)。超过给定声音长度的值将被忽略。", "{}{}OPTIONAL{}{} The time (in seconds) to start playing. Values beyond the end of the sound are clamped to its length. The default value is the asset-level offset, this value overrides it when provided.":"{}{}可选{}{}开始播放的时间(以秒为单位)。超出声音末尾的值将被限制在其长度内。默认值是资产级别偏移量,该值在提供时会覆盖它。", + "{}{}OPTIONAL{}{} The time (in seconds) to start playing. Values beyond the end of the sound are clamped to its length. The default value is the asset-level offset.":"{}{} 可选{}{} 开始播放的时间 (以秒为单位)。超出声音末尾的值将被限制在其长度内。默认值是资产级别的偏移量。", "{}{}OPTIONAL{}{} Value for the gain.":"{}{}可选{}{} 增益值。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_set_gain.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_set_gain.json index 1c50fe3f5..792c2db27 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_set_gain.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_set_gain.json @@ -7,5 +7,6 @@ "The time is measured in milliseconds, and the function requires that you input a final level of gain for the group to have reached by the end of that time. This gain can be between 0 (silent) and 1 (full volume) and the scale is linear, such that a value of 0.5 would be half volume. To instantly change the gain, simply set the time argument to 0.":"时间以毫秒为单位,该函数要求您输入组在该时间结束时达到的最终增益级别。该增益可以在 0 (无声) 和 1 (全音量) 之间,并且比例是线性的,使得值 0.5 将是音量的一半。要立即更改增益,只需将时间参数设置为 0。", "The time is measured in milliseconds, and the function requires that you input a final level of gain for the group to have reached by the end of that time. This gain can be between 0 (silent) and 1 (full volume) and the scale is linear, such that a value of 0.5 would be half volume. To instantly change the gain, simply set the time argument to 0. Note that on some platforms you can have a gain of greater than 1, although a value of 1 is considered \"full volume\" and anything greater may introduce audio clipping.":"时间以毫秒为单位,该函数要求您输入组在该时间结束时达到的最终增益级别。该增益可以在0(无声)和1(全音量)之间,并且比例是线性的,使得值0.5将是音量的一半。要立即更改增益,只需将时间参数设置为0。请注意,在某些平台上,您的增益可能大于1,尽管值1被视为\"最大音量\",任何更大的值都可能引入音频剪辑。", "With this function you can fade a group of sounds in or out over a given length of time, or it can be used to set the group gain instantly.":"使用此函数,您可以在给定的时间长度内淡入或淡出一组声音,也可以用于立即设置组增益。", + "{}{}NOTE{}{} A{}udio devices and/or operating systems can sometimes attempt to change the audio\u0027s amplitude {}in order to protect the user from what would otherwise be very loud sounds{}, for example by {}normalising {}the audio stream or by clipping the amplitude to 1. How this is handled is specific to the audio device or OS that\u0027s handling your game\u0027s audio. As a result, increasing gains might have an inconsistent effect.{}":"{}{} 注意{}{} 音频设备和 / 或操作系统有时会尝试更改音频的幅度 {} 以保护用户免受非常大的声音的影响 {},例如,{ } 标准化 {} 音频流或将幅度削波为 1。处理方式取决于处理游戏音频的音频设备或操作系统。因此,增加增益可能会产生不一致的效果。{}", "{}{}NOTE{}{} On some platforms you can have a gain of greater than 1, although a value of 1 is considered \"full volume\" and anything greater may introduce audio clipping.":"{}{}注意{}{} 在某些平台上,您的增益可能大于 1,尽管值 1 被视为\"最大音量\",任何更大的值都可能引入音频剪辑。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Properties.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Properties.json index eb684ec48..797b59d2e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Properties.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Properties.json @@ -19,5 +19,6 @@ "This page gives a detailed overview of the audio properties that {}GameMaker{} supports and the different \"levels\" at which you can set/change them.":"本页详细概述了 {}GameMaker{} 支持的音频属性以及您可以设置/更改这些属性的不同\"级别\"。", "audio_sound_gain(snd_Explode, 0, 0);  // Set the asset-level gain to 0 (new instances of this sound play muted)":"audio_sound_gain(snd_Explode, 0, 0); // 将资产级增益设置为 0(该声音的新实例静音)", "{}Audio Properties Overview{}":"{}音频属性概述{}", - "{}This can still be changed in-game later by calling {}{}audio_sound_gain{}{} with the sound {}asset{} ID as the argument: ":"{}以后仍可以在游戏中通过调用以声音{5}资源{6} ID 作为参数的 {}{}audio_sound_gain{}{} 来更改此设置: " + "{}This can still be changed in-game later by calling {}{}audio_sound_gain{}{} with the sound {}asset{} ID as the argument: ":"{}以后仍可以在游戏中通过调用以声音{5}资源{6} ID 作为参数的 {}{}audio_sound_gain{}{} 来更改此设置: ", + "{}{}NOTE{}{} A{}udio devices and/or operating systems can sometimes attempt to change the audio\u0027s amplitude {}in order to protect the user from what would otherwise be very loud sounds{}, for example by {}normalising {}the audio stream or by clipping the amplitude to 1. How this is handled is specific to the audio device or OS that\u0027s handling your game\u0027s audio. As a result, increasing gains might have an inconsistent effect.{}":"{}{} 注意{}{} 音{}频设备和 / 或操作系统有时会尝试更改音频的幅度 {} 以保护用户免受非常大的声音的影响 {},例如,{} 标准化 {} 音频流或将幅度削波为 1。处理方式取决于处理游戏音频的音频设备或操作系统。因此,增加增益可能会产生不一致的效果。{}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/audio_sync_group_debug.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/audio_sync_group_debug.json index 0de7ea613..4fe479ac4 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/audio_sync_group_debug.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/audio_sync_group_debug.json @@ -6,6 +6,7 @@ "Note that for general debugging of audio, you also have the function {}{}audio_debug(){}{}.":"请注意,对于音频的一般调试,您还有函数{}{}audio_debug(){}{}。", "Note that for general debugging of audio, you also have the function {}{}audio_debug{}{}.":"请注意,对于音频的一般调试,您还可以使用函数{}{}audio_debug{}{}。", "The above code will switch on or off the audio sync group debug overlay showing the sync group indexed in the variable \"sg\" depending on whether the game is run in debug mode or not.":"上述代码将打开或关闭音频同步组调试覆盖,显示变量\"sg\"中索引的同步组,这取决于游戏是否在调试模式下运行。", + "The above code will switch on or off the audio sync group debug overlay showing the sync group indexed in the variable {}sg{} depending on whether the game is run in debug mode or not.":"上述代码将打开或关闭音频同步组调试叠加层,显示变量 {}sg{} 中索引的同步组,具体取决于游戏是否在调试模式下运行。", "The group index to debug, or -1 to switch off the debugging.":"要调试的组索引,或-1关闭调试。", "This function can be used to display debug information about any given sync group (the group index is the value returned when the group was created using the function {}{}audio_create_sync_group(){}{}). You can call the function with a value of -1 to switch off the overlay.":"其函数可用于显示关于任何给定同步组的调试信息(组索引是使用函数{}{}audio_create_sync_group(){}{}创建组时返回的值)。 可以调用值为-1的函数以关闭覆盖。", "This function displays debug information about any given sync group (the group index is the value returned when the group was created using the function {}{}audio_create_sync_group{}{}). You can call the function with a value of -1 to switch off the overlay.":"此函数显示有关任何给定同步组的调试信息(组索引是使用函数{}{}audio_create_sync_group{}{}创建组时返回的值)。您可以使用值 -1 来调用该函数来关闭覆盖。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_debug.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_debug.json index 16f312f93..dc35ca0de 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_debug.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_debug.json @@ -3,6 +3,7 @@ "For synchronised groups of audio, you also have the function {}{}audio_sync_group_debug(){}{}.":"对于同步音频组,您还具有函数{}{}audio_sync_group_debug(){}{}。", "The above code will switch on or off the audio debug overlay depending on whether the game is running in debug mode or not.":"根据游戏是否在调试模式下运行,上述代码将打开或关闭音频调试叠加。", "This function can be used to display debug information about the audio system, with {}true{} switching it on and {}false{} to switch it off. When you are debugging audio in this way, the overlay will show the following information:":"此函数可用于显示有关音频系统的调试信息,{}true{}打开它,{}false{}关闭它。以这种方式调试音频时,叠加将显示以下信息:", + "This function can be used to display debug information about the audio system, with {}true{} switching it on and {}false{} switching it off. Enabling this will display the {}Audio{} window of {}The Debug Overlay{}.":"此函数可用于显示有关音频系统的调试信息,{}true{} 将其打开,{}false{} 将其关闭。启用此功能将显示 {} 调试叠加层 {} 的 {} 音频 {} 窗口。", "{}Data Handle{} - The OpenAL buffer handle (shows the same value for multiple sounds with the same source handle)":"{}Data Handle{} - OpenAL缓冲区句柄(为具有相同源句柄的多个声音显示相同的值)", "{}Gain {}- The gain value for the audio (0 - 65536)":"{}Gain{} - 音频的增益值(0- 65536)", "{}Handle {}- The OpenAL source handle (unique for every sound played)":"{}Handle{} - OpenAL 源句柄(每个播放的声音都独一无二)", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_get_name.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_get_name.json index d0bf08983..223016608 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_get_name.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_get_name.json @@ -1,8 +1,10 @@ { "The \"index\" value can be that of the asset itself (as seen in {}The Asset Browser{}) or the unique ID value that is given when you play the sound using, for example, {}{}audio_play_sound{}{}.":"\"index\" 值可以是资源本身的值 (如 {} 资源浏览器 {} 中所示),也可以是使用 {}{}audio_play_sound{}{} 播放声音时给出的唯一 ID 值。", + "The \"index\" value can be that of the asset itself (as seen in {}The Asset Browser{}) or the {}{}Sound Instance ID{}{} that is given when you play the sound using, for example, {}{}audio_play_sound{}{}.":"\"索引 \" 值可以是资产本身的值 (如资产浏览器中所示),也可以是您使用例如 audio_play_sound 播放声音时给出的声音实例 ID。", "The above code plays a random sound chosen from three different sound resources then shows a debug message with its name.":"上述代码播放从三种不同声音资源中选择的随机声音,然后显示带有其名称的调试消息。", "The index of the sound to check.":"检查声音的索引。", "This function will return the name of a given audio asset as a string.":"此函数将以字符串形式返回给定音频资源的名称。", "This function will return the name of a given audio resource as a string. The \"index\" value can be that of the resource itself (as seen in the Asset Browser) or the unique ID value that is given when you play the sound using, for example, {}{}audio_play_sound(){}{}. Note that the string returned is {}not{} the same as the resource ID and cannot be used to access the resource itself, so should only be used for displaying or error checking.":"此函数将以字符串形式返回给定音频资源的名称。\"索引\"值可以是资源本身的值(如资源浏览器所示),也可以是播放声音时给出的唯一ID值,例如,{}{}audio_play_sound(){}{}。 请注意,返回的字符串{}与资源ID不同,不能用于访问资源本身,因此只能用于显示或错误检查。", + "To get the actual asset reference originally used to play a sound instance, use {}{}audio_sound_get_asset{}{}.":"要获取最初用于播放声音实例的实际资源引用,请使用 {}{}audio_sound_get_asset{}{}。", "{}{}NOTE{}{} The string returned is {}not{} the same as the resource ID and cannot be used to access the resource itself, so should only be used for displaying or error checking.":"{}{}注意{}{} 返回的字符串与资源 ID {}不一致{},不能用于访问资源本身,只能用于显示或错误检查。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_master_gain.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_master_gain.json index 54e0d6d62..9713ca394 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_master_gain.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_master_gain.json @@ -1,9 +1,11 @@ { "It is based on a linear scale from 0 (silent) to any value greater than 0, although normally you\u0027d consider the maximum volume as 1. Anything over 1 can be used but, depending on the sound used and the platform being compiled to, you may get distortion or clipping when the sound is played back. This function will affect the relative volume of all sounds and music played from within your game.":"它基于从0(无声)到大于0的任何值的线性标度,尽管通常将最大音量视为1。可以使用超过1的任何内容,但根据使用的声音和正在编译的平台,播放声音时可能会失真或削波。此函数将影响游戏中播放的所有声音和音乐的相对音量。", "The above code checks for key-presses of the up and down arrow keys, which then increase or decrease the variable \"vol\". This variable is then used to set the global gain of all sound and music in the game.":"上述代码检查向上和向下箭头键的按键,然后增加或减少变量\"vol\"。然后,此变量用于设置游戏中所有声音和音乐的全局增益。", + "Value for the global volume (0 to 1)":"全局卷的值 (0 到 1)", "Value for the global volume (0 to 1).":"全局卷的值(0 到 1)。", "With this function you can set the absolute value for the global volume of all sounds and music.":"使用此函数,您可以设置所有声音和音乐的全局音量的绝对值。", "With this function you can set the absolute value for the global volume of all sounds and music. It is based on a linear scale from 0 (silent) to any value greater than 0, although normally you\u0027d consider the maximum volume as 1. Anything over 1 can be used but, depending on the sound used and the platform being compiled to, you may get distortion or clipping when the sound is played back. This function will affect the relative volume of all sounds and music played from within your game.":"使用此函数,您可以设置所有声音和音乐的全局音量的绝对值。它基于从0(无声)到大于0的任何值的线性标度,尽管通常将最大音量视为1。可以使用超过1的任何内容,但根据使用的声音和正在编译的平台,播放声音时可能会失真或削波。此函数将影响游戏中播放的所有声音和音乐的相对音量。", + "{}{}NOTE{}{} A{}udio devices and/or operating systems can sometimes attempt to change the audio\u0027s amplitude {}in order to protect the user from what would otherwise be very loud sounds{}, for example by {}normalising {}the audio stream or by clipping the amplitude to 1. How this is handled is specific to the audio device or OS that\u0027s handling your game\u0027s audio. As a result, increasing gains might have an inconsistent effect.{}":"{}{} 注意{}{} 音频设备和 / 或操作系统有时会尝试更改音频的幅度 {} 以保护用户免受非常大的声音的影响 {},例如,{ } 标准化 {} 音频流或将幅度削波为 1。处理方式取决于处理游戏音频的音频设备或操作系统。因此,增加增益可能会产生不一致的效果。{}", "{}{}NOTE{}{} This function sets the master gain of the {}default{} listener. Use {}{}audio_set_master_gain{}{} to set the master gain for a specific listener.":"{}{}注意{}{} 此函数设置{}默认{}监听器的主增益。使用 {}{}audio_set_master_gain{}{} 到设置特定监听器的主增益。", "{}{}NOTE{}{} Use {}{}db_to_lin{}{} and {}{}lin_to_db{}{} to convert back and forth between linear gains and gains expressed in decibels (dB).":"{}{}注意{}{} 使用 {}{}db_to_lin{}{} 和 {}{}lin_to_db{}{} 在线性增益和以分贝 (dB) 表示的增益之间来回转换。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_pause_all.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_pause_all.json index b2805c624..fe6bcbd91 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_pause_all.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_pause_all.json @@ -1,4 +1,5 @@ { "The above code checks for a press of the keyboard key \"P\" and if it detects one it sets the global variable \"Pause\" to {}true{} or false and then either pauses all sounds or restarts all previously paused sounds.":"上述代码检查是否按下键盘键\"P\",如果检测到一个,则将全局变量\"暂停\"设置为{}true{}或假,然后暂停所有声音或重新启动所有先前暂停的声音。", + "The above code checks for a press of the keyboard key \"P\" and if it detects one it sets the global variable \"Pause\" to {}true{} or {}false{} and then either pauses all sounds or restarts all previously paused sounds.":"上述代码检查是否按下了键盘键 \"P\",如果检测到按下,则将全局变量 \"Pause\" 设置为 {}true{} 或 {}false{},然后暂停所有声音或重新启动之前暂停的所有声音声音。", "With this function you can pause all sounds that are currently playing.":"使用此函数,您可以暂停当前播放的所有声音。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_pause_sound.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_pause_sound.json index 156c60f73..3d2565442 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_pause_sound.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_pause_sound.json @@ -1,5 +1,6 @@ { "The above code checks for a press of the keyboard key \"P\" and if it detects one it sets the global variable \"Pause\" to {}true{} or false and then either pauses the sound indexed in the variable \"snd_Waterfall\" or it resumes the sound from its paused state.":"上述代码检查是否按下键盘键\"P\",如果检测到一个,则将全局变量\"暂停\"设置为{}true{}或假,然后暂停变量\"snd_Waterfall\"中索引的声音,或者从其暂停状态恢复声音。", + "The above code checks for a press of the keyboard key \"P\" and if it detects one it sets the global variable \"Pause\" to {}true{} or {}false{} and then either pauses the sound indexed in the variable \"snd_Waterfall\" or it resumes the sound from its paused state.":"上述代码会检查是否按下了键盘键 \"P\",如果检测到,则会将全局变量 \"Pause\" 设置为 {}true{} 或 {}false{},然后暂停变量 \"Pause\" 中索引的声音 snd_Waterfall\" 或者它从暂停状态恢复声音。", "The index of the sound to pause.":"要暂停的声音的索引。", "With this function you can pause any sound that is currently playing. The sound can either be a single instance of a sound (the index for individual sounds being played can be stored in a variable when using the {}{}audio_play_sound(){}{} or {}{}audio_play_sound_at(){}{} functions) or a sound asset, in which case {}all{} instances of the given sound will be paused.":"使用此函数,您可以暂停当前播放的任何声音。声音可以是声音的单个实例(当使用{}{}audio_play_sound(){}{}或{}audio_play_sound_at(){}{}{}函数时,播放的单个声音的索引可以存储在变量中)或声音资源,在这种情况下{}给定声音的所有{}实例将暂停。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound.json index 691d5ed95..936dc6ca0 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound.json @@ -30,5 +30,6 @@ "{}{}OPTIONAL{}{} The bitmask data to set for the sound. On the HTML5 target  this will have no effect as the target does not support more than one listener.":"{}{}可选{}{}为声音设置的位掩码数据。在 HTML5 目标上,这不会产生任何影响,因为该目标不支持多个侦听器。", "{}{}OPTIONAL{}{} The gain of the sound instance (defaults to 1).":"{}{}可选{}{}声音实例的增益(默认为 1)。", "{}{}OPTIONAL{}{} The pitch multiplier (defaults to 1).":"{}{}可选{}{}音调乘数(默认为 1)。", - "{}{}OPTIONAL{}{} The time (in seconds) to start playing. Values beyond the end of the sound are clamped to its length. The default value is the asset-level offset, this value overrides it when provided.":"{}{}可选{}{}开始播放的时间(以秒为单位)。超出声音末尾的值将被限制在其长度内。默认值是资产级别偏移量,该值在提供时会覆盖它。" + "{}{}OPTIONAL{}{} The time (in seconds) to start playing. Values beyond the end of the sound are clamped to its length. The default value is the asset-level offset, this value overrides it when provided.":"{}{}可选{}{}开始播放的时间(以秒为单位)。超出声音末尾的值将被限制在其长度内。默认值是资产级别偏移量,该值在提供时会覆盖它。", + "{}{}OPTIONAL{}{} The time (in seconds) to start playing. Values beyond the end of the sound are clamped to its length. The default value is the asset-level offset.":"{}{} 可选{}{} 开始播放的时间 (以秒为单位)。超出声音末尾的值将被限制在其长度内。默认值是资产级别的偏移量。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound_at.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound_at.json index 678b65c03..691ba49fa 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound_at.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound_at.json @@ -30,5 +30,6 @@ "{}{}OPTIONAL{}{} The bitmask data to set for the sound. On the HTML5 target  this will have no effect as the target does not support more than one listener.":"{}{}可选{}{}为声音设置的位掩码数据。在 HTML5 目标上,这不会产生任何影响,因为该目标不支持多个侦听器。", "{}{}OPTIONAL{}{} The gain of the sound instance (defaults to 1).":"{}{}可选{}{}声音实例的增益(默认为 1)。", "{}{}OPTIONAL{}{} The pitch multiplier (defaults to 1).":"{}{}可选{}{}音调乘数(默认为 1)。", - "{}{}OPTIONAL{}{} The time (in seconds) to start playing. Values beyond the end of the sound are clamped to its length. The default value is the asset-level offset, this value overrides it when provided.":"{}{}可选{}{}开始播放的时间(以秒为单位)。超出声音末尾的值将被限制在其长度内。默认值是资产级别偏移量,该值在提供时会覆盖它。" + "{}{}OPTIONAL{}{} The time (in seconds) to start playing. Values beyond the end of the sound are clamped to its length. The default value is the asset-level offset, this value overrides it when provided.":"{}{}可选{}{}开始播放的时间(以秒为单位)。超出声音末尾的值将被限制在其长度内。默认值是资产级别偏移量,该值在提供时会覆盖它。", + "{}{}OPTIONAL{}{} The time (in seconds) to start playing. Values beyond the end of the sound are clamped to its length. The default value is the asset-level offset.":"{}{} 可选{}{} 开始播放的时间 (以秒为单位)。超出声音末尾的值将被限制在其长度内。默认值是资产级别的偏移量。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_gain.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_gain.json index b54a637d3..1a8dac967 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_gain.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_gain.json @@ -1,8 +1,12 @@ { + " The above code assigns the index of a sound to be played to the local variable {}snd{}. This variable is then used to reduce the volume of that specific sound to 0 and fade up to full volume over 5 seconds. ":"上述代码将要播放的声音的索引分配给局部变量 {}snd{}。然后,该变量用于将该特定声音的音量降低至 0,并在 5 秒内逐渐增强至最大音量。", + " The above code first sets the gain of the sound asset {}snd_fountain{} to 0.5. It then plays this sound using {}{}audio_play_sound{}{}  and sets the gain of this new sound instance to 2 (using the optional \"gain\" parameter of the function). ":"上面的代码首先将声音资源 {}snd_fountain{} 的增益设置为 0.5。然后,它使用 {}{}audio_play_sound{}{} 播放此声音,并将此新声音实例的增益设置为 2( 使用函数的可选 \"gain\" 参数)。", + "The above code assigns the index of a sound to be played to the local variable {}snd{}. This variable is then used to reduce the volume of that specific sound to 0 and fade up to full volume over 5 seconds.":"上述代码将要播放的声音的索引分配给局部变量 {}snd{}。然后,该变量用于将该特定声音的音量降低至 0,并在 5 秒内逐渐增强至最大音量。", "The above code checks a variable and if it returns {}true{} it will then assign the index of a sound to be played to the local variable \"snd\". This variable is then used to reduce the volume of that specific sound to 0 and fade up to full volume over 5 seconds.":"上面的代码检查一个变量,如果它返回{}true{},它将把要播放的声音的索引赋给局部变量snd。然后,此变量用于将特定声音的音量减小到 0,并在 5 秒内衰减至全音量。", "The above code checks a variable {}val{}. If it returns {}true{} it will then assign the index of a sound to be played to the local variable {}snd{}. This variable is then used to reduce the volume of that specific sound to 0 and fade up to full volume over 5 seconds.":"上面的代码检查变量 {}val{}。如果它返回 {}true{},则会将要播放的声音的索引分配给本地变量 {}snd{}。然后使用该变量将该特定声音的音量降低到 0,并在 5 秒内减弱到最大音量。", "The above code first sets the gain of the sound asset \"snd_fountain\" to 0.5. It then plays this sound using {}{}audio_play_sound{}{} and sets the gain of this new sound instance to 2 (using the optional \"gain\" parameter of the function)":"上面的代码首先将声音资源 \"snd_fintain\" 的增益设置为 0.5。然后,它使用 {}{}audio_play_sound{}{} 播放此声音,并将此新声音实例的增益设置为 2 (使用函数的可选 \"gain\" 参数)", "The above code first sets the gain of the sound asset \"snd_fountain\" to 0.5. It then plays this sound using {}{}audio_play_sound{}{} and sets the gain of this new sound instance to 2 (using the optional \"gain\" parameter of the function).":"上面的代码首先将声音资源 \"snd_fintain\" 的增益设置为 0.5。然后,它使用 {}{}audio_play_sound{}{} 播放此声音,并将此新声音实例的增益设置为 2 (使用函数的可选 \"gain\" 参数)", + "The above code first sets the gain of the sound asset {}snd_fountain{} to 0.5. It then plays this sound using {}{}audio_play_sound{}{}  and sets the gain of this new sound instance to 2 (using the optional \"gain\" parameter of the function).":"上面的代码首先将声音资源 {}snd_fountain{} 的增益设置为 0.5。然后,它使用 {}{}audio_play_sound{}{} 播放此声音,并将此新声音实例的增益设置为 2( 使用函数的可选 \"gain\" 参数)。", "The default asset-level gain is the value of the \"Volume\" slider in {}The Sound Editor{}: ":"默认资源级增益是{}声音编辑器{}中\"音量\"滑块的值:", "The default value for the sound {}asset{} gain is taken from the \"Volume\" slider in the Sound Editor: ":"声音{}资源{}增益的默认值取自声音编辑器中的\"音量\"滑块: ", "The index of the sound to set the gain for.":"设置增益的声音索引。", @@ -14,5 +18,6 @@ "Value for the music volume.":"音乐音量的值。", "With this function you can fade a sound asset or instance in or out over a given length of time, or it can be used to set the sound gain instantly.":"使用此函数,您可以在给定的时间长度内淡入或淡出声音资源或实例,也可以用于立即设置声音增益。", "With this function you can fade a sound in or out over a given length of time, or it can be used to set the sound gain instantly.":"使用此函数,您可以在给定时间长度内将声音淡入或淡出,或用于立即设置声音增益。", + "{}{}NOTE{}{} A{}udio devices and/or operating systems can sometimes attempt to change the audio\u0027s amplitude {}in order to protect the user from what would otherwise be very loud sounds{}, for example by {}normalising {}the audio stream or by clipping the amplitude to 1. How this is handled is specific to the audio device or OS that\u0027s handling your game\u0027s audio. As a result, increasing gains might have an inconsistent effect.{}":"{}{} 注意{}{} 音频设备和 / 或操作系统有时会尝试更改音频的幅度 {} 以保护用户免受非常大的声音的影响 {},例如,{ } 标准化 {} 音频流或将幅度削波为 1。处理方式取决于处理游戏音频的音频设备或操作系统。因此,增加增益可能会产生不一致的效果。{}", "{}{}NOTE{}{} Use {}{}db_to_lin{}{} and {}{}lin_to_db{}{} to convert back and forth between linear gains and gains expressed in decibels (dB).":"{}{}注意{}{}使用{}{}db_to_lin{}{}和{}{}lin_to_db{}{}在线性增益和以分贝(dB) 表示的增益之间来回转换。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_asset.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_asset.json new file mode 100644 index 000000000..36cc03b8e --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_asset.json @@ -0,0 +1,6 @@ +{ + "In the {}Create{} event, this plays a sound, storing its sound instance into a variable.":"在 {}Create{} 事件中,它会播放声音,并将其声音实例存储到变量中。", + "In the {}Key Press - Space{} event, it gets the asset used for playing the previously stored sound instance. If it returned a valid sound asset, another sound is playing using that same sound asset.":"在 {} 按键 - 空格 {} 事件中,它获取用于播放先前存储的声音实例的资源。如果它返回有效的声音资源,则正在使用同一声音资源播放另一个声音。", + "This function returns the {}{}Sound Asset{}{} that was used to play the given {}{}Sound Instance ID{}{}. The sound must be active (i.e. currently playing) for this function to return the correct value, otherwise it will return {}undefined{}.":"此函数返回用于播放给定 {}{} 声音实例 ID{}{} 的 {}{} 声音资源 {}{}。声音必须处于活动状态 (即当前正在播放),此函数才能返回正确的值,否则它将返回 {}undefined{}。", + "This way, the asset that this function returns for a sound can be reused to play that same sound again.":"这样,该函数为声音返回的资源就可以重复使用来再次播放相同的声音。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_track_position.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_track_position.json index 68a0a32c9..14e6cebfc 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_track_position.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_track_position.json @@ -1,7 +1,10 @@ { + "For currently playing sounds (as returned by {}audio_play_sound_*{}): the current track position.":"对于当前播放的声音 (由 {}audio_play_sound_*{} 返回):当前曲目位置。", + "For sound assets: the starting position (or offset) which is used when this sound is played using any of the {}audio_play_sound_*{} functions. This asset-level offset can be changed using {}{}audio_sound_set_track_position{}{}.":"对于声音资源:使用任意 {}audio_play_sound_*{} 函数播放此声音时使用的起始位置 (或偏移量)。可以使用 {}{}audio_sound_set_track_position{}{} 更改此资产级偏移量。", "The above code checks a track to get it\u0027s start position and if it\u0027s not 0 seconds it sets it to 0 seconds.":"上面的代码检查一个轨迹,以得到它的起始位置,如果它不是0秒,它将它设置为0秒。", "The above code checks a track to get its start position and if it\u0027s not 0 seconds it sets it to 0 seconds.":"上面的代码检查轨道以获取其起始位置,如果不是 0 秒,则将其设置为 0 秒。", "The function can take a {}{}Sound Asset{}{} or a sound instance. It returns: ":"该函数可以采用{}{}声音资源{}{}或声音实例。它返回:", + "The function can take a {}{}Sound Asset{}{} or a {}{}Sound Instance ID{}{}. It returns: ":"该函数可以采用 {}{} 声音资源 {}{} 或 {}{} 声音实例 ID{}{}。它返回:", "The index of the sound to get the play position of.":"声音的索引获取播放位置。", "The sound asset or instance to get the play position of.":"要获取播放位置的声音资源或实例。", "This function gets the position (in seconds) within the sound file for the sound to play from.":"此函数获取声音文件中播放声音的位置(以秒为单位)。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_length.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_length.json index be4549c09..172d612c9 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_length.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_length.json @@ -5,5 +5,6 @@ "The sound can either be a referenced from index for an individual sound instance being played which has been stored in a variable when using any of the {}audio_play_sound_{} functions, or an actual sound asset from {}The Asset Browser{}.":"声音可以是使用任何 {}audio_play_sound_{} 函数时存储在变量中的正在播放的单个声音实例的引用起始索引,也可以是来自资源浏览器的实际声音资源。", "This function returns the length of the given sound in seconds.":"此函数返回给定声音的长度(以秒为单位)。", "This function will return the length of the given sound in seconds. The sound can either be a referenced from index for an individual sound being played which has been stored in a variable when using the {}{}audio_play_sound(){}{} or {}{}audio_play_sound_at(){}{} functions, or an actual sound asset from the Asset Browser.":"此函数将以秒为单位返回给定声音的长度。当使用{}{}audio_play_sound(){}{}或{}{}audio_play_sound_at(){}{}函数时,声音可以是正在播放的单个声音的索引引用,也可以是资源浏览器中的实际声音资源。", + "{}{}NOTE{}{} For {}audio streams{} created at runtime on HTML5 and {}GX.games{}, this function may return {}-1{} if called before the runtime is able to retrieve the length of the audio stream.":"{}{} 注意{}{} 对于在 HTML5 和 {}GX.games{} 上运行时创建的 {} 音频流 {},如果在运行时能够检索音频流之前调用此函数,则可能会返回 {}-1{} 音频流的长度。", "{}{}NOTE{}{} The alarm will trigger at around the same time the sound stops playing. You can also use the {}Audio Playback Ended{} event if you need to execute some code at the exact time that playback of the audio ends.":"{}{}注意{}{}闹钟将在声音停止播放的同时触发。如果您需要在音频播放结束的确切时间执行某些代码,您还可以使用{}音频播放结束{}事件。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_effects.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_effects.json index d7e3c6dba..7756cd16e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_effects.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_effects.json @@ -31,6 +31,7 @@ "{}Outline{}{}Outline{}":"{}轮廓{}{}轮廓{}", "{}coreAlpha{}: The alpha of the core part of the font.":"{}coreAlpha{}:核心透明度,字体核心部分的alpha(透明度)。", "{}coreColour{}: The colour of the core part of the font (excluding any outlines, glows etc.).":"{}coreColour{}:核心颜色,字体核心部分的颜色(不包括任何轮廓、发光等)。", + "{}coreColour{}: The colour of the core part of the font (excluding any outlines, glows, etc.).":"{}coreColour{}:字体核心部分的颜色 (不包括任何轮廓、发光等)。", "{}dropShadowAlpha{}: The alpha of the shadow.":"{}dropShadowAlpha{}:影子的alpha(透明度)。", "{}dropShadowColour{}: The colour of the shadow.":"{}dropShadowColour{}:影子的颜色。", "{}dropShadowEnable{}: Enable or disable the Drop Shadow effect. {}Disabled{} by default.":"{}dropShadowEnable{}:启用或禁用投影效果。{}默认禁用{}。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/Instance_Variables/alarm.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/Instance_Variables/alarm.json index 600c6897e..a46a07675 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/Instance_Variables/alarm.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/Instance_Variables/alarm.json @@ -9,5 +9,6 @@ "You can set the alarm array directly (and retrieve the current alarm value directly by using the array too), but under some circumstances this is not the most appropriate method, so you can also use the function {}{}alarm_set{}{} to set an alarm, and the function {}{}alarm_get{}{} to get the value of an alarm.":"您可以直接设置警报数组 (也可以直接使用数组获取当前警报值),但在某些情况下这不是最合适的方法,因此您也可以使用函数 {}{}alarm_set{}{} 设置闹钟,函数 {}{}alarm_get{}{} 获取闹钟值。", "{}NOTE{} An alarm with no actions or code in it will not run. However, even with just a comment and no code, the alarm will count down.":"{}注意{}没有动作或代码的报警将不会运行。然而,即使只有一个注释,没有代码,警报也会倒计时。", "{}{}NOTE{}{} An alarm with no actions or code in it will not run. However, even with just a comment and no code, the alarm will count down.":"{}{} 注意{}{} 没有任何操作或代码的警报将不会运行。然而,即使只有注释而没有代码,警报也会倒计时。", + "{}{}NOTE{}{} This variable does not hold a real GML array, so you cannot run any {}array functions{} on it or serialise it (convert it to a string). The only operation you can run on it is accessing a value at an index, with the {}{}alarm{}[index]{} syntax.":"{}{} 注意{}{} 此变量不保存真正的 GML 数组,因此您无法对其运行任何 {} 数组函数 {} 或对其进行序列化 (将其转换为字符串)。您可以对其运行的唯一操作是使用 {}{}alarm{}[index]{} 语法访问索引处的值。", "{}{}Real{}{} (-1 if the alarm isn\u0027t running)":"{}{} Real {}{}( 如果闹钟未运行,则为 -1 )" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/Instance_Variables/depth.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/Instance_Variables/depth.json index 1226eefad..9f7966737 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/Instance_Variables/depth.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/Instance_Variables/depth.json @@ -8,6 +8,7 @@ "{}Note that instances of an object that have the {}same{} depth can be drawn {}above {}or{} below each other{} even when they appear to be placed one on top of the other in {}The Room Editor{}. If you want to guarantee that something is drawn over or under everything else, you should always set the depth (or layer) explicitly. Also note that there is a minimum ({}-16000{}) and maximum ({}16000{}) depth value outside of which instances will not be drawn, although they will still exist and process events.":"{} 请注意,具有 {} 相同 {} 深度的对象实例可以绘制在彼此的 {} 上方 {} 或 {} 下方 {},即使它们在 {} 房间编辑器 {}。如果您想保证某些内容绘制在其他所有内容之上或之下,则应始终显式设置深度 (或图层)。另请注意,存在最小 ({}-16000{}) 和最大 ({}16000{}) 深度值,超出该深度值将不会绘制实例,但它们仍然存在并处理事件。", "{}{}IMPORTANT{}{} The minimum and maximum depth values are approximate. As a result, when you set the draw depth to a value close to these limits, what you\u0027re drawing might not be drawn.":"{}{} 重要提示{}{} 最小和最大深度值是近似值。因此,当您将绘制深度设置为接近这些限制的值时,您正在绘制的内容可能不会被绘制。", "{}{}IMPORTANT{}{} When you modify the {}{}depth{}{} {}{} {}{}variable and {}GameMaker{} manages the layers, the built in {}{}{}{}layer{}{}{}{} variable will return -1 and not the layer ID, since managed layers cannot be manipulated through code. ":"{}{} 重要事项{}{} 当您修改 {}{}depth{}{}{}{}{}{} 变量并且 {}GameMaker{} 管理图层时,内置 {}{}{}{}layer{}{}{}{} 变量将返回 -1 而不是图层 ID,因为无法通过代码操作托管图层。", + "{}{}IMPORTANT{}{} When you modify the {}{}depth{}{} {}{} {}{}variable and {}GameMaker{} manages the layers, the built-in {}{}{}{}layer{}{}{}{} variable will return -1 and not the layer ID, since managed layers cannot be manipulated through code. ":"{}{} 重要{}{} 当您修改 {}{}depth{}{}{}{}{}{} 变量并且 {}GameMaker{} 管理层时,内置的 {}{}{}{}layer{}{}{}{} 变量将返回 -1 而不是层 ID,因为托管层无法通过代码进行操作。", "{}{}NOTE{} {}You {}cannot{} set the depth of an instance in its Draw event (all other events are fine).":"{}{}注意{}{}您{}不能{}在实例的绘制事件中设置实例的深度(所有其他事件都可以)。", "{}{}NOTE{}{} Depth values are approximate. If you try to draw things at depth values close to the maximum depth and minimum depth, they may not be drawn due to inaccuracies introduced by the calculations.":"{}{} 注意{}{} 深度值是近似值。如果您尝试以接近最大深度和最小深度的深度值绘制事物,则可能会由于计算引入的不准确性而无法绘制它们。", "{}{}NOTE{}{} You {}cannot{} set the depth of an instance in its Draw event (all other events are fine). You can, however, set the depth at which to draw things in the Draw event using {}{}gpu_set_depth{}{}.":"{}{} 注意{}{} 您 {} 无法 {} 在 Draw 事件中设置实例的深度 (所有其他事件都可以)。不过,您可以使用 {}{}gpu_set_depth{}{} 设置在 Draw 事件中绘制事物的深度。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_create_depth.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_create_depth.json index 9a8517a48..9943351ac 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_create_depth.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_create_depth.json @@ -21,11 +21,12 @@ "Values applied to the new instance through this struct can be of any type, including {}method{} variables. {}Built-in variables{} can be changed as well.":"通过此结构应用于新实例的值可以是任何类型的,包括{}方法{}变量。{}内置变量{}也可以更改。", "Variables from this struct are applied to the new instance {}before{} its Create event runs, but {}after{} its {}Variable Definitions{} are set.":"此结构中的变量在{}的创建事件运行前应用于新实例{},但{}之后{}的{}变量定义{}被设置。", "With this function you can create a new instance of the specified object at any given point within the room and at the depth specified. The depth can be any value, where the lower the depth the \"nearer\" to the camera things will be drawn and the higher the depth the further away, so an instance at depth -200 will be drawn over an instance at depth +300 (for example).":"使用此函数,可以在房间内任意给定点和指定深度创建新的指定对象实例。深度可以是任何值,其中深度越低,\"越靠近\"摄像机,而深度越高,则越远,那么深度-200处的实例将绘制在深度+300(例如)处的实例上。", - "You\u0027re not limited to a struct literal, as you can also pass in a variable that stores an existing struct, or create a {}new{} struct from a {}constructor{}.":"不限于结构文字,因为还可以传递存储现有结构的变量,或从{}constructor{}创建{}new{}结构。", + "You\u0027re not limited to a struct literal, as you can also pass in a variable that stores an existing struct, or create a {}new{} struct from a {}constructor{}.":"您不仅限于结构体字面量,因为您还可以传入存储现有结构体的变量,或者从 {2} 构造函数 {3} 创建 {} 新 {} 结构体。", "{}IMPORTANT{} There is a minimum and maximum layer depth of -16000 to 16000. Anything placed on a depth outside that range {}will not be drawn{} although all events will still run as normal.":"{}重要{}最小和最大层深度为-16000到16000。放置在该范围之外的深度上的任何内容都不会被绘制{},尽管所有事件仍将正常运行。", "{}NOTE{} Variables from the struct are \"shallow-copied\" to the new instance, meaning any arrays, structs, and other resources are copied by reference and not duplicated.":"{}注意{}结构中的变量\"浅拷贝\"到新实例,这意味着通过引用复制任何数组、结构和其他资源,而不是复制。", "{}OPTIONAL{} A struct with variables to assign to the new instance":"{}OPTIONAL{}带变量的结构,可分配给新实例", - "{}{}IMPORTANT{}{} There is a minimum and maximum layer depth of {}-16000{} to {}16000{}. Anything placed on a layer outside that range will not be drawn although all events will still run as normal for anything on the layer.":"{}{} 重要提示{}{} 最小和最大层深度为 {}-16000{} 到 {}16000{}。放置在该范围之外的图层上的任何内容都不会被绘制,尽管该图层上任何内容的所有事件仍将正常运行。", + "{}{}IMPORTANT{}{} There is a minimum and maximum layer depth of {}-16000{} to {}16000{}. Anything placed on a layer outside that range will not be drawn although all events will still run as normal for anything on the layer.":"{}{} 重要{}{} 最小和最大层深度为 {}-16000{} 到 {}16000{}。放置在该范围之外的图层上的任何内容都不会被绘制,尽管该图层上任何内容的所有事件仍将正常运行。", + "{}{}NOTE{}{} This function behaves differently when you call it after calling a room-changing function in the same event. See the note on {}{}room_goto{}{} for details.":"{}{} 注意{}{} 当您在同一事件中调用房间更改函数后调用该函数时,该函数的行为会有所不同。有关详细信息,请参阅有关 {}{}room_goto{}{} 的注释。", "{}{}NOTE{}{} Variables from the struct are \"shallow-copied\" to the new instance, meaning any arrays, structs, and other resources are copied by reference and not duplicated.":"{}{} 注意{}{} 结构中的变量被 \" 浅复制 \" 到新实例,这意味着任何数组、结构和其他资源都通过引用复制,而不是重复。", "{}{}OPTIONAL{}{} A struct with variables to assign to the new instance":"{}{} 可选{}{} 一个结构体,其中包含要分配给新实例的变量" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_create_layer.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_create_layer.json index aa5e99480..c111301d7 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_create_layer.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_create_layer.json @@ -21,5 +21,6 @@ "{}IMPORTANT{} There is a minimum and maximum layer depth of -16000 to 16000. Anything placed on a layer outside that range {}will not be drawn{} although all events will still run as normal.":"{}重要{}最小和最大层深度为-16000到16000。放置在该范围之外的图层上的任何内容都不会被绘制{},尽管所有事件仍将正常运行。", "{}NOTE{} Variables from the struct are \"shallow-copied\" to the new instance, meaning any arrays, structs, and other resources are copied by reference and not duplicated.":"{}注意{}结构中的变量\"浅拷贝\"到新实例,这意味着通过引用复制任何数组、结构和其他资源,而不是复制。", "{}OPTIONAL{} A struct with variables to assign to the new instance":"{}OPTIONAL{}带变量的结构,可分配给新实例", - "{}{}IMPORTANT{}{} There is a minimum and maximum layer depth of {}-16000{} to {}16000{}. Anything placed on a layer outside that range will not be drawn although all events will still run as normal for anything on the layer.":"{}{} 重要提示{}{} 最小和最大层深度为 {}-16000{} 到 {}16000{}。放置在该范围之外的图层上的任何内容都不会被绘制,尽管该图层上任何内容的所有事件仍将正常运行。" + "{}{}IMPORTANT{}{} There is a minimum and maximum layer depth of {}-16000{} to {}16000{}. Anything placed on a layer outside that range will not be drawn although all events will still run as normal for anything on the layer.":"{}{} 重要提示{}{} 最小和最大层深度为 {}-16000{} 到 {}16000{}。放置在该范围之外的图层上的任何内容都不会被绘制,尽管该图层上任何内容的所有事件仍将正常运行。", + "{}{}NOTE{}{} This function behaves differently when you call it after calling a room-changing function in the same event. See the note on {}{}room_goto{}{} for details.":"{}{} 注意{}{} 当您在同一事件中调用房间更改函数后调用该函数时,该函数的行为会有所不同。有关详细信息,请参阅有关 {}{}room_goto{}{} 的注释。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_id.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_id.json index 9195febf8..d70bf3f51 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_id.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Instances/instance_id.json @@ -1,7 +1,9 @@ { "As you cannot run {}{}array_length{}{} on this function, use {}{}instance_number{}(all){} to get the number of instances in the room. Any entries outside of this range will return {}noone{} (-4).":"由于您无法在此函数上运行 {}{}array_length{}{},因此请使用 {}{}instance_number{}(all){} 获取房间中的实例数量。任何超出此范围的条目都将返回 {}noone{}(-4)。", + "As you cannot run {}{}array_length{}{} on this function, use {}{}instance_number{}(all){} to get the number of instances in the room. Any entries outside of this range will return {}noone{}.":"由于您无法在此函数上运行 {}{}array_length{}{},因此请使用 {}{}instance_number{}(all){} 获取房间中的实例数量。任何超出此范围的条目都将返回 {}noone{}。", "The above code will loop through all instances within the room and add 0.1 to their speed.":"上面的代码将遍历房间内的所有实例,并将它们的速度增加0.1。", "This {}read only{} {}array{} holds all the {}{}id{}s{} of every {}active {}instance within the room. This means that if you have used any of the {}Instance Deactivate{} functions those instances that have been deactivated will not be included in this array (if you have used a value from this array previously, it will now return the keyword {}noone{}).":"此{}只读{}{}数组{}保存房间内每个{8}活动{9}实例的所有{}{}id{}s{}。这意味着,如果您使用了任何{}实例取消激活{}函数,则那些已取消激活的实例将不会包括在此数组中(如果您以前使用过此数组中的值,则现在将返回关键字{}noone{})。", "This {}read-only variable acts as an{} {}array{} that holds the {}{}id{}s{} of all {}active {}instances within the room. This means that if you have used any of the {}Instance Deactivate{} functions those instances that have been deactivated will not be included in this array.":"此 {} 只读变量充当 {}{} 数组 {},用于保存房间内所有 {8} 活动 {9} 实例的 {}{}id{}{}。 这意味着,如果您使用了任何 {}实例停用{} 函数,那些已停用的实例将不会包含在该数组中。", + "{}{}NOTE{}{} This variable does not hold a real GML array, so you cannot run any {}array functions{} on it or serialise it (convert it to a string). The only operation you can run on it is accessing a value at an index, with the {}{}instance_id{}[index]{} syntax.":"{}{} 注意{}{} 此变量不保存真正的 GML 数组,因此您无法对其运行任何 {} 数组函数 {} 或对其进行序列化 (将其转换为字符串)。您可以对其运行的唯一操作是使用 {}{}instance_id{}[index]{} 语法访问索引处的值。", "{}{}NOTE{}{} This variable does not hold a real GML array, so you cannot run any {}array functions{} on it or serialise it (convert it to a string). The only operation you can run on it is returning a value at an index, with the {}{}instance_id{}[index]{} syntax.":"{}{} 注意{}{} 此变量不保存真正的 GML 数组,因此您无法对其运行任何 {} 数组函数 {} 或对其进行序列化 (将其转换为字符串)。您可以对其运行的唯一操作是使用 {}{}instance_id{}[index]{} 语法返回索引处的值。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Objects/Object_Events/event_perform_async.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Objects/Object_Events/event_perform_async.json index 4c9503ecc..745ad5f70 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Objects/Object_Events/event_perform_async.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Objects/Object_Events/event_perform_async.json @@ -1,5 +1,6 @@ { "Async Event Type Constant":"异步事件类型常量", + "Audio Playback Ended event":"音频播放结束事件", "Audio Playback event":"音频播放事件", "Audio Recording event":"录音事件", "Cloud event":"云事件", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Background_Layers/Background_Layers.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Background_Layers/Background_Layers.json index 2e3612891..52c2e73c7 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Background_Layers/Background_Layers.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Background_Layers/Background_Layers.json @@ -1,5 +1,6 @@ { "Background Layers":"背景图层", "Note that if you want to set the background position or the background horizontal or vertical scrolling speed then you need to use the following general layer functions:":"请注意,如果要设置背景位置或背景水平或垂直滚动速度,则需要使用以下一般层函数:", - "The {}GameMaker{} {}Room Editor{} permits you to add backgrounds into any given room using {}layers{}. As the name implies, a background layer is simply a sprite asset that is being used as a background on a layer at a set depth within the room, and by stacking layers you can make some things draw over or under others. You can also control certain aspects of layers from code, adding or removing things, or changing certain properties of the layer or what it contains at run time. Below is a list of all the functions that can be used for editing {}{}background layers{}{}:":"{}GameMaker{}{}房间编辑器{}允许您使用{}层{}向任何给定房间添加背景。 顾名思义,背景层只是一个精灵资源,在房间内某个设置深度的层上用作背景,通过堆叠层,你可以使一些东西在其他层上或下面画。您还可以从代码、添加或删除对象、或更改层的某些属性或运行时包含的内容中控制层的某些方面。以下是可用于编辑{}{}背景层{}{}的所有函数的列表:" + "The {}GameMaker{} {}Room Editor{} permits you to add backgrounds into any given room using {}layers{}. As the name implies, a background layer is simply a sprite asset that is being used as a background on a layer at a set depth within the room, and by stacking layers you can make some things draw over or under others. You can also control certain aspects of layers from code, adding or removing things, or changing certain properties of the layer or what it contains at run time. Below is a list of all the functions that can be used for editing {}{}background layers{}{}:":"{}GameMaker{}{}房间编辑器{}允许您使用{}层{}向任何给定房间添加背景。 顾名思义,背景层只是一个精灵资源,在房间内某个设置深度的层上用作背景,通过堆叠层,你可以使一些东西在其他层上或下面画。您还可以从代码、添加或删除对象、或更改层的某些属性或运行时包含的内容中控制层的某些方面。以下是可用于编辑{}{}背景层{}{}的所有函数的列表:", + "The {}GameMaker{} {}Room Editor{} permits you to add backgrounds into any given room using {}layers{}. As the name implies, a background layer is simply a sprite asset that is being used as a background on a layer that\u0027s at a set depth within the room, and by stacking layers you can make some things draw over or under others. You can also control certain aspects of layers from code, adding or removing things, or changing certain properties of the layer or what it contains at run time. Below is a list of all the functions that can be used for editing {}{}background layers{}{}:":"{}GameMaker{}{} 房间编辑器 {} 允许您使用 {} 图层 {} 将背景添加到任何给定房间中。顾名思义,背景图层只是一个精灵资源,用作房间内设定深度的图层上的背景,通过堆叠图层,您可以使某些东西绘制在其他东西之上或之下。您还可以通过代码控制图层的某些方面,添加或删除内容,或者更改图层的某些属性或其在运行时包含的内容。以下是可用于编辑 {}{} 背景层 {}{} 的所有函数的列表:" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/General_Layer_Functions.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/General_Layer_Functions.json index c40499c39..1e5a5e1a6 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/General_Layer_Functions.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/General_Layer_Functions.json @@ -1,13 +1,33 @@ { + "Activate/Deactivate Instances on Layers":"激活 / 停用层上的实例", + "Any assets that you add to rooms are placed on a layer. These assets can be tile maps (using tile sets), backgrounds, sprites or sequences, particle systems and instances. You can add and modify a room\u0027s layers in {}The Room Editor{} or at runtime through code.":"您添加到房间的任何资源都放置在图层上。这些资源可以是图块地图 (使用图块集)、背景、精灵或序列、粒子系统和实例。您可以在 {} 房间编辑器 {} 中或在运行时通过代码添加和修改房间的图层。", + "Each asset that you add to a layer is considered an {}element{} of that layer.":"您添加到层的每个资源都被视为该层的一个 {} 元素 {}。", + "Exclusively for use with {}instances{} on layers (although the layer itself can have other elements, they will not be affected by the following functions) you have a couple of functions that can be used to deactivate or reactivate all instances:":"专门用于层上的 {} 实例{}( 虽然层本身可以有其他元素,但它们不会受到以下函数的影响),您有几个函数可用于停用或重新激活所有实例:", "Finally, and this is exclusively for use with {}instances{} on layers (although the layer itself can have other elements, they will not be affected by the following functions), you have a couple of functions that can be used to deactivate or reactivate all instances:":"最后,这是专门用于图层上的{}实例{}(尽管该图层本身可以具有其他元素,但它们不会受到以下函数的影响),但有几个函数可用于取消激活或重新激活所有实例:", + "Function Reference":"功能参考", + "General":"常规", "General Layer Functions":"常规图层函数", + "Layer Elements":"图层元素", + "Layers are useful for a few reasons:":"图层很有用,原因如下:", + "Particle Systems":"粒子系统", + "Targeting Layers in a Different Room":"定位不同房间中的图层", "The {}GameMaker{} {}Room Editor{} permits you to add {}layers{} of different assets to your room. These can be tile maps (using tile sets), backgrounds, sprites or sequences, and instances, but note that unlike the room editor, you are {}not{} limited to a single asset type per layer, and can add multiple asset types to the same layer - for example you can have a background and a tile map all on the same layer. Note that each asset that is added to a layer is considered an {}element{} of that layer.":"{}GameMaker{}{}房间编辑器{}允许您将{}层{}不同资源添加到您的房间。这些可以是图块贴图(使用图块集)、背景、精灵或序列和实例,但请注意,与房间编辑器不同,您{}不限于每个层的单个资源类型,并且可以向同一层添加多个资源类型。例如,您可以在同一层上拥有背景和图块贴图。请注意,添加到层的每个资源都被视为该层的{}元素{}。", "The {}GameMaker{} {}Room Editor{} permits you to add {}layers{} of different assets to your room. These can be tile maps (using tile sets), backgrounds, sprites or sequences, particle systems and instances, but note that unlike the room editor, you are {}not{} limited to a single asset type per layer, and can add multiple asset types to the same layer - for example you can have a background and a tile map all on the same layer.":"{}GameMaker{}{}房间编辑器{}允许您将{}层{}不同资源添加到您的房间。这些可以是图块贴图(使用图块集)、背景、精灵或序列和实例,但请注意,与房间编辑器不同,您{}不限{}于每个层的单个资源类型,并且可以向同一层添加多个资源类型。例如,您可以在同一层上拥有背景和图块贴图。", + "There are no functions to get access to particle systems on a layer, but you can create them on a specific layer using the function: ":"没有函数可以访问图层上的粒子系统,但您可以使用以下函数在特定图层上创建它们:", "This section outlines the general functions used when working with room layers, as well as a few functions specific to working with {}{}instance layer{} {}elements:":"本节概述了在处理房间图层时使用的一般函数,以及一些特定于使用{}{}实例层{}{}元素的函数:", + "To get all elements on a layer you can use the function {}{}layer_get_all_elements{}{}.":"要获取图层上的所有元素,您可以使用函数 {}{}layer_get_all_elements{}{}。", + "To get the underlying asset type of an element, you can use the function {}{}layer_get_element_type{}{}.":"要获取元素的基础资源类型,您可以使用函数 {}{}layer_get_element_type{}{}。", "We also have a couple of extra functions relating to targeting layers in a different room. It may be that you want to change something in a room that is not the current room, or maybe you want to generate rooms procedurally, or any number of things. To enable this we use the following functions:":"我们还有几个与不同房间中的目标层相关的额外函数。您可能想要更改不是当前房间的房间中的某些内容,或者您可能想要按程序生成房间,或者任何数量的内容。为此,我们使用以下函数:", "What you do here is set the target room using the appropriate function and then call the layer functions are normal. These layer functions will now apply {}only{} to the target room and not the current one. When you are finished you\u0027d call the reset function to return the code scope back to the current room again.":"您在这里所做的是使用适当的函数设置目标房间,然后调用层函数是正常的。这些图层函数现在将{}仅{}应用于目标房间,而不应用于当前房间。完成后,您可以调用重置函数将代码范围重新返回到当前房间。", + "When you use {}The Room Editor{} to add assets to a room, a new element is added to that layer every time you drag an asset onto the editor canvas. There are two exceptions to this: in case of tiles the element that\u0027s added is a {}tile map{}, rather than the individual tiles that you place and also, no element is added for {}Paths{}.":"当您使用 {} 房间编辑器 {} 将资产添加到房间时,每次您将资产拖到编辑器画布上时,都会向该层添加一个新元素。有两个例外:对于图块,添加的元素是 {} 图块地图 {},而不是您放置的各个图块,而且不会为 {} 路径 {} 添加任何元素。", + "You can get all layers in the current room using {}{}layer_get_all{}{} or a single layer based on the name you gave it in the Room Editor using {}{}layer_get_id{}{}.":"您可以使用 {}{}layer_get_all{}{} 获取当前房间中的所有图层,也可以使用 {}{}layer_get_id{}{} 根据您在房间编辑器中指定的名称获取单个图层。", + "they affect how these assets on the layer are drawn: {} {}at an offset (x, y) and moving with a certain speed.{} {}at a certain depth, the {}{}layer_depth{}{}.{} {}using custom code ({}{}layer_script_begin{}{} and {}{}layer_script_end{}{}) and shader ({}{}layer_shader{}{}).{} {} ":"它们会影响图层上这些资源的绘制方式:{}{} 以偏移量 (x, y) 并以一定速度移动。{}\n\n{} 在某个深度,{}{}layer_depth{}{}。\n\n{}{} 使用自定义代码 ({}{}layer_script_begin{}{} 和 {}{}layer_script_end{}{}) 和着色器 ({}{}layer_shader{}{})。{}{}", + "they logically group assets.":"他们对资产进行逻辑分组。", "{}General Layer Functions{}":"{}常规图层函数{}", + "{}Layers{}":"{} 层 {}", "{}WARNING!{} While targeting another room, you can use all the regular layer functions {}except{} you cannot create instances using {}{}{}instance_create_layer(){}{}{} or {}{}{}instance_create_depth(){}{}{}, nor will the layer function {}{}{}layer_add_instance(){}{}{} be available.":"{}警告!{} 将另一个房间作为目标时,您可以使用除此{}之外的所有常规图层函数{},不能使用 {}{}{}instance_create_layer(){}{}{} 或 {}{}{}instance_create_depth(){}{}{} 创建实例,也不能使用图层函数 {}{}{}layer_add_instance(){}{}{}。", "{}{}NOTE{}{} Each asset that is added to a layer is considered an {}element{} of that layer.":"{}{}注意{}{} 添加到层的每个资源都被视为该层的{}元素{}。", - "{}{}WARNING{}{} While targeting another room, you can use all the regular layer functions {}except{} you cannot create instances using {}{}{}instance_create_layer(){}{}{} or {}{}{}instance_create_depth(){}{}{}, nor will the layer function {}{}{}layer_add_instance(){}{}{} be available.":"{}{}警告!{}{} 将另一个房间作为目标时,您可以使用除此{}之外的所有常规图层函数{},不能使用 {}{}{}instance_create_layer(){}{}{} 或 {}{}{}instance_create_depth(){}{}{} 创建实例,也不能使用图层函数 {}{}{}layer_add_instance(){}{}{}。" + "{}{}NOTE{}{} Unlike the Room Editor, you are {}not{} limited to only certain asset types per layer, and can add assets of different types to the same layer - for example you can have a background, a tile map and an instance all on the same layer.":"{}{} 注意{}{} 与房间编辑器不同,您 {} 不 {} 限于每层仅某些资产类型,并且可以将不同类型的资产添加到同一层 - 例如,您可以有背景、瓦片地图和实例都在同一层上。", + "{}{}WARNING{}{} While targeting another room, you can use all the regular layer functions {}except{} you cannot create instances using {}{}{}instance_create_layer(){}{}{} or {}{}{}instance_create_depth(){}{}{}, nor will the layer function {}{}{}layer_add_instance(){}{}{} be available.":"{}{}警告!{}{} 将另一个房间作为目标时,您可以使用除此{}之外的所有常规图层函数{},不能使用 {}{}{}instance_create_layer(){}{}{} 或 {}{}{}instance_create_depth(){}{}{} 创建实例,也不能使用图层函数 {}{}{}layer_add_instance(){}{}{}。", + "{}{}WARNING{}{} While targeting another room, you can use all the regular layer functions, {}except{} you cannot create instances using {}{}instance_create_layer{}{} or {}{}instance_create_depth{}{}, nor will the layer function {}{}layer_add_instance{}{} be available.":"{}{} 警告{}{} 当定位另一个房间时,您可以使用所有常规层函数,{} 但 {} 您无法使用 {}{}instance_create_layer{}{} 或 {}{}instance_create_depth{}{} 创建实例 ,层函数 {}{}layer_add_instance{}{} 也不可用。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_create.json index 5c229381a..e9971cba9 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_create.json @@ -3,6 +3,7 @@ "The depth that the layer has to be created at.":"必须创建层的深度。", "The following image shows a schematic of how depth works for layers:":"下图显示了深度如何作用于层的示意图:", "This function is used to create a new layer within the current room. You supply the depth that the new layer is to occupy and the function returns the unique Layer ID value that can then be used to access the layer in further functions. You can also supply an optional \"name\" argument, which will enable you to give the layer a specific name (as a string), and instead of using the layer ID to access the layer, you can use this name string instead, although it should be noted that using name strings will have a greater impact on performance than using just the ID value. If you do not specify the name of the layer, then the created layer will be assigned a name with the format \"{}_layer_XXX{}\", where \"XXX\" is a hex value used to give the layer a unique name.":"此函数用于在当前房间内创建新层。您可以提供新图层要占据的深度,并且该函数返回唯一的图层 ID 值,然后该值可用于在进一步的函数中访问该图层。还可以提供一个可选的\"name\"参数,这将使您能够给层指定一个特定的名称(作为字符串),而不用使用层 ID 来访问层,而是可以使用这个名称字符串,不过应该注意,使用名称字符串对性能的影响比仅使用 ID 值更大。如果未指定层的名称,则将为创建的层分配一个格式为\"{}_layer_XXX{}\"的名称,其中\"XXX\"是十六进制值,用于给层赋予唯一名称。", + "This function is used to create a new layer within the current room. You supply the depth that the new layer is to occupy and the function returns the unique layer ID handle that can then be used to access the layer in further functions. You can also supply an optional \"name\" argument, which will enable you to give the layer a specific name (as a string), and instead of using the layer ID to access the layer, you can use this name string instead, although it should be noted that using name strings will have a greater impact on performance than using just the ID value. If you do not specify the name of the layer, then the created layer will be assigned a name with the format \"{}_layer_XXX{}\", where \"XXX\" is a hex value used to give the layer a unique name.":"该函数用于在当前房间内创建一个新图层。您提供新层要占据的深度,函数返回唯一的层 ID 句柄,然后可以使用该句柄在其他函数中访问该层。您还可以提供一个可选的 \" 名称 \" 参数,这将使您能够为图层指定一个特定名称 (作为字符串),并且您可以使用此名称字符串来代替使用图层 ID 来访问图层,尽管它应该注意的是,使用名称字符串比仅使用 ID 值对性能的影响更大。如果您不指定图层名称,则将为创建的图层分配一个格式为 \"{}_layer_XXX{}\" 的名称,其中 \"XXX\" 是一个十六进制值,用于为图层指定唯一名称。", "When giving a depth value, this will be higher the \"further away\" from the camera the layer is and lower the \"closer\" to the camera the layer is, so if you have three layers with depths -100, 0, 100, the layers will draw in the order 100, 0, -100, so that the \"top\" layer (ie, the closest to the camera view and so drawn over everything else) will be the layer with the -100 depth.":"当给出深度值时,该深度值将越高\"离相机越远\"该层,越低\"离相机越近\"该层,因此,如果您有三个具有深度(100、0、100)的层,这些层将按100、0、- 100的顺序绘制,因此\"顶部\"层(即最接近相机视图的层,因此在其它所有地方绘制)将是具有-100深度的层。", "{}It is worth noting that while you {}can{} assign more than one layer to a single depth, {}there is no way that you can guarantee that layers on the same depth will be drawn in any given order{} and as such it is best to assign only one layer to any given depth. Also note that the minimum and maximum layer depths are -16000 to 16000, and anything outside of those depths {}will not be rendered{}. If you require a depth outside of that range then you will need to use the function {}{}layer_force_draw_depth(){}{}.":"{}值得注意的是,虽然{}可以{}为单个深度指定多个层,{}您无法保证以任何给定顺序绘制同一深度上的层{},因此最好只为任何给定深度指定一层。同时请注意,最小和最大层深度为-16000至16000,超出这些深度{}的任何内容都不会呈现{}。 如果需要超出该范围的深度,则需要使用函数{}{}layer_force_draw_depth(){}{}。", "{}It is worth noting that while you {}can{} assign more than one layer to a single depth, {}there is no way that you can guarantee that layers on the same depth will be drawn in any given order{} and as such it is best to assign only one layer to any given depth. Also note that the minimum and maximum layer depths are {}-16000{} to {}16000{}, and anything outside of those depths {}will not be rendered{}. If you require a depth outside of that range then you will need to use the function {}{}layer_force_draw_depth(){}{}.":"{} 值得注意的是,虽然您 {} 可以 {} 将多个层分配给单个深度,但 {} 您无法保证相同深度上的层将以任何给定顺序绘制 {} 并且因此,最好只为任何给定深度分配一层。另请注意,最小和最大层深度为 {}-16000{} 到 {}16000{},这些深度之外的任何内容都 {} 不会被渲染 {}。如果您需要的深度超出该范围,则需要使用函数 {}{}layer_force_draw_depth(){}{}。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_force_draw_depth.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_force_draw_depth.json index 4cade3ffd..989937e9a 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_force_draw_depth.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_force_draw_depth.json @@ -4,6 +4,7 @@ "The new Z depth":"新Z深度", "This function forces {}all{} layers to be drawn at the specified z depth.":"此函数强制以指定的 z 深度绘制 {} 所有 {} 层。", "This function forces {}all{} layers to be drawn at the specified z depth. This {}does not change the order the layers are rendered in{} and they\u0027ll still be drawn in depth order, it simply changes what z value is used. In general you do not need to worry about this, but if you have layers that have a depth outside of the legal range (-16000 to 16000) then they won\u0027t be rendered, so you can force the Z depth to a reasonable value - 0 for example - and they will all be rendered fine. Note that this is generally only for use with legacy projects from previous version of {}GameMaker{} where you could have draw depths higher or lower than the permitted layer range.":"此函数强制{}所有{}层以指定的 z 深度绘制。这{}不会更改层在{}中渲染的顺序,它们仍将按深度顺序绘制,它只是更改所使用的 z 值。一般来说,您不需要担心这一点,但是如果您的层的深度超出法律范围(-16000 到 16000),那么它们不会被渲染,所以您可以强制 Z 深度为一个合理的值,例如,0,它们都将被渲染良好。请注意,这通常仅用于以前版本的{}GameMaker{}遗留项目,在该版本中,绘制深度可能高于或低于允许的图层范围。", + "This function will take precedence over the depth set with {}{}gpu_set_depth{}{} in any object instances running within the specified layer.":"在指定层中运行的任何对象实例中,此函数将优先于使用 {}{}gpu_set_depth{}{} 设置的深度。", "This {}does not change the order the layers are rendered in{} and they\u0027ll still be drawn in depth order, it simply changes what z value is used. In general you do not need to worry about this, but if you have layers that have a depth outside of the allowed range ({}-16000{} to {}16000{}) then they won\u0027t be rendered, so you can force the Z depth to a reasonable value - 0 for example - and they will all be rendered fine.":"这 {} 不会改变层的渲染顺序 {},并且仍会按深度顺序绘制它们,它只是更改所使用的 z 值。一般来说,您无需担心这一点,但如果您的图层的深度超出了允许的范围 ({}-16000{} 到 {}16000{}),那么它们将不会被渲染,因此您可以强制 Z 深度为合理的值 (例如 0),它们都会被渲染得很好。", "Whether to enable (set to {}true{} or disable (set to {}false{}) Z depth forcing":"是启用(设置为{}true{})还是禁用(设置为{}false{})Z深度强制", "Whether to enable (set to {}true{}) or disable (set to {}false{}) Z depth forcing":"是否启用 (设置为 {}true{}) 或禁用 (设置为 {}false{})Z 深度强制" diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_all_elements.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_all_elements.json index 4a4049be4..0f15a32b8 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_all_elements.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_all_elements.json @@ -1,5 +1,8 @@ { "The above code gets the IDs for all the instance elements assigned to the layer of the instance running the code. The code then checks to see if any of the returned elements are sprite assets and if they then they are destroyed.":"上面的代码获取分配给运行代码的实例层的所有实例元素的ID.然后,代码检查是否有任何返回的元素是精灵资源,如果有,则将其销毁。", + "The above code gets the IDs for all the instance elements assigned to the layer of the instance running the code. The code then checks to see if any of the returned elements are sprite assets. If they are, they\u0027re destroyed.":"上面的代码获取分配给运行代码的实例层的所有实例元素的 ID。然后,代码检查是否有任何返回的元素是精灵资源。如果是的话,他们就会被摧毁。", "The unique ID value of the layer to get the elements from (or the layer name as a string)":"要从中获取元素的层的唯一ID值(或字符串形式的层名)", - "You can use this function to get the {}element IDs{} of the given layer. You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and the function will return an {}array{} of IDs, where each entry in the array is a unique ID for an element on that layer. For example, if the layer is an Asset Layer, the array will be populated with the ID values for each sprite asset that is assigned to the layer. Note that using code to work with layers means that you can assign different element types to the same layer - so you can have sprite assets along with instances, for example - in which case you can then use the function {}{}layer_get_element_type(){}{} to get the type of element the ID relates to.":"可以使用此函数获取给定层的{}元素ID{}。提供层 ID(使用{}{}layer_create(){}{}创建层时获得的 ID)或层名称(作为字符串,这将对性能产生影响),函数将返回 ID 的{}数组{},其中数组中的每个条目是该层上元素的唯一 ID。例如,如果层是资源层,则数组中将填充分配给该层的每个子块资源的ID值。请注意,使用代码处理层意味着可以将不同的元素类型分配给相同的层,因此您可以将精灵资源与实例一起使用,例如,在这种情况下,您可以使用函数{}{}layer_get_element_type(){}{}来获取ID相关的元素类型。" + "You can use this function to get the {}element IDs{} of the given layer. You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and the function will return an {}array{} of IDs, where each entry in the array is a unique ID for an element on that layer. For example, if the layer is an Asset Layer, the array will be populated with the ID values for each sprite asset that is assigned to the layer. Note that using code to work with layers means that you can assign different element types to the same layer - so you can have sprite assets along with instances, for example - in which case you can then use the function {}{}layer_get_element_type(){}{} to get the type of element the ID relates to.":"可以使用此函数获取给定层的{}元素ID{}。提供层 ID(使用{}{}layer_create(){}{}创建层时获得的 ID)或层名称(作为字符串,这将对性能产生影响),函数将返回 ID 的{}数组{},其中数组中的每个条目是该层上元素的唯一 ID。例如,如果层是资源层,则数组中将填充分配给该层的每个子块资源的ID值。请注意,使用代码处理层意味着可以将不同的元素类型分配给相同的层,因此您可以将精灵资源与实例一起使用,例如,在这种情况下,您可以使用函数{}{}layer_get_element_type(){}{}来获取ID相关的元素类型。", + "You can use this function to get the {}element IDs{} of the given layer. You supply the layer ID (which you get when you create the layer using {}{}layer_create{}{}) or the layer name (as a string - this will have a performance impact) and the function will return an {}{}Array{}{} of IDs, where each entry in the array is a unique ID for an element on that layer. For example, if the layer is an Asset Layer, the array will be populated with the ID values of the sprite, sequence and particle system assets that are assigned to the layer.":"您可以使用此函数获取给定层的 {} 元素 ID{}。您提供图层 ID(在使用 {}{}layer_create{}{} 创建图层时获得) 或图层名称 (作为字符串 - 这会对性能产生影响),该函数将返回一个 ID 的{}{} 数组 {}{},其中数组中的每个条目都是该层上元素的唯一 ID。例如,如果图层是资产图层,则数组将填充分配给该图层的精灵、序列和粒子系统资产的 ID 值。", + "{}{}NOTE{}{} Using code to work with layers means that you can assign different element types to the same layer - so you can have sprite assets along with instances, for example - in which case you can then use the function {}{}layer_get_element_type{}{} to get the type of element the ID relates to.":"{}{} 注意{}{} 使用代码来处理图层意味着您可以将不同的元素类型分配给同一图层 - 例如,您可以将精灵资源与实例一起使用 - 在这种情况下您可以使用该函数 {}{}layer_get_element_type{}{} 获取 ID 相关的元素类型。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_depth.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_depth.json index 04fa7028c..9ce952d9f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_depth.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_depth.json @@ -1,7 +1,10 @@ { + "Note that depth is defined as being higher the \"further away\" from the camera and lower the \"closer\" to the camera, so if you have three layers with depths -100, 0, 100, the layers will draw in the order 100, 0, -100, so that the \"top\" layer (i.e., the closest to the camera view and so drawn over everything else) will be the layer with the -100 depth.":"请注意,深度被定义为离相机 \" 越远 \" 则越高,离相机 \" 越近 \" 则越低,因此,如果您有深度为 -100、0、100 的三个图层,则图层将以 100 的顺序绘制, 0、-100,因此 \" 顶部 \" 图层 (即最接近相机视图,因此绘制在其他所有图层之上) 将是深度为 -100 的图层。", "The above code checks the depth of a layer ID stored in a global variable and if it is not -100 it destroys the layer and re-creates it at the depth of -100.":"上面的代码检查存储在全局变量中的层ID的深度,如果它不是-100,则它销毁该层并在深度-100处重新创建它。", "The following image shows a schematic of how depth works for layers:":"下图显示了深度如何作用于层的示意图:", "The unique ID value of the layer to get the depth of (or the layer name as a string)":"要获取深度的图层的唯一ID值(或字符串形式的图层名称)", + "You can use this function to get the {}depth{} value associated with a given layer.":"您可以使用此函数获取与给定层关联的 {} 深度 {} 值。", "You can use this function to get the {}depth{} value associated with a given layer. You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and the function will return that layers depth as a real number. Note that depth is defined as being higher the \"further away\" from the camera and lower the \"closer\" to the camera, so if you have three layers with depths -100, 0, 100, the layers will draw in the order 100, 0, -100, so that the \"top\" layer (ie, the closest to the camera view and so drawn over everything else) will be the layer with the -100 depth.":"可以使用此函数获取与给定层关联的{}深度{}值。提供层 ID(使用{}{}layer_create(){}{}创建层时获得的 ID)或层名称(作为字符串,这将对性能产生影响),并且该函数将以实数返回层深度。请注意,深度被定义为距离相机\"越远\"越高,距离相机越近,因此,如果您有三层,深度为100、0、100,则各层将按100、0、- 100的顺序绘制,因此,\"顶部\"层(即最接近摄像机视图的层,因此在其它所有地方绘制)将是深度为-100的层。", + "You supply the layer ID (which you get when you create the layer using {}{}layer_create{}{}) or the layer name (as a string - this will have a performance impact) and the function will return that layer\u0027s depth as a real number.":"您提供图层 ID(在使用 {}{}layer_create{}{} 创建图层时获得) 或图层名称 (作为字符串 - 这会对性能产生影响),该函数将返回该图层的深度,如下所示一个实数。", "{}Note that if you supply an invalid layer ID value you will get an error.":"{}请注意,如果您提供了一个无效的层ID值,您将得到一个错误。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_element_type.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_element_type.json index 718f4c34b..b9a2c5152 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_element_type.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_element_type.json @@ -1,6 +1,7 @@ { "Layer Element Type Constant":"层元素类型常量", "Note that this function is most useful when you have multiple different element types assigned to the one layer, and that you can get a list of all the elements on any given layer using the function {}{}layer_get_all_elements(){}{}.":"请注意,当有多个不同的元素类型分配给一个层时,此函数非常有用,并且可以使用函数{}{}layer_get_all_elements(){}{}获得任何给定层上所有元素的列表。", + "The above code gets the IDs for all the instance elements assigned to the layer of the instance running the code. The code then checks to see if any of the returned elements are sprite assets and if they are, they\u0027re destroyed.":"上面的代码获取分配给运行代码的实例层的所有实例元素的 ID。然后,代码检查返回的元素是否是精灵资产,如果是,则将其销毁。", "The above code gets the IDs for all the instance elements assigned to the layer of the instance running the code. The code then checks to see if any of the returned elements are sprite assets and if they then they are destroyed.":"上面的代码获取分配给运行代码的实例层的所有实例元素的ID.然后,代码检查是否有任何返回的元素是精灵资源,如果有,则将其销毁。", "The element does not exist or the ID value is erroneous.":"元素不存在或 ID 值错误。", "The element is a background.":"元素是背景。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_id.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_id.json index e3b6a9d84..7fd1a1aff 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_id.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_id.json @@ -1,5 +1,9 @@ { - "The above code will first get the index of the nearest instance to the given x/y position and store it in a local variable. It then gets the unique instance layer ID for the layer named \"Instances Front\", and moves the found instance onto that layer.":"上面的代码将首先获取与给定x/y位置最近的实例的索引,并将其存储在局部变量中。然后,它获取名为\"Instances Front\"的层的唯一实例层ID,并将找到的实例移动到该层上。", + "If you create a new layer through code using the function {}{}layer_create(){}{} then that function will return the unique ID handle instead (dynamical created layers do not get names unless specified).":"如果您使用函数 {}{}layer_create(){}{} 通过代码创建新层,则该函数将返回唯一的 ID 句柄 (动态创建的层不会获取名称,除非指定)。", + "In the IDE, all layers have a name and a type, and to be able to edit or change them through code you must get the {}layer ID{} value. This function is used to retrieve this ID by using the name (a string) of the layer (as written in the IDE).":"在 IDE 中,所有层都有名称和类型,为了能够通过代码编辑或更改它们,您必须获取 {} 层 ID{} 值。此函数用于通过使用层的名称 (字符串 )( 如 IDE 中所写) 来检索此 ID。", + "Note that if you give the name of a layer that does not exist in the current room, the function will return -1.":"请注意,如果您给出当前房间中不存在的图层名称,该函数将返回 -1。", + "The above code will first get the index of the nearest instance to the given x/y position and store it in a local variable. It then gets the unique instance layer ID for the layer named \"Instances Front\", and moves the found instance onto that layer.":"上面的代码将首先获取距离给定 x/y 位置最近的实例的索引,并将其存储在局部变量中。然后,它获取名为 \"Instances Front\" 的层的唯一实例层 ID,并将找到的实例移动到该层上。", "The name of the layer (a string)":"层的名称(字符串)", + "This function can be used to get the unique ID handle for a given {}layer{}.":"此函数可用于获取给定 {} 层{} 的唯一 ID 句柄。", "This function can be used to get the unique ID value for a given {}layer{}. In the IDE, all layers have a name and a type, and to be able to edit or change them through code you must give the {}layer ID{} value. This function is used to retrieve this ID by using the name (a string) of the layer (as written in the IDE). If you create a new layer through code using the function {}{}layer_create(){}{} then that function will return the unique ID value instead (dynamical created layers do not get names). Note that if you give the name of a layer that does not exist in the current room, then you will get an error and the project will crash.":"此函数可用于获取给定{}层{}的唯一ID值。 在 IDE 中,所有层都有名称和类型,要能够通过代码对其进行编辑或更改,必须给出{}层ID{}值。此函数用于使用层的名称(字符串)(如 IDE 中写入的)检索此 ID。如果使用函数{}{}layer_create(){}{}通过代码创建新层,则该函数将返回唯一的ID值(动态创建的层不会获得名称)。请注意,如果给出当前房间中不存在的层的名称,则会出错,项目将崩溃。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_name.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_name.json index cf12370b0..b89c7839a 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_name.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/General_Layer_Functions/layer_get_name.json @@ -1,5 +1,8 @@ { "The above code gets the IDs for all the layers in the room and then loops though them checking to see if any are named layers. If they are they are then their ID is added to a list.":"上面的代码获取房间中所有层的ID,然后循环检查是否有任何命名的层。如果是,则将其ID添加到列表中。", + "The above code gets the IDs of all the layers in the room and then loops through them to see if they\u0027re named layers. If they are they are then their ID is added to a list.":"上面的代码获取房间中所有图层的 ID,然后循环查看它们是否为命名图层。如果是,那么他们的 ID 将被添加到列表中。", "The unique ID value of the layer to get the name of":"要获取其名称的层的唯一ID值", - "You can use this function to get the {}name{} of the given layer. You supply the unique layer ID value and if the layer is one of the named layers created in the room editor, then the function will return a string with the layer name. If the layer is not one of the room editor ones (ie: it was created using {}{}layer_create(){}{}) then an empty string will be returned.":"可以使用此函数获取给定层的{}名称{}。提供唯一的图层 ID 值,如果图层是在房间编辑器中创建的命名图层之一,则函数将返回具有图层名称的字符串。如果层不是房间编辑器的层(即:使用{}{}layer_create(){}{}创建),则将返回空字符串。" + "This function gets the name of the given layer.":"该函数获取给定图层的名称。", + "You can use this function to get the {}name{} of the given layer. You supply the unique layer ID value and if the layer is one of the named layers created in the room editor, then the function will return a string with the layer name. If the layer is not one of the room editor ones (ie: it was created using {}{}layer_create(){}{}) then an empty string will be returned.":"可以使用此函数获取给定层的{}名称{}。提供唯一的图层 ID 值,如果图层是在房间编辑器中创建的命名图层之一,则函数将返回具有图层名称的字符串。如果层不是房间编辑器的层(即:使用{}{}layer_create(){}{}创建),则将返回空字符串。", + "You supply the unique layer ID value and if the layer is one of the named layers created in {}The Room Editor{}, then the function will return a string with the layer name. If the layer is not one of the Room Editor ones (i.e.: it was created using {}{}layer_create{}{}) then an empty string {}\"\"{} will be returned.":"您提供唯一的图层 ID 值,如果该图层是在 {} 房间编辑器 {} 中创建的命名图层之一,则该函数将返回包含图层名称的字符串。如果该图层不是房间编辑器图层之一 (即:它是使用 {}{}layer_create{}{} 创建的),则将返回空字符串 {}\"\"{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Rooms.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Rooms.json index 0223ee444..adac19eaa 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Rooms.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Rooms.json @@ -1,27 +1,38 @@ { "An important thing to note when creating room layers is that {}you can have multiple different element types on one layer{}. So, for example, you may have a layer for enemies, and on that layer have the enemy instances as well as certain sprite assets that are only related to that enemy. Or you could have a background element with a tile map element to create the look of a room. This is not permitted in the room editor, but when creating things dynamically you can do this, which is why functions like {}{}layer_get_all_elements(){}{} exist.":"创建房间图层时需要注意的是,{}在一个层上可以有多个不同的元素类型{}。 所以,例如,你可能有一个敌人的层,在这个层上有敌人实例以及某些与敌人有关的精灵资源。或者,您可以使用带有图块地图元素的背景元素来创建房间的外观。这在房间编辑器中是不允许的,但在动态创建对象时,可以执行此操作,这就是为什么存在类似{}{}layer_get_all_elements(){}{}的函数的原因。", + "Any {}GameMaker{} game must have at least one room in it for it to run, but you may need many more depending on the type of game and how you structure your project. By default, a new {}GameMaker{} project has a single room added to it.":"任何 {}GameMaker{} 游戏都必须至少有一个房间才能运行,但您可能需要更多房间,具体取决于游戏类型以及您构建项目的方式。默认情况下,新的 {}GameMaker{} 项目会添加一个房间。", + "Background Elements":"背景元素", "Background Layers":"背景图层", "Filter and Effect Functions":"滤镜和效果函数", + "Filters and Effects":"滤镜和效果", "Function Reference":"功能参考", "General Layer Functions":"常规图层函数", "Global":"全局", "Information":"信息", + "Layers":"层", + "Layers and Elements":"图层和元素", "Modifying Rooms":"修改房间", "Next, we have a series of functions that can be used to change rooms and their contents or even create new rooms and add to them. It should be noted that these functions should {}never be run from within the room that you wish to change{}, but rather be run from an instance in another room first. Also note that if you change any room asset in this way, the change is {}permanent{} and will be maintained for the entire duration of the game, even if you call the room_restart() function (closing and restarting the game will reset the room properties though).":"接下来,我们有一系列函数可以用来更改房间及其内容,甚至可以创建新房间并添加到其中。应该注意的是,这些函数{}不应在你想要更改的房间内运行{},而应先从另一个房间的实例中运行。另请注意,如果你以这种方式更改任何房间资源,则更改将是{}永久的{},即使你调用了 room_restart() 函数(但关闭和重启游戏会重置房间属性),更改将在游戏的整个持续时间内保持不变。", + "Particle System Elements: {}part_system_create_layer{}":"粒子系统元素:{}part_system_create_layer{}", "Room Layers & Elements":"房间层数和元素", "Rooms":"房间", "Rooms are created in the {}Room Editor{} in {}GameMaker{}{} and {}are where everything happens in your game. You must have at least one room in any game for it to run, but you may need many more depending on the type of game and how you structure your project. This section has all the general GML functions and variables related to rooms and for getting information about them as well as for setting certain properties within them.":"房间是在{}GameMaker{}{}中的{}房间编辑器{}中创建的,{}是游戏中发生一切的地方。你必须在任何游戏中至少有一个房间来运行它,但你可能需要更多,这取决于游戏的类型和你如何构建你的项目。本节包含与房间相关的所有通用GML函数和变量,用于获取有关房间的信息以及设置房间中的某些属性。", "Rooms are created in {}The Room Editor{} in {}GameMaker{}{} and {}are where everything happens in your game. You must have at least one room in any game for it to run, but you may need many more depending on the type of game and how you structure your project. This section has all the general GML functions and variables related to rooms and for getting information about them as well as for setting certain properties within them.":"房间是在 {}GameMaker{}{} 的 {0} 房间编辑器 {1} 中创建的,并且是游戏中所有事情发生的地方。在任何游戏中,您都必须至少拥有一个房间才能运行,但您可能需要更多房间,具体取决于游戏类型以及您构建项目的方式。本节包含与房间相关的所有通用 GML 函数和变量,用于获取有关房间的信息以及设置其中的某些属性。", + "Rooms{} {}are where everything happens in your game. You create them in the {}IDE{} using {}The Room Editor{} or at runtime using the functions under {}Modifying Rooms{}.":"房间 {}{} 是游戏中一切发生的地方。您可以在 {}IDE{} 中使用 {} 房间编辑器 {} 创建它们,或者在运行时使用 {} 修改房间 {} 下的函数创建它们。", + "Sequence Elements":"序列元素", "Sequence Layers":"序列图层", + "Sprite Elements":"精灵元素", "Sprite Layers":"精灵图层", "Switching Rooms":"切换房间", "The following {}global variables{} and functions can be used for getting basic information about any given room:":"以下{}全局变量{}和函数可用于获取有关任何给定房间的基本信息:", "There are also a number of different functions related to creating and manipulating the different types of elements that can be placed on layers in the room. These functions are listed in the appropriate sections for each element type listed below:":"还有许多与创建和操作不同类型的元素相关的不同函数,这些元素可以放置在房间中的层上。这些函数在下面列出的每个元素类型的相应部分中列出:", + "This section has all the general GML functions and variables related to rooms, for getting information about them as well as for setting certain properties within them.":"本节包含与房间相关的所有通用 GML 函数和变量,用于获取有关房间的信息以及设置其中的某些属性。", + "Tile Map Elements":"平铺地图元素", "Tile Map Layers":"图块集层", "You can also use the following functions to find out if a room exists, get its name (as defined in {}The Asset Browser{}) and general info: ":"您还可以使用以下函数来查明房间是否存在、获取其名称 (如 {} 资产浏览器 {} 中所定义) 和一般信息:", "You can also use the following functions to get the name of the current room (as defined in the {}Asset Browser{}) as well as move between rooms:":"您还可以使用以下函数来获取当前房间的名称(如{}资源浏览器{}中所定义)以及在房间之间移动:", "{}NOTE{} The variables listed above will not be valid in a script, as scripts are executed before the first room is loaded.{} {} This only applies to code written at the root of a script, but not to functions created inside scripts, as those functions can be executed at any time during the game. ":"{}注意{}上面列出的变量在脚本中无效,因为脚本在加载第一个房间之前执行。{}{}这仅适用于在脚本根处编写的代码,但不适用于在脚本中创建的函数,因为这些函数可以在游戏中的任何时间执行。", - "{}{}IMPORTANT{}{} When creating room layers {}you can have multiple different element types on one layer{}. So, for example, you may have a layer for enemies, and on that layer have the enemy instances as well as certain sprite assets that are only related to that enemy. Or you could have a background element with a tile map element to create the look of a room. This is not permitted in {}The Room Editor{}, but when creating things dynamically you can do this, which is why functions like {}{}layer_get_all_elements{}{} exist.":"{}{} 重要提示{}{} 创建房间层时 {} 您可以在一个层上拥有多种不同的元素类型 {}。因此,例如,您可能有一个敌人层,并且该层上有敌人实例以及仅与该敌人相关的某些精灵资产。或者,您可以使用带有图块地图元素的背景元素来创建房间的外观。这在 {} 房间编辑器 {} 中是不允许的,但在动态创建内容时您可以这样做,这就是存在 {}{}layer_get_all_elements{}{} 等函数的原因。", + "{}{}IMPORTANT{}{} When creating room layers {}you can have multiple different element types on one layer{}. So, for example, you may have a layer for enemies, and on that layer have the enemy instances as well as certain sprite assets that are only related to that enemy. Or you could have a background element with a tile map element to create the look of a room. This is not permitted in {}The Room Editor{}, but when creating things dynamically you can do this, which is why functions like {}{}layer_get_all_elements{}{} exist.":"{}{} 重要{}{} 创建房间层时 {} 您可以在一层上拥有多种不同的元素类型 {}。因此,例如,您可能有一个敌人层,并且该层上有敌人实例以及仅与该敌人相关的某些精灵资产。或者,您可以使用带有图块地图元素的背景元素来创建房间的外观。这在 {} 房间编辑器 {} 中是不允许的,但在动态创建内容时您可以这样做,这就是存在 {}{}layer_get_all_elements{}{} 等函数的原因。", "{}{}NOTE{}{} If you change any room asset in this way, the change is {}permanent{} and will be maintained for the entire duration of the game, even if you call the {}{}room_restart{}{} function (closing and restarting the game will reset the room properties though).":"{}{} 注意{}{} 如果您以这种方式更改任何房间资产,则该更改是 {} 永久 {} 的,并且将在整个游戏期间保持不变,即使您调用 {}{}room_restart{}{} 函数 (关闭并重新启动游戏将重置房间属性)。", "{}{}NOTE{}{} The variables listed above will not be valid in a script, as scripts are executed before the first room is loaded.{} {} This only applies to code written at the root of a script, but not to functions created inside scripts, as those functions can be executed at any time during the game. ":"{}{} 注意{}{} 上面列出的变量在脚本中无效,因为脚本是在加载第一个房间之前执行的。{}{} 这仅适用于在脚本根部编写的代码,但不要在脚本内创建的函数,因为这些函数可以在游戏过程中随时执行。", "{}{}NOTE{}{} These functions should {}never be run from within the room that you wish to change{}, but rather be run from an instance in another room first.":"{}{} 注意{}{} 这些函数 {} 不应从您希望更改的房间内运行 {},而应首\u200B\u200B先从另一个房间中的实例运行。" diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_angle.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_angle.json index 8e48a1bad..23ea87e62 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_angle.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_angle.json @@ -3,5 +3,7 @@ "The above code checks the value held in the {}current_angle{} variable, and if it is less than 90 then it adds to it then uses the value to set the angle of the sequence element referenced in the variable {}my_seq{}.":"上面的代码检查{}current_angle{}变量中保存的值,如果它小于90,则它加到它上,然后使用该值来设置变量{}my_seq{}中引用的序列元素的角度。", "The new angle to rotate the sequence element to":"将序列元素旋转的新角度", "The unique ID value of the sequence element to target":"序列元素到目标的唯一ID值", - "With this function you can set the angle of rotation for the given sequence element. You supply the sequence element ID as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} along with the new angle to set and the sequence will be rotated about its origin to the new position. Angles in GameMaker are calculated with 0º to the right, and go anti-clockwise - so 90º is up, 180º is left and 270º is down - and the default angle for a sequence would be 0º.":"使用此函数,可以设置给定序列元素的旋转角度。提供由{}{}layer_sequence_create(){}{}或{}层元素函数{}之一返回的序列元素 ID 以及要设置的新角度,序列将围绕其原点旋转到新位置。GameMaker 中的角度以 0o 向右计算,逆时针移动,90o 向上,180o 向左,270o 向下,一个序列的默认角度为 0o。" + "With this function you can set the angle of rotation for the given sequence element. You supply the sequence element ID as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} along with the new angle to set and the sequence will be rotated about its origin to the new position. Angles in GameMaker are calculated with 0º to the right, and go anti-clockwise - so 90º is up, 180º is left and 270º is down - and the default angle for a sequence would be 0º.":"使用此函数,可以设置给定序列元素的旋转角度。提供由{}{}layer_sequence_create(){}{}或{}层元素函数{}之一返回的序列元素 ID 以及要设置的新角度,序列将围绕其原点旋转到新位置。GameMaker 中的角度以 0o 向右计算,逆时针移动,90o 向上,180o 向左,270o 向下,一个序列的默认角度为 0o。", + "With this function you can set the angle of rotation for the given sequence element. You supply the sequence element ID as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} along with the new angle to set and the sequence will be rotated about its origin to the new position. Angles in {}GameMaker{} are calculated with 0º to the right, and go anti-clockwise - so 90º is up, 180º is left and 270º is down - and the default angle for a sequence would be 0º.":"使用此功能,您可以设置给定序列元素的旋转角度。您提供由 {}{}layer_sequence_create(){}{} 或某个 {} 层元素函数 {} 返回的序列元素 ID 以及要设置的新角度,序列将围绕其原点旋转到新的位置。{}GameMaker{} 中的角度按向右 0° 和逆时针方向计算 - 因此 90° 为上、180° 为左、270° 为下 - 并且序列的默认角度为 0°。", + "{}{}{}IMPORTANT{}{} {}If your sequence has any instances in it, these instances shouldn\u0027t change their {}{}image_xscale{}{}  / {}{}image_yscale{}{} / {}{}image_angle{}{} / {}{}x{}{} / {}{}y{}{} variables as they will be overwritten when the sequence updates each step after starting to be played. You can check {}{}in_sequence{}{} and only update the properties of such an instance when this variable is {}false{}.":"{}{}{} 重要{}{}\n{} 如果您的序列中有任何实例,这些实例不应更改其 {}{}image_xscale{}{}/{}{}image_yscale{}{}/{}{}image_angle{}{}/{}{}x{}{}/{}{}y{}{} 变量,因为当序列开始播放后更新每个步骤时,它们将被覆盖。 \n\n您可以检查 {}{}in_sequence{}{},并且仅当该变量为 {}false{} 时才更新此类实例的属性。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_exists.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_exists.json index 61c06f4de..079449409 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_exists.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_exists.json @@ -2,5 +2,6 @@ "The above code checks to see if the given sequence element exists, and if it does not then it creates a new sequence on the given layer then pauses it.":"上面的代码检查给定序列元素是否存在,如果不存在,则它在给定层上创建一个新序列,然后暂停它。", "The unique ID or name of the layer to check":"要检查的层的唯一ID或名称", "The unique ID value of the sequence element to target":"序列元素到目标的唯一ID值", + "With this function you can check to see if a sequence element exists on the given layer. You supply the layer ID which can be a string of the layer name - as defined in the Room Editor - or the unique layer ID - as returned by the function {}{}layer_get_id(){}{}, as well the sequence element ID - as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} - and it will return {}true{} if the given element exists or {}false{} otherwise.":"使用此函数,您可以检查给定图层上是否存在序列元素。您提供的图层 ID 可以是图层名称的字符串 (在房间编辑器中定义),也可以是唯一的图层 ID(由函数 {}{}layer_get_id(){}{} 返回) 以及序列元素 ID - 由 {}{}layer_sequence_create(){}{} 或 {} 层元素函数 {} 之一返回 - 如果给定元素存在,它将返回 {}true{},否则返回 {}false{}。", "With this function you can check to see if a sequence element exists on the given layer. You supply the layer ID which can be a string of the layer name - as defined in the room editor - or the unique layer ID - as returned by the function {}{}layer_get_id(){}{}, as well the sequence element ID - as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} - and it will return {}true{} if the given element exists or {}false{} otherwise.":"使用此函数,可以检查给定图层上是否存在序列元素。您提供的图层ID可以是在房间编辑器中定义的图层名称的字符串,也可以是由函数{}{}layer_get_id(){}{}返回的唯一图层ID,以及由{}{}layer_sequence_create(){}{}或其中一个{}图层元素函数{}返回的序列元素Id-,如果给定元素存在,则返回{}true{},否则返回{}false{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_get_instance.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_get_instance.json index 7499ef2db..edda3dad0 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_get_instance.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_get_instance.json @@ -1,5 +1,6 @@ { "The above code creates a new sequence element and then retrieves its sequence instance ID. This is then used to change the playback speed scale property of the sequence instance.":"上面的代码创建一个新的序列元素,然后检索其序列实例ID。然后用于更改序列实例的回放速度比例属性。", "The unique ID value of the sequence element to target":"序列元素到目标的唯一ID值", + "With this function you supply the sequence element ID - as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} - and it will return the sequence {}instance{} {}struct{}. You can find out more about the format of the sequence instance struct on {}The Sequence Instance Struct{} page.":"通过此函数,您可以提供序列元素 ID(由 {}{}layer_sequence_create(){}{} 或 {} 层元素函数 {} 之一返回),它将返回序列 {} 实例 {}{} 结构 {}。您可以在 {} 序列实例结构 {} 页面上找到有关序列实例结构格式的更多信息。", "With this function you supply the sequence element ID - as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} - and it will return the sequence {}instance{} {}struct{}. You can find out more about the format of the sequence instance struct on {}this page{}.":"使用此函数,您可以提供由{}{}layer_sequence_create(){}{}或{}层元素函数{}之一返回的序列元素ID,它将返回序列{}实例{}{}结构{}。 您可以在{}此页{}上找到有关序列实例结构格式的更多信息。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_get_sequence.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_get_sequence.json index 008c2214c..0bc93256c 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_get_sequence.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_get_sequence.json @@ -1,5 +1,6 @@ { "The above code creates a new sequence element and then retrieves its sequence data struct. This is then used to change the playback speed and type of the sequence.":"上面的代码创建新的序列元素,然后检索其序列数据结构。然后用于更改播放速度和序列类型。", "The unique ID value of the sequence element to target":"序列元素到目标的唯一ID值", + "With this function you supply the sequence element ID - as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} - and it will return the sequence object {}struct{}. This function bypasses the need to first get the sequence instance struct and permits you to access the sequence data directly. You can find out more about the format of the sequence object struct on {}The Sequence Object Struct{} page.":"使用此函数,您可以提供序列元素 ID(由 {}{}layer_sequence_create(){}{} 或 {} 层元素函数 {} 之一返回),它将返回序列对象 {}struct{}。此函数无需首先获取序列实例结构,并允许您直接访问序列数据。您可以在 {} 序列对象结构 {} 页面上找到有关序列对象结构格式的更多信息。", "With this function you supply the sequence element ID - as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} - and it will return the sequence object {}struct{}. This function bypasses the need to first get the sequence instance struct and permits you to access the sequence data directly. You can find out more about the format of the sequence object struct on {}this page{}.":"使用此函数,您可以提供由{}{}layer_sequence_create(){}{}或{}层元素函数{}之一返回的序列元素ID,它将返回序列对象{}结构{}。 此函数无需首先获取序列实例结构,并允许您直接访问序列数据。您可以在{}本页{}上找到有关序列对象结构格式的更多信息。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_is_finished.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_is_finished.json index de59996af..bcaf68eca 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_is_finished.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_is_finished.json @@ -2,5 +2,5 @@ "The above code checks if the sequence element ID stored in the variable \"title_sequence\" is finished, and if it is it starts it playing again and sets an alarm.":"上述代码检查存储在变量\"title_sequence\"中的序列元素ID是否完成,如果是,则开始重新播放并设置报警。", "The unique ID value of the sequence element to target":"序列元素到目标的唯一ID值", "With this function you supply the sequence element ID - as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} - and it will check if the sequence is finished playing or not, returning {}true{} if it is, and {}false{} if it is not. Note that this is only applicable when the sequence is {}not{} set to loop or ping-pong in the playback mode.":"使用此函数,您可以提供由{}{}layer_sequence_create(){}{}或{}层元素函数{}之一返回的序列元素ID,它将检查序列是否完成播放,如果是,则返回{}true{};如果未完成,则返回{}false{}。注意,这仅适用于在回放模式下序列{}未{}设置为循环或乒乓的情况。", - "With this function you supply the sequence element ID - as returned by {}{}layer_sequence_create{}{} or by one of the {}layer element functions{} - and it will check if the sequence is finished playing or not, returning {}true{} if it is, and {}false{} if it is not. Note that this is only applicable when the sequence is {}not{} set to loop or ping-pong in the playback mode.":"使用此函数,您可以提供序列元素 ID(由 {}{}layer_sequence_create{}{} 或 {} 层元素函数 {} 之一返回),它将检查序列是否已完成播放,并返回 如果是,则为 {}true{}; 如果不是,则为 {}false{}。请注意,这仅当序列在播放模式下 {} 未 {} 设置为循环或乒乓时适用。" + "With this function you supply the sequence element ID - as returned by {}{}layer_sequence_create{}{} or by one of the {}layer element functions{} - and it will check if the sequence is finished playing or not, returning {}true{} if it is, and {}false{} if it is not. Note that this is only applicable when the sequence is {}not{} set to loop or ping-pong in the playback mode.":"使用此函数,您可以提供序列元素 ID(由 {}{}layer_sequence_create{}{} 或 {} 层元素函数 {} 之一返回),它将检查序列是否已完成播放,返回如果是,则为 {}true{}; 如果不是,则为 {}false{}。请注意,这仅适用于序列在播放模式下 {} 未 {} 设置为循环或乒乓时。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_play.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_play.json index 44808a8a7..8dc74e935 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_play.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_play.json @@ -3,6 +3,7 @@ "The unique ID value of the sequence element to target":"序列元素到目标的唯一ID值", "With this function you can start the playback of the given sequence. You supply the sequence element ID as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} and the function will play the sequence, which you can then pause if required using the function {}{}layer_sequence_pause(){}{}.":"通过此函数,您可以开始播放给定序列。{}layer_sequence_create(){}{}或{}层元素函数{}之一返回的序列元素 ID 提供,函数将播放序列,如果需要,可使用函数{}{}layer_sequence_pause(){}{}暂停序列。", "With this function you can start the playback of the given sequence. You supply the sequence element ID as returned by {}{}layer_sequence_create{}{} or by one of the {}layer element functions{} and the function will play the sequence, which you can then pause if required using the function {}{}layer_sequence_pause{}{}.":"使用此功能,您可以开始播放给定的序列。您提供由 {}{}layer_sequence_create{}{} 或 {} 层元素函数 {} 之一返回的序列元素 ID,该函数将播放该序列,然后您可以根据需要使用函数 {}{}layer_sequence_pause{}{} 暂停该序列。", + "With this function you can start the playback of the given sequence. You supply the sequence element ID as returned by {}{}layer_sequence_create{}{} or by one of the {}layer element functions{} and the function will play the sequence, which you can then pause if required using the function {}{}layer_sequence_pause{}{}.{}{}":"使用此功能,您可以开始播放给定的序列。 \n您提供由 {}{}layer_sequence_create{}{} 返回的序列元素 ID \n\n或者通过 {} 层元素函数 {} 之一,该函数将播放该序列, \n如果需要,您可以使用函数 {}{}layer_sequence_pause{}{} 暂停。{}{}", "{}IMPORTANT!{} If your sequence has any instances in it, these instances shouldn\u0027t change their {}{}image_xscale{}{}  / {}{}image_yscale{}{} / {}{}image_angle{}{} / {}{}x{}{} / {}{}y{}{} variables as they will be overwritten when the sequence updates each step after starting to be played.":"{}重要!{}如果序列中有任何实例,则这些实例不应更改其{}{}image_xscale{}{}/{}{}image_yscale{}{}/{}{}image_angle{}{}/{}{}x{}{}/{}{}y{}{}变量,因为在开始播放序列后每次更新步骤时都会覆盖这些变量。", "{}{}{}IMPORTANT{}{} {}If your sequence has any instances in it, these instances shouldn\u0027t change their {}{}image_xscale{}{}  / {}{}image_yscale{}{} / {}{}image_angle{}{} / {}{}x{}{} / {}{}y{}{} variables as they will be overwritten when the sequence updates each step after starting to be played. You can check {}{}in_sequence{}{} and only update the properties of such an instance when this variable is {}false{}.":"{}{}{} 重要提示{}{}{} 如果您的序列中有任何实例,这些实例不应更改其 {}{}image_xscale{}{}/{}{}image_yscale{}{}/{}{}image_angle{}{}/{}{}x{}{}/{}{}y{}{} 变量,因为当序列开始播放后更新每个步骤时,它们将被覆盖。您可以检查 {}{}in_sequence{}{},并且仅当该变量为 {}false{} 时才更新此类实例的属性。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_xscale.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_xscale.json index fceecbdcb..5aa1d7c85 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_xscale.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_xscale.json @@ -1,8 +1,10 @@ { "Also note that you shouldn\u0027t change the {}image_xscale{} \\ {}image_yscale{} \\ {}image_angle{} \\ {}x{} \\ {}y{} variables for any instances in a sequence that uses this function as they will be overwritten as soon as the sequence updates after calling the function.":"另请注意,您不应更改使用此函数序列中任何实例的{}image_xscale{}\\{}image_yscale{}\\{}image_angle{}\\{}x{}\\{}y{}变量,因为调用该函数后,一旦序列更新,这些变量将被覆盖。", + "It is very important to note that applying {}uneven{} scaling (e.g.: scaling the X axis by 3 and the Y axis by 2) to sequence elements that contain any instance which uses {}rotation{}, {}may cause issues with the instance drawing, collisions, culling, and many other things{}. Basically, if your sequence relies on {}any{} instance properties then we do not recommend that you combine uneven scaling along with instance rotation.":"请务必注意,对包含任何使用 {} 旋转 {} 的实例的序列元素应用 {} 不均匀 {} 缩放 (例如:将 X 轴缩放 3 倍、将 Y 轴缩放 2 倍) 可能会导致问题包括实例绘制、碰撞、剔除和许多其他操作 {}。基本上,如果您的序列依赖于 {} 任何 {} 实例属性,那么我们不建议您将不均匀缩放与实例旋转结合起来。", "It is very important to note that applying {}uneven{} scaling (eg: scaling the X axis by 3 and the Y axis by 2) to sequence elements that contain any instance which uses {}rotation{}, {}may cause issues with the instance drawing, collisions, culling, and many other things{}. Basically, if your sequence relies on {}any{} instance properties then we do not recommend that you combine uneven scaling along with instance rotation.":"请务必注意,对于包含使用{}旋转{}、{}的任何实例的序列元素,应用{}不均匀{}缩放(例如:X轴缩放3,Y轴缩放2)可能会导致实例绘制、碰撞、剔除以及许多其他问题{}。基本上,如果序列依赖于{}任何{}实例属性,则不建议将不均匀缩放与实例旋转结合使用。", "The above code checks the value held in the {}seq_scale{} variable, and if it is less than 2 then it adds to it then uses the value to set the X and Y scale of the sequence element referenced in the variable {}my_seq{}.":"上面的代码检查{}seq_scale{}变量中保存的值,如果它小于2,则它加到它上,然后使用该值来设置变量{}my_seq{}中引用的序列元素的X和Y比例。", "The new X axis scale value to apply to the sequence element":"应用于序列元素的新X轴比例值", "The unique ID value of the sequence element to target":"序列元素到目标的唯一ID值", - "With this function you can set the X scale for the given sequence element. You supply the sequence element ID as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} along with the new scale to set on the X axis and the sequence will be scaled by this amount. A scale of 1 indicates no scaling (1:1), smaller values will scale down (0.5, for example, will half the width of the sequence), larger values will scale up and negative values will mirror the sequence about its origin {}and{} scale it unless the value used is exactly -1 (in which case the sequence is just mirrored about its origin with no scaling).":"使用此函数,可以设置给定序列元素的 X 比例。提供由{}{}layer_sequence_create(){}{}或由其中一个{}层元素函数{}返回的序列元素 ID,以及要在 X 轴上设置的新比例,序列将按此量缩放。1表示没有缩放(1:1),较小的值将缩小(例如,0.5表示序列宽度的一半),较大的值将按比例放大,负值将反映关于其原点的序列{},{}缩放序列,除非使用的值恰好是-1(在这种情况下,序列只是围绕其原点镜像,没有缩放)。" + "With this function you can set the X scale for the given sequence element. You supply the sequence element ID as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} along with the new scale to set on the X axis and the sequence will be scaled by this amount. A scale of 1 indicates no scaling (1:1), smaller values will scale down (0.5, for example, will half the width of the sequence), larger values will scale up and negative values will mirror the sequence about its origin {}and{} scale it unless the value used is exactly -1 (in which case the sequence is just mirrored about its origin with no scaling).":"使用此函数,可以设置给定序列元素的 X 比例。提供由{}{}layer_sequence_create(){}{}或由其中一个{}层元素函数{}返回的序列元素 ID,以及要在 X 轴上设置的新比例,序列将按此量缩放。1表示没有缩放(1:1),较小的值将缩小(例如,0.5表示序列宽度的一半),较大的值将按比例放大,负值将反映关于其原点的序列{},{}缩放序列,除非使用的值恰好是-1(在这种情况下,序列只是围绕其原点镜像,没有缩放)。", + "{}{}{}IMPORTANT{}{} {}If your sequence has any instances in it, these instances shouldn\u0027t change their {}{}image_xscale{}{}  / {}{}image_yscale{}{} / {}{}image_angle{}{} / {}{}x{}{} / {}{}y{}{} variables as they will be overwritten when the sequence updates each step after starting to be played. You can check {}{}in_sequence{}{} and only update the properties of such an instance when this variable is {}false{}.":"{}{}{} 重要{}{}\n\n{} 如果您的序列中有任何实例, \n这些实例不应更改其 {}{}image_xscale{}{}/{}{}image_yscale{}{}/{}{}image_angle{}{}/{}{}x{}{}/{}{}y{}{} 变量,因为当序列开始播放后更新每个步骤时,它们将被覆盖。 \n\n您可以检查 {}{}in_sequence{}{},并且仅当该变量为 {}false{} 时才更新此类实例的属性。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_yscale.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_yscale.json index 6932b6547..b93d0edd3 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_yscale.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sequence_Layers/layer_sequence_yscale.json @@ -4,5 +4,6 @@ "The above code checks the value held in the {}seq_scale{} variable, and if it is less than 2 then it adds to it then uses the value to set the X and Y scale of the sequence element referenced in the variable {}my_seq{}.":"上面的代码检查{}seq_scale{}变量中保存的值,如果它小于2,则它加到它上,然后使用该值来设置变量{}my_seq{}中引用的序列元素的X和Y比例。", "The new Y axis scale value to apply to the sequence element":"应用于序列元素的新Y轴比例值", "The unique ID value of the sequence element to target":"序列元素到目标的唯一ID值", - "With this function you can set the Y scale for the given sequence element. You supply the sequence element ID as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} along with the new scale to set on the Y axis and the sequence will be scaled by this amount. A scale of 1 indicates no scaling (1:1), smaller values will scale down (0.5, for example, will half the width of the sequence), larger values will scale up and negative values will flip the sequence about its origin {}and{} scale it unless the value used is exactly -1 (in which case the sequence is just flipped about its origin with no scaling).":"使用此函数,可以设置给定序列元素的 Y 比例。提供由{}{}layer_sequence_create(){}{}或由其中一个{}层元素函数{}返回的序列元素 ID,以及要在 Y 轴上设置的新比例,序列将按此量缩放。1表示没有缩放(1:1),较小的值将缩小(例如,0.5,将缩放序列宽度的一半),较大值将按比例放大,负值将围绕其原点翻转序列{},{}缩放序列,除非所用值恰好为-1(在这种情况下,序列仅围绕其原点翻转,没有缩放)。" + "With this function you can set the Y scale for the given sequence element. You supply the sequence element ID as returned by {}{}layer_sequence_create(){}{} or by one of the {}layer element functions{} along with the new scale to set on the Y axis and the sequence will be scaled by this amount. A scale of 1 indicates no scaling (1:1), smaller values will scale down (0.5, for example, will half the width of the sequence), larger values will scale up and negative values will flip the sequence about its origin {}and{} scale it unless the value used is exactly -1 (in which case the sequence is just flipped about its origin with no scaling).":"使用此函数,可以设置给定序列元素的 Y 比例。提供由{}{}layer_sequence_create(){}{}或由其中一个{}层元素函数{}返回的序列元素 ID,以及要在 Y 轴上设置的新比例,序列将按此量缩放。1表示没有缩放(1:1),较小的值将缩小(例如,0.5,将缩放序列宽度的一半),较大值将按比例放大,负值将围绕其原点翻转序列{},{}缩放序列,除非所用值恰好为-1(在这种情况下,序列仅围绕其原点翻转,没有缩放)。", + "{}{}{}IMPORTANT{}{} {}If your sequence has any instances in it, these instances shouldn\u0027t change their {}{}image_xscale{}{}  / {}{}image_yscale{}{} / {}{}image_angle{}{} / {}{}x{}{} / {}{}y{}{} variables as they will be overwritten when the sequence updates each step after starting to be played. You can check {}{}in_sequence{}{} and only update the properties of such an instance when this variable is {}false{}.":"{}{}{} 重要{}{}\n{} 如果您的序列中有任何实例,这些实例不应更改其 {}{}image_xscale{}{}/{}{}image_yscale{}{}/{}{}image_angle{}{}/{}{}x{}{}/{}{}y{}{} 变量,因为当序列开始播放后更新每个步骤时,它们将被覆盖。 \n\n您可以检查 {}{}in_sequence{}{},并且仅当该变量为 {}false{} 时才更新此类实例的属性。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sprite_Layers/Sprite_Layers.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sprite_Layers/Sprite_Layers.json index d200538ad..a21ac7339 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sprite_Layers/Sprite_Layers.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Sprite_Layers/Sprite_Layers.json @@ -1,4 +1,6 @@ { "Sprite Layers":"精灵图层", - "The {}GameMaker{} {}Room Editor{} permits you to add sprites into any given room using {}layers{}. As the name implies, a layer is simply a collection of assets that are all considered to be at the same depth within the room, and by stacking layers you can make some things draw over or under others. You can also control certain aspects of layers from code, adding or removing things, or changing certain properties of the layer or what it contains at run time. Below is a list of all the functions that can be used for editing {}Sprites{} that have been added to an {}{}asset layer{}{}:":"{}GameMaker{}{}房间编辑器{}允许您使用{}层{}将精灵添加到任何给定房间。 顾名思义,一个层只是一个资源的集合,这些资源都被认为位于房间内相同的深度,通过堆叠层,你可以使一些东西在其他层之上或之下。您还可以从代码、添加或删除对象、或更改层的某些属性或运行时包含的内容中控制层的某些方面。以下是可用于编辑{}精灵{}的所有函数列表,这些函数已添加到{}{}资源层{}{}:" + "The {}GameMaker{} {}Room Editor{} permits you to add sprites into any given room using {}layers{}. As the name implies, a layer is simply a collection of assets that are all considered to be at the same depth within the room, and by stacking layers you can make some things draw over or under others. You can also control certain aspects of layers from code, adding or removing things, or changing certain properties of the layer or what it contains at run time. Below is a list of all the functions that can be used for editing {}Sprites{} that have been added to an {}{}asset layer{}{}:":"{}GameMaker{}{}房间编辑器{}允许您使用{}层{}将精灵添加到任何给定房间。 顾名思义,一个层只是一个资源的集合,这些资源都被认为位于房间内相同的深度,通过堆叠层,你可以使一些东西在其他层之上或之下。您还可以从代码、添加或删除对象、或更改层的某些属性或运行时包含的内容中控制层的某些方面。以下是可用于编辑{}精灵{}的所有函数列表,这些函数已添加到{}{}资源层{}{}:", + "The {}GameMaker{} {}Room Editor{} permits you to add sprites into any given room using {}layers{}. As the name implies, a layer is simply a collection of assets that are all considered to be at the same depth within the room, and by stacking layers you can make some things draw over or under others. You can also control certain aspects of layers from code, adding or removing things, or changing certain properties of the layer or what it contains at run time. Below is a list of all the functions that can be used for editing {}Sprites{} that have been added to an {}{}asset layer{}{}:":"{}GameMaker{}{} 房间编辑器 {} 允许您使用 {} 层 {} 将精灵添加到任何给定房间中。顾名思义,图层只是资源的集合,这些资源都被认为位于房间内的相同深度,通过堆叠图层,您可以使某些东西绘制在其他东西之上或之下。您还可以通过代码控制图层的某些方面,添加或删除内容,或者更改图层的某些属性或其在运行时包含的内容。下面列出了可用于编辑已添加到 {}{} 资源层 {}{} 的 {} 精灵 {} 的所有函数:", + "{}Sprite Elements{}":"{} 精灵元素 {}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/Text_Elements.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/Text_Elements.json new file mode 100644 index 000000000..c185e3028 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/Text_Elements.json @@ -0,0 +1,11 @@ +{ + "Text Element Functions":"文本元素功能", + "Text Element Property Getters":"文本元素属性获取", + "Text Element Property Setters":"文本元素属性设置", + "The functions listed here allow you to create and modify Text Elements in room layers.":"此处列出的功能允许您在房间图层中创建和修改文本元素。", + "These functions let you create/destroy text elements, check if one exists, and get the ID of an element for use in functions.":"这些函数可让您创建 / 销毁文本元素,检查文本元素是否存在,并获取元素的 ID 以在函数中使用。", + "These functions let you modify any property of a text element, by providing its {}ID{}.":"这些函数可让您通过提供文本元素的 {}ID{} 来修改文本元素的任何属性。", + "These functions let you read any property from a text element, by providing its {}ID{}.":"这些函数可让您通过提供文本元素的 {}ID{} 来读取其任何属性。", + "{}Text Elements{}":"{} 文本元素 {}", + "{}You can place text in {}The Room Editor{} by creating an {}Asset Layer{}, and then dragging in a font asset or using the {} tool from the Layer Toolbox. The default text that appears on a new text element can be changed from the {}Room Editor Preferences{}.":"{} 您可以通过创建 {}Asset Layer{},然后拖入字体资源或使用 Layer Toolbox 中的 {} 工具,将文本放置在 {}Room Editor{} 中。新文本元素上显示的默认文本可以通过 {} 房间编辑器首选项 {} 进行更改。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_alpha.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_alpha.json new file mode 100644 index 000000000..c8fd388c5 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_alpha.json @@ -0,0 +1,9 @@ +{ + "Finally it applies the new alpha to the element. Each frame it moves closer to the target alpha.":"最后它将新的 alpha 应用于元素。每帧它都会更接近目标 Alpha。", + "It calculates a value between the current and the target alpha, moving the current alpha 10% ({}0.1{}) towards the target.":"它计算当前 alpha 和目标 alpha 之间的值,将当前 alpha 向目标移动 10%({}0.1{})。", + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The new alpha of the element":"元素的新 alpha", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the alpha (opacity) of the given Text Element. This is a value between 0 (invisible) and 1 (fully visible).":"此函数更改给定文本元素的 alpha(不透明度)。该值介于 0( 不可见) 和 1( 完全可见) 之间。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets its alpha. It sets the target alpha based on input, being {}1{} (visible) when space is held, and {}0{} (invisible) otherwise.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取其 Alpha。它根据输入设置目标 Alpha,当保留空间时为 {}1{}( 可见),否则为 {}0{}( 不可见)。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_angle.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_angle.json new file mode 100644 index 000000000..1aa434015 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_angle.json @@ -0,0 +1,7 @@ +{ + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The new angle of the Text Element":"文本元素的新角度", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the angle (rotation) of the given Text Element.":"此函数更改给定文本元素的角度 (旋转)。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then gets its angle. It applies the angle back with 5 added to it, so the element rotates 5 degrees every frame.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其角度。它应用角度后加 5,因此元素每帧旋转 5 度。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_blend.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_blend.json new file mode 100644 index 000000000..530fc374b --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_blend.json @@ -0,0 +1,9 @@ +{ + "Finally it applies the new colour to the element. Each frame it moves closer to the target colour.":"最后它将新颜色应用于元素。每帧它都会更接近目标颜色。", + "It calculates a colour between the current and the target colour, moving the current colour 10% ({}0.1{}) towards the target.":"它计算当前颜色和目标颜色之间的颜色,将当前颜色向目标移动 10%({}0.1{})。", + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The new blend colour of the element":"元素的新混合颜色", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the blend colour of the given Text Element, similar to {}{}image_blend{}{} for an Object Instance.":"此函数更改给定文本元素的混合颜色,类似于对象实例的 {}{}image_blend{}{}。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets its blend colour. It sets the target colour based on input, being red when space is held, and white otherwise.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取其混合颜色。它根据输入设置目标颜色,当保留空格时为红色,否则为白色。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_charspacing.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_charspacing.json new file mode 100644 index 000000000..cdb884db1 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_charspacing.json @@ -0,0 +1,6 @@ +{ + "The new character spacing for the element.":"元素的新字符间距。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the character spacing of the given Text Element. This is the space (in pixels) added between each character in the displayed string.":"此函数更改给定文本元素的字符间距。这是显示字符串中每个字符之间添加的空格 (以像素为单位)。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, gets its character spacing value and applies it back, increased by 2.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,获取其字符间距值并将其应用回来,增加 2。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_create.json new file mode 100644 index 000000000..32a134e48 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_create.json @@ -0,0 +1,10 @@ +{ + "The X position in the room where the text element should be created. Note that the actual X position where the text appears will be negatively offset by its {}xorigin{} value.":"应在房间中创建文本元素的 X 位置。请注意,文本出现的实际 X 位置将以其 {}xorigin{} 值进行负偏移。", + "The Y position in the room where the text element should be created. Note that the actual Y position where the text appears will be negatively offset by its {}yorigin{} value.":"应在房间中创建文本元素的 Y 位置。请注意,文本出现的实际 Y 位置将以其 {}yorigin{} 值进行负偏移。", + "The actual text string that appears on this element.":"出现在该元素上的实际文本字符串。", + "The font asset to use for rendering the text.":"用于渲染文本的字体资源。", + "The function will return -1 if the given layer does not exist.":"如果给定层不存在,该函数将返回 -1。", + "The layer where you want to create the element. {}You can supply the layer name as a string, or the layer ID returned from a function like {}{}layer_get_id{}{} or {}{}layer_create{}{}.{}":"您要在其中创建元素的层。{} 您可以以字符串形式提供层名称,或从 {}{}layer_get_id{}{} 或 {}{}layer_create{}{} 等函数返回的层 ID。{}", + "This creates a new Text Element in the {}Assets{} layer, at the instance\u0027s position, using the {}Font1{} font asset.":"这会使用 {}Font1{} 字体资源在实例位置的 {}Assets{} 层中创建一个新的文本元素。", + "This function creates a new Text Element in a room layer, and returns its element ID.":"此函数在房间图层中创建一个新的文本元素,并返回其元素 ID。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_destroy.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_destroy.json new file mode 100644 index 000000000..e45252c37 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_destroy.json @@ -0,0 +1,5 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function destroys the given Text Element.":"此函数会破坏给定的文本元素。", + "This gets the ID of the Text Element {}text1{} from the {}Assets{} layer. It then checks whether that element exists, and if it does, it destroys it.":"这将从 {}Assets{} 层获取文本元素 {}text1{} 的 ID。然后它检查该元素是否存在,如果存在,则销毁它。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_exists.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_exists.json new file mode 100644 index 000000000..39bfeb04f --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_exists.json @@ -0,0 +1,6 @@ +{ + "The layer to check. {}You can supply the layer name as a string, or the layer ID returned from a function like {}{}layer_get_id{}{} or {}{}layer_create{}{}.{}":"要检查的图层。{} 您可以以字符串形式提供层名称,或从 {}{}layer_get_id{}{} 或 {}{}layer_create{}{} 等函数返回的层 ID。{}", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function checks whether the given Text Element exists on the given layer, and returns {}true{} or {}false{}.":"此函数检查给定文本元素是否存在于给定图层上,并返回 {}true{} 或 {}false{}。", + "This gets the ID of the Text Element {}text1{} from the {}Assets{} layer. It then checks whether that element exists, and if it does, it destroys it.":"这将从 {}Assets{} 层获取文本元素 {}text1{} 的 ID。然后它检查该元素是否存在,如果存在,则销毁它。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_font.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_font.json new file mode 100644 index 000000000..be2802153 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_font.json @@ -0,0 +1,6 @@ +{ + "The Font to use to render the element\u0027s text.":"用于呈现元素文本的字体。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the font used by the given Text Element.":"此函数更改给定文本元素使用的字体。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then gets its font. If the font does not exist, it applies the font {}Font2{} to the element.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其字体。如果该字体不存在,则会将字体 {}Font2{} 应用于该元素。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_frameh.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_frameh.json new file mode 100644 index 000000000..477c9a70f --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_frameh.json @@ -0,0 +1,6 @@ +{ + "The new frame height of the element.":"元素的新框架高度。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the frame height of the given Text Element.":"此函数更改给定文本元素的框架高度。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, then sets its frame width to half the room\u0027s size, and the frame height to 64.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后将其框架宽度设置为房间大小的一半,并将框架高度设置为 64。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_framew.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_framew.json new file mode 100644 index 000000000..ab32548f5 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_framew.json @@ -0,0 +1,6 @@ +{ + "The new frame width of the element.":"元素的新框架宽度。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the frame width of the given Text Element. This affects {}wrapping{} and the {}justified alignment{}.":"此函数更改给定文本元素的框架宽度。这会影响 {} 换行 {} 和 {} 合理对齐 {}。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, then sets its frame width to half the room\u0027s size, and the frame height to 64.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后将其框架宽度设置为房间大小的一半,并将框架高度设置为 64。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_alpha.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_alpha.json new file mode 100644 index 000000000..23239ee0f --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_alpha.json @@ -0,0 +1,8 @@ +{ + "Finally it applies the new alpha to the element. Each frame it moves closer to the target alpha.":"最后它将新的 alpha 应用于元素。每帧它都会更接近目标 Alpha。", + "It calculates a value between the current and the target alpha, moving the current alpha 10% ({}0.1{}) towards the target.":"它计算当前 alpha 和目标 alpha 之间的值,将当前 alpha 向目标移动 10%({}0.1{})。", + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the alpha (opacity) of the given Text Element. This can be changed with {}{}layer_text_alpha{}{}.":"此函数返回给定文本元素的 alpha(不透明度)。这可以通过 {}{}layer_text_alpha{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets its alpha. It sets the target alpha based on input, being {}1{} (visible) when space is held, and {}0{} (invisible) otherwise.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取其 Alpha。它根据输入设置目标 Alpha,当保留空间时为 {}1{}( 可见),否则为 {}0{}( 不可见)。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_angle.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_angle.json new file mode 100644 index 000000000..3cbbf7d3d --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_angle.json @@ -0,0 +1,6 @@ +{ + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the angle (rotation value) of the given Text Element. This can be changed with {}{}layer_text_angle{}{}.":"此函数返回给定文本元素的角度 (旋转值)。这可以通过 {}{}layer_text_angle{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then gets its angle. It applies the angle back with 5 added to it, so the element rotates 5 degrees every frame.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其角度。它应用角度后加 5,因此元素每帧旋转 5 度。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_blend.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_blend.json new file mode 100644 index 000000000..99c007704 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_blend.json @@ -0,0 +1,8 @@ +{ + "Finally it applies the new colour to the element. Each frame it moves closer to the target colour.":"最后它将新颜色应用于元素。每帧它都会更接近目标颜色。", + "It calculates a colour between the current and the target colour, moving the current colour 10% ({}0.1{}) towards the target.":"它计算当前颜色和目标颜色之间的颜色,将当前颜色向目标移动 10%({}0.1{})。", + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the blend colour of the given Text Element. This can be changed with {}{}layer_text_blend{}{}.":"此函数返回给定文本元素的混合颜色。这可以通过 {}{}layer_text_blend{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets its blend colour. It sets the target colour based on input, being red when space is held, and white otherwise.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取其混合颜色。它根据输入设置目标颜色,当保留空格时为红色,否则为白色。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_charspacing.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_charspacing.json new file mode 100644 index 000000000..da5bea3b5 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_charspacing.json @@ -0,0 +1,5 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the character spacing (in pixels) of the given Text Element. This can be changed with {}{}layer_text_charspacing{}{}.":"此函数返回给定文本元素的字符间距 (以像素为单位)。这可以通过 {}{}layer_text_charspacing{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, gets its character spacing value and applies it back, increased by 2.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,获取其字符间距值并将其应用回来,增加 2。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_font.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_font.json new file mode 100644 index 000000000..104f6a750 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_font.json @@ -0,0 +1,5 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the {}{}Font Asset{}{} used by the given Text Element. This can be changed with {}{}layer_text_font{}{}.":"此函数返回给定文本元素使用的 {}{} 字体资源 {}{}。这可以通过 {}{}layer_text_font{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then gets its font. If the font does not exist, it applies the font {}Font2{} to the element.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其字体。如果该字体不存在,则会将字体 {}Font2{} 应用于该元素。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_frameh.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_frameh.json new file mode 100644 index 000000000..7271d8c65 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_frameh.json @@ -0,0 +1,6 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "Then it draws a blue {}round rectangle{} that covers the entire frame. To ensure this appears behind the text, the Object Instance needs to be in a layer with a depth higher than the Asset Layer where the Text Element is placed.":"然后它会绘制一个覆盖整个框架的蓝色 {} 圆角矩形 {}。为了确保它出现在文本后面,对象实例需要位于比放置文本元素的资源层更深的层中。", + "This function returns the frame height of the given Text Element. This can be changed with {}{}layer_text_frameh{}{}.":"此函数返回给定文本元素的框架高度。可以使用 {}{}layer_text_frameh{}{} 更改此设置。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, then gets its text position (by subtracting the element\u0027s origin from its X/Y position) and its frame width and height.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其文本位置 (通过从其 X/Y 位置减去元素的原点) 及其框架宽度和高度。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_framew.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_framew.json new file mode 100644 index 000000000..f70966e22 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_framew.json @@ -0,0 +1,6 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "Then it draws a blue {}round rectangle{} that covers the entire frame. To ensure this appears behind the text, the Object Instance needs to be in a layer with a depth higher than the Asset Layer where the Text Element is placed.":"然后它会绘制一个覆盖整个框架的蓝色 {} 圆角矩形 {}。为了确保它出现在文本后面,对象实例需要位于比放置文本元素的资源层更深的层中。", + "This function returns the frame width of the given Text Element. This can be changed with {}{}layer_text_framew{}{}.":"此函数返回给定文本元素的框架宽度。这可以通过 {}{}layer_text_framew{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, then gets its text position (by subtracting the element\u0027s origin from its X/Y position) and its frame width and height.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其文本位置 (通过从其 X/Y 位置减去元素的原点) 及其框架宽度和高度。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_halign.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_halign.json new file mode 100644 index 000000000..e75307279 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_halign.json @@ -0,0 +1,10 @@ +{ + "Spacing between words will be adjusted so each line fits the frame horizontally.":"将调整单词之间的间距,使每行水平适合框架。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "The text will be aligned in the centre of the frame.":"文本将在框架的中心对齐。", + "The text will be aligned to the left of the frame.":"文本将与框架左侧对齐。", + "The text will be aligned to the right of the frame.":"文本将与框架右侧对齐。", + "This function returns the horizontal alignment mode of the given Text Element. This can be changed with {}{}layer_text_halign{}{}.":"此函数返回给定文本元素的水平对齐模式。可以使用 {}{}layer_text_halign{}{} 更改此设置。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and stores its horizontal and vertical alignments into variables, before changing the alignments. These variables can later be used to reset the alignment values to what they were before they were changed here.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并将其水平和垂直对齐方式存储到变量中,然后再更改对齐方式。这些变量稍后可用于将对齐值重置为在此处更改之前的值。", + "This will return one of the following constants:":"这将返回以下常量之一:" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_id.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_id.json new file mode 100644 index 000000000..a771e6fd0 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_id.json @@ -0,0 +1,7 @@ +{ + "The layer to check. {}You can supply the layer name as a string, or the layer ID returned from a function like {}{}layer_get_id{}{} or {}{}layer_create{}{}.{}":"要检查的图层。{} 您可以以字符串形式提供层名称,或从 {}{}layer_get_id{}{} 或 {}{}layer_create{}{} 等函数返回的层 ID。{}", + "The name of the Text Element as a string, see image above.":"文本元素的名称作为字符串,请参见上图。", + "This function returns the ID of a Text Element which was placed in the Room Editor. This ID can be used in the {}Text Element Functions{}.":"此函数返回放置在房间编辑器中的文本元素的 ID。此 ID 可在 {} 文本元素函数 {} 中使用。", + "This gets the ID of the Text Element {}text1{} from the {}Assets{} layer. It then checks whether that element exists, and if it does, it destroys it.":"这将从 {}Assets{} 层获取文本元素 {}text1{} 的 ID。然后它检查该元素是否存在,如果存在,则销毁它。", + "You must provide a layer to check in, and the name of the text element as set in the Room Editor, as a string:":"您必须提供一个要签入的图层,以及在房间编辑器中设置的文本元素的名称 (作为字符串):" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_linespacing.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_linespacing.json new file mode 100644 index 000000000..e12484ad1 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_linespacing.json @@ -0,0 +1,5 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the line spacing (in pixels) of the given Text Element. This can be changed with {}{}layer_text_linespacing{}{}.":"此函数返回给定文本元素的行间距 (以像素为单位)。这可以通过 {}{}layer_text_linespacing{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, gets its line spacing value and applies it back, increased by 4.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,获取其行间距值并将其应用回来,增加 4。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_text.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_text.json new file mode 100644 index 000000000..29a963917 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_text.json @@ -0,0 +1,5 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the text string of the given Text Element. This can be changed with {}{}layer_text_text{}{}.":"此函数返回给定文本元素的文本字符串。可以使用 {}{}layer_text_text{}{} 更改此设置。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and retrieves its text string. It then reapplies the text string back to the element, but with a number value added to it, inside parentheses. For example, if the text was {}\"Waiting for players\"{} it will become {}\"Waiting for players (5)\"{}.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并检索其文本字符串。然后,它将文本字符串重新应用回元素,但在括号内添加了一个数字值。例如,如果文本是 {}\" Waiting for players \"{},它将变为 {}\" Waiting for players (5)\"{}。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_valign.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_valign.json new file mode 100644 index 000000000..f018e8999 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_valign.json @@ -0,0 +1,9 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "The text will be aligned to the bottom of the frame.":"文本将与框架底部对齐。", + "The text will be aligned to the top of the frame.":"文本将与框架顶部对齐。", + "The text will be centred vertically in the frame.":"文本将在框架中垂直居中。", + "This function returns the vertical alignment mode of the given Text Element. This can be changed with {}{}layer_text_valign{}{}.":"此函数返回给定文本元素的垂直对齐模式。可以使用 {}{}layer_text_valign{}{} 更改此设置。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and stores its horizontal and vertical alignments into variables, before changing the alignments. These variables can later be used to reset the alignment values to what they were before they were changed here.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并将其水平和垂直对齐方式存储到变量中,然后再更改对齐方式。这些变量稍后可用于将对齐值重置为在此处更改之前的值。", + "This will return one of the following constants:":"这将返回以下常量之一:" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_wrap.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_wrap.json new file mode 100644 index 000000000..d3ac2e1f6 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_wrap.json @@ -0,0 +1,5 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns whether wrapping is enabled ({}true{}) or disabled ({}false{}) in the given Text Element. This can be changed with {}{}layer_text_wrap{}{}.":"此函数返回给定文本元素中是否启用 ({}true{}) 还是禁用 ({}false{}) 换行。可以使用 {}{}layer_text_wrap{}{} 更改此设置。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets the wrapping boolean value. It then reapplies the boolean value after flipping it, so if wrapping is disabled, it will be enabled, and vice versa.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取包装布尔值。然后,它会在翻转后重新应用布尔值,因此,如果禁用换行,则会启用换行,反之亦然。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_x.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_x.json new file mode 100644 index 000000000..2d4b8b93a --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_x.json @@ -0,0 +1,8 @@ +{ + "Finally, it applies the positions back to the element, with 4 added to each component so it shifts its position every frame, moving down and right by 4 pixels each.":"最后,它将位置应用回元素,每个组件添加 4 个位置,因此每帧都会移动其位置,每个向下和向右移动 4 个像素。", + "It then performs a check on those coordinates, and if they reach one end of the room, they are set to the other end (e.g. going through the right boundary puts you at the left boundary, and so on).":"然后,它对这些坐标进行检查,如果它们到达房间的一端,则将它们设置到另一端 (例如,穿过右边界会将您置于左边界,依此类推)。", + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the X position of the given Text Element. This can be changed with {}{}layer_text_x{}{}.":"此函数返回给定文本元素的 X 位置。这可以通过 {}{}layer_text_x{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then gets its X and Y positions, storing them into a struct.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其 X 和 Y 位置,并将它们存储到结构中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_xorigin.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_xorigin.json new file mode 100644 index 000000000..a24afc906 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_xorigin.json @@ -0,0 +1,6 @@ +{ + "It then draws an arrow at that position. That means this code would need to run in a Draw event for it to work. Keep in mind that you would ideally want to initialise the {}text1_id{} variable in the Create event.":"然后它在该位置绘制一个箭头。这意味着此代码需要在 Draw 事件中运行才能正常工作。请记住,您最好希望在 Create 事件中初始化 {}text1_id{} 变量。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the X origin of the given Text Element. This can be changed with {}{}layer_text_xorigin{}{}.":"此函数返回给定文本元素的 X 原点。这可以通过 {}{}layer_text_xorigin{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then calculates the final position of the text by reading the X/Y coordinates of the element and subtracting the origin from them.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后通过读取元素的 X/Y 坐标并从中减去原点来计算文本的最终位置。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_xscale.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_xscale.json new file mode 100644 index 000000000..7345e76a5 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_xscale.json @@ -0,0 +1,7 @@ +{ + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "Then it gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets its xscale and yscale. It applies each component back, with the zoom value added to it.":"然后,它从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取其 xscale 和 yscale。它将应用每个组件,并添加缩放值。", + "This function returns the X scale of the given Text Element. This can be changed with {}{}layer_text_xscale{}{}.":"此函数返回给定文本元素的 X 比例。这可以通过 {}{}layer_text_xscale{}{} 进行更改。", + "This scales the Text Element based on input from the mouse wheel. It first gets the wheel\u0027s delta input, by subtracting an up scroll from a down scroll (returning {}1{} for up and {}-1{} for down). It multiplies that by {}0.1{} to slow down the scale change that takes place in one frame.":"这将根据鼠标滚轮的输入缩放文本元素。它首先通过从向下滚动中减去向上滚动来获取滚轮的增量输入 (向上滚动返回 {}1{},向下滚动返回 {}-1{})。它将其乘以 {}0.1{} 以减慢一帧中发生的比例变化。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_y.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_y.json new file mode 100644 index 000000000..981397e67 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_y.json @@ -0,0 +1,8 @@ +{ + "Finally, it applies the positions back to the element, with 4 added to each component so it shifts its position every frame, moving down and right by 4 pixels each.":"最后,它将位置应用回元素,每个组件添加 4 个位置,因此每帧都会移动其位置,每个向下和向右移动 4 个像素。", + "It then performs a check on those coordinates, and if they reach one end of the room, they are set to the other end (e.g. going through the right boundary puts you at the left boundary, and so on).":"然后,它对这些坐标进行检查,如果它们到达房间的一端,则将它们设置到另一端 (例如,穿过右边界会将您置于左边界,依此类推)。", + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the Y position of the given Text Element. This can be changed with {}{}layer_text_y{}{}.":"此函数返回给定文本元素的 Y 位置。这可以通过 {}{}layer_text_y{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then gets its X and Y positions, storing them into a struct.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其 X 和 Y 位置,并将它们存储到结构中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_yorigin.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_yorigin.json new file mode 100644 index 000000000..7a038c9eb --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_yorigin.json @@ -0,0 +1,6 @@ +{ + "It then draws an arrow at that position. That means this code would need to run in a Draw event for it to work. Keep in mind that you would ideally want to initialise the {}text1_id{} variable in the Create event.":"然后它在该位置绘制一个箭头。这意味着此代码需要在 Draw 事件中运行才能正常工作。请记住,理想情况下您最好在 Create 事件中初始化 {}text1_id{} 变量。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function returns the Y origin of the given Text Element. This can be changed with {}{}layer_text_yorigin{}{}.":"此函数返回给定文本元素的 Y 原点。这可以通过 {}{}layer_text_yorigin{}{} 进行更改。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then calculates the final position of the text by reading the X/Y coordinates of the element and subtracting the origin from them.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后通过读取元素的 X/Y 坐标并从中减去原点来计算文本的最终位置。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_yscale.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_yscale.json new file mode 100644 index 000000000..2a3a0ffc2 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_get_yscale.json @@ -0,0 +1,7 @@ +{ + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "Then it gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets its xscale and yscale. It applies each component back, with the zoom value added to it.":"然后,它从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取其 xscale 和 yscale。它将应用每个组件,并添加缩放值。", + "This function returns the Y scale of the given Text Element. This can be changed with {}{}layer_text_yscale{}{}.":"此函数返回给定文本元素的 Y 比例。这可以通过 {}{}layer_text_yscale{}{} 进行更改。", + "This scales the Text Element based on input from the mouse wheel. It first gets the wheel\u0027s delta input, by subtracting an up scroll from a down scroll (returning {}1{} for up and {}-1{} for down). It multiplies that by {}0.1{} to slow down the scale change that takes place in one frame.":"这将根据鼠标滚轮的输入缩放文本元素。它首先通过从向下滚动中减去向上滚动来获取滚轮的增量输入 (向上滚动返回 {}1{},向下滚动返回 {}-1{})。它将其乘以 {}0.1{} 以减慢一帧中发生的比例变化。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_halign.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_halign.json new file mode 100644 index 000000000..8c17cdcc7 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_halign.json @@ -0,0 +1,10 @@ +{ + "Horizontal alignment to use":"使用水平对齐方式", + "Spacing between words will be adjusted so each line fits the frame horizontally.":"将调整单词之间的间距,使每行水平适合框架。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "The text will be aligned in the centre of the frame.":"文本将在框架的中心对齐。", + "The text will be aligned to the left of the frame.":"文本将与框架左侧对齐。", + "The text will be aligned to the right of the frame.":"文本将与框架右侧对齐。", + "This function changes the horizontal alignment of the given Text Element. You can supply any one of the following constants:":"此函数更改给定文本元素的水平对齐方式。您可以提供以下任一常量:", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and stores its horizontal and vertical alignments into variables, before changing the alignments. These variables can later be used to reset the alignment values to what they were before they were changed here.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并将其水平和垂直对齐方式存储到变量中,然后再更改对齐方式。这些变量稍后可用于将对齐值重置为在此处更改之前的值。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_linespacing.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_linespacing.json new file mode 100644 index 000000000..d759b8483 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_linespacing.json @@ -0,0 +1,6 @@ +{ + "The new line spacing for the element.":"元素的新行距。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the line spacing of the given Text Element. This is the space (in pixels) added between each line in the displayed string.":"此函数更改给定文本元素的行距。这是显示字符串中每行之间添加的空格 (以像素为单位)。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, gets its line spacing value and applies it back, increased by 4.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,获取其行间距值并将其应用回来,增加 4。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_text.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_text.json new file mode 100644 index 000000000..e89e7b84b --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_text.json @@ -0,0 +1,6 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "The text string that appears on the element.":"出现在元素上的文本字符串。", + "This function changes the text of the given Text Element. You supply the Text Element to modify, and the string that should appear on that element.":"此函数更改给定文本元素的文本。您提供要修改的文本元素以及应出现在该元素上的字符串。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and retrieves its text string. It then reapplies the text string back to the element, but with a number value added to it, inside parentheses. For example, if the text was {}\"Waiting for players\"{} it will become {}\"Waiting for players (5)\"{}.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并检索其文本字符串。然后,它将文本字符串重新应用回元素,但在括号内添加了一个数字值。例如,如果文本是 {}\" 等待玩家 \"{},它将变为 {}\" 等待玩家 (5)\"{}。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_valign.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_valign.json new file mode 100644 index 000000000..af0f34d22 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_valign.json @@ -0,0 +1,9 @@ +{ + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "The text will be aligned to the bottom of the frame.":"文本将与框架底部对齐。", + "The text will be aligned to the top of the frame.":"文本将与框架顶部对齐。", + "The text will be centred vertically in the frame.":"文本将在框架中垂直居中。", + "This function changes the vertical alignment of the given Text Element. You can supply any one of the following constants:":"此函数更改给定文本元素的垂直对齐方式。您可以提供以下任一常量:", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and stores its horizontal and vertical alignments into variables, before changing the alignments. These variables can later be used to reset the alignment values to what they were before they were changed here.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并将其水平和垂直对齐方式存储到变量中,然后再更改对齐方式。这些变量稍后可用于将对齐值重置为在此处更改之前的值。", + "Vertical alignment to use":"使用的垂直对齐方式" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_wrap.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_wrap.json new file mode 100644 index 000000000..9f4dcfd8c --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_wrap.json @@ -0,0 +1,6 @@ +{ + "Enable ({}true{}) or disable ({}false{}) wrapping":"启用 ({}true{}) 或禁用 ({}false{}) 换行", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function enables or disables wrapping of text in the given Text Element. When enabled, text is moved to the next line when the current line width exceeds the {}frame width{}.":"此函数启用或禁用给定文本元素中的文本换行。启用后,当当前行宽度超过 {} 框架宽度 {} 时,文本将移动到下一行。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets the wrapping boolean value. It then reapplies the boolean value after flipping it, so if wrapping is disabled, it will be enabled, and vice versa.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取包装布尔值。然后,它会在翻转后重新应用布尔值,因此,如果禁用换行,则会启用换行,反之亦然。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_x.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_x.json new file mode 100644 index 000000000..456167e8e --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_x.json @@ -0,0 +1,7 @@ +{ + "Finally, it applies the positions back to the element, with 4 added to each component so it shifts its position every frame, moving down and right by 4 pixels each.":"最后,它将位置应用回元素,每个组件添加 4 个位置,因此每帧都会移动其位置,每个向下和向右移动 4 个像素。", + "It then performs a check on those coordinates, and if they reach one end of the room, they are set to the other end (e.g. going through the right boundary puts you at the left boundary, and so on).":"然后,它对这些坐标进行检查,如果它们到达房间的一端,则将它们设置到另一端 (例如,穿过右边界会将您置于左边界,依此类推)。", + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "This function changes the X (horizontal) position of the given Text Element. Note that the text\u0027s X position will be offset by the element\u0027s {}xorigin{} value.":"此函数更改给定文本元素的 X(水平) 位置。请注意,文本的 X 位置将偏移元素的 {}xorigin{} 值。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then gets its X and Y positions, storing them into a struct.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其 X 和 Y 位置,并将它们存储到结构中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_xorigin.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_xorigin.json new file mode 100644 index 000000000..64d4db421 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_xorigin.json @@ -0,0 +1,8 @@ +{ + "It then sets its xorigin to {}0{} and yorigin to {}50{}, so it appears 50 pixels above the instance\u0027s position. This origin can later be changed to adjust the height of the text above the instance.":"然后,它将其 xorigin 设置为 {}0{},将 yorigin 设置为 {}50{},因此它显示在实例位置上方 50 像素处。稍后可以更改此原点以调整实例上方文本的高度。", + "The new X origin of the element":"元素的新 X 原点", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the X origin of the given Text Element.":"此函数更改给定文本元素的 X 原点。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and sets its position to the instance\u0027s position.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并将其位置设置为实例的位置。", + "This is similar to the sprite origin, and is the point within the element that acts as the \"centre\" for rotation. It acts as a negative offset for the text.":"这与精灵原点类似,是元素内充当旋转 \" 中心 \" 的点。它充当文本的负偏移量。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_xscale.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_xscale.json new file mode 100644 index 000000000..62bf032ec --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_xscale.json @@ -0,0 +1,8 @@ +{ + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The new X scale of the Text Element.":"文本元素的新 X 比例。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "Then it gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets its xscale and yscale. It applies each component back, with the zoom value added to it.":"然后,它从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取其 xscale 和 yscale。它将应用每个组件,并添加缩放值。", + "This function changes the horizontal scale of the given Text Element. 1 is the default scale.":"此函数更改给定文本元素的水平比例。 1 是默认比例。", + "This scales the Text Element based on input from the mouse wheel. It first gets the wheel\u0027s delta input, by subtracting an up scroll from a down scroll (returning {}1{} for up and {}-1{} for down). It multiplies that by {}0.1{} to slow down the scale change that takes place in one frame.":"这将根据鼠标滚轮的输入缩放文本元素。它首先通过从向下滚动中减去向上滚动来获取滚轮的增量输入 (向上滚动返回 {}1{},向下滚动返回 {}-1{})。它将其乘以 {}0.1{} 以减慢一帧中发生的比例变化。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_y.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_y.json new file mode 100644 index 000000000..cd42ece07 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_y.json @@ -0,0 +1,9 @@ +{ + "Finally, it applies the positions back to the element, with 4 added to each component so it shifts its position every frame, moving down and right by 4 pixels each.":"最后,它将位置应用回元素,每个组件添加 4 个位置,因此每帧都会移动其位置,每个向下和向右移动 4 个像素。", + "It then performs a check on those coordinates, and if they reach one end of the room, they are set to the other end (e.g. going through the right boundary puts you at the left boundary, and so on).":"然后,它对这些坐标进行检查,如果它们到达房间的一端,则将它们设置到另一端 (例如,穿过右边界会将您置于左边界,依此类推)。", + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The Y position of the element":"元素的 Y 位置", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the Y (vertical) position of the given Text Element. Note that the text\u0027s Y position will be offset by the element\u0027s {}yorigin{} value.":"此函数更改给定文本元素的 Y(垂直) 位置。请注意,文本的 Y 位置将偏移元素的 {}yorigin{} 值。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and then gets its X and Y positions, storing them into a struct.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,然后获取其 X 和 Y 位置,并将它们存储到结构中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_yorigin.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_yorigin.json new file mode 100644 index 000000000..9bb46f6ad --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_yorigin.json @@ -0,0 +1,8 @@ +{ + "It then sets its xorigin to {}0{} and yorigin to {}50{}, so it appears 50 pixels above the instance\u0027s position. This origin can later be changed to adjust the height of the text above the instance.":"然后,它将其 xorigin 设置为 {}0{},将 yorigin 设置为 {}50{},因此它显示在实例位置上方 50 像素处。稍后可以更改此原点以调整实例上方文本的高度。", + "The new Y origin of the element":"元素的新 Y 原点", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "This function changes the Y origin of the given Text Element.":"此函数更改给定文本元素的 Y 原点。", + "This gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and sets its position to the instance\u0027s position.":"这会从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并将其位置设置为实例的位置。", + "This is similar to the sprite origin, and is the point within the element that acts as the \"centre\" for rotation. It acts as a negative offset for the text.":"这与精灵原点类似,是元素内充当旋转 \" 中心 \" 的点。它充当文本的负偏移量。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_yscale.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_yscale.json new file mode 100644 index 000000000..9cce9accd --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Text_Functions/layer_text_yscale.json @@ -0,0 +1,8 @@ +{ + "Since this code is for a Step event, you should initialise the {}_text1_id{} variable in the Create event.":"由于此代码适用于 Step 事件,因此您应该在 Create 事件中初始化 {}_text1_id{} 变量。", + "The new Y scale of the Text Element.":"文本元素的新 Y 比例。", + "The text element ID, retrieved from {}{}layer_text_create{}{} or {}{}layer_text_get_id{}{}.":"文本元素 ID,从 {}{}layer_text_create{}{} 或 {}{}layer_text_get_id{}{} 检索。", + "Then it gets the ID of the Text Element {}text1{} from the layer {}Assets{}, and gets its xscale and yscale. It applies each component back, with the zoom value added to it.":"然后,它从 {}Assets{} 层获取文本元素 {}text1{} 的 ID,并获取其 xscale 和 yscale。它将应用每个组件,并添加缩放值。", + "This function changes the vertical scale of the given Text Element. 1 is the default scale.":"此函数更改给定文本元素的垂直比例。 1 是默认比例。", + "This scales the Text Element based on input from the mouse wheel. It first gets the wheel\u0027s delta input, by subtracting an up scroll from a down scroll (returning {}1{} for up and {}-1{} for down). It multiplies that by {}0.1{} to slow down the scale change that takes place in one frame.":"这将根据鼠标滚轮的输入缩放文本元素。它首先通过从向下滚动中减去向上滚动来获取滚轮的增量输入 (向上滚动返回 {}1{},向下滚动返回 {}-1{})。它将其乘以 {}0.1{} 以减慢一帧中发生的比例变化。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/Tile_Map_Layers.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/Tile_Map_Layers.json index ac2fa95b4..51340cf07 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/Tile_Map_Layers.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/Tile_Map_Layers.json @@ -1,10 +1,38 @@ { + "A \"blob\" of tile data is stored as a 32 bit value. It is made up of {}19{} bits that store the tile index in the tile set (bits 0 to 18) plus a few extra bits to indicate how the tile data should be drawn: bit 28 stores the mirror bit, bit 29 stores the flip bit, bit 30 stores the rotate bit and bit 31 is unused. Bits 19 to 27 are also unused. You can also use these unused bits to store your own data.":"瓦片数据的 \"blob\" 存储为 32 位值。它由 {}19{} 位组成,用于存储图块集中的图块索引 (位 0 到 18),加上一些额外的位来指示应如何绘制图块数据:位 28 存储镜像位,位 29 位存储翻转位,位 30 存储旋转位,位 31 未使用。位 19 至 27 也未使用。您还可以使用这些未使用的位来存储您自己的数据。", + "A special constant that is for \"and\"-ing with the tile data blob to extract the {}19{} bits of the tile index.":"一个特殊常量,用于与图块数据 blob 进行 \" 与 \" 运算以提取图块索引的 {}19{} 位。", + "A tile map is a collection of tile set tiles that are all considered to be at the same depth within the room.":"图块地图是图块集图块的集合,这些图块都被认为位于房间内的相同深度。", "Apart from the functions listed above to set tile maps, you also have a number of functions that can be used to manipulate the data of individual tiles. A \"blob\" of tile data is made up of the tile index plus a few extra bits to show whether the tile has been rotated, flipped or mirrored. You also have the possibility of adding your own bit-mask to the tile data, although this is for advanced users only as you will be masking off bits that are reserved for the tile index - essentially there are 19 bits reserved for your tile indices, but if you only use 8 of them, then you have eleven bits left over that can be used to create a custom mask. This mask can then be used and checked in code to create custom tile collisions or whatever. However, you would normally not need to create your own tile data blobs, and would instead use the function {}{}tilemap_get(){}{} to get the tile data, then you would manipulate it using the functions below, and then you would set it again using {}{}tilemap_set(){}{}.":"除了上面列出的用于设置图块图的函数外,您还有许多可用于操作单个图块图的数据的函数。图块数据的\"斑点\"由图块索引加上一些额外的位组成,以显示图块是否已经旋转、翻转或镜像。您还可以将自己的位掩码添加到图块数据中,虽然这仅适用于高级用户,因为您将屏蔽为图块索引保留的位实际上有 19 位保留给图块索引,但如果仅使用其中的 8 位,则剩余 11 位可用于创建自定义掩码。然后可以使用此掩码并检入代码来创建自定义图块冲突等。然而,您通常不需要创建自己的图块数据块,而是使用函数{}{}tilemap_get(){}{}来获取图块数据,然后使用下面的函数操作该图块数据,然后使用{}{}tilemap_set(){}{}再次设置。", "Below is a list of all the functions that can be used for editing individual {}tiles{}:":"以下是可用于编辑单个{}图块{}的所有函数的列表:", "Below is a list of all the functions that can be used for editing {}tile map layers{}:":"以下是可用于编辑{}tile map layers{}的所有函数列表:", + "Calculating the Mask Bits":"计算掩码位", + "Each tile map has its own unique element ID and properties.":"每个图块地图都有自己唯一的元素 ID 和属性。", + "Editing Individual Tiles":"编辑单个图块", + "Editing {}Tile Map Elements{}":"编辑 {} 平铺地图元素 {}", + "For more convenient access to certain bits you can use the values of the tile mask constant: ":"为了更方便地访问某些位,您可以使用平铺掩码常量的值:", + "Function Reference":"功能参考", + "However, you would normally not need to create your own tile data blobs, and would instead use the function {}{}tilemap_get{}{} to get the tile data, then you would manipulate it using the functions for {}Editing Individual Tiles{}, and then you would set it again using {}{}tilemap_set{}{}.":"不过,您通常不需要创建自己的图块数据 blob,而是使用函数 {}{}tilemap_get{}{} 获取图块数据,然后使用用于 {} 编辑单个图块{}的函数来操作它 ,然后您可以使用 {}{}tilemap_set{}{} 再次设置它。", + "It can be visualised as a grid where each cell stores some tile data: the index of the tile that should be drawn at that cell, along with how it should be drawn (rotated, flipped and/or mirrored).":"它可以可视化为一个网格,其中每个单元格存储一些图块数据:应在该单元格绘制的图块的索引,以及应如何绘制它 (旋转、翻转和 / 或镜像)。", + "The bit mask is \"and\"-ed {}&{} against the tile data when the tile map is {}drawn{} (so it doesn\u0027t affect any of the other functionality), meaning that bits which aren\u0027t in the mask are ignored, but can still be read and written to by the user for their own purposes.":"当 {} 绘制{} 图块地图时,位掩码是针对图块数据的 \"and\"-ed{0}&{1}\n\n(因此它不会影响任何其他功能),这意味着不在掩码中的位将被忽略,但用户仍然可以出于自己的目的读取和写入。", "The {}GameMaker{} {}Room Editor{} permits you to add tiles into any given room using {}layers{}. As the name implies, a tile map layer is simply a collection of tile set tiles that are all considered to be at the same depth within the room, and by stacking layers you can make some things draw over or under others. You can also control certain aspects of layers from code, adding or removing things, or changing certain properties of the layer or what it contains at run time. Note that in the room editor you are limited to one tile map per layer (the {}{}Tile Layer{}{}), but when working with them in code, you can have multiple tile maps assigned to a single layer, with each map having its own unique ID and properties, so:":"{}GameMaker{} {}房间编辑器{}允许您使用{}层{}向任何给定房间添加图块。 顾名思义,图块贴图层只是图块集图块的集合,它们都被认为在房间内的同一深度,通过堆叠层,你可以使一些东西在其他东西上或下面画。您还可以从代码、添加或删除对象、或更改层的某些属性或运行时包含的内容中控制层的某些方面。请注意,在房间编辑器中,每个层({}{}图块层{}{})限制为一个图块贴图,但是在代码中使用它们时,可以将多个图块贴图指定给单个层,每个贴图都有自己的唯一 ID 和属性,因此:", "The {}tile layer{} is what you create in the Room Editor to add tile sets to":"{}tile layer{}是您在\"房间编辑器\"中创建的,用于将图块集添加到", + "The {}tile layer{} is what you create in {}The Room Editor{} to add tile sets to. Note that layers are only of a certain type in the Room Editor, not in code.":"{} 图块层 {} 是您在 {} 房间编辑器 {} 中创建的用于添加图块集的层。请注意,图层仅在房间编辑器中属于某种类型,在代码中则不然。", + "The {}tile map{} is what you call the collection of tiles that are added to a layer, either in the Room Editor or through code, as a single element on that layer.":"{} 图块地图 {} 是您所说的图块集合,这些图块可以在房间编辑器中或通过代码添加到层中,作为该层上的单个元素。", "The {}tile map{} is what you call the collection of tiles that are added to a layer, either in the room editor or through code, as a single element on that layer":"{}tile map{}是您称为添加到层的图块集合,无论是在房间编辑器中还是通过代码,作为该层上的单个元素", + "The {}tile set{} is the asset that you use to create tile layers and tile maps.":"{} 图块集 {} 是用于创建图块图层和图块地图的资源。", "The {}tile set{} is the resource that you use to create tile layers and tile maps":"{}tile set{}是用于创建图块图层和图块贴图的资源", - "Tile Map Layers":"贴图层" + "Tile Data \"Blob\"":"平铺数据 \"Blob\"", + "Tile Map Bit Mask":"平铺地图位掩码", + "Tile Map Layers":"贴图层", + "To get an initial index mask value you take the number of tiles in the tile set and subtract 1, so a 16x16 tile set has 256 tiles and a mask value of 255 (or $ff in hexadecimal). If the tile set has a number of tiles that\u0027s not a power of two, then round up to the nearest power of two to get the mask, for example a tile set that is 20x20 has 400 tiles, which you would round up to 512, and so get a mask index value of 511 ($1ff in hexadecimal). Apart from the index mask, normally you would want to preserve the flip, rotate and mirror values that are assigned to a tile too, to help with that there are the constants under {}Tile Mask Constant{} that can be used. These can be bitwise \"or\"-ed {}|{} together with the index mask value to preserve those bits of data.":"要获得初始索引掩码值,您需要获取图块集中的图块数量并减去 1,因此 16x16 图块集有 256 个图块,掩码值为 255( 或十六进制的 $ff)。如果图块集的图块数量不是 2 的幂,则向上舍入到最接近的 2 的幂以获得掩码,例如 20x20 的图块集有 400 个图块,您可以将其向上舍入到 512,因此得到掩码索引值 511( 十六进制 $1ff)。除了索引掩码之外,通常您还希望保留分配给图块的翻转、旋转和镜像值,为了帮助实现这一点,可以使用 {}Tile Mask Constant{} 下的常量。这些可以与索引掩码值一起按位 \" 或 \" 组合 {}|{} 以保留这些数据位。", + "Used to set/get the flip bit of a tile data blob.":"用于设置 / 获取图块数据 blob 的翻转位。", + "Used to set/get the mirror bit of a tile data blob.":"用于设置 / 获取切片数据 blob 的镜像位。", + "Used to set/get the rotate bit of a tile data blob.":"用于设置 / 获取切片数据 blob 的旋转位。", + "When working with tiles, you use a few things that are related to one another as follows: ":"使用图块时,您会使用一些彼此相关的东西,如下所示:", + "You can get tile data at a specific map cell using {}{}tilemap_get{}{} or {}{}tilemap_get_at_pixel{}{} and set it using {}{}tilemap_set{}{} or {}{}tilemap_set_at_pixel{}{}.":"您可以使用 {}{}tilemap_get{}{} 或 {}{}tilemap_get_at_pixel{}{} 获取特定地图单元格的图块数据,并使用 {}{}tilemap_set{}{} 或 {}{}tilemap_set_at_pixel{}{}设置数据。", + "You have the possibility of adding your own bit mask to a tile map in order to use bits of the tile data \"blob\" for your own use, although this is for advanced users only as you will be masking off bits that are reserved for the tile index. There are {}19{} bits reserved for your tile indices, but if you only use 8 of them, then you have eleven bits left over that can be used to create a custom mask. This mask can then be used and checked in code to create custom tile collisions or whatever.":"您可以将自己的位掩码添加到图块地图中,以便将图块数据 \"blob\" 的位供您自己使用,尽管这仅适用于高级用户,因为您将屏蔽为图块地图保留的位。瓷砖索引。为您的图块索引保留了 {}19{} 位,但如果您只使用其中的 8 个,那么您还剩下 11 位可用于创建自定义掩码。然后可以使用该遮罩并在代码中检查以创建自定义图块碰撞或其他内容。", + "{}Tile Map Elements{}":"{} 平铺地图元素 {}", + "{}{}NOTE{}{} Aside from a mask per tile map, there is also a {}global{} one. The two are bitwise \"and\"-ed {}&{} together internally by {}GameMaker{} before being used for drawing.":"{}{} 注意{}{} 除了每个图块地图的遮罩之外,还有一个 {} 全局 {} 遮罩。在用于绘图之前,{}GameMaker{} 在内部将两者按位 \" 与 \"{}&{} 组合在一起。", + "{}{}NOTE{}{} In the Room Editor you are limited to a single tile map per layer, which is created when you add a {}Tile Layer{}, but when working with them in code, you can have multiple tile maps assigned to a layer.":"{}{} 注意{}{} 在房间编辑器中,每层只能使用一个图块地图,该地图是在您添加 {} 图块层 {} 时创建的,但在代码中使用它们时,您可以拥有多个分配给图层的平铺地图。", + "{}{}NOTE{}{} See {}Bitwise Operators{} for more information on how to work with binary and bit masks.":"{}{} 注意{}{} 有关如何使用二进制和位掩码的详细信息,请参阅 {} 位运算符 {}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_create.json index 504f90925..68cbc381d 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_create.json @@ -3,8 +3,12 @@ "The above code creates a new layer and then adds a new tile map element to it, setting the tile map position to (0,0) as well as the tile set to be used and the width and height of the tile map.":"上面的代码创建一个新层,然后添加一个新的图块贴图元素,将图块贴图位置设置为(0,0),以及要使用的图块设置以及图块贴图的宽度和高度。", "The height of the tile map (in cells)":"图块贴图的高度(以单元格为单位)", "The unique ID value of the layer to target (or the layer name as a string)":"目标层的唯一ID值(或作为字符串的层名)", + "The width of the tile map (in cells)":"平铺地图的宽度 (以单元格为单位)", "The width tile map (in cells)":"宽度图块贴图(以单元格为单位)", "The x position of the tile map in the room":"房间内图块地图的x位置", "The y position of the tile map in the room":"房间内图块地图的y位置", - "With this function you can assign a tile-set resource to a layer to be used as a tile map in your project. You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and then an initial (x, y) position to add the tile map to the room, the tile set resource to use, and then the width and height of the tile map in {}cells{} (ie: a width of 20 and a height of 10 will create a tile map with 200 cells that is 20 cells wide and 10 cells tall), with the size of the cells themselves being defined by the tile set chosen. It is worth noting that you cannot place tiles at negative positions within the tile map, so all tiles must be placed within the cell spaces 0 to width - 1, 0 to height - 1.":"使用此函数,可以将图块集资源指定给要在项目中用作图块贴图的层。提供层 ID(使用{}{}layer_create(){}{})或层名称(作为字符串,这将对性能产生影响),然后提供初始位置(x,y),以将图块贴图添加到房间、要使用的图块集资源,然后提供{}单元格{}中图块贴图的宽度和高度(即:宽度为 20 和高度为 10 将创建具有 20 个单元格宽和 10 个单元格高的 200 个单元格的图块贴图), 单元格的大小由所选的图块集定义。值得注意的是,您无法在图块贴图中的负位置放置图块,因此所有图块必须放置在单元格空间 0 至宽度-1、0 至高度-1内。" + "With this function you can assign a tile-set asset to a layer to be used as a tile map in your project.":"使用此功能,您可以将图块集资源分配给图层,以在项目中用作图块地图。", + "With this function you can assign a tile-set resource to a layer to be used as a tile map in your project. You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and then an initial (x, y) position to add the tile map to the room, the tile set resource to use, and then the width and height of the tile map in {}cells{} (ie: a width of 20 and a height of 10 will create a tile map with 200 cells that is 20 cells wide and 10 cells tall), with the size of the cells themselves being defined by the tile set chosen. It is worth noting that you cannot place tiles at negative positions within the tile map, so all tiles must be placed within the cell spaces 0 to width - 1, 0 to height - 1.":"使用此函数,可以将图块集资源指定给要在项目中用作图块贴图的层。提供层 ID(使用{}{}layer_create(){}{})或层名称(作为字符串,这将对性能产生影响),然后提供初始位置(x,y),以将图块贴图添加到房间、要使用的图块集资源,然后提供{}单元格{}中图块贴图的宽度和高度(即:宽度为 20 和高度为 10 将创建具有 20 个单元格宽和 10 个单元格高的 200 个单元格的图块贴图), 单元格的大小由所选的图块集定义。值得注意的是,您无法在图块贴图中的负位置放置图块,因此所有图块必须放置在单元格空间 0 至宽度-1、0 至高度-1内。", + "You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and then an initial (x, y) position to add the tile map to the room, the tile set asset to use, and then the width and height of the tile map in {}cells{} (i.e.: a width of 20 and a height of 10 will create a tile map with 200 cells that is 20 cells wide and 10 cells tall), with the size of the cells themselves being defined by the tile set chosen.":"您提供图层 ID(在使用 {}{}layer_create(){}{} 创建图层时获得) 或图层名称 (作为字符串 - 这会对性能产生影响),然后提供初始值 (x, y) 将图块地图添加到房间的位置、要使用的图块集资源,然后是 {} 单元格 {} 中图块地图的宽度和高度 (即:宽度为 20,高度为 10 将创建一个具有 200 个单元格的图块地图 (宽 20 个单元格,高 10 个单元格),单元格本身的大小由所选图块集定义。", + "{}{}NOTE{}{} You cannot place tiles at negative positions within the tile map, so all tiles must be placed within the cell spaces 0 to width - 1, 0 to height - 1.":"{}{} 注意{}{} 您不能将图块放置在图块地图内的负位置,因此所有图块必须放置在 0 到宽度 - 1、0 到高度 - 1 的单元格空间内。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_destroy.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_destroy.json index 86f65db82..f73a6a2fa 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_destroy.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_destroy.json @@ -1,5 +1,8 @@ { "The above code checks the layer \"Tiles_trees\" to see if the given tile map element exists and if it does, then it is destroyed (but not the layer).":"上面的代码检查层\"Tiles_trees\"以查看给定的图块映射元素是否存在,如果存在,则它被销毁(但不是层)。", "The unique ID value of the tile map to be destroyed":"要销毁的图块图的唯一ID值", - "This function will destroy the given tile map element. You supply the tile map ID (which you get when you create the tile map using {}{}layer_tilemap_create(){}{} or when you use the layer ID along with {}{}layer_get_tilemap_id(){}{}) and this will remove it. Note that this does {}not{} remove the layer, only the tile map from it, and if the tile map is one that has been added in the room editor, then the next time you leave the room and then return, the tile map will be recreated again. However if the room is persistent, the tile map will be removed unless room persistence is switched off again.":"此函数将销毁给定的图块贴图元素。提供图块贴图 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图时,或将层 ID 与{}{}layer_get_tilemap_id(){}{}一起使用时获得该 ID),此操作将删除它。请注意,这{}不会{}删除该层,只删除其中的图块贴图,如果图块贴图已添加到房间编辑器中,那么下次离开房间并返回时,将再次重新创建图块贴图。但是,如果房间是持久性的,将移除图块映射,除非再次关闭房间持久性。" + "This function will destroy the given tile map element.":"此函数将销毁给定的图块地图元素。", + "This function will destroy the given tile map element. You supply the tile map ID (which you get when you create the tile map using {}{}layer_tilemap_create(){}{} or when you use the layer ID along with {}{}layer_get_tilemap_id(){}{}) and this will remove it. Note that this does {}not{} remove the layer, only the tile map from it, and if the tile map is one that has been added in the room editor, then the next time you leave the room and then return, the tile map will be recreated again. However if the room is persistent, the tile map will be removed unless room persistence is switched off again.":"此函数将销毁给定的图块贴图元素。提供图块贴图 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图时,或将层 ID 与{}{}layer_get_tilemap_id(){}{}一起使用时获得该 ID),此操作将删除它。请注意,这{}不会{}删除该层,只删除其中的图块贴图,如果图块贴图已添加到房间编辑器中,那么下次离开房间并返回时,将再次重新创建图块贴图。但是,如果房间是持久性的,将移除图块映射,除非再次关闭房间持久性。", + "You supply the tile map ID (which you get when you create the tile map using {}{}layer_tilemap_create(){}{} or when you use the layer ID along with {}{}layer_get_tilemap_id(){}{}) and this will remove it.":"您提供图块地图 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图时或将图层 ID 与 {}{}layer_get_tilemap_id(){}{} 一起使用时获得) 并这将删除它。", + "{}{}NOTE{}{} This does {}not{} remove the layer, only the tile map from it. If the tile map is one that has been added in the Room Editor, the next time you leave the room and then return, the tile map will be created again. If the room is persistent, however, the tile map will be removed unless room persistence is switched off again.":"{}{} 注意{}{} 这 {} 不会 {} 删除图层,只会删除图层中的图块地图。如果该图块地图是已在房间编辑器中添加的图块地图,则下次您离开房间然后返回时,将再次创建该图块地图。但是,如果房间是持久性的,则除非再次关闭房间持久性,否则图块地图将被删除。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_exists.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_exists.json index 0997fac88..25110ee7b 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_exists.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_exists.json @@ -2,7 +2,9 @@ "The above code checks the layer \"tilemap_trees\" to see if the given tile map element exists and if it does, then it is destroyed (but not the layer).":"上面的代码检查层\"tilemap_trees\"以查看给定的图块映射元素是否存在,如果存在,则它被销毁(而不是层)。", "The unique ID value of the layer to target (or the layer name as a string)":"目标层的唯一ID值(或作为字符串的层名)", "The unique ID value of the tile map element to check":"要检查的图块映射元素的唯一ID值", + "You can use this function to check and see if a tile map element exists on any given layer.":"您可以使用此函数来检查并查看任何给定图层上是否存在图块地图元素。", "You can use this function to check and see if a tile map element exists on any given layer. You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}) and the function will return either {}true{} if the element exists, or {}false{} if it does not.":"可以使用此函数检查并查看在任何给定层上是否存在图块贴图元素。提供层 ID(使用{}{}layer_create(){}{}创建层时获得的 ID)或层名称(作为字符串,这将产生性能影响)和图块映射元素 ID(当使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得),如果元素存在,则函数将返回{}true{},如果不存在,则返回{}false{}。", + "You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}) and the function will return either {}true{} if the element exists, or {}false{} if it does not.":"您提供图层 ID(在使用 {}{}layer_create(){}{} 创建图层时获得)\n\n或图层名称 (作为字符串 - 这会对性能产生影响)\n以及图块地图元素 ID(您在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获取)\n\n如果该元素存在,该函数将返回 {}true{}; 如果不存在,该函数将返回 {}false{}。", "{}NOTE{}: This function works within the scope of the current target room - by default the room in which the function is called - which can be set using the function {}{}{}layer_set_target_room(){}{}{}.":"{}注意{}:该函数在当前目标房间的范围内工作,默认情况下调用该函数的房间,该房间可以使用函数{}{}{}layer_set_target_room(){}{}{}设置。", "{}{}{}NOTE{}{}{} This function works within the scope of the current target room - by default the room in which the function is called - which can be set using the function {}{}{}layer_set_target_room(){}{}{}.":"{}{}{} 注意{}{}{} 该函数在当前目标房间的范围内工作 - 默认情况下是调用该函数的房间 - 可以使用函数 {}{}{}layer_set_target_room() {}{}{}设置。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_get_id.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_get_id.json index 5e452bd28..1cc3e3bb4 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_get_id.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/layer_tilemap_get_id.json @@ -1,5 +1,7 @@ { "The above code will get the layer ID for the layer named \"tilemap_trees\" and then use that to get the ID of the tile map element on that layer. This ID is then used to remove the tile map from the layer.":"上面的代码将获取名为\"tilemap_trees\"的层的层ID,然后使用该代码来获取该层上的图块映射元素的ID。然后,此 ID 用于从层中删除图块贴图。", "The unique ID value of the layer to target (or the layer name as a string)":"目标层的唯一ID值(或作为字符串的层名)", - "This function can be used to retrieve the unique ID value of the tile map element on a layer. You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and the function will return the ID value associated with the tile map element on the layer. Note that this function is specifically designed for use with tile maps that have been added in the IDE, as if you add a tile map to a layer through code using the function {}{}layer_tilemap_create(){}{}, then it will return the unique ID for the tile map element added. If the given tilemap ID is incorrect or the tilemap doesn\u0027t exist, the function will return -1.":"此函数可用于检索图层上图块贴图元素的唯一 ID 值。提供层 ID(使用{}{}layer_create(){}{}创建层时获得的 ID)或层名称(作为字符串,这将对性能产生影响),并且该函数将返回与图层上的图块贴图元素关联的 ID 值。请注意,此函数专门设计用于在 IDE 中添加的图块贴图,就好像您使用函数{}{}layer_tilemap_create(){}{}通过代码将图块贴图添加到层,那么它将返回所添加的图块贴图元素的唯一ID。如果给定的贴图ID不正确或贴图不存在,则函数将返回-1。" + "This function can be used to retrieve the unique ID value of the tile map element on a layer.":"此函数可用于检索图层上瓦片地图元素的唯一 ID 值。", + "This function can be used to retrieve the unique ID value of the tile map element on a layer. You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and the function will return the ID value associated with the tile map element on the layer. Note that this function is specifically designed for use with tile maps that have been added in the IDE, as if you add a tile map to a layer through code using the function {}{}layer_tilemap_create(){}{}, then it will return the unique ID for the tile map element added. If the given tilemap ID is incorrect or the tilemap doesn\u0027t exist, the function will return -1.":"此函数可用于检索图层上图块贴图元素的唯一 ID 值。提供层 ID(使用{}{}layer_create(){}{}创建层时获得的 ID)或层名称(作为字符串,这将对性能产生影响),并且该函数将返回与图层上的图块贴图元素关联的 ID 值。请注意,此函数专门设计用于在 IDE 中添加的图块贴图,就好像您使用函数{}{}layer_tilemap_create(){}{}通过代码将图块贴图添加到层,那么它将返回所添加的图块贴图元素的唯一ID。如果给定的贴图ID不正确或贴图不存在,则函数将返回-1。", + "You supply the layer ID (which you get when you create the layer using {}{}layer_create(){}{}) or the layer name (as a string - this will have a performance impact) and the function will return the ID value associated with the tile map element on the layer. Note that this function is specifically designed for use with tile maps that have been added in the IDE, as if you add a tile map to a layer through code using the function {}{}layer_tilemap_create(){}{}, then it will return the unique ID for the tile map element added. If the given tilemap ID is incorrect or the tilemap doesn\u0027t exist, the function will return -1.":"您提供图层 ID(在使用 {}{}layer_create(){}{} 创建图层时获得) 或图层名称 (作为字符串 - 这会对性能产生影响),该函数将返回该 ID 与图层上的图块地图元素关联的值。请注意,此函数是专门为与 IDE 中已添加的瓦片地图一起使用而设计的,就好像您使用函数 {}{}layer_tilemap_create(){}{} 通过代码将瓦片地图添加到图层一样,那么它将返回添加的图块地图元素的唯一 ID。如果给定的瓦片地图 ID 不正确或瓦片地图不存在,该函数将返回 -1。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_empty.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_empty.json index 469bd73d6..bbd690d06 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_empty.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_empty.json @@ -1,5 +1,7 @@ { "The above code gets the tile map ID from the given layer and then proceeds to check every tile cell on the map to see if it has data or not. If it does, the tile is set to empty.":"上面的代码从给定层获取块映射ID,然后继续检查映射上的每个块单元,以查看它是否有数据。如果是,则图块设置为空。", + "This function can be used to check whether a given set of tile-data is for an empty tile or not.":"此函数可用于检查给定的图块数据集是否适用于空图块。", "This function can be used to check whether a given set of tile-data is for an empty tile or not. You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return {}true{} if the tile is empty, or {}false{} if there is a tile index.":"此函数可用于检查给定的图块数据集是否用于空图块。提供了可以使用函数{}{}tilemap_get(){}{}检索的图块数据,如果图块为空,则函数将返回{}true{};如果有图块索引,则返回{}false{}。", + "You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return {}true{} if the tile is empty, or {}false{} if there is a tile index.":"您提供图块数据,可以使用函数 {}{}tilemap_get(){}{} 检索该数据,如果图块为空,则该函数将返回 {}true{},如果存在,则该函数将返回 {}false{} 是一个平铺索引。", "the tile-data to check":"要检查的图块数据" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_flip.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_flip.json index de951ff1d..e45820557 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_flip.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_flip.json @@ -1,5 +1,7 @@ { "The above code gets the tile map ID from the given layer and then gets the x and y cell position for the tile under the mouse. This position is then used to get the tile-data which is flipped and then used to set the tile again.":"上述代码从给定层获取块映射ID,然后在鼠标下获取块的x和y单元位置。然后,此位置用于获取翻转的图块数据,然后用于再次设置图块。", + "This function can be used to check whether in a given set of tile-data the tile has been flipped or not.":"该函数可用于检查给定的图块数据集中图块是否已被翻转。", "This function can be used to check whether in a given set of tile-data the tile has been flipped or not. You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return {}true{} if the tile is flipped, or {}false{} if not.":"此函数可用于检查在给定图块数据集中,图块是否已翻转。提供了可使用函数{}{}tilemap_get(){}{}检索的图块数据,如果图块翻转,函数将返回{}true{},否则返回{}false{}。", + "You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return {}true{} if the tile is flipped, or {}false{} if not.":"您提供图块数据,可以使用函数 {}{}tilemap_get(){}{} 检索该数据,如果图块翻转,该函数将返回 {}true{},否则返回 {}false{}。", "the tile-data to check":"要检查的图块数据" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_index.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_index.json index 2a35decc4..71f0db011 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_index.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_index.json @@ -1,6 +1,9 @@ { "The above code gets the tile map ID from the given layer and then uses that to get the tile-data for the cell under the mouse position. This data is then used to set the tile index to a random number.":"上面的代码从给定层获取块映射ID,然后使用它来获取鼠标位置下单元的块数据。然后,此数据用于将图块索引设置为随机数。", + "This function can be used to get the tile index (the position of the tile within the tile set image) from a set of tile-data.":"此函数可用于从一组图块数据中获取图块索引 (图块集图像中图块的位置)。", "This function can be used to get the tile index (the position of the tile within the tile set image) from a set of tile-data. You specify the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return an integer value for the index.":"此函数可用于从图块数据集中获取图块索引(图块在图块集图像中的位置)。指定可以使用函数{}{}tilemap_get(){}{}检索的图块数据,该函数将返回索引的整数值。", "When using this function, ensure that the given tile-data is valid, otherwise the returned index value will not be valid either which may result in unexpected behaviour.":"使用此函数时,请确保给定的图块数据有效,否则返回的索引值也将无效,这可能会导致意外行为。", - "the tile-data to check":"要检查的图块数据" + "You specify the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return an integer value for the index.":"您指定图块数据,可以使用函数 {}{}tilemap_get(){}{} 检索该数据,并且该函数将返回索引的整数值。", + "the tile-data to check":"要检查的图块数据", + "{}{}NOTE{}{} When using this function, ensure that the given tile data is valid, otherwise the returned index value will not be valid either which may result in unexpected behaviour.":"{}{} 注意{}{} 使用此函数时,请确保给定的图块数据有效,否则返回的索引值也将无效,这可能会导致意外行为。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_mirror.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_mirror.json index be1597b35..904ebae69 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_mirror.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_mirror.json @@ -1,5 +1,7 @@ { "The above code gets the tile map ID from the given layer and then gets the x and y cell position for the tile under the mouse. This position is then used to get the tile-data which is mirrored and then used to set the tile again.":"上述代码从给定层获取块映射ID,然后在鼠标下获取块的x和y单元位置。然后,此位置用于获取镜像的图块数据,然后用于再次设置图块。", + "This function can be used to check whether in a given set of tile-data the tile has been mirrored or not.":"此函数可用于检查给定的图块数据集中是否已镜像图块。", "This function can be used to check whether in a given set of tile-data the tile has been mirrored or not. You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return {}true{} if the tile is mirrored, or {}false{} if not.":"此函数可用于检查在给定的图块数据集中,图块是否已镜像。提供了可使用函数{}{}tilemap_get(){}{}检索的分块数据,如果分块被镜像,则函数将返回{}true{},否则返回{}false{}。", + "You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return {}true{} if the tile is mirrored, or {}false{} if not.":"您提供图块数据,可以使用函数 {}{}tilemap_get(){}{} 检索该数据,如果图块已镜像,则该函数将返回 {}true{},否则返回 {}false{}。", "the tile-data to check":"要检查的图块数据" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_rotate.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_rotate.json index 469b39075..bf75a1296 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_rotate.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_get_rotate.json @@ -1,5 +1,7 @@ { "The above code gets the tile map ID from the given layer and then gets the x and y cell position for the tile under the mouse. This position is then used to get the tile-data which is rotated and then used to set the tile again.":"上述代码从给定层获取块映射ID,然后在鼠标下获取块的x和y单元位置。然后,此位置用于获取旋转的图块数据,然后用于再次设置图块。", + "This function can be used to check whether in a given set of tile-data the tile has been rotated 90 degrees or not.":"此函数可用于检查给定的图块数据集中图块是否已旋转 90 度。", "This function can be used to check whether in a given set of tile-data the tile has been rotated 90 degrees or not. You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return {}true{} if the tile is rotated, or {}false{} if not.":"此函数可用于检查在给定图块数据集中,图块是否已旋转 90 度。提供了可以使用函数{}{}tilemap_get(){}{}检索的图块数据,如果块旋转,函数将返回{}true{},否则返回{}false{}。", + "You give the tile data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return {}true{} if the tile is rotated, or {}false{} if not.":"您提供图块数据,可以使用函数 {}{}tilemap_get(){}{} 检索该数据,如果图块旋转,该函数将返回 {}true{},否则返回 {}false{}。", "the tile-data to check":"要检查的图块数据" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_empty.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_empty.json index acc35068b..04eed3c7d 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_empty.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_empty.json @@ -1,6 +1,8 @@ { "The above code gets the tile map ID from the given layer and then proceeds to check every tile cell on the map to see if it has data or not. If it does, the tile is set to empty.":"上面的代码从给定层获取块映射ID,然后继续检查映射上的每个块单元,以查看它是否有数据。如果是,则图块设置为空。", + "This function can be used to set a given set of tile-data to be an empty tile.":"此函数可用于将给定的图块数据集设置为空图块。", "This function can be used to set a given set of tile-data to be an empty tile. You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and the function will return {}true{} if the tile is empty, or {}false{} if there is a tile index. The function will return a modified tile-data set which can then be applied using the {}{}tilemap_set(){}{} function.":"此函数可用于将给定的图块数据集设置为空图块。提供了可以使用函数{}{}tilemap_get(){}{}检索的图块数据,如果图块为空,则函数将返回{}true{};如果有图块索引,则返回{}false{}。函数将返回修改的图块数据集,然后可以使用{}{}tilemap_set(){}{}函数应用该数据集。", "This function can be used to set a given set of tile-data to be an empty tile. You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}. The function will return a modified tile-data set which can then be applied using the {}{}tilemap_set(){}{} function.":"此函数可用于将给定的图块数据集设置为空图块。提供了可以使用函数 {}{}tilemap_get(){}{} 检索的图块数据。函数将返回修改的图块数据集,然后可以使用 {}{}tilemap_set(){}{} 函数应用该数据集。", + "You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}. The function will return a modified tile-data set which can then be applied using the {}{}tilemap_set(){}{} function.":"您提供图块数据,可以使用函数 {}{}tilemap_get(){}{} 检索该数据。该函数将返回修改后的图块数据集,然后可以使用 {}{}tilemap_set(){}{} 函数应用该数据集。", "the tile-data to set":"要设置的图块数据" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_flip.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_flip.json index 4502d2acf..e6a1e329b 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_flip.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_flip.json @@ -1,6 +1,8 @@ { "Set to {}true{} to flip and {}false{} to leave it as-is":"设置为{}true{}以翻转,{}false{}保留其状态", "The above code gets the tile map ID from the given layer and then gets the x and y cell position for the tile under the mouse. This position is then used to get the tile-data which is flipped and then used to set the tile again.":"上述代码从给定层获取块映射ID,然后在鼠标下获取块的x和y单元位置。然后,此位置用于获取翻转的图块数据,然后用于再次设置图块。", + "This function can be used to set a given set of tile-data to flip the tile or not.":"此函数可用于设置给定的图块数据集以翻转图块或不翻转图块。", "This function can be used to set a given set of tile-data to flip the tile or not. You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and then set the flip argument to either {}true{} if you want the tile flipped, or {}false{} if you want the tile to be in its default, un-flipped state. The function will return a modified tile-data set which can then be applied using the {}{}tilemap_set(){}{} function.":"此函数可用于设置给定的图块数据集以翻转或不翻转图块。提供可使用函数{}{}tilemap_get(){}{}检索的图块数据,然后将翻转参数设置为{}true{}(如果要图块翻转),或{}false{}(如果希望图块处于默认未翻转状态)。函数将返回修改的图块数据集,然后可以使用{}{}tilemap_set(){}{}函数应用该数据集。", + "You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and then set the flip argument to either {}true{} if you want the tile flipped, or {}false{} if you want the tile to be in its default, un-flipped state. The function will return a modified tile-data set which can then be applied using the {}{}tilemap_set(){}{} function.":"您提供图块数据,可以使用函数 {}{}tilemap_get(){}{} 检索该数据,然后将翻转参数设置为 {}true{}( 如果您希望图块翻转) 或 {}false{} 如果您希望图块处于默认的未翻转状态。该函数将返回修改后的图块数据集,然后可以使用 {}{}tilemap_set(){}{} 函数应用该数据集。", "the tile-data to set":"要设置的图块数据" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_index.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_index.json index e14518f0b..12a27951a 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_index.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_index.json @@ -1,6 +1,8 @@ { "The above code gets the tile map ID from the given layer and then uses that to get the tile-data for the cell under the mouse position. This data is then used to set the tile index to a random number.":"上面的代码从给定层获取块映射ID,然后使用它来获取鼠标位置下单元的块数据。然后,此数据用于将图块索引设置为随机数。", "The integer index value of the tile to use":"要使用的图块的整数索引值", + "This function can be used to set the tile index (the position of the tile within the tile set image) for a set of tile-data.":"此函数可用于设置一组图块数据的图块索引 (图块集图像中图块的位置)。", "This function can be used to set the tile index (the position of the tile within the tile set image) for a set of tile-data. You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and then the integer value that represents the position of the tile (its index) within the tile set. The function will return a modified tile-data set which can then be applied using the {}{}tilemap_set(){}{} function.":"此函数可用于为一组图块数据设置图块索引(图块在图块集图像中的位置)。给出可以使用函数{}{}tilemap_get(){}{}检索的图块数据,然后给出表示图块集内图块位置(其索引)的整数值。函数将返回修改的图块数据集,然后可以使用{}{}tilemap_set(){}{}函数应用该数据集。", + "You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and then the integer value that represents the position of the tile (its index) within the tile set. The function will return a modified tile-data set which can then be applied using the {}{}tilemap_set(){}{} function.":"您提供图块数据 (可以使用函数 {}{}tilemap_get(){}{} 检索),然后给出表示图块在图块集中的位置 (其索引) 的整数值。该函数将返回修改后的图块数据集,然后可以使用 {}{}tilemap_set(){}{} 函数应用该数据集。", "the tile-data to set":"要设置的图块数据" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_mirror.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_mirror.json index 803999cd7..dcdafc5fc 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_mirror.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tile_set_mirror.json @@ -1,6 +1,8 @@ { "Set to {}true{} to mirror and {}false{} to leave it as-is":"设置为{}true{}进行镜像,{}false{}保留其辅助函数", "The above code gets the tile map ID from the given layer and then gets the x and y cell position for the tile under the mouse. This position is then used to get the tile-data which is mirrored and then used to set the tile again.":"上述代码从给定层获取块映射ID,然后在鼠标下获取块的x和y单元位置。然后,此位置用于获取镜像的图块数据,然后用于再次设置图块。", + "This function can be used to set a given set of tile-data to mirror the tile or not.":"此函数可用于设置给定的图块数据集以镜像或不镜像图块。", "This function can be used to set a given set of tile-data to mirror the tile or not. You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and then set the mirror argument to either {}true{} if you want the tile mirrored, or {}false{} if you want the tile to be in its default, un-mirrored state. The function will return a modified tile-data set which can then be applied using the {}{}tilemap_set(){}{} function.":"此函数可用于设置给定的图块数据集以镜像或不镜像图块。提供可使用函数{}{}tilemap_get(){}{}检索的图块数据,然后将镜像参数设置为{}true{}(如果要镜像图块块),或{}false{}(如果希望分块处于默认、未镜像状态)。函数将返回修改的图块数据集,然后可以使用{}{}tilemap_set(){}{}函数应用该数据集。", + "You give the tile-data, which can be retrieved using the function {}{}tilemap_get(){}{}, and then set the mirror argument to either {}true{} if you want the tile mirrored, or {}false{} if you want the tile to be in its default, un-mirrored state. The function will return a modified tile-data set which can then be applied using the {}{}tilemap_set(){}{} function.":"您提供图块数据,可以使用函数 {}{}tilemap_get(){}{} 检索该数据,然后将镜像参数设置为 {}true{}( 如果您希望镜像图块) 或 {}false{} 如果您希望图块处于默认的非镜像状态。该函数将返回修改后的图块数据集,然后可以使用 {}{}tilemap_set(){}{} 函数应用该数据集。", "the tile-data to set":"要设置的图块数据" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_clear.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_clear.json index b53b43aae..c5e75d3b5 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_clear.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_clear.json @@ -2,5 +2,7 @@ "The above code gets the ID value of a tile map created in the room editor, and then clears it using \"empty\" tiles.":"上面的代码获取在房间编辑器中创建的图块图的ID值,然后使用\"空\"图块清除它。", "The tile data to use to clear the layer":"用于清除图层的图块数据", "The unique ID value of the tile map element to change":"要更改的图块图元素的唯一ID值", - "Using this function you can clear/set all the tiles on a given tile-map. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then supply the tile data that you wish to clear the layer with. A default value of 0 will clear all the tiles from the layer (essentially making all tiles \"empty\"), while you can use the dedicated {}tile_*{} functions to create your own tile data to clear the tile map with.":"使用此函数,可以清除/设置给定贴图上的所有图块。指定图块贴图元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或使用函数{}{}layer_tilemap_get_id(){}{}时获得该 ID),然后提供要清除该层的图块数据。默认值0将清除该层的所有图块(实质上使所有图块\"为空\"),而您可以使用专用的{}tile_*{}函数创建自己的图块数据以使用清除图块贴图。" + "Using this function you can clear/set all the tiles on a given tile-map.":"使用此功能,您可以清除 / 设置给定图块地图上的所有图块。", + "Using this function you can clear/set all the tiles on a given tile-map. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then supply the tile data that you wish to clear the layer with. A default value of 0 will clear all the tiles from the layer (essentially making all tiles \"empty\"), while you can use the dedicated {}tile_*{} functions to create your own tile data to clear the tile map with.":"使用此函数,可以清除/设置给定贴图上的所有图块。指定图块贴图元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或使用函数{}{}layer_tilemap_get_id(){}{}时获得该 ID),然后提供要清除该层的图块数据。默认值0将清除该层的所有图块(实质上使所有图块\"为空\"),而您可以使用专用的{}tile_*{}函数创建自己的图块数据以使用清除图块贴图。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then supply the tile data that you wish to clear the layer with. A default value of 0 will clear all the tiles from the layer (essentially making all tiles \"empty\"), while you can use the dedicated {}tile_*{} functions to create your own tile data to clear the tile map with.":"您提供图块地图元素 ID(当您使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),并且然后提供您想要清除图层的图块数据。默认值 0 会清除图层中的所有图块 (实质上使所有图块 \" 清空 \"),同时您可以使用专用的 {}tile_*{} 函数创建您自己的图块数据来清除图块地图。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get.json index de62f6277..cc4448513 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get.json @@ -1,8 +1,12 @@ { + "Note that we are using x/y cell positions based on the size of the tile map grid and {}not{} as a position in the room, so \"cell_x\" is a value from 0 to {}tile map width{}, and \"cell_y\" is a value from 0 to {}tile map height{}. If you need to get the data for a tile at a specific room position then you need to use the function {}{}tilemap_get_at_pixel(){}{}.":"请注意,我们根据图块地图网格的大小使用 x/y 单元格位置,而{}不是{}作为房间中的位置,因此 \"cell_x\" 是一个从 0 到 {} 图块地图宽度 {} 的值, \"cell_y\" 是一个从 0 到 {} 图块地图高度 {} 的值。如果您需要获取特定房间位置处图块的数据,则需要使用函数 {}{}tilemap_get_at_pixel(){}{}。", "The above code gets the ID for the tile map on the layer \"Tiles_Sky\" and then uses that to get the data from the tile at cell (0, 0). This tile data is then flipped before being used to set the tile on the tile map again.":"上面的代码获取\"Tiles_Sky\"层上图块贴图的ID,然后使用该ID从单元(0,0)的块中获取数据。然后翻转此图块数据,然后再用于设置图块贴图上的图块。", "The cell along the x-axis to get the tile data from":"沿x轴的单元格,用于从中获取图块数据", "The cell along the y-axis to get the tile data from":"沿y轴的单元格,用于从中获取图块数据", "The unique ID value of the tile map element to get the tile-data of":"图块图元素的唯一ID值,用于获取", + "Using this function you can retrieve the tile data from a cell of the tile map element.":"使用此函数,您可以从瓦片地图元素的单元格中检索瓦片数据。", "Using this function you can retrieve the tile data from a cell of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), as well as the {}cell{} x and y position and the function will return the tile data \"blob\". This data is essentially a bit mask that contains the tile index, the flip/rotate/mirror booleans and any mask data that has been applied (see {}{}tilemap_set_mask(){}{} for details), and the resulting data value can then be used in the {}tile_*{} functions to change a tiles properties. Note that we are using x/y cell positions based on the size of the tile map grid and {}not{} as a position in the room, so \"cell_x\" is a value from 0 to {}tile map width{}, and \"cell_y\" is a value from 0 to {}tile map height{}. If you need to get the data for a tile at a specific room position then you need to use the function {}{}tilemap_get_at_pixel(){}{}.":"使用此函数,可以从图块地图元素的单元格中检索图块数据。提供图块贴图元素Id(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}创建图块贴图元素时获得的Id),以及{}单元格{}的x和y位置,该函数将返回图块数据\"blob\"。此数据基本上是一个位掩码,其中包含互动程序索引、翻转/旋转/镜像布尔值和已应用的任何掩码数据(有关详细信息,请参见{}{}tilemap_set_mask(){}{}),然后可以在{}互动程序{}函数中使用生成的数据值来更改互动程序属性。请注意,我们使用基于互动程序贴图网格大小的x/ y单元格位置,而{}不是{}作为房间中的位置,因此\"cell_x\"是0到{}tile_map_width{}的值,而\"cell_y\"是0到{}tile_map_height{}的值。如果需要在特定房间位置获取互动程序的数据,则需要使用函数{}{}tilemap_get_at_pixel(){}{}。", - "{}IMPORTANT!{} If the tiles in the tile map have been unchanged (ie: they are not rotated or flipped etc...), then the return value of the tile set data will be exactly equal to the index of the tile on the tile set. So you can create \"collision maps\" of tiles using one tile at index 1 in the tile set - for example - then use this function to check for 1 or 0 (an empty tile) to calculate collisions.":"{}重要!{}如果互动程序映射中的互动程序未更改(即:它们未旋转或翻转等等),则互动程序集数据的返回值将与互动程序集上互动程序的索引完全相等。因此,您可以使用互动程序集中索引1处的一个互动程序(例如,使用此函数检查1或0(空互动程序))来创建互动程序的\"碰撞贴图\",以计算碰撞。" + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), as well as the {}cell{} x and y position and the function will return the tile data \"blob\". This data is essentially a bit mask that contains the tile index, the flip/rotate/mirror booleans and any mask data that has been applied (see {}{}tilemap_set_mask(){}{} for details), and the resulting data value can then be used in the {}tile_*{} functions to change a tile\u0027s properties.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),如下所示以及 {} 单元格 {}x 和 y 位置,该函数将返回图块数据 \"blob\"。该数据本质上是一个位掩码,其中包含图块索引、翻转 / 旋转 / 镜像布尔值以及已应用的任何掩码数据 (有关详细信息,请参阅 {}{}tilemap_set_mask(){}{}) 以及结果数据值然后可以在 {}tile_*{} 函数中使用来更改图块的属性。", + "{}IMPORTANT!{} If the tiles in the tile map have been unchanged (ie: they are not rotated or flipped etc...), then the return value of the tile set data will be exactly equal to the index of the tile on the tile set. So you can create \"collision maps\" of tiles using one tile at index 1 in the tile set - for example - then use this function to check for 1 or 0 (an empty tile) to calculate collisions.":"{}重要!{}如果互动程序映射中的互动程序未更改(即:它们未旋转或翻转等等),则互动程序集数据的返回值将与互动程序集上互动程序的索引完全相等。因此,您可以使用互动程序集中索引1处的一个互动程序(例如,使用此函数检查1或0(空互动程序))来创建互动程序的\"碰撞贴图\",以计算碰撞。", + "{}{}IMPORTANT{}{} If the tiles in the tile map have been unchanged (i.e.: they are not rotated, flipped, etc.), then the return value of the tile set data will be exactly equal to the index of the tile on the tile set. So you can create \"collision maps\" of tiles using one tile at index 1 in the tile set - for example - then use this function to check for 1 or 0 (an empty tile) to calculate collisions.":"{}{} 重要{}{} 如果图块地图中的图块没有发生变化 (即:它们没有旋转、翻转等),那么图块集数据的返回值将恰好等于瓷砖组上的瓷砖。因此,您可以使用图块集中索引 1 处的一个图块创建图块的 \" 碰撞图 \"( 例如),然后使用此函数检查 1 或 0( 空图块) 以计算碰撞。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_at_pixel.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_at_pixel.json index 5c76997b0..28dc854ef 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_at_pixel.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_at_pixel.json @@ -3,6 +3,9 @@ "The position along the x-axis to get the tile data from (in room pixels)":"沿x轴从(房间像素中)获取图块数据的位置", "The position along the y-axis to get the tile data from (in room pixels)":"沿y轴从(房间像素中)获取图块数据的位置", "The unique ID value of the tile map element to get the tile-data of":"图块图元素的唯一ID值,用于获取", + "Using this function you can retrieve the tile data from a position (within the room) of the tile map element.":"使用此函数,您可以从瓦片地图元素的某个位置 (房间内) 检索瓦片数据。", "Using this function you can retrieve the tile data from a position (within the room) of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}) as well as the x and y position {}in the room{} to get the tile data from and the function will return the tile data \"blob\". This data is essentially a bit mask that contains the tile index, the flip/rotate/mirror booleans and any mask data that has been applied (see {}{}tilemap_set_mask(){}{} for details), and the resulting data value can then be used in the {}tile_*{} functions to change a tiles properties. If you need to get the tile data from a specific tile cell you should be using the function {}{}tilemap_get(){}{} instead.":"使用此函数,您可以从图块地图元素的某个位置(在房间内)检索图块数据。您可以提供互动程序地图元素Id(当您使用{}{}layer_tilemap_create(){}{}创建互动程序地图元素时,或者当您使用函数{}{}layer_tilemap_get_id(){}{})以及房间{}中的x和y位置{}从中获取互动程序地图元素数据时,将获得此ID,并且此函数将返回互动程序数据\"blob\"。此数据基本上是一个位掩码,其中包含互动程序索引、翻转/旋转/镜像布尔值和已应用的任何掩码数据(有关详细信息,请参见{}{}tilemap_set_mask(){}{}),然后可以在{}互动程序{}函数中使用生成的数据值来更改互动程序属性。如果需要从特定的互动程序单元格获取互动程序数据,则应改用函数{}{}tilemap_get(){}{}。", - "{}IMPORTANT!{} If the tiles in the tile map have been unchanged (ie: they are {}not{} rotated or flipped etc...), then the return value of the tile set data will be exactly equal to the index of the tile on the tile set. So you can create \"collision maps\" of tiles using one tile at index 1 in the tile set - for example - then use this function to check for 1 or 0 (an empty tile) to calculate collisions.":"{}重要!{} 如果图块地图中的图块未更改(即:它们{}不{}旋转或翻转等...),则图块集数据的返回值将恰好等于图块集上的图块的索引。因此,您可以使用图块集中索引为1的一个图块创建图块的\"碰撞贴图\"-例如-然后使用此函数检查1或0(空图块)以计算碰撞。" + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}) as well as the x and y position {}in the room{} to get the tile data from and the function will return the tile data \"blob\". This data is essentially a bit mask that contains the tile index, the flip/rotate/mirror booleans and any mask data that has been applied (see {}{}tilemap_set_mask(){}{} for details), and the resulting data value can then be used in the {}tile_*{} functions to change a tiles properties. If you need to get the tile data from a specific tile cell you should be using the function {}{}tilemap_get(){}{} instead.":"您还可以提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得) 作为获取图块数据的 {} 房间中 {} 的 x 和 y 位置,该函数将返回图块数据 \"blob\"。该数据本质上是一个位掩码,其中包含图块索引、翻转 / 旋转 / 镜像布尔值以及已应用的任何掩码数据 (有关详细信息,请参阅 {}{}tilemap_set_mask(){}{}) 以及结果数据值然后可以在 {}tile_*{} 函数中使用来更改图块属性。如果您需要从特定图块单元格获取图块数据,则应使用函数 {}{}tilemap_get(){}{}。", + "{}IMPORTANT!{} If the tiles in the tile map have been unchanged (ie: they are {}not{} rotated or flipped etc...), then the return value of the tile set data will be exactly equal to the index of the tile on the tile set. So you can create \"collision maps\" of tiles using one tile at index 1 in the tile set - for example - then use this function to check for 1 or 0 (an empty tile) to calculate collisions.":"{}重要!{} 如果图块地图中的图块未更改(即:它们{}不{}旋转或翻转等...),则图块集数据的返回值将恰好等于图块集上的图块的索引。因此,您可以使用图块集中索引为1的一个图块创建图块的\"碰撞贴图\"-例如-然后使用此函数检查1或0(空图块)以计算碰撞。", + "{}{}IMPORTANT{}{} If the tiles in the tile map have been unchanged (i.e.: they are {}not{} rotated, flipped, etc.), then the return value of the tile set data will be exactly equal to the index of the tile on the tile set. So you can create \"collision maps\" of tiles using one tile at index 1 in the tile set - for example - then use this function to check for 1 or 0 (an empty tile) to calculate collisions.":"{}{} 重要{}{} 如果图块地图中的图块未发生变化 (即:它们 {} 未 {} 旋转、翻转等),则图块集数据的返回值将完全相等到图块集上图块的索引。因此,您可以使用图块集中索引 1 处的一个图块创建图块的 \" 碰撞图 \"( 例如),然后使用此函数检查 1 或 0( 空图块) 以计算碰撞。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_cell_x_at_pixel.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_cell_x_at_pixel.json index b513a4e81..f6561f986 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_cell_x_at_pixel.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_cell_x_at_pixel.json @@ -1,7 +1,11 @@ { + "Note that if the value is outside of the tile map area, and no cell is available, it will return -1.":"请注意,如果该值位于图块地图区域之外,并且没有可用的单元格,则它将返回 -1。", "The above code uses the retrieved tile map ID to get the cell position from a set of room coordinates and then store the data for any tile found there in an instance variable.":"上面的代码使用检索到的图块贴图ID从一组房间坐标中获取单元位置,然后在实例变量中存储在其中找到的任何块的数据。", "The unique ID value of the tile map element to get the cell x position of":"块映射元素的唯一ID值,用于获取", "The x position within the room to use for getting the cell":"房间内用于获取细胞的x位置", "The y position within the room to use for getting the cell":"房间内用于获取细胞的y位置", - "Using this function you can retrieve the x-axis position of an individual tile map cell by giving the relative x-axis position within the room. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), as well as the x and y position {}within the room{} and the function will return the x position of the cell within the tile map for that point. Note that if the value is outside of the tile map area, and no cell is available, it will return -1.":"使用此函数,可以通过给出房间内的相对x轴位置来检索单个图块贴图单元的x轴位置。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID)以及房间{}内的 x 和 y 位置{},该函数将返回该点图块贴图中单元格的 x 位置。请注意,如果值在图块映射区域之外,且没有可用的单元格,则返回-1。" + "Using this function you can retrieve the x-axis position of an individual tile map cell by giving the relative x-axis position within the room.":"使用此函数,您可以通过给出房间内的相对 x 轴位置来检索单个图块地图单元格的 x 轴位置。", + "Using this function you can retrieve the x-axis position of an individual tile map cell by giving the relative x-axis position within the room. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), as well as the x and y position {}within the room{} and the function will return the x position of the cell within the tile map for that point. Note that if the value is outside of the tile map area, and no cell is available, it will return -1.":"使用此函数,可以通过给出房间内的相对x轴位置来检索单个图块贴图单元的x轴位置。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID)以及房间{}内的 x 和 y 位置{},该函数将返回该点图块贴图中单元格的 x 位置。请注意,如果值在图块映射区域之外,且没有可用的单元格,则返回-1。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), as well as the x and y position {}within the room{} and the function will return the x position of the cell within the tile map for that point.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),如下所示以及 {} 房间内 {} 的 x 和 y 位置,该函数将返回该点的图块地图内单元格的 x 位置。", + "{}{}Real{}{} (x-axis cell position or -1 if there is an error)":"{}{}Real{}{}(x 轴单元格位置,如果出现错误,则为 -1)" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_cell_y_at_pixel.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_cell_y_at_pixel.json index bf6910337..0eae7130f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_cell_y_at_pixel.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_cell_y_at_pixel.json @@ -1,7 +1,11 @@ { + "Note that if the value is outside of the tile map area, and no cell is available, it will return -1.":"请注意,如果该值位于图块地图区域之外,并且没有可用的单元格,则它将返回 -1。", "The above code uses the retrieved tile map ID to get the cell position from a set of room coordinates and then store the data for any tile found there in an instance variable.":"上面的代码使用检索到的图块贴图ID从一组房间坐标中获取单元位置,然后在实例变量中存储在其中找到的任何块的数据。", "The unique ID value of the tile map element to get the cell y position of":"块映射元素的唯一ID值,用于获取", "The x position within the room to use for getting the cell":"房间内用于获取细胞的x位置", "The y position within the room to use for getting the cell":"房间内用于获取细胞的y位置", - "Using this function you can retrieve the y-axis position of an individual tile map cell by giving the relative y-axis position within the room. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), as well as the x and y position {}within the room{} and the function will return the y position of the cell within the tile map for that point. Note that if the value is outside of the tile map area, and no cell is available, it will return -1.":"使用此函数,可以通过给出房间内的相对y轴位置来检索单个贴图单元的y轴位置。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID)以及房间{}内的 x 和 y 位置{},该函数将返回该点图块贴图内单元格的 y 位置。请注意,如果值在图块映射区域之外,且没有可用的单元格,则返回-1。" + "Using this function you can retrieve the y-axis position of an individual tile map cell by giving the relative y-axis position within the room.":"使用此函数,您可以通过给出房间内的相对 y 轴位置来检索单个图块地图单元格的 y 轴位置。", + "Using this function you can retrieve the y-axis position of an individual tile map cell by giving the relative y-axis position within the room. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), as well as the x and y position {}within the room{} and the function will return the y position of the cell within the tile map for that point. Note that if the value is outside of the tile map area, and no cell is available, it will return -1.":"使用此函数,可以通过给出房间内的相对y轴位置来检索单个贴图单元的y轴位置。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID)以及房间{}内的 x 和 y 位置{},该函数将返回该点图块贴图内单元格的 y 位置。请注意,如果值在图块映射区域之外,且没有可用的单元格,则返回-1。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), as well as the x and y position {}within the room{} and the function will return the y position of the cell within the tile map for that point.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),如下所示以及 {} 房间内 {} 的 x 和 y 位置,该函数将返回该点的图块地图内单元格的 y 位置。", + "{}{}Real{}{} (y-axis cell position or -1 if there is an error)":"{}{}Real{}{}(y 轴单元格位置,如果出现错误,则为 -1)" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_frame.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_frame.json index ffae8a3e5..72df496ec 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_frame.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_frame.json @@ -1,6 +1,8 @@ { + "Since tiles can be animated, it can sometimes be useful to know which frame is currently being drawn and react accordingly, so with this function you can retrieve the current frame index for a given tile map.":"由于图块可以进行动画处理,因此了解当前正在绘制哪个帧并做出相应反应有时会很有用,因此使用此函数,您可以检索给定图块地图的当前帧索引。", "Since tiles can be animated, it can sometimes be useful to know which frame is currently being drawn and react accordingly, so with this function you can retrieve the current frame index for a given tile map. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the frame index.":"由于可以动画地块,因此有时知道当前正在绘制的帧并做出相应的反应会很有用,因此使用此函数可以检索给定图块贴图的当前帧索引。给定图块映射元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块映射元素时或使用函数{}{}layer_tilemap_get_id(){}{}时获得该 ID),该函数将返回帧索引。", "The above code checks the current animation frame for the given tile map on the given layer, and sets a global variable based on the return value.":"上述代码检查给定层上给定图块映射的当前动画帧,并基于返回值设置全局变量。", "The unique ID value of the tile map element to get the frame index of":"块映射元素的唯一ID值,用于获取", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the frame index.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),然后该函数将返回帧索引。", "{}{}Real{}{} (between 0 (inclusive) and the maximum number of frames of animation (exclusive))":"{}{}Real{}{}(0(包括)和动画的最大帧数(除外)之间)" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_global_mask.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_global_mask.json index 8041ac08a..7d8cc2ea7 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_global_mask.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_global_mask.json @@ -1,4 +1,9 @@ { + "For further information on global tile map bit masks, see the function {}{}tilemap_set_global_mask{}{}.":"有关全局图块地图位掩码的更多信息,请参阅函数 {}{}tilemap_set_global_mask{}{}。", "The above code gets the global mask value associated with all tile maps. If it is not the same as the value defined in the variable \"new_mask\", then it is set to that value.":"上述代码获得与所有图块贴图相关联的全局掩码值。如果它与变量\"new_mask\"中定义的值不同,则将其设置为该值。", - "This function can be used to retrieve the bit mask value for {}all{} tile maps, returning the current mask value or -1 if there is an error or 0 if no mask is specified. For further information on global tile map bit masks, see the function {}{}tilemap_set_global_mask(){}{}.":"此函数可用于检索{}all{}图块贴图的位掩码值,如果出现错误,则返回当前掩码值或-1;如果未指定掩码,则返回0。有关全局图块映射位掩码的更多信息,请参见函数{}{}tilemap_set_global_mask(){}{}。" + "The above code gets the global mask value associated with all tile maps. If it is not the same as the value defined in the variable {}_new_mask{}, then it is set to that value.":"上面的代码获取与所有瓦片地图关联的全局掩码值。如果它与变量 {}_new_mask{} 中定义的值不同,则将其设置为该值。", + "The function returns the current mask value or -1 if there is an error.":"该函数返回当前掩码值,如果出现错误,则返回 -1。", + "This function can be used to retrieve the bit mask value for {}all{} tile maps, returning the current mask value or -1 if there is an error or 0 if no mask is specified. For further information on global tile map bit masks, see the function {}{}tilemap_set_global_mask(){}{}.":"此函数可用于检索{}all{}图块贴图的位掩码值,如果出现错误,则返回当前掩码值或-1;如果未指定掩码,则返回0。有关全局图块映射位掩码的更多信息,请参见函数{}{}tilemap_set_global_mask(){}{}。", + "This function returns the global bit mask value, the one used for {}all{} tile maps.":"此函数返回全局位掩码值,该值用于 {} 所有 {} 图块地图。", + "{}{}Real{}{} (the global mask value or -1 in case of an error)":"{}{}Real{}{}( 全局掩码值,如果出现错误,则为 -1)" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_height.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_height.json index f5f9181b6..dd4477836 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_height.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_height.json @@ -1,5 +1,7 @@ { "The above code uses the retrieved tile map ID to get the tile width and height of the tile map and then uses those values to set an instance variable.":"上面的代码使用检索到的图块图ID来获取图块图的宽度和高度,然后使用这些值来设置实例变量。", "The unique ID value of the tile map element to get the height of":"图块贴图元素的唯一ID值,以获取", - "Using this function you can retrieve the height (in cells) of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the height (number of cells wide).":"使用此函数可以检索图块贴图元素的高度(以单元格为单位)。可以指定图块贴图元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或当您使用函数{}{}layer_tilemap_get_id(){}{}),函数将返回高度(单元格宽度的数量)。" + "Using this function you can retrieve the height (in cells) of the tile map element.":"使用此函数,您可以检索图块地图元素的高度 (以单元格为单位)。", + "Using this function you can retrieve the height (in cells) of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the height (number of cells wide).":"使用此函数可以检索图块贴图元素的高度(以单元格为单位)。可以指定图块贴图元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或当您使用函数{}{}layer_tilemap_get_id(){}{}),函数将返回高度(单元格宽度的数量)。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the height (number of cells wide).":"您提供图块地图元素 ID(当您使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),并且该函数将返回高度 (宽度的单元格数量)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_mask.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_mask.json index e8651c3f9..54cf66b38 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_mask.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_mask.json @@ -1,5 +1,9 @@ { + "For further information on tile map bit masks, see the function {}{}tilemap_set_mask{}{}.":"有关图块地图位掩码的更多信息,请参阅函数 {}{}tilemap_set_mask{}{}。", "The above code gets the tile map ID from the given layer and then checks the mask value associated with it. If it is not the same as the value defined in the variable \"new_mask\", then it is set to that value.":"上述代码从给定层获取图块映射ID,然后检查与其相关联的掩码值。如果它与变量\"new_mask\"中定义的值不同,则将其设置为该值。", + "The above code gets the tile map ID from the given layer and then checks the mask value associated with it. If it is not the same as the value defined in the variable {}_new_mask{}, then it is set to that value.":"上面的代码从给定图层获取图块地图 ID,然后检查与其关联的掩码值。如果它与变量 {}_new_mask{} 中定义的值不同,则将其设置为该值。", "The unique ID value of the tile map element to get the mask of":"图块映射元素的唯一ID值,用于获取的掩码", - "This function can be used to retrieve the bit mask value for the given tile map. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the current mask value or -1 if there is an error or 0 if no mask is specified. For further information on tile map bit masks, see the function {}{}tilemap_set_mask(){}{}.":"此函数可用于检索给定图块贴图的位掩码值。指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}创建图块贴图元素时获得),如果出现错误,则函数将返回当前掩码值或 - 1;如果未指定掩码,则返回 0。有关图块映射位掩码的更多信息,请参见函数{}{}tilemap_set_mask(){}{}。" + "This function can be used to retrieve the bit mask value for the given tile map. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the current mask value or -1 if there is an error or 0 if no mask is specified. For further information on tile map bit masks, see the function {}{}tilemap_set_mask(){}{}.":"此函数可用于检索给定图块贴图的位掩码值。指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}创建图块贴图元素时获得),如果出现错误,则函数将返回当前掩码值或 - 1;如果未指定掩码,则返回 0。有关图块映射位掩码的更多信息,请参见函数{}{}tilemap_set_mask(){}{}。", + "This function returns the bit mask value for the given tile map.":"此函数返回给定图块地图的位掩码值。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create{}{} or when you use the function {}{}layer_tilemap_get_id{}{}), and the function will return the current mask value or -1 if there is an error.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create{}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id{}{} 时获得),该函数将返回当前掩码值或 -1( 如果有错误)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tile_height.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tile_height.json index f53c58a45..b13083b94 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tile_height.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tile_height.json @@ -1,5 +1,7 @@ { "The above code uses the retrieved tile map ID to get the tile cell width and height and use them to set two global variables.":"上面的代码使用检索到的图块贴图ID来获取图块单元的宽度和高度,并使用它们来设置两个全局变量。", "The unique ID value of the tile map element to get the tile cell height of":"图块贴图元素的唯一ID值,以获取图块单元格高度", - "Using this function you can retrieve the height (in pixels) of each tile cell of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the tile set cell height.":"使用此函数可以检索图块贴图元素的每个图块单元的高度(以像素为单位)。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时得到的 ID),该函数将返回图块集单元格高度。" + "Using this function you can retrieve the height (in pixels) of each tile cell of the tile map element.":"使用此函数,您可以检索图块地图元素的每个图块单元的高度 (以像素为单位)。", + "Using this function you can retrieve the height (in pixels) of each tile cell of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the tile set cell height.":"使用此函数可以检索图块贴图元素的每个图块单元的高度(以像素为单位)。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时得到的 ID),该函数将返回图块集单元格高度。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the tile set cell height.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),然后该函数将返回图块集单元格高度。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tile_width.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tile_width.json index 2faa2e618..4152cc4aa 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tile_width.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tile_width.json @@ -1,5 +1,7 @@ { "The above code uses the retrieved tile map ID to get the tile cell width and height and use them to set two global variables.":"上面的代码使用检索到的图块贴图ID来获取图块单元的宽度和高度,并使用它们来设置两个全局变量。", "The unique ID value of the tile map element to get the tile cell width of":"图块图元素的唯一ID值,用于获取图块单元宽度", - "Using this function you can retrieve the width (in pixels) of each tile cell of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the tile set cell width.":"使用此函数可以检索图块贴图元素的每个图块单元的宽度(以像素为单位)。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时得到的 ID),该函数将返回图块集单元格宽度。" + "Using this function you can retrieve the width (in pixels) of each tile cell of the tile map element.":"使用此函数,您可以检索图块地图元素的每个图块单元的宽度 (以像素为单位)。", + "Using this function you can retrieve the width (in pixels) of each tile cell of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the tile set cell width.":"使用此函数可以检索图块贴图元素的每个图块单元的宽度(以像素为单位)。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时得到的 ID),该函数将返回图块集单元格宽度。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the tile set cell width.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),然后该函数将返回图块集单元格宽度。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tileset.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tileset.json index d0fc7274a..77f462db3 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tileset.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_tileset.json @@ -1,5 +1,7 @@ { "The above code checks the current tile set assigned to the layer \"Tiles_trees\" and if it is not \"ts_Nighttime\" then that tile set is assigned to the tile map.":"上述代码检查分配给图层\"Tiles_trees\"的当前图块集,如果它不是\"ts_Nighttime\",则该图块集被分配给图块映射。", "The unique ID value of the Tile Map element to get the tile set from":"Tile Map元素的唯一ID值,用于从中获取图块集", - "Using this function you can retrieve the index value of the Tile Set asset assigned to a given tile map element on a layer. You give the Tile Map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the Tile Set asset index.":"使用此函数,可以检索分配给层上给定图块贴图元素的图块集资源的索引值。给定\"图块贴图\"元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或使用函数{}{}layer_tilemap_get_id(){}{}时获得该 ID),该函数将返回图块集资源索引。" + "Using this function you can retrieve the index value of the Tile Set asset assigned to a given tile map element on a layer.":"使用此函数,您可以检索分配给图层上给定图块地图元素的图块集资源的索引值。", + "Using this function you can retrieve the index value of the Tile Set asset assigned to a given tile map element on a layer. You give the Tile Map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the Tile Set asset index.":"使用此函数,可以检索分配给层上给定图块贴图元素的图块集资源的索引值。给定\"图块贴图\"元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或使用函数{}{}layer_tilemap_get_id(){}{}时获得该 ID),该函数将返回图块集资源索引。", + "You give the Tile Map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the Tile Set asset index.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),并且该函数将返回图块集资产索引。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_width.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_width.json index 7ced9eda5..80f6e9f5b 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_width.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_width.json @@ -1,5 +1,7 @@ { "The above code uses the retrieved tile map ID to get the tile width and height of the tile map and then uses those values to set an instance variable.":"上面的代码使用检索到的图块图ID来获取图块图的宽度和高度,然后使用这些值来设置实例变量。", "The unique ID value of the tile map element to get the width of":"图块映射元素的唯一ID值,以获取", - "Using this function you can retrieve the width (in cells) of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the width (number of cells wide).":"使用此函数可以检索图块映射元素的宽度(以单元格为单位)。可以指定图块贴图元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或当您使用函数{}{}layer_tilemap_get_id(){}{}),函数将返回宽度(单元格宽度的数量)。" + "Using this function you can retrieve the width (in cells) of the tile map element.":"使用此函数,您可以检索图块地图元素的宽度 (以单元格为单位)。", + "Using this function you can retrieve the width (in cells) of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the width (number of cells wide).":"使用此函数可以检索图块映射元素的宽度(以单元格为单位)。可以指定图块贴图元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或当您使用函数{}{}layer_tilemap_get_id(){}{}),函数将返回宽度(单元格宽度的数量)。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the width (number of cells wide).":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),然后该函数将返回宽度 (宽度的单元格数量)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_x.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_x.json index e0876f72e..5f0436215 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_x.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_x.json @@ -1,5 +1,7 @@ { "The above code uses the retrieved tile map ID to get the tile x and y position of the tile map and then uses those values to move it.":"上面的代码使用检索到的图块图ID来获取图块图的图块x和y位置,然后使用这些值来移动它。", "The unique ID value of the tile map element to get the x position of":"图块图元素的唯一ID值,用于获取", - "Using this function you can retrieve the x position (within the room) of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the x-axis position.":"使用此函数可以检索图块贴图元素的x位置(房间内)。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时得到的 ID),该函数将返回 xaxis 位置。" + "Using this function you can retrieve the x position (within the room) of the tile map element.":"使用此函数,您可以检索图块地图元素的 x 位置 (在房间内)。", + "Using this function you can retrieve the x position (within the room) of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the x-axis position.":"使用此函数可以检索图块贴图元素的x位置(房间内)。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时得到的 ID),该函数将返回 xaxis 位置。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the x-axis position.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),然后该函数将返回 x 轴位置。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_y.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_y.json index df7a8f5fc..b688599ea 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_y.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_get_y.json @@ -1,5 +1,7 @@ { "The above code uses the retrieved tile map ID to get the tile x and y position of the tile map and then uses those values to move it.":"上面的代码使用检索到的图块图ID来获取图块图的图块x和y位置,然后使用这些值来移动它。", "The unique ID value of the tile map element to get the y position of":"图块图元素的唯一ID值,用于获取", - "Using this function you can retrieve the y position (within the room) of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the y-axis position.":"使用此函数可以检索图块贴图元素的 y 位置(房间内)。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或使用函数{}{}layer_tilemap_get_id(){}{}时获得该 ID),该函数将返回 yaxis 位置。" + "Using this function you can retrieve the y position (within the room) of the tile map element.":"使用此函数,您可以检索图块地图元素的 y 位置 (在房间内)。", + "Using this function you can retrieve the y position (within the room) of the tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the y-axis position.":"使用此函数可以检索图块贴图元素的 y 位置(房间内)。给定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或使用函数{}{}layer_tilemap_get_id(){}{}时获得该 ID),该函数将返回 yaxis 位置。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the function will return the y-axis position.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),然后该函数将返回 y 轴位置。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_global_mask.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_global_mask.json index 8836e35b9..6d1e1b196 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_global_mask.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_global_mask.json @@ -1,11 +1,17 @@ { "A special constant that is for \"and\"-ing with the tile data blob to extract the tile index.":"用于\"和\"的专用常量,与块数据块一起提取块索引。", "An easy way to get the initial index mask value is to take the number of tiles in the tile set and subtract 1, so a 16x16 tile set has 256 tiles and a mask value of 255 (or $ff in hexadecimal), and if the tile set has a number of tiles that are {}not{} a power of two, then round up to the nearest power of two to get the mask, for example a tile set that is 20x20 has 400 tiles, which you would round up to 512, and so get a mask index value of 511 ($1ff in hexadecimal). Apart from the index mask, normally you would want to preserve the flip, rotate and mirror values that are assigned to a tile too, so to help with that there are a few {}constants{} that can be used. These can be \"or\"-ed together with the index mask value to preserve those bits of data. The following constants can be used (see the example code below for usage):":"获得初始索引掩码值的简单方法是取图块集中的图块数并减去1,因此,16x16的图块集有256个图块,掩码值为255(或十六进制中的$ ff),如果图块集的图块数{}不是{}的2次幂,则向上舍入到最接近的2次方以获得掩码,例如,20x20的图块集具有400个图块,这四舍五入到512,因此得到掩码索引值511(十六进制为$ 1ff)。除了索引掩码之外,通常您还希望保留分配给图块的翻转、旋转和镜像值,以便帮助使用一些{}常数{}。这些可以与索引掩码值一起\"或\"化,以保留这些数据位。可以使用以下常量(有关用法,请参见下面的示例代码):", + "The above code sets the global tile map bit mask to 8bits (binary {}0b11111111{}, i.e. the value {}255{}), while also preserving the flip, mirror, and rotate values.":"上述代码将全局图块地图位掩码设置为 8 位 (二进制 {}0b11111111{},即值 {}255{}),同时还保留翻转、镜像和旋转值。", "The above code sets the global tile map bit mask to 8bits, preserving the flip, mirror, and rotate values for each tile in the map.":"上述代码将全局块映射位掩码设置为8位,保留映射中每个块的翻转、镜像和旋转值。", + "The above code sets the global tile map bit mask using {}{}tilemap_set_global_mask{}{}. 8 bits can be used for the tile index and the mirror, flip and rotate bits are preserved. For the tile map at a layer named \"Tiles_sky\" a custom mask is set that allows only 4 bits for the tile index. The transform bits are, however, also preserved.":"上面的代码使用 {}{}tilemap_set_global_mask{}{} 设置全局图块地图位掩码。 8 位可用于平铺索引,并且保留镜像、翻转和旋转位。对于名为 \"Tiles_sky\" 的图层上的图块地图,设置了一个自定义掩码,仅允许 4 位用于图块索引。然而,变换位也被保留。", + "The idea is that if you have, for example, pretty small tile sets of 16 x 16 tiles then you\u0027ll have a total of 256 different tiles in each tile set, which only uses up 8 bits of your index in the {} {} (from an available {}19{} bits of data). These bits can be \"masked\" and then the rest of the tile data can be used to store additional values. See {}Calculating the Mask Bits{}.":"这个想法是,例如,如果您有 16 x 16 个图块的非常小的图块集,那么每个图块集中总共将有 256 个不同的图块,这仅占用 {}{ }( 来自可用的 {}19{} 位数据)。这些位可以被 \" 屏蔽\",然后瓦片数据的其余部分可以用于存储附加值。请参阅 {} 计算掩码位 {}。", "The mask value to use":"要使用的掩码值", "This function can be used to set the {}tile bit mask{} for a all tile maps in the game. The idea is that if you have, for example, pretty small tile sets of 16 x 16 tiles will have a total of 256 different tiles in each tile set, which only uses up 8 bits of your index in the tile data \"blob\" (from an available 19 bits of data). These bits can be \"masked\" and then the rest of the tile data can be used to store additional values.":"此函数可用于设置游戏中所有图块贴图的{}图块位掩码{}。其思想是,例如,如果您有相当小的16 x 16块的图块集,则每个图块集中总共将有256个不同的图块,这仅使用图块数据\"blob\"(从可用的19位数据中)中的8位索引。这些位可以被\"屏蔽\",然后其余的图块数据可用于存储附加值。", + "This function sets the {}Tile Map Bit Mask{} for all tile maps in the game.":"此函数为游戏中的所有图块地图设置 {} 图块地图位掩码 {}。", + "Tile map bit masking is an advanced feature and allows you to use bits of the tile data \"blob\" for your own use. For example, the user could reserve a bit to mean \"solid\" in the tile-data structure and then this can be checked for fast collisions. Basically, the bit mask is \"and\"-ed against the tile data when the tile map is {}drawn{} (so it doesn\u0027t affect any of the other functionality), meaning that bits which aren\u0027t in the mask are ignored, but can still be read and written to by the user for their own purposes.":"图块地图位掩码是一项高级功能,允许您将图块数据 \"blob\" 的位供您自己使用。例如,用户可以在图块数据结构中保留一个位来表示 \" 实体\",然后可以检查它是否存在快速冲突。基本上,当 {} 绘制 {} 图块地图时,位掩码会针对图块数据进行 \" 与 \" 运算 (因此不会影响任何其他功能),这意味着不在掩码中的位被忽略,但用户仍可以出于自己的目的进行读取和写入。", "Tile map bit masking is an advanced feature and allows you to use bits of the tile data \"blob\" for your own use. For example, the user could reserve a bit to mean \"solid\" in the tile-data structure and then this can be checked for fast collisions. Basically, the bit mask is \"and\"-ed against the tile data when the tile map is {}drawn{} (so it doesn\u0027t affect any of the other functionality), meaning that bits which aren\u0027t in the mask are ignored, but can still be read and written to by the user for their own purposes. Note that there are two different masks – a global one and one per tile map - and these are \"and\"-ed together internally by {}GameMaker{} before being used for drawing.":"图块贴图位掩码是一项高级函数,允许您使用图块数据的位\"blob\"供您自己使用。例如,用户可以在图块数据结构中保留一个表示\"实心\"的位,然后可以检查快速冲突。基本上,当绘制图块映射{}时,位掩码相对于图块数据\"和\"ed{}(因此不影响任何其他函数),意味着不在掩码中的位被忽略,但用户仍可以出于自己的目的读取和写入。请注意,有两种不同的蒙版 – 全局蒙版和每块贴图一个,它们在用于绘制之前由{}GameMaker{}内部组合在一起。", "Used to set/get the flip bit of a tile data blob.":"用于设置/获取图块数据块的翻转位。", "Used to set/get the mirror bit of a tile data blob.":"用于设置/获取图块数据块的镜像位。", - "Used to set/get the rotate bit of a tile data blob.":"用于设置/获取图块数据块的旋转位。" + "Used to set/get the rotate bit of a tile data blob.":"用于设置/获取图块数据块的旋转位。", + "{}{}IMPORTANT{}{} You should make sure to always have at least the same bits set in the global mask to make the per tile map masks ({}{}tilemap_set_mask{}{}) work the way you\u0027d expect. For example, a global mask of {}0b0000111111111101{} will force bit 1 to 0 in any tile map mask because of the \"and\"-ing of the two masks, no matter if the bit is set there or not.":"{}{} 重要{}{} 您应该确保在全局掩码中始终至少设置相同的位,以使每个图块地图掩码 ({}{}tilemap_set_mask{}{}) 按照您的方式工作预计。例如,全局掩码 {}0b0000111111111101{} 将强制任何图块地图掩码中的位 1 为 0,因为这两个掩码之间存在 \" 与 \" 关系,无论该位是否已设置。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_height.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_height.json index 7c972a44e..4ae3752c3 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_height.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_height.json @@ -2,5 +2,7 @@ "The above code checks the width of a specific tile map and if it is not the correct size then the width is set.":"上面的代码检查特定图块贴图的宽度,如果其大小不正确,则设置该宽度。", "The height value (in \"cells\")":"高度值(以\"单元格\"表示)", "The unique ID value of the tile map element to set the height of":"图块贴图元素的唯一ID值,用于设置", - "This function can be used to resize a tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the new height of the tile map in tile cells.":"此函数可用于调整图块贴图元素的大小。可以指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID),以及图块单元中图块贴图的新高度。" + "This function can be used to resize a tile map element.":"此函数可用于调整图块地图元素的大小。", + "This function can be used to resize a tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the new height of the tile map in tile cells.":"此函数可用于调整图块贴图元素的大小。可以指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID),以及图块单元中图块贴图的新高度。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the new height of the tile map in tile cells.":"您提供图块地图元素 ID(当您使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),并且平铺单元格中平铺地图的新高度。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_mask.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_mask.json index e7a9e9a5f..821497022 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_mask.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_mask.json @@ -1,13 +1,23 @@ { "A special constant that is for \"and\"-ing with the tile data blob to extract the tile index.":"用于\"和\"的专用常量,与块数据块一起提取块索引。", "An easy way to get the initial index mask value is to take the number of tiles in the tile set and subtract 1, so a 16x16 tile set has 256 tiles and a mask value of 255 (or $ff in hexadecimal), and if the tile set has a number of tiles that are not a power of two, then round up to the nearest power of two to get the mask, for example a tile set that is 20x20 has 400 tiles, which you would round up to 512, and so get a mask index value of 511 ($1ff in hexadecimal). Apart from the index mask, normally you would want to preserve the flip, rotate and mirror values that are assigned to a tile too, so to help with that there are a few {}constants{} that can be used. These can be \"or\"-ed together with the index mask value to preserve those bits of data. The following constants can be used (see the example code below for usage):":"获得初始索引掩码值的简单方法是取图块集中的图块数并减去1,因此,16x16的图块集有256个图块,掩码值为255(或$ ff,十六进制),如果图块集的图块数不是2的幂,则向上四舍五入到最接近的2次方以获得掩码,例如,20x20的图块集有400个图块,这四舍五入到512,因此得到掩码索引值511(十六进制为$ 1ff)。除了索引掩码之外,通常您还希望保留分配给图块的翻转、旋转和镜像值,以便帮助使用一些{}常数{}。这些可以与索引掩码值一起\"或\"化,以保留这些数据位。可以使用以下常量(有关用法,请参见下面的示例代码):", + "In the Create event the bit mask is set to be the 8 lowest bits plus the mirror, flip and rotate bits. A random integer value from 0 to 255 is then written to bit 8 to 15 of each tile. This is done as follows: the bits of {}_random_value{} are first shifted {}left{} by 8 bits, for example a value of {}0b0000000011001111{} ({}207{}) becomes {}0b1100111100000000{} ({}52992{}). This result is stored in {}_random_value_shifted{}. This value is then bitwise \"or\"-ed {}|{} with the tile data, which will result in a 1 bit whenever a bit is set in either the tile data or in the random value. The tile data is then written back to the same tile map call using {}{}tilemap_set{}{}.":"在创建事件中,位掩码设置为 8 个最低位加上镜像、翻转和旋转位。然后将 0 到 255 之间的随机整数值写入每个图块的位 8 到 15。具体操作如下:{}_random_value{} 的位首先 {} 左 {} 移位 8 位,例如,值 {}0b0000000011001111{}({}207{}) 变为 {}0b1100111100000000{}({}52992{})。此结果存储在 {}_random_value_shifted{} 中。然后,该值与图块数据进行按位 \" 或 \" 运算 {}|{},只要在图块数据或随机值中设置了一位,就会得到 1 位。然后,使用 {}{}tilemap_set{}{} 将图块数据写回同一图块地图调用。", + "In the Create event the bit mask is set to be the 8 lowest bits plus the mirror, flip and rotate bits. A random integer value from 0 to 255 is then written to bit 8 to 15 of each tile. This is done as follows: the bits of {}_random_value{} are first shifted {}left{} by 8 bits, for example a value of {}0b0000000011001111{} ({}207{}) becomes {}0b1111111100000000{} ({}52992{}). This result is stored in {}_random_value_shifted{}. This value is then bitwise \"or\"-ed {}|{} with the tile data, which will result in a 1 bit whenever a bit is set in either the tile data or in the random value. The tile data is then written back to the same tile map call using {}{}tilemap_set{}{}.":"在创建事件中,位掩码设置为 8 个最低位加上镜像、翻转和旋转位。然后将 0 到 255 之间的随机整数值写入每个图块的位 8 到 15。具体操作如下:{}_random_value{} 的位首先 {} 左 {} 移位 8 位,例如,值 {}0b0000000011001111{}({}207{}) 变为 {}0b1111111100000000{}({}52992{})。此结果存储在 {}_random_value_shifted{} 中。然后,该值与图块数据进行按位 \" 或 \" 运算 {}|{},只要在图块数据或随机值中设置了一位,就会得到 1 位。然后,使用 {}{}tilemap_set{}{} 将图块数据写回同一图块地图调用。", + "In the Step event the tile data under the mouse is looked up using {}{}tilemap_get_at_pixel{}{}. To get the random value back out, the bits are first shifted {}right{} by 8 bits, which moves the 8 bits of the random value back to bit positions 0 to 7 (the index bits are also shifted right and so are lost at this point). This new value is then bitwise \"and\"-ed {}&{} with 255 to only keep the lower 8 bits that hold the random value (any of the mirror, flip or rotate bits may be set which, without \"and\"-ing would give a much higher value). The result is assigned to {}random_value_under_cursor{}.":"在 Step 事件中,使用 {}{}tilemap_get_at_pixel{}{} 查找鼠标下方的图块数据。为了取回随机值,首先将这些位 {} 右移 {}8 位,这会将随机值的 8 位移回位位置 0 到 7( 索引位也会右移,因此会丢失) 在此刻)。然后,这个新值按位 \" 与 \"-ed{}&{} 为 255,以仅保留保存随机值的低 8 位 (可以设置任何镜像、翻转或旋转位,无需 \" 与\" -ing 会给出更高的值)。结果分配给 {}random_value_under_cursor{}。", + "The above code gets the tile map ID from the given layer and then sets the tile map bit mask to 8bits (a value of {}255{} or {}0b11111111{}), preserving the flip, mirror, and rotate values for each tile in the map.":"上述代码从给定图层获取图块地图 ID,然后将图块地图位掩码设置为 8 位 (值为 {}255{} 或 {}0b11111111{}),保留每个图块的翻转、镜像和旋转值平铺在地图上。", "The above code gets the tile map ID from the given layer and then sets the tile map bit mask to 8bits, preserving the flip, mirror, and rotate values for each tile in the map.":"上述代码从给定层获取图块映射ID,然后将图块映射位掩码设置为8位,保留映射中每个图块的翻转、镜像和旋转值。", + "The above code sets the tile bit mask to the value needed for {}GameMaker{} to draw tiles correctly by combining all tile mask constants using bitwise OR. The full {}19{} bits are used for the tile index and the mirror, flip and rotate bits are preserved.":"上面的代码通过使用按位或组合所有图块掩码常量,将图块位掩码设置为 {}GameMaker{} 正确绘制图块所需的值。完整的 {}19{} 位用于图块索引,并保留镜像、翻转和旋转位。", + "The above code shows how to store some custom data in the cells of a tile map and read them back.":"上面的代码显示了如何在图块地图的单元格中存储一些自定义数据并读取它们。", "The mask value":"掩码值", + "The random value stored in the tile under the mouse position is displayed in the Draw GUI event.":"鼠标位置下的图块中存储的随机值显示在 Draw GUI 事件中。", "The unique ID value of the tile map element to set the mask of":"要设置掩码的图块贴图元素的唯一ID值", "This function can be used to set the {}tile bit mask{} for a single tile map. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then the mask value. The idea is that if you have, for example, a pretty small tile set of 16 x 16 tiles then you have a total of 256 different tiles in your tile set, which only uses up 8 bits of your index in the tile data \"blob\" (from an available 19 bits of data). These bits can be \"masked\" and then the rest of the tile data can be used to store additional values.":"此函数可用于设置单个图块贴图的{}块位掩码{}。为贴图元素 ID(当使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}创建图块贴图元素时获得的 ID),然后给出掩码值。其思想是,例如,如果您有一个相当小的16 x 16块的图块集,那么您的图块集中总共有256个不同的图块,这在图块数据\"blob\"(从可用的19位数据)中仅使用8位索引。这些位可以被\"屏蔽\",然后其余的图块数据可用于存储附加值。", + "This function sets the {}Tile Map Bit Mask{} for a single tile map.":"此函数为单个图块地图设置 {} 图块地图位掩码 {}。", "Tile Mask Constant":"图块遮罩常数", "Tile map bit masking is an advanced feature and allows you to use bits of the tile data \"blob\" for your own use. For example, the user could reserve a bit to mean \"solid\" in the tile-data structure and then this can be checked for fast collisions. Basically, the bit mask is \"and\"-ed against the tile data when the tile map is {}drawn{} (so it doesn\u0027t affect any of the other functionality), meaning that bits which aren\u0027t in the mask are ignored, but can still be read and written to by the user for their own purposes. Note that there are two different masks – a global one and one per tile map - and these are \"and\"-ed together internally by {}GameMaker{} before being used for drawing.":"图块贴图位掩码是一项高级函数,允许您使用图块数据的位\"blob\"供您自己使用。例如,用户可以在图块数据结构中保留一个表示\"实心\"的位,然后可以检查快速冲突。基本上,当绘制图块映射{}时,位掩码相对于图块数据\"和\"ed{}(因此不影响任何其他函数),意味着不在掩码中的位被忽略,但用户仍可以出于自己的目的读取和写入。请注意,有两种不同的蒙版 – 全局蒙版和每块贴图一个,它们在用于绘制之前由{}GameMaker{}内部组合在一起。", + "Tile map bit masking is an advanced feature and allows you to use bits of the tile data \"blob\" for your own use. For example, you could reserve a bit to mean \"solid\" in the tile data that can then be checked for fast collisions. Basically, the bit mask is \"and\"-ed against the tile data when the tile map is {}drawn{} (so it doesn\u0027t affect any of the other functionality), meaning that bits which aren\u0027t in the mask are ignored, but can still be read and written to by the user for their own purposes.":"图块地图位掩码是一项高级功能,允许您将图块数据 \"blob\" 的位供您自己使用。例如,您可以在图块数据中保留一些表示 \" 实体 \" 的位,然后可以检查快速碰撞。基本上,当 {} 绘制 {} 图块地图时,位掩码会针对图块数据进行 \" 与 \" 运算 (因此不会影响任何其他功能),这意味着不在掩码中的位被忽略,但用户仍可以出于自己的目的进行读取和写入。", "Used to set/get the flip bit of a tile data blob.":"用于设置/获取图块数据块的翻转位。", "Used to set/get the mirror bit of a tile data blob.":"用于设置/获取图块数据块的镜像位。", - "Used to set/get the rotate bit of a tile data blob.":"用于设置/获取图块数据块的旋转位。" + "Used to set/get the rotate bit of a tile data blob.":"用于设置/获取图块数据块的旋转位。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create{}{} or when you use the function {}{}layer_tilemap_get_id{}{}), and then the mask value. If you have, for example, a pretty small tile set of 16 x 16 tiles then you have a total of 256 different tiles in your tile set. You only need 8 bits of the {} {} to index these tiles (from an available {}19{} bits of data). These bits can be \"masked\" and then the rest of the tile data can be used to store additional values. See {}Calculating the Mask Bits{}.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create{}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id{}{} 时获得),然后提供掩码值。例如,如果您有一个非常小的 16 x 16 个图块集,那么您的图块集中总共有 256 个不同的图块。您只需要 {}{} 的 8 位即可为这些图块建立索引 (来自可用的 {}19{} 位数据)。这些位可以被 \" 屏蔽\",然后瓦片数据的其余部分可以用于存储附加值。请参阅 {} 计算掩码位 {}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_width.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_width.json index 172966e39..4a2da24a5 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_width.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_set_width.json @@ -2,5 +2,7 @@ "The above code checks the width of a specific tile map and if it is not the correct size then the width is set.":"上面的代码检查特定图块贴图的宽度,如果其大小不正确,则设置该宽度。", "The unique ID value of the tile map element to set the width of":"图块映射元素的唯一ID值,用于设置", "The width value (in \"cells\")":"宽度值(以\"单元格\"表示)", - "This function can be used to resize a tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the new width of the tile map in tile cells.":"此函数可用于调整图块贴图元素的大小。可以指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID),以及图块单元格中图块贴图的新宽度。" + "This function can be used to resize a tile map element.":"此函数可用于调整图块地图元素的大小。", + "This function can be used to resize a tile map element. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the new width of the tile map in tile cells.":"此函数可用于调整图块贴图元素的大小。可以指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID),以及图块单元格中图块贴图的新宽度。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and the new width of the tile map in tile cells.":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),然后平铺单元格中平铺地图的新宽度。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_tileset.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_tileset.json index e4e5a374c..3f1dbf818 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_tileset.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_tileset.json @@ -2,5 +2,7 @@ "The above code checks the current tile set assigned to the tile map on the layer \"Tiles_trees\" and if it is not \"ts_Nighttime\" then that tile set is assigned to the tile map.":"上述代码检查分配给图层\"Tiles_trees\"上的图块贴图的当前图块集,如果它不是\"ts_Nighttime\",则该图块集被分配给图块贴图。", "The new tile set index to use":"要使用的新图块集索引", "The unique ID value of the tile map element to change":"要更改的图块图元素的唯一ID值", - "Using this function you can change the tile set asset assigned to a given tile map element on a layer. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then supply a tile set index and the tile map will be given the new sprite.":"使用此函数,可以更改分配给图层上给定图块贴图元素的图块集资源。指定图块贴图元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或使用函数{}{}layer_tilemap_get_id(){}{}时获得该 ID),然后提供图块集索引,将给图块贴图指定新sprite。" + "Using this function you can change the tile set asset assigned to a given tile map element on a layer.":"使用此功能,您可以更改分配给图层上给定图块地图元素的图块集资源。", + "Using this function you can change the tile set asset assigned to a given tile map element on a layer. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then supply a tile set index and the tile map will be given the new sprite.":"使用此函数,可以更改分配给图层上给定图块贴图元素的图块集资源。指定图块贴图元素 ID(当使用{}{}layer_tilemap_create(){}{}创建图块贴图元素时或使用函数{}{}layer_tilemap_get_id(){}{}时获得该 ID),然后提供图块集索引,将给图块贴图指定新sprite。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then supply a tile set index and the tile map will be given the new sprite.":"您提供图块地图元素 ID(当您使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),并且然后提供图块集索引,图块地图将被赋予新的精灵。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_x.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_x.json index 1c6fe5a67..c3fa9f1fa 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_x.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_x.json @@ -2,5 +2,7 @@ "The above code gets the ID value of the tile map asset assigned to the layer \"Asset_sky\" and then sets its x position to a random value between 0 and the width of the room.":"上述代码获得分配给层\"Asset_sky\"的图块地图资源的ID值,然后将其x位置设置为介于0和房间宽度之间的随机值。", "The unique ID value of the tile map element to change":"要更改的图块图元素的唯一ID值", "The x position for the tile map":"图块贴图的x位置", - "This function controls the position along the x-axis of the room of the asset tile map element on the layer. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then set the x value to use (based on the room coordinates).":"此函数控制层上资源图块贴图元素沿房间 x轴的位置。指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID),然后设置要使用的 x 值(基于房间坐标)。" + "This function controls the position along the x-axis of the room of the asset tile map element on the layer.":"此函数控制图层上资产图块地图元素沿房间 x 轴的位置。", + "This function controls the position along the x-axis of the room of the asset tile map element on the layer. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then set the x value to use (based on the room coordinates).":"此函数控制层上资源图块贴图元素沿房间 x轴的位置。指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID),然后设置要使用的 x 值(基于房间坐标)。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then set the x value to use (based on the room coordinates).":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),然后然后设置要使用的 x 值 (基于房间坐标)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_y.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_y.json index dbc99248a..b200694fe 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_y.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/Tile_Map_Layers/tilemap_y.json @@ -2,5 +2,7 @@ "The above code gets the ID value of the tile map asset assigned to the layer \"Asset_sky\" and then sets its y position to a random value between 0 and the height of the room.":"上述代码获得分配给层\"Asset_sky\"的贴图资源的ID值,然后将其y位置设置为介于0和房间高度之间的随机值。", "The unique ID value of the tile map element to change":"要更改的图块图元素的唯一ID值", "The y position for the tile map":"图块贴图的 y 位置", - "This function controls the position along the y-axis of the room of the asset tile map element on the layer. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then set the y value to use (based on the room coordinates).":"此函数控制图层上资源图块贴图元的房间沿 y轴的位置。指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID),然后设置要使用的 y 值(基于房间坐标)。" + "This function controls the position along the y-axis of the room of the asset tile map element on the layer.":"此函数控制图层上资产图块地图元素沿房间 y 轴的位置。", + "This function controls the position along the y-axis of the room of the asset tile map element on the layer. You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then set the y value to use (based on the room coordinates).":"此函数控制图层上资源图块贴图元的房间沿 y轴的位置。指定图块贴图元素 ID(使用{}{}layer_tilemap_create(){}{}或使用函数{}{}layer_tilemap_get_id(){}{}时获得的 ID),然后设置要使用的 y 值(基于房间坐标)。", + "You give the tile map element ID (which you get when you create a tile map element using {}{}layer_tilemap_create(){}{} or when you use the function {}{}layer_tilemap_get_id(){}{}), and then set the y value to use (based on the room coordinates).":"您提供图块地图元素 ID(在使用 {}{}layer_tilemap_create(){}{} 创建图块地图元素或使用函数 {}{}layer_tilemap_get_id(){}{} 时获得),然后然后设置要使用的 y 值 (基于房间坐标)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_first.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_first.json index 429c67d7f..a55f95342 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_first.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_first.json @@ -1,4 +1,5 @@ { "The above code will check the \"lives\" variable and if it is less than 1 go to the first room in the game.":"上面的代码将检查\" Lives \"变量,如果它小于1,则转到游戏中的第一个房间。", - "This {}read only{} variable returns the index of the very first room in the game (this is defined by the order in which the rooms appear in the {}Room Manager{} and {}not{} by the order in which they were created).":"此{}只读{}变量返回游戏中第一个房间的索引(这由房间在{}房间管理器{}中的显示顺序定义,而{}不是{}按创建房间的顺序定义)。" + "This {}read only{} variable returns the index of the very first room in the game (this is defined by the order in which the rooms appear in the {}Room Manager{} and {}not{} by the order in which they were created).":"此{}只读{}变量返回游戏中第一个房间的索引(这由房间在{}房间管理器{}中的显示顺序定义,而{}不是{}按创建房间的顺序定义)。", + "This {}read-only{} variable returns the index of the very first room in the game (this is defined by the order in which the rooms appear in the {}Room Manager{} and {}not{} by the order in which they were created).":"此 {} 只读 {} 变量返回游戏中第一个房间的索引 (这是由房间在 {} 房间管理器 {} 中出现的顺序定义的,而不是由它们是被创建的)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto.json index 3dddf626e..ed8e1c8a3 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto.json @@ -3,5 +3,6 @@ "The index of the room to go to.":"要转到的房间的索引。", "This function permits you to go to any room in your game project, whether created using code or in the Asset Browser. You supply the room index (stored in the variable for the room name, or as a variable returned from the function {}{}room_add(){}{}). Note that the room will not change until the end of the event where the function was called, so any code after this has been called will still run if in the same event. This function will also trigger the {}Room End{} event.":"此函数允许您进入游戏项目中的任何房间,无论是使用代码创建还是在资源浏览器中创建。提供房间索引(存储在用于房间名称的变量中,或作为从函数{}{}room_add(){}{}返回的变量)。 请注意,在调用函数的事件结束之前,房间不会改变,因此,如果在相同事件中,调用后的任何代码仍将运行。此函数还将触发{}房间结束{}事件。", "{}NOTE{} Room IDs are not based on their order in the Asset Browser or the Room Manager, and so you should avoid supplying a number value directly. Instead, use the room {}constant{} for the asset you want to reference (which is simply its name) or retrieve it through a function.":"{}注意{}房间ID不是基于它们在资源浏览器或房间管理器中的顺序,因此您应避免直接提供数值。相反,对于要引用的资源(只是其名称),请使用房间{}常量{}或通过函数检索它。", - "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,将无法在同一事件中创建新实例。" + "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,将无法在同一事件中创建新实例。", + "{}NOTE{} You will not be able to {}create new instances{} of objects in the same event after this function is called. There is one exception: if the object you\u0027re creating an instance of is already {}marked persistent{}, or its {}{}persistent{}{} variable is set to {}true{} in the {}variable struct{} passed into the {}instance_create_*(){} function, it will be created.{} {} In the latter case (making the new instance persistent through the variable struct), the {}Variable Definitions{} for that instance will not be executed. ":"{}注意{} 调用此函数后,您将无法在同一事件中{}创建对象的新实例{}。\n\n有一个例外:如果您正在创建实例的对象已经{}标记为持久{},\n\n或其 {}{}persistent{}{} 变量在传递到 {}instance_create_*(){} 函数的 {}variable struct{} 中设置为 {}true{},则将创建。{} {}\n\n在后一种情况下(通过变量结构使新实例持久化),该实例的{}变量定义{}将不会被执行。\n" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto_next.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto_next.json index f9dcce965..6882f2d1a 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto_next.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto_next.json @@ -1,5 +1,6 @@ { "The above code will check to see if there is another room after the current one and if so it will go to that room.":"上面的代码将检查当前房间之后是否有另一个房间,如果有,它将转到该房间。", "With this function you can make your game go to the next one as listed in the {}Room Manager{} at the time the game was compiled. If this room does not exist, an error will be thrown and the game will be forced to close. Note that the room will not change until the end of the event where the function was called, so any code after this has been called will still run if in the same event.":"使用此函数,您可以在游戏编译时进入{}房间管理器{}中列出的下一个游戏。如果此房间不存在,将抛出错误并迫使游戏关闭。请注意,在调用函数的事件结束之前,房间不会改变,因此,如果在相同事件中,调用后的任何代码仍将运行。", - "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,您将无法在同一事件中创建新实例。" + "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,您将无法在同一事件中创建新实例。", + "{}NOTE{} You will not be able to {}create new instances{} of objects in the same event after this function is called. There is one exception: if the object you\u0027re creating an instance of is already {}marked persistent{}, or its {}{}persistent{}{} variable is set to {}true{} in the {}variable struct{} passed into the {}instance_create_*(){} function, it will be created.{} {} In the latter case (making the new instance persistent through the variable struct), the {}Variable Definitions{} for that instance will not be executed. ":"{}注意{} 调用此函数后,您将无法在同一事件中{}创建对象的新实例{}。\n\n有一个例外:如果您正在创建实例的对象已经{}标记为持久{},\n\n或其 {}{}persistent{}{} 变量在传递到 {}instance_create_*(){} 函数的 {}variable struct{} 中设置为 {}true{},则将创建。{} {}\n\n在后一种情况下(通过变量结构使新实例持久化),该实例的{}变量定义{}将不会被执行。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto_previous.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto_previous.json index 504b20c7e..6595fc277 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto_previous.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_goto_previous.json @@ -1,5 +1,6 @@ { "The above code will check to see if there is another room before the current one and if so it will go to that room.":"上面的代码将检查在当前房间之前是否有另一个房间,如果有,它将转到该房间。", "With this function you can make your game go to the previous one as listed in the {}Room Manager{} at the time the game was compiled. If this room does not exist, an error will be thrown and the game will be forced to close. Note that the room will not change until the end of the event where the function was called, so any code after this has been called will still run if in the same event. This function will also trigger the {}Room End{} event.":"使用此函数,您可以使您的游戏转到编译游戏时在{}房间管理器{}中列出的上一个。如果此房间不存在,将抛出错误并迫使游戏关闭。请注意,在调用函数的事件结束之前,房间不会改变,因此,如果在相同事件中,调用后的任何代码仍将运行。此函数还将触发{}房间结束{}事件。", - "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,您将无法在同一事件中创建新的实例。" + "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,您将无法在同一事件中创建新的实例。", + "{}NOTE{} You will not be able to {}create new instances{} of objects in the same event after this function is called. There is one exception: if the object you\u0027re creating an instance of is already {}marked persistent{}, or its {}{}persistent{}{} variable is set to {}true{} in the {}variable struct{} passed into the {}instance_create_*(){} function, it will be created.{} {} In the latter case (making the new instance persistent through the variable struct), the {}Variable Definitions{} for that instance will not be executed. ":"{}注意{} 调用此函数后,您将无法在同一事件中{}创建对象的新实例{}。\n\n有一个例外:如果您正在创建实例的对象已经{}标记为持久{},\n\n或其 {}{}persistent{}{} 变量在传递到 {}instance_create_*(){} 函数的 {}variable struct{} 中设置为 {}true{},则将创建。{} {}\n\n在后一种情况下(通过变量结构使新实例持久化),该实例的{}变量定义{}将不会被执行。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_last.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_last.json index 41f3716b2..f997bc6d5 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_last.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_last.json @@ -1,4 +1,5 @@ { "The above code checks to see if a key has been pressed and if so it goes to the last room in the game.":"上面的代码检查是否按下了某个键,如果是,则转到游戏中的最后一个房间。", - "This {}read only{} variable returns the index of the very last room in the game (this is defined by the order in which the rooms appear in the {}Room Manager{} and {}not{} by the order in which they were created). Note that this variable will not recognise or take into consideration rooms that have been added dynamically using {}{}room_add(){}{} or {}{}room_duplicate(){}{}.":"此 {} 只读 {} 变量返回游戏中最后一个房间的索引 (这由房间在 {} 房间管理器 {} 中的显示顺序定义,而 {} 不是 {} 按创建房间的顺序定义)。请注意,此变量不会识别或考虑使用 {}{}room_add(){}{} 或 {}{}room_duplicate(){}{} 动态添加的房间。" + "This {}read only{} variable returns the index of the very last room in the game (this is defined by the order in which the rooms appear in the {}Room Manager{} and {}not{} by the order in which they were created). Note that this variable will not recognise or take into consideration rooms that have been added dynamically using {}{}room_add(){}{} or {}{}room_duplicate(){}{}.":"此 {} 只读 {} 变量返回游戏中最后一个房间的索引 (这由房间在 {} 房间管理器 {} 中的显示顺序定义,而 {} 不是 {} 按创建房间的顺序定义)。请注意,此变量不会识别或考虑使用 {}{}room_add(){}{} 或 {}{}room_duplicate(){}{} 动态添加的房间。", + "This {}read-only{} variable returns the index of the very last room in the game (this is defined by the order in which the rooms appear in the {}Room Manager{} and {}not{} by the order in which they were created). Note that this variable will not recognise or take into consideration rooms that have been added dynamically using {}{}room_add(){}{} or {}{}room_duplicate(){}{}.":"此 {} 只读{} 变量返回游戏中最后一个房间的索引 (这是由房间在 {} 房间管理器 {} 中出现的顺序定义的,{} 而不是 {} 由它们是被创建的)。请注意,此变量不会识别或考虑使用 {}{}room_add(){}{} 或 {}{}room_duplicate(){}{} 动态添加的房间。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_restart.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_restart.json index c717ae8da..c3f95391c 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_restart.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_restart.json @@ -1,5 +1,6 @@ { "The above code checks to see if the variable \"lives\" is less than 1 and if it is it will restart the room.":"上面的代码检查变量\" lives \"是否小于1,如果小于1,它将重新启动房间。", "This function will restart the current room, as if it had just been entered. Note that the room will not restart until the end of the event where the function was called, so any code after this has been called will still run if in the same event. This function will also trigger the {}Room End{} event.":"此函数将重新启动当前房间,就像刚刚进入一样。请注意,在调用函数的事件结束之前,房间不会重新启动,因此,如果在同一事件中,调用此函数之后的任何代码仍将运行。此函数还将触发{}房间结束{}事件。", - "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,您将无法在同一事件中创建新的实例。" + "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,您将无法在同一事件中创建新的实例。", + "{}NOTE{} You will not be able to {}create new instances{} of objects in the same event after this function is called. There is one exception: if the object you\u0027re creating an instance of is already {}marked persistent{}, or its {}{}persistent{}{} variable is set to {}true{} in the {}variable struct{} passed into the {}instance_create_*(){} function, it will be created.{} {} In the latter case (making the new instance persistent through the variable struct), the {}Variable Definitions{} for that instance will not be executed. ":"{}注意{} 调用此函数后,您将无法在同一事件中{}创建对象的新实例{}。\n\n有一个例外:如果您正在创建实例的对象已经{}标记为持久{},\n\n或其 {}{}persistent{}{} 变量在传递到 {}instance_create_*(){} 函数的 {}variable struct{} 中设置为 {}true{},则将创建。{} {}\n\n在后一种情况下(通过变量结构使新实例持久化),该实例的{}变量定义{}将不会被执行。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Events_Moments_Broadcast.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Events_Moments_Broadcast.json index 396db2d23..2de535977 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Events_Moments_Broadcast.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Events_Moments_Broadcast.json @@ -4,6 +4,7 @@ "Apart from all the properties listed {}here{} for a sequence struct, you also have the possibility of adding in special \"action\" properties to a sequence. There are three different types of these \"action\" properties that can be added to a sequence object - {}Events{}. {}Moments{} and {}Broadcast Messages{} - and each of these is explained in more detail in the sections below.":"除了{}这里{}为序列结构列出的所有属性之外,还可以在序列中添加特殊的\"动作\"属性。有三种不同类型的这些\"动作\"属性可以添加到序列对象-{}事件{}。{}时刻{}和{}广播消息{},以下各节将更详细地解释这些属性。", "Events, Moments and Broadcast Messages":"事件、时刻和广播消息的序列", "In this function all we\u0027re doing is listening for a mouse press and then reversing the playback direction of the sequence that the method has been bound to. You\u0027ll notice that currently you are not able to pass any parameters to the functions which are linked to these properties, and in all cases the {}{}self{}{} variable within the scope of the function is assigned to be the sequence instance.":"在这个函数中,我们所做的就是听鼠标按一下,然后反转方法绑定到的序列的播放方向。您会注意到,当前您无法向链接到这些属性的函数传递任何参数,并且在所有情况下,函数范围内的{}{}self{}{}变量都被指定为序列实例。", + "In this function all we\u0027re doing is listening for a mouse press and then reversing the playback direction of the sequence that the method has been bound to. You\u0027ll notice that currently you are not able to pass any parameters to the functions which are linked to these properties, and in all cases the {}{}self{}{} variable within the scope of the function is assigned to be the {}sequence instance struct{}.":"在此函数中,我们所做的就是监听鼠标按下,然后反转该方法所绑定的序列的播放方向。您会注意到,目前您无法将任何参数传递给链接到这些属性的函数,并且在所有情况下,函数范围内的 {}{}self{}{} 变量都被分配为 {} 序列实例结构 {}。", "Once a broadcast message has been emitted by the sequence, you can parse it using the {}Other{} > {}Broadcast Message{} event in object instances, which is explained in detail {}here{}.":"序列发出广播消息后,您可以使用对象实例中的{}Other{}>{}广播消息{}事件对其进行解析,此处{}将对此进行详细说明{}。", "Sequence Events":"序列事件", "Sequence objects can have {}events{} added to them, and these events are analogous to the events used by object assets. The events you assign to a sequence object will occur in a specific order, either once at a defined moment in the sequence life-cycle, or every frame that the sequence is running. In this section, we discuss how these events are handled using code, but they can also be added using the {}Sequence Editor{}. Note that that the order of events listed here is not influenced by the {}playhead{} direction, and even if the sequence is playing backwards, the events will still be run in the order given below.":"序列对象可以添加{}事件{},这些事件类似于对象资源使用的事件。分配给序列对象的事件将以特定顺序发生,或在序列生命周期中定义的时刻发生一次,或序列正在运行的每个帧发生。在本节中,我们讨论如何使用代码处理这些事件,但也可以使用{}序列编辑器{}添加这些事件。 请注意,此处列出的事件顺序不受{}播放头{}方向的影响,即使序列正在反向播放,事件仍将按以下顺序运行。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Keyframe_Data_Struct.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Keyframe_Data_Struct.json index f346b9900..a851b337e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Keyframe_Data_Struct.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Keyframe_Data_Struct.json @@ -3,6 +3,7 @@ "Sequence Audio Key Constant":"序列音频键常数", "Sequence Keyframe Data Struct":"序列关键帧数据结构", "Sequence Text Alignment Constant":"序列文本对齐常量", + "Spacing between words will be adjusted so each line fits the frame horizontally.":"将调整单词之间的间距,使每行水平适合框架。", "Text Track Data":"文本跟踪数据", "The index of the audio asset to use for the track. This property is only available for tracks of the type {}seqtracktype_audio{} and you can get or set it.":"要用于音轨的音频资源的索引。此属性仅对类型为{}SeqTrackType_Audio{}的轨道可用,您可以获取或设置它。", "The index of the sprite asset to use for the track. This property is only available for tracks of the type {}seqtracktype_graphic{} and you can get or set it.":"用于轨迹的精灵资源的索引。此属性仅适用于类型为{}SeqTrackType_Graphic{}的轨道,您可以获取或设置它。", @@ -10,19 +11,27 @@ "The sound will loop when played.":"播放时声音将循环播放。", "The sound will only play once then stop.":"声音只会播放一次,然后停止。", "The struct will contain the following additional variables if assigned to a {}text track{} ({}seqtracktype_text{}):":"如果分配给{}文本轨道{}({}seqTrackType_text{}),则该结构将包含以下附加变量:", + "The text will be aligned in the centre of the frame.":"文本将在框架的中心对齐。", "The text will be aligned to the bottom of the frame":"文本将与框架的底部对齐", + "The text will be aligned to the bottom of the frame.":"文本将与框架底部对齐。", "The text will be aligned to the left of the frame":"文本将与框架的左侧对齐", + "The text will be aligned to the left of the frame.":"文本将与框架左侧对齐。", "The text will be aligned to the right of the frame":"文本将与框架的右侧对齐", + "The text will be aligned to the right of the frame.":"文本将与框架右侧对齐。", "The text will be aligned to the top of the frame":"文本将与框架顶部对齐", + "The text will be aligned to the top of the frame.":"文本将与框架顶部对齐。", "The text will be centred horizontally within the frame":"文本将在框架内水平居中", + "The text will be centred vertically in the frame.":"文本将在框架中垂直居中。", "The text will be centred vertically within the frame":"文本将在框架内垂直居中", "The text will be justified within the frame":"文本将在框架内对齐", "The {}playbackMode{} variable can be one of the following constants:":"{}playbackMode{}变量可以是以下常量之一:", "The Keyframe Data Struct":"关键帧数据结构", "This is a boolean that indicates whether the text should be wrapped ({}true{}) or not ({}false{}).":"这是一个布尔值,指示文本是否应该换行({}true{})或不换行({}false{})。", "This is the channel that the keyframe data should be applied to. It is a positive integer value starting at 0, and it\u0027s worth noting that when creating parameter tracks for \"position\" or \"scale\" keyframes, then you need to use very specific channel values. These are: channel 0 is the X position or the X scale, channel 1 is the Y position or Y scale.":"这是应用关键帧数据的通道。这是一个从0开始的正整数值,值得注意的是,在为\"位置\"或\"缩放\"关键帧创建参数轨迹时,您需要使用非常特定的通道值。这些是:通道0是X位置或X比例,通道1是Y位置或Y比例。", + "This is the horizontal alignment of the text, and will be one of the constants given below.":"这是文本的水平对齐方式,并且将是下面给出的常量之一。", "This is the horizontal alignment of the text, and will be one of the {}{}Sequence Text Alignment Constant{}{}s given below.":"这是文本的水平对齐方式,将是下面给出的{}{}序列文本对齐常数{}{}之一。", "This is the text string that is drawn on the track.":"这是在轨道上绘制的文本字符串。", + "This is the vertical alignment of the text, and will be one of the constants given below.":"这是文本的垂直对齐方式,并且将是下面给出的常量之一。", "This is the vertical alignment of the text, and will be one of the {}{}Sequence Text Alignment Constant{}{}s given below.":"这是文本的垂直对齐,将是下面给出的{}{}序列文本对齐常数{}{}之一。", "This is the {}{}Font Asset{}{} used by the text track.":"这是文本音轨使用的{}{}字体资源{}{}。", "This property allows access to the {}events{} and {}broadcast messages{} associated with the keyframe data struct. You can get or set this property, and when getting it an array of strings is returned, and when setting it an array of strings should be specified. For more information on events, please see the section {}Sequence Events And Moments{}. This property is only available for tracks of the type {}seqtracktype_message{}.":"此属性允许访问与关键帧数据结构关联的{}事件{}和{}广播消息{}。可以获取或设置此属性,获取时返回字符串数组,设置时应指定字符串数组。有关事件的更多信息,请参阅\"{}事件和时刻{}序列\"部分。 此属性仅适用于类型{}seqtracktype_message{}的轨迹。", @@ -35,5 +44,6 @@ "When you define a {}keyframe struct{} for a track, you need to also define the data that will be associated with it. This is comprised of different {}channels{}, where each channel is simply a Keyframe Data Struct. A channel can be given specific type of data depending on what type of track you are setting the keyframe data for.":"为轨迹定义{}关键帧结构{}时,还需要定义与其关联的数据。这由不同的{}通道{}组成,其中每个通道仅是关键帧数据结构。根据要设置关键帧数据的曲目类型,可以为通道指定特定类型的数据。", "{}Any additional variables listed in the table(s) below{}":"{}下表中列出的任何其他变量{}", "{}alignmentH{} can be any of the following constants:":"{}alignmentH{} 可以是以下任何常量:", - "{}alignmentV{} can be any of the following constants:":"{}alignmentV{} 可以是以下任何常量:" + "{}alignmentV{} can be any of the following constants:":"{}alignmentV{} 可以是以下任何常量:", + "{}{}NOTE{}{} The constants {}seqtextkey_left{}, {}seqtextkey_center{}, {}seqtextkey_right{}, {}seqtextkey_justify{}, {}seqtextkey_top{}, {}seqtextkey_middle{}, {}seqtextkey_bottom{} also work as alternatives for the constants listed above, however they are deprecated and only supported for legacy purposes.":"{}{} 注意{}{} 常量 {}seqtextkey_left{}、{}seqtextkey_center{}、{}seqtextkey_right{}、{}seqtextkey_justify{}、{}seqtextkey_top{}、{}seqtextkey_middle{}、{}seqtextkey_bottom{} 也可以作为上面列出的常量的替代品,但它们已被弃用,并且仅支持用于旧版目的。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Sequence_Instance_Struct.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Sequence_Instance_Struct.json index dce6a7d0a..26cf7b016 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Sequence_Instance_Struct.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Sequence_Instance_Struct.json @@ -8,6 +8,9 @@ "The Sequence Instance Struct":"序列实例结构", "The X origin of the asset for the track (all assets).":"轨迹资源的X原点(所有资源)。", "The Y origin of the asset for the track (all assets).":"轨迹资源的Y原点(所有资源)。", + "The audio emitter\u0027s falloff factor":"音频发射器的衰减因子", + "The audio emitter\u0027s falloff maximum distance":"音频发射器的衰减最大距离", + "The audio emitter\u0027s falloff reference distance":"音频发射器的衰减参考距离", "The character spacing value (text tracks).":"字符间距值(字幕信息)。", "The colour multiply value for the asset on the track in the sequence at the current playhead position (sprite, instance and sequence tracks). This value will be an {}array{} of four {}ARGB{} values with the format [A, R, G, B]. Note that the values for each component are expressed as between 0 and 1, where 0 corresponds to the HEX value #00 and 1 corresponds to the HEX value #FF (0 - 255 as shown in the colour picker for colour multiply tracks in the Sequences Editor).":"当前播放头位置(精灵、实例和序列曲目)序列中曲目上资源的颜色乘法值。此值为{}数组{},包含4个{}ARGB{}值,格式为[A,R,G,B]。请注意,每个组件的值在0和1之间表示,其中0对应于十六进制值# 00,1对应于十六进制值# FF(0- 255,如序列编辑器中多色轨迹的颜色选择器所示)。", "The following list contains the properties that may be available to you when accessing an active track struct (as included in the {}activeTracks{} array of a Sequence Instance struct, explained above). Each asset track struct can have any of the following properties, depending on the type of asset the track uses (note that you can modify all these properties, except where specified as {}read-only{}), and all values returned are for the current playhead position:":"以下列表包含访问活动跟踪结构时可用的属性(如上面解释的序列实例结构的{}activeTracks{}数组中包含的属性)。根据曲目所使用的资源类型,每个资源跟踪结构可以具有以下任何属性(请注意,您可以修改所有这些属性,除非指定为{}只读{}),并且返回的所有值都针对当前播放头位置:", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Track_Struct.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Track_Struct.json index 86c82bf1c..4e09c1382 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Track_Struct.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Track_Struct.json @@ -1,6 +1,7 @@ { "\"{}blend_multiply{}\" or \"{}image_blend{}\" - when set on a track which is of type {}seqtracktype_colour{} this indicates that the contents of this track should be used as colour multiplication data. The keyframe data for such a track should be an array of four values with the format [A, R, G, B]. Note that the values for each component are expressed as between 0 and 1, where 0 corresponds to the HEX value #00 and 1 corresponds to the HEX value #FF (0 - 255 as shown in the colour picker for image blend tracks in the Sequences Editor).":"\"{}blend_multiply{}\" 或\"{}image_blend{}\" 设置在类型为{}seqtracktype_colour{}的磁道上时,表示此磁道的内容应用作色彩乘法数据。此类磁道的关键帧数据应为四值数组,格式为[A,R,G,B]。请注意,每个分量的值在0和1之间表示,其中0对应于十六进制值# 00,1对应于十六进制值# FF(0- 255,如序列编辑器中图像混合轨迹的颜色拾取器所示)。", "\"{}blend_multiply{}\" or \"{}image_blend{}\" - when set on a track which is of type {}seqtracktype_colour{} this indicates that the contents of this track should be used as colour multiplication data. The keyframe data for such a track should be an array of four values with the format [A, R, G, B]. Note that the values for each component are expressed as between 0 and 1, where 0 corresponds to the HEX value #00 and 1 corresponds to the HEX value #FF (0 - 255 as shown in the colour picker for image blend tracks in {}The Sequence Editor{}).":"\"{}blend_multiply{}\" 或 \"{}image_blend{}\" - 当在 {}seqtracktype_colour{} 类型的轨道上设置时,这表示该轨道的内容应用作颜色乘法数据。此类轨道的关键帧数据应该是由四个值组成的数组,格式为 [A, R, G, B]。请注意,每个分量的值表示为 0 到 1 之间,其中 0 对应于十六进制值 #00,1 对应于十六进制值 #FF(0 - 255,如 {} 序列编辑器 {}中图像混合轨迹的颜色选择器中所示) )。", + "\"{}blend_multiply{}\" or \"{}image_blend{}\" - when set on a track which is of type {}seqtracktype_colour{} this indicates that the contents of this track should be used as colour multiplication data. The keyframe data for such a track should be an array of four values with the format [A, R, G, B]. Note that the values for each component are expressed as between 0 and 1, where 0 corresponds to the HEX value {}#00{} and 1 corresponds to the HEX value {}#FF{} (0 - 255 as shown in the colour picker for image blend tracks in {}The Sequence Editor{}).":"\"{}blend_multiply{}\" 或 \"{}image_blend{}\" - 当在 {}seqtracktype_colour{} 类型的轨道上设置时,这表示该轨道的内容应用作颜色乘法数据。此类轨道的关键帧数据应该是由四个值组成的数组,格式为 [A, R, G, B]。请注意,每个组件的值均表示为 0 到 1 之间,其中 0 对应于十六进制值 {}#00{},1 对应于十六进制值 {}#FF{}(0 - 255,如颜色所示 ){} 序列编辑器 {} 中的图像混合轨道选择器)。", "\"{}characterSpacing{}\" - also used with {}seqtracktype_real{} tracks, used as the character spacing for the text. Each keyframe for this track should have a single channel containing the spacing value.":"\"{}characterSpacing{}\" - 也与 {}seqtracktype_real{} 轨道一起使用,用作文本的字符间距。该轨道的每个关键帧都应有一个包含间距值的通道。", "\"{}characterSpacing{}\" - also used with {}seqtracktype_real{} tracks, used as the character spacing for the text. {}Each keyframe for this track should have a single channel containing the spacing value.{}":"\"{}characterSpacting{}\" 也与{}seqtracktype_real{}轨迹一起使用,用作文本的字符间距。{}此轨迹的每个关键帧应有一个包含间距值的单个通道。{}", "\"{}frameSize{}\" - when set on a {}seqtracktype_real{} track, this indicates that the contents of this track should be used as the frame size for the text. Each keyframe for this track should have two channels, 0 and 1, where 0 stores the X size and 1 stores the Y size of the frame.":"\"{}frameSize{}\" - 当在 {}seqtracktype_real{} 轨道上设置时,这表示该轨道的内容应用作文本的帧大小。该轨道的每个关键帧应有两个通道:0 和 1,其中 0 存储帧的 X 尺寸,1 存储帧的 Y 尺寸。", @@ -27,6 +28,7 @@ "The properties available in the track struct are:":"TRACK结构中可用的属性有:", "The track struct can be used either for top-level {}{}{}asset track{}{}s{} or for sub-track {}{}{}parameter tracks{}, and the behaviour of the track is defined by two things, its {}name{} and its {}type{}. Track {}structs{} are created using the function {}{}sequence_track_new(){}{} and can be retrieved from sequence assets using the {}activeTracks{} property from the {}Sequence Instance Struct{} or the {}tracks{} property from the {}Sequence Object Struct{}.":"轨道结构可用于顶级{}{}{}资源轨道{}{}s{}或子轨道{}{}{}参数轨道{},且轨道的行为由两个要素定义:其{}名称{}及其{}类型{}。 轨迹{}结构{}使用函数{}{}sequence_track_new(){}{}创建,可以使用{}序列实例结构{}的{}activeTracks{}属性或{}序列对象结构{}的{}tracks{}属性从序列资源中检索。", "The track struct can be used either for top-level {}{}{}asset track{}{}s{} or for sub-track {}{}{}parameter tracks{}, and the behaviour of the track is defined by two things, its {}name{} and its {}type{}. Track {}structs{} are created using the function {}{}sequence_track_new(){}{} and can be retrieved from sequence assets using the {}activeTracks{} property from {}The Sequence Instance Struct{} or the {}tracks{} property from {}The Sequence Object Struct{}.":"track 结构体可用于顶级 {}{}{} 资源轨道 {}{}{} 或子轨道 {}{}{} 参数轨道 {} ,并且 track 的行为由两件事定义:其 {} 名称 {} 和 {} 类型 {}。轨道 {} 结构 {} 是使用函数 {}{}sequence_track_new(){}{} 创建的,并且可以使用 {} 序列实例结构 {} 中的 {20}activeTracks{21} 属性或 {} 序列对象结构 {} 中的 {24}tracks{25} 属性从序列资产中检索。", + "The track struct can be used either for top-level {}{}{}asset track{}{}s{} or for sub-track {}{}{}parameter tracks{}, and the behaviour of the track is defined by two things, its {}name{} and its {}type{}. Track {}structs{} are created using the function {}{}sequence_track_new{}{} and can be retrieved from sequence assets using the {}activeTracks{} property of {}The Sequence Instance Struct{} or the {}tracks{} property of {}The Sequence Object Struct{}.":"Track结构体可用于顶级{}{}{}资产轨道{}{}{}或子轨道{}{}{}参数轨道{},并且轨道的行为已定义由两件事决定:其{}名称{}和{}类型{}。轨道{}结构{}是使用函数{}{}sequence_track_new{}{}创建的,并且可以使用{}序列实例结构{}或{}tracks{}的{20}activeTracks{21}属性从序列资产中检索{}序列对象结构{}的属性。", "The {}name{} property can be any of the following strings:":"{}name{}属性可以是以下任何字符串:", "The {}type{} property can be any one of the following constants (these constants are also used when generating {}keyframes{} and {}keyframe data{}):":"{}type{}属性可以是以下任一常量(生成{}关键帧{}和{}关键帧数据{}时使用这些常量):", "The Track Struct":"轨道结构", @@ -45,6 +47,7 @@ "This is a sequence asset track.":"这是序列资源跟踪。", "This is a text track.":"这是一个文本轨道。", "This is an audio asset track.":"这是一个音频资源跟踪。", + "This is an audio effect track.":"这是音频效果轨道。", "This is an event/moment track.":"这是一个事件/时刻跟踪。", "This is an instance asset track.":"这是实例资源跟踪。", "This property allows access to the list of tracks which are children of this track. When getting this property an {}array{} of {}{}Sequence Track Struct{}{}s is returned, and when setting this property an array of {}{}Sequence Track Struct{}{}s should be specified.":"此属性允许访问此曲目的子轨迹列表。获得此属性时,将返回{}{}序列跟踪结构{}{}的{}数组{},设置此属性时,应指定{}{}序列跟踪结构{}{}的数组。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequences.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequences.json index 63535fed5..a22d34e8f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequences.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequences.json @@ -3,6 +3,7 @@ "Before you can add tracks to the sequence object, you need to create them, so you\u0027d now create an array of {}asset{} tracks that have been defined with the function {}{}sequence_track_new{}{}. Note that in code, there is really no difference between asset tracks and parameter tracks - they are all simply tracks and how they behave will depend on the type of track you create and whether they are assigned as sub-tracks to a top level track or not. So, you would create a track for an asset, and then assign sub-tracks for the different parameters to it and these sub-tracks would act as the {}parameter{} tracks for the asset. The example below creates a single graphics asset track that will be added to the sequence later:":"在将轨道添加到序列对象之前,您需要创建它们,因此您现在需要创建一个已使用函数 {}{}sequence_track_new{}{} 定义的 {0}asset{1} 轨道数组。请注意,在代码中,资产轨道和参数轨道之间实际上没有区别 - 它们都是简单的轨道,它们的行为方式将取决于您创建的轨道类型以及它们是否被分配为顶级轨道的子轨道或不是。因此,您可以为资产创建一条轨道,然后为其分配不同参数的子轨道,这些子轨道将充当资产的 {} 参数 {} 轨道。下面的示例创建一个图形资源轨道,稍后将其添加到序列中:", "Create the new sequence object using the function {}{}sequence_create{}{} and store the sequence object index in a variable. This index gives you access to the sequence object struct.":"使用函数 {}{}sequence_create{}{} 创建新的序列对象,并将序列对象索引存储在变量中。该索引使您可以访问序列对象结构。", "Each asset track needs to have some data to tell the sequence how it will look, or its position , etc... and this is added in the form of {}keyframes{}. At the top level for an asset track, you can set keyframes for various things (listed in the section on the Track Struct, below), but note that as these are asset track keyframes, they won\u0027t be interpolated and will simply change the value they refer to when the given frame is reached. Each keyframe is a struct that is added to an array, and then this array is assigned to the asset track. To create the keyframe struct we would call the function {}{}sequence_keyframe_new{}{} and to populate the keyframe with the required data, we would use the function {}{}sequence_keyframedata_new{}{}:":"每个资产轨道都需要一些数据来告诉序列它的外观、位置等 ...... 并且这些数据以 {} 关键帧 {} 的形式添加。在资产轨道的顶层,您可以为各种内容设置关键帧 (在下面的轨道结构部分中列出),但请注意,由于这些是资产轨道关键帧,因此它们不会被插值,只会更改当到达给定帧时它们引用的值。每个关键帧都是一个添加到数组中的结构,然后将该数组分配给资源轨道。要创建关键帧结构,我们将调用函数 {}{}sequence_keyframe_new{}{},并使用函数 {}{}sequence_keyframedata_new{}{} 填充关键帧:", + "Each asset track needs to have some data to tell the sequence how it will look, what its position is, etc. This is added in the form of {}keyframes{}. At the top level for an asset track, you can set keyframes for various things (listed in the section on the Track Struct, below), but note that as these are asset track keyframes, they won\u0027t be interpolated and will simply change the value they refer to when the given frame is reached. Each keyframe is a struct that is added to an array, and then this array is assigned to the asset track. To create the keyframe struct we would call the function {}{}sequence_keyframe_new{}{} and to populate the keyframe with the required data, we would use the function {}{}sequence_keyframedata_new{}{}:":"每个资产轨道都需要一些数据来告诉序列它的外观、位置等。这些数据以 {} 关键帧 {} 的形式添加。在资产轨道的顶层,您可以为各种内容设置关键帧 (在下面的轨道结构部分中列出),但请注意,由于这些是资产轨道关键帧,因此它们不会被插值,而只会更改当到达给定帧时它们引用的值。每个关键帧都是一个添加到数组中的结构,然后将该数组分配给资产轨道。要创建关键帧结构,我们将调用函数 {}{}sequence_keyframe_new{}{},并使用函数 {}{}sequence_keyframedata_new{}{} 填充关键帧:", "Events, Moments and Broadcast Messages":"事件、时刻和广播消息", "Finally, as mentioned above, you have the {}sequence data{}, which is another struct. This struct contains {}all{} the data about the sequence. The tracks it contains, the properties those tracks have, the playback speed and much more. The exact details of this structs contents are outlined below, but basically consists of {}asset track{} structs and {}parameter track{} structs which use {}keyframe data{} to actually perform actions while the sequence plays.":"最后,如上所述,您拥有 {} 序列数据 {},它是另一个结构体。该结构包含有关序列的 {} 所有 {} 数据。它包含的曲目、这些曲目具有的属性、播放速度等等。下面概述了该结构内容的具体细节,但基本上由 {} 资产轨道 {} 结构和 {} 参数轨道 {} 结构组成,它们使用 {} 关键帧数据 {} 在序列播放时实际执行操作。", "Finally, it is possible to add code to sequences that can be triggered as either an {}event{} a {}moment{} or as a {}broadcast message{}. This is explained fully on the following page:":"最后,可以向序列添加代码,这些代码可以作为 {} 事件 {}、{} 时刻 {} 或作为 {} 广播消息 {} 触发。下页对此进行了完整解释:", @@ -10,6 +11,7 @@ "Sequence elements are dealt with using the room {}layer functions{}, but for sequence objects, instances and data we have the following functions:":"序列元素使用房间 {} 层函数 {} 进行处理,但对于序列对象、实例和数据,我们有以下函数:", "Sequences are usually created in the IDE using {}The Sequence Editor{}, but they can also be created and edited using code. However, before looking at the functions available, it\u0027s important to understand the way that sequences are defined in {}GameMaker{} and the different terms that will be used.":"序列通常使用 {} 序列编辑器 {} 在 IDE 中创建,但也可以使用代码创建和编辑。不过,在查看可用函数之前,了解 {}GameMaker{} 中定义序列的方式以及将使用的不同术语非常重要。", "Set the sequence object top level values like length, play mode, play speed, etc. For example:":"设置序列对象顶级值,如长度、播放模式、播放速度等。例如:", + "Set the sequence object top-level values like length, play mode, play speed, etc. For example:":"设置序列对象顶级值,如长度、播放模式、播放速度等。例如:", "The above instructions create a very simple sequence object that draws a sprite at the (0, 0) position {}of the sequence{} and then moves it to the bottom-right corner and back in a loop. As mentioned, there are a number of places where you need to access different structs to give or get data about the sequence, and the sections below list all the different properties that these structs contain:":"上述指令创建了一个非常简单的序列对象,该对象在序列的 (0, 0) 位置 {} 绘制一个精灵,然后将其移动到右下角并循环返回。如前所述,有很多地方需要访问不同的结构来提供或获取有关序列的数据,下面的部分列出了这些结构包含的所有不同属性:", "There is also a {}built-in variable{} associated with instances that can be used to determine if the instance has been used in a sequence or not:":"还有一个与实例关联的 {} 内置变量 {},可用于确定实例是否已在序列中使用:", "To start with, at the top level, you have a {}sequence element{}. This is what you place on a layer in a room, either through {}The Room Editor{} or in code using the appropriate {}layer functions{}. The layer element has no real properties other than an element ID value, but this ID is required to use the above mentioned layer functions to change the sequence playback or to access the sequence data.":"首先,在顶层,您有一个 {} 序列元素 {}。这是您通过 {} 房间编辑器 {} 或使用适当的 {} 层函数 {} 在代码中放置在房间层上的内容。除了元素 ID 值之外,图层元素没有任何实际属性,但是需要此 ID 才能使用上述图层功能来更改序列播放或访问序列数据。", @@ -22,5 +24,6 @@ "{}The Sequence Instance Struct{}":"{} 序列实例结构 {}", "{}The Sequence Object Struct{}":"{} 序列对象结构 {}", "{}The Track Struct{}":"{} 轨道结构 {}", - "{}{}IMPORTANT{}{} If your sequence has any instances in it, these instances shouldn\u0027t change their {}{}image_xscale{}{} / {}{}image_yscale{}{} / {}{}image_angle{}{} / {}x{} / {}y{} variables as they will be overwritten when the sequence updates each step after starting to be played.":"{}{} 重要提示{}{} 如果您的序列中有任何实例,这些实例不应更改其 {}{}image_xscale{}{}/{}{}image_yscale{}{}/{}{}image_angle{}{}/{}x{}/{}y{} 变量,因为当序列开始播放后更新每个步骤时,它们将被覆盖。" + "{}{}IMPORTANT{}{} If your sequence has any instances in it, these instances shouldn\u0027t change their {}{}image_xscale{}{} / {}{}image_yscale{}{} / {}{}image_angle{}{} / {}x{} / {}y{} variables as they will be overwritten when the sequence updates each step after starting to be played.":"{}{} 重要提示{}{} 如果您的序列中有任何实例,这些实例不应更改其 {}{}image_xscale{}{}/{}{}image_yscale{}{}/{}{}image_angle{}{}/{}x{}/{}y{} 变量,因为当序列开始播放后更新每个步骤时,它们将被覆盖。", + "{}{}{}IMPORTANT{}{} {}If your sequence has any instances in it, these instances shouldn\u0027t change their {}{}image_xscale{}{}  / {}{}image_yscale{}{} / {}{}image_angle{}{} / {}{}x{}{} / {}{}y{}{} variables as they will be overwritten when the sequence updates each step after starting to be played. You can check {}{}in_sequence{}{} and only update the properties of such an instance when this variable is {}false{}.":"{}{}{} 重要{}{}{} 如果您的序列中有任何实例,这些实例不应更改其 {}{}image_xscale{}{}/{}{}image_yscale{}{}/{}{}image_angle{}{}/{}{}x{}{}/{}{}y{}{} 变量,因为当序列开始播放后更新每个步骤时,它们将被覆盖。您可以检查 {}{}in_sequence{}{},并且仅当该变量为 {}false{} 时才更新此类实例的属性。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/Shader_Constants.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/Shader_Constants.json index d856bf063..51cfcebc8 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/Shader_Constants.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/Shader_Constants.json @@ -1,32 +1,57 @@ { + "Apart from the shader functions and constants defined in the OpenGL ES Shading Language (GLSL ES) {}Reference Pages{}, there are also a number of built-in shader constants available to you that are unique to {}GameMaker{}.":"除了 OpenGL ES 着色语言 (GLSL ES){} 参考页 {} 中定义的着色器函数和常量之外,您还可以使用许多 {}GameMaker{} 特有的内置着色器常量。", "Apart from the shader functions and constants defined in the OpenGL ES Shading Language (GLSL ES) {}Reference Pages{}, there are also a number of shader constants available to you that are unique to {}GameMaker{}.":"除了在 OpenGL ES 着色语言(GLSL ES){}参考页{}中定义的着色器函数和常量之外,还有许多可用于{}GameMaker{}的着色器常量。", "Apart from the shader functions and constants defined in the OpenGL ES Shading Language (GLSL ES) {}Reference Pages{}, there are also a number of shader uniforms available to you that are unique to {}GameMaker{}.":"除了 OpenGL ES 着色器语言 (GLSL ES){} 参考页面 {} 中定义的着色器函数和常量外,还有许多着色器 uniform 可供您使用,这些着色器 uniform 是 {}GameMaker{} 独有的。", "Shader Constants":"着色器常量", + "The following constants (i.e. {}defines{}) can be used as array indices when using the shader array uniform {}gm_Matrices{}:":"使用着色器数组统一 {}gm_Matrices{} 时,以下常量 (即 {}defines{}) 可用作数组索引:", "The following constants are also available:":"以下常量也可用:", "The following display matrix constants can be used as array indices when using the shader array constant {}gm_Matrices{}:":"使用着色器数组常量{}GM_矩阵{}时,可以将以下显示矩阵常量用作数组索引:", "The following pre-defined matrix uniforms and constants can be used in your shader to access {}GameMaker{} specific values:":"可以在着色器中使用以下预定义的矩阵统一和常量来访问 {}GameMaker{} 特定值:", "The maximum number of point and directional lights available in the shader":"材质球中可用的点光源和平行光的最大数量", "The maximum number of point and directional lights available in the shader.":"着色器中可用的点光源和平行光的最大数量。", + "The maximum number of point and directional lights available in the vertex shader.":"顶点着色器中可用的点光源和定向光源的最大数量。", + "The names listed in the tables below refer to either:":"下表中列出的名称指的是:", "The size of the matrix array ({}gm_Matrices{}) in the vertex shader.":"顶点着色器中的矩阵数组的大小 ({}gm_Matrices{})。", "This array constant returns a transform matrix and is one of the available pre-defined uniforms that {}GameMaker{} creates for you to use within the shader code editor. The array index is chosen from one of the above listed constants.":"此数组常量返回变换矩阵,是{}GameMaker{}为您在着色器代码编辑器中使用而创建的可用预定义 uniform 之一。数组索引选自上述常数之一。", + "This array index constant holds the index to the current projection matrix. The index returned would be used as an array value when accessing the built-in {}gm_Matrices{} uniform within the shader code.":"该数组索引常量保存当前投影矩阵的索引。在访问着色器代码中的内置 {}gm_Matrices{} 统一值时,返回的索引将用作数组值。", "This array index constant holds the index to the current projection matrix. The index returned would be used as an array value when calling the {}gm_Matrices{} constant within the shader code.":"此数组索引常数保存当前投影矩阵的索引。当调用着色器代码中的{}gm_Matrices{}常量时,返回的索引将用作数组值。", + "This array index constant holds the index to the current view matrix. The index returned would be used as an array value when accessing the built-in {}gm_Matrices{} uniform within the shader code.":"该数组索引常量保存当前视图矩阵的索引。在访问着色器代码中的内置 {}gm_Matrices{} 统一值时,返回的索引将用作数组值。", "This array index constant holds the index to the current view matrix. The index returned would be used as an array value when calling the {}gm_Matrices{} constant within the shader code.":"此数组索引常量保存当前视图矩阵的索引。当调用着色器代码中的{}gm_Matrices{}常量时,返回的索引将用作数组值。", + "This array index constant holds the index to the current world matrix. This can be used for things like lighting if you have light information in world space. The index returned would be used as an array value when accessing the built-in {}gm_Matrices{} uniform within the shader code.":"该数组索引常量保存当前世界矩阵的索引。如果您有世界空间中的光信息,这可以用于诸如照明之类的事情。在访问着色器代码中的内置 {}gm_Matrices{} 统一值时,返回的索引将用作数组值。", "This array index constant holds the index to the current world matrix. This can be used for things like lighting if you have light information in world-space. The index returned would be used as an array value when calling the {}gm_Matrices{} constant within the shader code.":"此数组索引常数保存当前世界矩阵的索引。如果世界空间中有灯光信息,这可以用于照明之类的事情。当调用着色器代码中的{}gm_Matrices{}常量时,返回的索引将用作数组值。", + "This array index constant holds the index to the result of the world and view matrices multiplied together. This is often used for things like fog. The index returned would be used as an array value when accessing the built-in {}gm_Matrices{} uniform within the shader code.":"该数组索引常量保存世界矩阵和视图矩阵相乘结果的索引。这通常用于雾等事物。在访问着色器代码中的内置 {}gm_Matrices{} 统一值时,返回的索引将用作数组值。", "This array index constant holds the index to the result of the world and view matrices multiplied together. This is often used for things like fog. The index returned would be used as an array value when calling the {}gm_Matrices{} constant within the shader code.":"此数组索引常量保存世界结果的索引,并查看相乘在一起的矩阵。这经常用于雾之类的事情。当调用着色器代码中的{}gm_Matrices{}常量时,返回的索引将用作数组值。", "This array index constant holds the index to the result of the world, view and projection matrices multiplied together. This is the normal transformation matrix used for vertex positions. The index returned would be used as an array value when calling the {}gm_Matrices{} constant within the shader code.":"此数组索引常量将世界、视图和投影矩阵结果的索引相乘在一起。这是用于顶点位置的法线变换矩阵。当调用着色器代码中的{}gm_Matrices{}常量时,返回的索引将用作数组值。", + "This array index constant holds the index to the result of the world, view and projection matrices multiplied together. This is the normal transformation matrix used for vertex positions. The index returned would be used as an index into the {}gm_Matrices{} uniform within the shader code.":"该数组索引常量保存世界矩阵、视图矩阵和投影矩阵相乘结果的索引。这是用于顶点位置的法线变换矩阵。返回的索引将用作着色器代码中 {}gm_Matrices{} 统一的索引。", + "This array uniform of mat4s stores the various transform matrices used by {}GameMaker{} and is one of the available predefined uniforms that {}GameMaker{} creates for you to use within the shader code editor. The array index is chosen from one of the matrix index constants listed above, e.g. {}gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION]{}. Its number of elements is {}MATRICES_MAX{}.":"此 mat4s 数组统一存储了 {}GameMaker{} 使用的各种变换矩阵,并且是 {}GameMaker{} 创建供您在着色器代码编辑器中使用的可用预定义统一之一。数组索引选自上面列出的矩阵索引常量之一,例如 {}gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION]{}。其元素数量为 {}MATRICES_MAX{}。", + "This boolean uniform holds whether alpha testing is enabled. See {}{}gpu_set_alphatestenable{}{} for more information on alpha testing.":"这个布尔值保存是否启用 alpha 测试。有关 alpha 测试的更多信息,请参阅 {}{}gpu_set_alphatestenable{}{}。", + "This boolean uniform holds whether lighting is enabled, i.e. the value set with {}{}draw_light_enable{}{} and returned by {}{}draw_get_lighting{}{}.":"该布尔值保存是否启用光照,即使用 {}{}draw_light_enable{}{} 设置并由 {}{}draw_get_lighting{}{} 返回的值。", "This can be used to get alpha testing in the shader. See {}{}gpu_set_alphatestenable(){}{} for more information on alpha testing.":"这可用于在着色器中进行 Alpha 测试。有关 alpha 测试的更多信息,请参见{}{}gpu_set_alphatestenable(){}{}。", "This can be used to get or set the {}GameMaker{} lighting when using 3D.":"这可用于在使用3D时获取或设置{}GameMaker{}照明。", "This can be used to get the current alpha testing reference value. See {}{}gpu_set_alphatestref(){}{} for more information on the alpha test reference.":"这可用于获取当前alpha测试参考值。有关 alpha 测试参考的更多信息,请参见{}{}gpu_set_alphatestref(){}{}。", "This can be used to get the distance at which fog is maximal and nothing can be seen anymore.":"这可以用来获得雾最大并且什么都看不见的距离。", "This can be used to get the distance where polygons start to be blended with the fog colour.":"这可用于获取多边形开始与雾颜色混合的距离。", "This can be used to get the fog colour used by {}GameMaker{}.":"这可用于获取{}GameMaker{}使用的雾色。", + "This float uniform holds the current alpha testing reference value. See {}{}gpu_set_alphatestref{}{} for more information on the alpha test reference.":"该浮点uniform保存当前的 alpha 测试参考值。有关 alpha 测试参考的更多信息,请参阅 {}{}gpu_set_alphatestref{}{}。", "This is a 2D sampler constant that returns the texture of the current object, as set by {}GameMaker{}. So it would be the current sprite, surface or texture that would normally be used when drawing without the shader being called.":"这是返回当前对象的纹理的二维采样器常量,由{}GameMaker{}设置。 因此,在不调用着色器的情况下绘制时,通常使用的是当前精灵、表面或纹理。", + "This is a 2D sampler uniform that holds the texture of that which {}GameMaker{} is currently drawing. So it would be the (full) texture page the current sprite is on, the texture of the surface being drawn or the texture passed as the texture to {}{}vertex_submit{}{} in case you\u0027re submitting a custom vertex buffer.":"这是一个 2D 采样器制服,保存 {}GameMaker{} 当前正在绘制的纹理。因此,如果您要提交自定义顶点缓冲区,它将是当前精灵所在的 (完整) 纹理页面、正在绘制的表面纹理或作为纹理传递到 {}{}vertex_submit{}{} 的纹理。", "This is a vec4 containing the colour of the ambient light as set in {}{}draw_light_define_ambient(){}{}":"这是一个包含在 {}{}draw_light_define_ambient(){}{} 中设置的环境光颜色的 vec4", + "This is a vec4 uniform containing the colour of the ambient light as set with {}{}draw_light_define_ambient{}{}.":"这是一个 vec4 制服,包含使用 {}{}draw_light_define_ambient{}{} 设置的环境光颜色。", "This is an array of vec4s, each vec4 contains a light\u0027s colour (R, G, B), with the alpha channel (A) always being 1":"这是一个 vec4s 数组,每个 vec4 包含一种光的颜色 (R、G、B),其中 Alpha 通道 (A) 始终为 1", "This is an array of vec4s, each vec4 contains a light\u0027s normalised direction vector (X, Y, Z) and a fourth dimension (W) which is 1 when the light is enabled, and 0 when disabled":"这是一个 vec4s 数组,每个 vec4 包含一个光的归一化方向向量 (X、Y、Z) 和第四维 (W),当光启用时为 1,禁用时为 0", "This is an array of vec4s, each vec4 contains a light\u0027s position (X, Y, Z) and a fourth dimension (W) which is the light\u0027s range, which is 0 when that light is disabled":"这是一个 vec4s 数组,每个 vec4 包含一个光的位置 (X、Y、Z) 和第四维 (W),这是光的范围,当该光被禁用时,第四维 (W) 为 0", + "This is an array uniform of vec4s, where each vec4 contains a light\u0027s colour (R, G, B), with the alpha channel (A) always being 1.":"这是 vec4 的统一数组,其中每个 vec4 包含光的颜色 (R、G、B),且 alpha 通道 (A) 始终为 1。", + "This is an array uniform of vec4s, where each vec4 contains a light\u0027s normalised direction vector (X, Y, Z) and a fourth dimension (W) which is 1 when the light is enabled, and 0 when disabled. Light properties can be set using {}{}draw_light_define_direction{}{}.":"这是一个 vec4s 的统一数组,其中每个 vec4 包含光的归一化方向向量 (X, Y, Z) 和第四个维度 (W),当光启用时为 1,禁用时为 0。可以使用 {}{}draw_light_define_direction{}{} 设置灯光属性。", + "This is an array uniform of vec4s, where each vec4 contains a light\u0027s position (X, Y, Z) and a fourth dimension (W) which is the light\u0027s range, which is 0 when that light is disabled. Light properties can be set using {}{}draw_light_define_point{}{}.":"这是 vec4 的统一数组,其中每个 vec4 包含灯光的位置 (X、Y、Z) 和第四个维度 (W),第四个维度是灯光的范围,当灯光被禁用时,第四个维度为 0。可以使用 {}{}draw_light_define_point{}{} 设置灯光属性。", "This is not an array index, but rather returns the number of the lights in the vertex shader.":"这不是数组索引,而是返回顶点着色器中的灯光数量。", "This is not an array index, but rather returns the size of the matrix array in the vertex shader.":"这不是数组索引,而是返回顶点着色器中矩阵数组的大小。", + "This is the distance at which fog is maximal and nothing can be seen anymore.":"这是雾气最大并且什么也看不见的距离。", + "This is the distance where polygons start to be blended with the fog colour.":"这是多边形开始与雾颜色混合的距离。", + "This will hold {}true{} or {}false{}, depending on whether the GPU has pixel fog enabled or not.":"该值将保持 {}true{} 或 {}false{},具体取决于 GPU 是否启用了像素雾。", + "This will hold {}true{} or {}false{}, depending on whether the GPU has vertex fog enabled or not.":"该值将保持 {}true{} 或 {}false{},具体取决于 GPU 是否启用了顶点雾。", "This will return {}true{} or {}false{} if the GPU has pixel fog enabled or not.":"如果 GPU 启用或未启用像素雾,这将返回{}true{}或{}false{}。", - "This will return {}true{} or {}false{} if the GPU has vertex fog enabled or not.":"如果 GPU 启用或未启用顶点雾,这将返回{}true{}或{}false{}。" + "This will return {}true{} or {}false{} if the GPU has vertex fog enabled or not.":"如果 GPU 启用或未启用顶点雾,这将返回{}true{}或{}false{}。", + "Uniforms, which start with the {}gm_{} prefix":"Uniforms,以 {}gm_{} 前缀开头", + "{}#define{}s, which are similar to {}Macros{} in {}GML Code{} and are written in {}UPPERCASE{}":"{}#define{},类似于 {}GML 代码 {} 中的 {} 宏 {},并以 {}UPPERCASE{} 编写", + "{}Built-In Shader Constants{}":"{} 内置着色器常量 {}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/Shaders.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/Shaders.json index f3fcc8b0a..3a695a84d 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/Shaders.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/Shaders.json @@ -1,22 +1,28 @@ { "All target platforms":"所有目标平台", "As an extra check you can also call the function {}{}shaders_are_supported(){}{} to see if the hardware even supports shaders. In general you\u0027d do these checks on game start and store the results as a {}global variable{} to then check later.":"作为额外检查,您还可以调用函数{}{}shaders_are_supported(){}{}来查看硬件是否甚至支持着色器。通常,您会在游戏开始时执行这些检查,并将结果存储为{}全局变量{},然后进行检查。", + "As an extra check you can also call the function {}{}shaders_are_supported{}{} to see if the hardware even supports shaders. In general you\u0027d do these checks on game start and store the results as a {}global variable{} to then check later.":"作为额外检查,您还可以调用函数 {}{}shaders_are_supported{}{} 来查看硬件是否支持着色器。一般来说,您会在游戏开始时执行这些检查,并将结果存储为 {} 全局变量 {},以便稍后检查。", + "As you can see, they are used in a similar manner to blend modes and surfaces, where you first select (set) the shader, draw what you want using it, then reset the draw target again afterwards. If you wish to render the entire screen through a shader, and not just a single sprite or background, you will need to set up a surface to catch the current view, and then pass that through to the shader (see {}Surfaces{} for more information).":"正如您所看到的,它们的使用方式与混合模式和表面类似,您首先选择 (设置) 着色器,使用它绘制您想要的内容,然后再次重置绘制目标。如果您希望通过着色器渲染整个屏幕,而不仅仅是单个精灵或背景,则需要设置一个表面来捕获当前视图,然后将其传递到着色器 (请参阅 {} 表面 {} 了解更多信息)。", "As you can see, they are used in a similar manner to blend modes and surfaces, where you first select (set) the shader, draw what you want using it, then reset the draw target again afterwards. If you wish to render the full screen through a shader, and not just a single sprite or background, you will need to set up a surface to catch the current view, and then pass that through to the shader (see {}Surfaces{} for more information).":"正如您所看到的,它们以类似的方式用于混合模式和表面,其中您首先选择(设置)着色器,使用它绘制您想要的,然后之后再次重置绘制目标。如果您希望通过着色器而不是单个精灵或背景来渲染整个屏幕,则需要设置一个表面来捕捉当前视图,然后将其传递到着色器(有关详细信息,请参阅{}Surfaces{})。", "Finally, {}GameMaker{} permits you to define your own {}Vertex Formats{} from which you can create your own custom primitives. This can greatly speed up shader operations or can be used to extend their capabilities and create surprising effects. You can find information on this in the following sections:":"最后,{}GameMaker{}允许您定义自己的{}顶点格式{},从中可以创建自己的自定义基元。这可以大大加快着色器操作,或用于扩展其函数并创建出人意料的效果。您可以在以下章节中找到这方面的信息:", "For a complete overview of the available GLSL ES functions and variables that you can use to program the shaders themselves, please refer to the {}OpenGL ES Shading Language (GLSL ES) Reference Pages{}. The following link is also useful as it contains some quick reference cards for the OpenGL ES API (note that only the last two cards shown are applicable to {}GameMaker{}): {}OpenGL ES Reference Cards{}.":"有关可用于对着色器本身编程的可用GLSL ES函数和变量的完整概述,请参阅{}OpenGL ES着色语言(GLSL ES)参考页{}。 以下链接也很有用,因为它包含一些用于OpenGL ES API的快速参考卡(请注意,仅显示的最后两张卡适用于{}GameMaker{}):{}OpenGL ES参考卡{}。", "For a complete overview of the language specification of GLSL ES that {}GameMaker{} currently uses, including the functions and variables that you can use to program the shaders themselves, please refer to the {}GLSL ES Specification 1.00{}. If you\u0027re looking for a quick overview of these functions and variables, the following link is useful as well as it contains some quick reference cards for the OpenGL ES API on the last two cards: {}OpenGL ES Reference Cards{}.":"有关 {}GameMaker{} 当前使用的 GLSL ES 语言规范的完整概述,包括可用于对着色器本身进行编程的函数和变量,请参阅 {}GLSL ES Specification 1.00{}.。如果您正在寻找这些函数和变量的快速概述,以下链接非常有用,因为它包含最后两张卡上的 OpenGL ES API 的一些快速参考卡:{}OpenGL ES 参考卡 {}。", "Guide To Using Shaders":"着色器使用指南", "If the shader you are using has input values, these are set using the {}uniform{} functions. You would first get the uniform {}handle{} (which is essentially an ID value for the uniform to be set) using the function {}{}shader_get_uniform(){}{} in the {}Create Event{} of the instance using the shader, and then store these handles in variables, something like this:":"如果使用的着色器具有输入值,则使用{}统一{}函数设置这些值。首先使用着色器在实例的{}创建事件{}中使用函数{}{}shader_get_uniform(){}{}获取统一{}句柄{}(本质上是要设置 uniform 的ID值),然后将这些句柄存储在变量中,如下所示:", + "If the shader you are using has input values, these are set using the {}uniform{} functions. You would first get the uniform {}handle{} (which is essentially an ID value for the uniform to be set) using the function {}{}shader_get_uniform{}{} in the {}Create Event{} of the instance using the shader, and then store these handles in variables, something like this:":"如果您使用的着色器具有输入值,则这些值是使用 {}uniform{} 函数设置的。您首先需要使用实例的 {} 创建事件 {} 中的函数 {}{}shader_get_uniform{}{} 获取统一的 {} 句柄 {}( 本质上是要设置的统一的 ID 值) 着色器,然后将这些句柄存储在变量中,如下所示:", "If you are new to shaders or want a more complete guide to creating and use them using {}GameMaker{}, then please see the following page of the manual:":"如果您是着色器的新手,或者想要使用{}GameMaker{}创建和使用着色器的更完整指南,请参阅手册的以下页面:", "It is important to note that {}GameMaker{} also supports some conditional compile {}Macros{} which can be used within GLSL ES shaders so they can perform alternative code on specific supported platforms. The macros and the platforms they will be generated on are shown in the table below:":"需要注意的是,{}GameMaker{}还支持一些条件编译{}宏{},这些宏可以在GLSL ES着色器中使用,因此它们可以在特定的支持平台上执行替代代码。下表显示了宏及其生成的平台:", "Mac and Ubuntu (Linux)":"Mac和Ubuntu(Linux)", "Once you have the uniform handles, they can then be set in the shader code for the {}Draw Event{} like this:":"有了统一的句柄后,可以在{}绘制事件{}的着色器代码中设置它们,如下所示:", + "One final thing to note is that although shaders are accepted across all platforms, they are still device specific and if the hardware or software of the device cannot use shaders then you will get an error. Therefore you are recommended to check that the shader has been compiled before setting uniforms or using the shader itself by using {}{}shader_is_compiled{}{}, like this:":"最后要注意的一件事是,尽管着色器在所有平台上都被接受,但它们仍然是特定于设备的,如果设备的硬件或软件无法使用着色器,那么您将收到错误。因此,建议您在设置制服或使用着色器本身之前使用 {}{}shader_is_compiled{}{} 检查着色器是否已编译,如下所示:", "One final thing to note is that although shaders are accepted across all platforms, they are still device specific and if the hardware or software of the device cannot use shaders then you will get an error. Therefore you are recommended to check that the shader has been compiled before setting uniforms or using the shader itself, like this:":"最后要注意的一点是,尽管着色器在所有平台上都被接受,但它们仍然是特定于设备的,如果设备的硬件或软件不能使用着色器,则会出现错误。因此,建议您在设置统一或使用着色器本身之前检查着色器是否已编译,如下所示:", "Primitives And Vertex Formats":"基本元和顶点格式", "Shader Uniforms":"着色器 Uniforms 常量", "Shaders are an incredibly powerful tool for manipulating what and how things are {}rendered{} to the screen by the graphics card. Since these tiny programs are actually run on the graphics card itself, this means that they are extremely fast to process, freeing up valuable CPU cycles for more game logic.":"着色器是一个非常强大的工具,用于操纵图形卡向屏幕呈现{}内容和方式{}。由于这些小程序实际上运行在显卡上,这意味着它们处理速度极快,为更多的游戏逻辑释放了宝贵的CPU周期。", + "Shaders use a certain {}precision{} to store variables. By default, this may not be the highest precision. You can add the following line of code:":"着色器使用特定的 {} 精度 {} 来存储变量。默认情况下,这可能不是最高精度。您可以添加以下代码行:", "The following functions are available for drawing and setting shaders:":"以下函数可用于绘制与设置着色器:", "To create a shader you will need to have written both a {}Vertex Shader{} and a {}Fragment Shader{} (also know as a {}Pixel Shader{}) using the {}Shader Editor{}, and even if (for example) you only wish to change the vertex positions for an instance being drawn, or if you only want to change the colour values for the pixels, you will still need {}both{} programs for a complete shader to work.":"要创建着色器,需要使用{}着色器编辑器{}编写{}顶点着色器{}和{}碎片着色器{}(也称为{}像素着色器{}),并且即使(例如)仅希望更改正在绘制的实例的顶点位置,或者如果只想更改像素的颜色值,仍需要{}两个{}程序才能使完整着色器工作。", + "To create a shader you will need to have written both a {}Vertex Shader{} and a {}Fragment Shader{} (also know as a {}Pixel Shader{}) using {}The Shader Editor{}, and even if (for example) you only wish to change the vertex positions for an instance being drawn, or if you only want to change the colour values for the pixels, you will still need {}both{} programs for a complete shader to work.":"要创建着色器,您需要使用 {} 着色器编辑器 {} 编写 {} 顶点着色器 {} 和 {} 片段着色器 {}( 也称为 {} 像素着色器 {}),即使 (例如) 您只想更改正在绘制的实例的顶点位置,或者如果您只想更改像素的颜色值,您仍然需要 {} 这两个 {} 程序才能使完整的着色器正常工作。", "Using a shader in your projects is very simple, and only requires a couple of lines of code to get the most basic of use from it:":"在项目中使用着色器非常简单,只需几行代码即可从中获得最基本的用途:", "We also have a special function which defines a global state for all shaders:":"我们还有一个特殊的函数,它定义了所有着色器的全局状态:", "When working with texture samplers in shaders you will need information about the texture being used, in which case you can use the following functions:":"在着色器中使用纹理采样器时,您将需要有关正在使用的纹理的信息,在这种情况下,您可以使用以下函数:", @@ -25,9 +31,12 @@ "While this manual will {}not{} cover any of the Open GL shader functions and variables, it does contain a list of the ones that are unique to {}GameMaker{}. These constants are not part of the Open GL specification for shaders and are supplied to simplify the integration of shaders within your projects.":"虽然本手册{}不{}涵盖任何 Open GL 着色器函数和变量,但它确实包含{}GameMaker{}独有的函数和变量列表。 这些常量不是用于着色器的Open GL规范的一部分,而是为了简化项目中着色器的集成。", "While this manual will {}not{} cover any of the OpenGL shader functions and variables, it does contain a list of the ones that are unique to {}GameMaker{}. These constants are not part of the OpenGL specification for shaders and are supplied to simplify the integration of shaders within your projects.":"虽然本手册{}不会{}介绍任何 OpenGL 着色器函数和变量,但它确实包含了 {}GameMaker{} 所独有的函数和变量的列表。这些常量不是着色器的 OpenGL 规范的一部分,提供这些常量是为了简化项目中着色器的集成。", "Windows, XboxOne":"Windows, XboxOne", + "at the top of any pixel shader that requires a higher degree of mathematical precision. This can be useful on e.g. s{}ome Android devices that run their shaders in low precision mode{}.":"位于任何需要更高数学精度的像素着色器的顶部。这对于例如一些在低精度模式下运行着色器的 Android 设备 {}。", "{}NOTE{} Shaders do {}not{} permit you to change the value of any variables that you pass into them, and so these will be called {}shader constants{} in all the documentation that refers to them.":"{}注意{}着色器不允许{}更改传入变量的任何变量的值,因此在引用这些变量的所有文档中,这些变量称为{}着色器常量{}。", "{}NOTE{}: Shaders, like anything related to drawing, can {}only be used in the draw event{}. It is also worth noting that if you are trying to use a colour value in a shader and the object has no texture, the results will turn out black.":"{}注意{}:着色器,像任何与绘制相关的东西一样,只能在绘制事件{}中使用。同样值得注意的是,如果尝试在着色器中使用颜色值,并且对象没有纹理,则结果将变为黑色。", "{}Shaders{}":"{}着色器{}", "{}{}NOTE{}{} Shaders do {}not{} permit you to change the value of any variables that you pass into them, and so these will be called {}shader constants{} in all the documentation that refers to them.":"{}{}注意{}{} 着色器{}不允许{}您更改传递给它们的任何变量的值,因此在所有引用它们的文档中,这些变量将称为{}着色器常量{}。", + "{}{}NOTE{}{} Shaders do {}not{} permit you to change the value of any variables that you pass into them, and so these will be called {}shader constants{} (or uniforms) in all the documentation that refers to them.":"{}{} 注意{}{} 着色器 {} 不允许 {} 允许您更改传递给它们的任何变量的值,因此这些在所有着色器中将被称为 {} 着色器常量 {}( 或统一) 引用它们的文档。", + "{}{}NOTE{}{} Shaders, like anything related to drawing, can {}only be used in the Draw events{}. It is also worth noting that if you are trying to use a colour value in a shader and the object has no texture, the results will turn out black.":"{}{} 注意{}{} 着色器与绘图相关的任何内容一样,{} 只能在 Draw 事件中使用 {}。还值得注意的是,如果您尝试在着色器中使用颜色值并且对象没有纹理,则结果将变成黑色。", "{}{}NOTE{}{} Shaders, like anything related to drawing, can {}only be used in the draw event{}. It is also worth noting that if you are trying to use a colour value in a shader and the object has no texture, the results will turn out black.":"{}{}注意{}{} 着色器,就像任何与绘制相关的东西一样,{}只能在绘制事件中使用{}。同样值得注意的是,如果您尝试在着色器中使用颜色值,并且对象没有纹理,结果将变为黑色。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_enable_corner_id.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_enable_corner_id.json index d1b9f77f5..3744fa47a 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_enable_corner_id.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_enable_corner_id.json @@ -8,5 +8,6 @@ "This function enables the use of corner IDs in shaders.":"此函数允许在着色器中使用角ID。", "With this function you can set a global state for all shaders being used where, when enabled, the shader \"steals\" 2 bits from the input colour values. The first is from the lower bit of the red colour value, and the second is from the lower bit of the blue colour value. These values can get then be recovered in the shader to work out which vertex you are dealing with (ie: which corner).":"使用此功能,您可以为所有正在使用的着色器设置全局状态,当启用该着色器时,着色器将从输入颜色值\"窃取\"2位。第一个来自红色值的低位,第二个来自蓝色值的低位。然后可以在着色器中恢复这些值,以确定您正在处理的是哪个顶点(即:哪个角)。", "With this function you can set a global state for all shaders being used where, when enabled, the shader \"steals\" 2 bits from the input colour values. The first is from the lower bit of the red colour value, and the second is from the lower bit of the blue colour value. These values can then be recovered in the shader to work out which vertex you are dealing with (ie: which corner).":"使用此功能,您可以为所有正在使用的着色器设置全局状态,当启用该着色器时,着色器将从输入颜色值\"窃取\"2位。第一个来自红色值的低位,第二个来自蓝色值的低位。然后可以在着色器中恢复这些值,以确定您正在处理的是哪个顶点(即:哪个角)。", - "{}{}NOTE{}{} The corner IDs are numbered consecutively going clockwise, starting at 0 for the top-left corner.":"{}{}注意{}{} 角 ID 按顺时针方向连续编号,左上角从 0 开始编号。" + "{}{}NOTE{}{} The corner IDs are numbered consecutively going clockwise, starting at 0 for the top-left corner.":"{}{}注意{}{} 角 ID 按顺时针方向连续编号,左上角从 0 开始编号。", + "{}{}NOTE{}{} This will not work when using {}vertex buffers and primitives{} as the colour data for each vertex is handled by the user.":"{}{} 注意{}{} 当使用 {} 顶点缓冲区和基元 {} 时,此功能将不起作用,因为每个顶点的颜色数据均由用户处理。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_matrix.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_matrix.json index 7a6e77bf6..01fff9c70 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_matrix.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_matrix.json @@ -1,8 +1,11 @@ { "The above code will get the handle of the shader constant \"u_vMatrix\" then set that constant to the current transform matrix.":"上面的代码将获得着色器常数\"u_vMatrix\"的句柄,然后将该常数设置为当前变换矩阵。", + "The above code will get the handle of the shader constant {}u_vMatrix{} then set that constant to the current transform matrix.":"上述代码将获取着色器常量 {}u_vMatrix{} 的句柄,然后将该常量设置为当前变换矩阵。", "The handle of the shader constant to set.":"要设置的着色器常量的句柄。", + "This function sets the value (or values) of a shader constant to the current transform matrix (as set using the {}Matrix Functions{}).":"此函数将着色器常量的一个或多个值设置为当前变换矩阵 (使用 {} 矩阵函数 {} 设置)。", "With this function you can set the value (or values) of a shader constant to the current transform matrix (as set using the {}Matrix Functions{}). You must previously have gotten the \"handle\" of the constant using the function {}{}shader_get_uniform(){}{}.":"使用此函数,可以将着色器常量的值设置为当前变换矩阵(使用{}矩阵函数{}设置)。 您必须之前使用函数{}{}shader_get_uniform(){}{}获得常量的\"句柄\"。", "With this function you can set the value (or values) of a shader constant to the current transform matrix (as set using the {}Matrix Functions{}). You must previously have gotten the \"handle\" of the constant using the function {}{}shader_get_uniform(){}{}.{}{}":"通过此函数,您可以将着色器常量的一个或多个值设置为当前变换矩阵 (使用 {} 矩阵函数 {} 设置)。您之前必须已使用函数 {}{}shader_get_uniform(){}{} 获取了常量的 \" 句柄\"。{}{}", + "You must previously have gotten the \"handle\" of the constant using the function {}{}shader_get_uniform{}{}.{}{}":"您之前必须已使用函数 {}{}shader_get_uniform{}{} 获取了常量的 \" 句柄\"。{}{}", "{}{}NOTE{}{} All uniforms must be set {}after{} calling the function {}{}shader_set{}{} and {}before{} calling {}{}shader_reset{}{}.":"{}{} 注意{}{} 必须在调用函数 {}{}shader_set{}{}{4} 之后 {5} 和调用 {}{}shader_reset{}{}{10} 之前 {11} 设置所有 uniforms 。", "{}{}{}NOTE{}: All uniforms must be set {}after{} calling the function {}{}{}shader_set(){}{}{}, and before calling {}{}{}shader_reset(){}{}{}.":"{}{}{}注意{}:在调用函数 {}{}{}shader_set(){}{}{}{4} 之后 {5},在调用 {}{}{}shader_reset(){}{}{} 之前,必须设置所有 uniform 。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_matrix_array.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_matrix_array.json index b06f4ccad..857f99da1 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_matrix_array.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_matrix_array.json @@ -1,8 +1,15 @@ { "A previously initialised array of floating point values.":"先前初始化的浮点值数组。", + "A previously initialised array of floating point values. Its length should be a multiple of 16, i.e. {}number_of_matrices * 16{}.":"先前初始化的浮点值数组。其长度应为 16 的倍数,即 {}number_of_matrices * 16{}。", + "Every group of 16 floats in the array becomes directly accessible as an element of the uniform array, i.e. the first 16 array elements correspond to {}u_mTransforms[0]{}, the next 16 elements to {}u_mTransforms[1]{}, etc.":"数组中每组 16 个浮点都可以作为统一数组的元素直接访问,即前 16 个数组元素对应于 {}u_mTransforms[0]{},接下来的 16 个元素对应于 {}u_mTransforms[1]{}, ETC。", + "First the maximum number of transforms is defined and an array is created to hold that number of transforms. An identity matrix is then copied to the array to initialise each individual matrix. A shader {}sh_dynamic_batch{} that defines a {}mat4{} array uniform named \"u_mTransforms\" is then set as the current shader and the handle to the uniform is retrieved with {}{}shader_get_uniform{}{}. {}{}shader_set_uniform_matrix_array{}{} is then called to set the value of that uniform to the given array. Finally, a vertex buffer stored in the variable {}vb_batch{} is then submitted.":"首先定义最大变换数,并创建一个数组来保存该变换数。然后将单位矩阵复制到数组中以初始化每个单独的矩阵。然后,定义名为 \"u_mTransforms\" 的 {}mat4{} 数组制服的着色器 {}sh_dynamic_batch{} 将被设置为当前着色器,并使用 {}{}shader_get_uniform{}{} 检索制服的句柄。然后调用 {}{}shader_set_uniform_matrix_array{}{} 将该统一值设置为给定数组。最后,提交存储在变量 {}vb_batch{} 中的顶点缓冲区。", + "In the shader you\u0027d define the uniform as follows: ":"在着色器中,您可以按如下方式定义制服:", + "The above code example shows how to initialise an array of matrices and send it to a shader.":"上面的代码示例展示了如何初始化矩阵数组并将其发送到着色器。", "The above code will get the handle of the shader constant \"cMatrixArray\" then set that constant to the given array.":"上面的代码将获取着色器常量\"cMatrixArray\"的句柄,然后将该常数设置为给定的数组。", "The handle of the shader constant to set.":"要设置的着色器常量的句柄。", + "This function sets a shader constant to hold an array of matrix values.":"该函数设置一个着色器常量来保存矩阵值数组。", "With this function you can set a shader constant to hold an array of matrix values. You must previously have gotten the \"handle\" of the constant using the function {}{}shader_get_uniform(){}{}, and you will have to have previously initialised the array as an array of floating point values, where each successive group of 16 floats is a 4x4 matrix.":"使用此函数,可以设置着色器常量以保存矩阵值数组。您必须之前使用函数{}{}shader_get_uniform(){}{}获得常量的\"句柄\",并且您必须事先将数组初始化为浮点值数组,其中每一组连续的16个浮点是4x4矩阵。", + "You must previously have gotten the \"handle\" of the constant using the function {}{}shader_get_uniform{}{}, and you will have to have previously initialised the array as an array of floating point values, where each successive group of 16 floats holds the contents of a 4x4 matrix.":"您之前必须使用函数 {}{}shader_get_uniform{}{} 获取常量的 \" 句柄\",并且之前必须将数组初始化为浮点值数组,其中每个连续的 16 个浮点组保存 4x4 矩阵的内容。", "{}NOTE{}: All uniforms must be set {}after{} calling the function {}{}{}shader_set(){}{}{}, and before calling {}{}{}shader_reset(){}{}{}.":"{}注意{}:在调用函数 {}{}{}shader_set(){}{}{}{2} 之后 {3},在调用 {}{}{}shader_reset(){}{}{} 之前,必须设置所有 uniform 。", "{}{}NOTE{}{} All uniforms must be set {}after{} calling the function {}{}shader_set{}{} and {}before{} calling {}{}shader_reset{}{}.":"{}{} 注意{}{} 必须在调用函数 {}{}shader_set{}{}{4} 之后 {5} 和调用 {}{}shader_reset{}{}{10} 之前 {11} 设置所有 uniforms 。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shaders_are_supported.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shaders_are_supported.json index 22f2b1d35..3bd8ba8ea 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shaders_are_supported.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shaders_are_supported.json @@ -1,4 +1,6 @@ { + "It is important to note that on {}Android{}, if the project does not have any shader assets defined, then the function will {}always return {}false{}{}, regardless of whether the device supports shaders or not.":"请务必注意,在 {}Android{} 上,如果项目没有定义任何着色器资源,则无论设备是否支持着色器,该函数都将 {} 始终返回 {}false{}{}。", "The above code will set a global variable to {}false{}, and then if the platform supports shaders and both the shaders being checked have compiled correctly, it will be set to {}true{}.":"上面的代码将全局变量设置为{}false{},然后如果平台支持着色器并且两个被检查的着色器都已正确编译,则将其设置为{}true{}。", - "This function will do a check to see if the chosen target platform supports shaders, returning {}true{} if they do, and {}false{} if they do not. It is important to note that on {}Android{}, if the project does not have any shader resources defined, then the function will {}always return {}false{}{}, regardless of whether the device supports shaders or not.":"此函数将检查所选目标平台是否支持着色器,如果支持着色器,则返回{}true{};如果不支持,返回{}false{}。值得注意的是,在{}Android{}上,如果项目没有定义任何着色器资源,则无论设备是否支持着色器,函数都会{}始终返回{}false{}{}。" + "This function will do a check to see if the chosen target platform supports shaders, returning {}true{} if they do, and {}false{} if they do not. It is important to note that on {}Android{}, if the project does not have any shader resources defined, then the function will {}always return {}false{}{}, regardless of whether the device supports shaders or not.":"此函数将检查所选目标平台是否支持着色器,如果支持着色器,则返回{}true{};如果不支持,返回{}false{}。值得注意的是,在{}Android{}上,如果项目没有定义任何着色器资源,则无论设备是否支持着色器,函数都会{}始终返回{}false{}{}。", + "This function will return whether the current target platform supports shaders, returning {}true{} if it does, and {}false{} if it does not (which would be the case for HTML5 {}without WebGL{} and old Android devices).":"此函数将返回当前目标平台是否支持着色器,如果支持则返回 {}true{},如果不支持则返回 {}false{}( 对于 {} 没有 WebGL{} 的 HTML5 和旧版 Android 设备就是这种情况)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Animation/skeleton_animation_clear.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Animation/skeleton_animation_clear.json index f75bef366..70c248ba0 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Animation/skeleton_animation_clear.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Animation/skeleton_animation_clear.json @@ -1,5 +1,10 @@ { + "It can optionally reset the skeleton to its setup pose in a given amount of time.":"它可以选择在给定的时间内将骨架重置为其设置姿势。", + "The above code clears animation track 1 of the skeletal animation assigned to the current instance and resets it to its setup pose.":"上面的代码清除分配给当前实例的骨骼动画的动画轨道 1,并将其重置为其设置姿势。", "The above code will clear the animation track 1 if the right mouse button is pressed.":"如果按下鼠标右键,上面的代码将清除动画轨迹1。", "The animation track to clear.":"要清除的动画轨迹。", - "This function will clear the specified animation track of all animations, ready to be re-assigned.":"此函数将清除所有动画的指定动画轨迹,准备重新分配。" + "This function will clear the specified animation track of all animations, ready to be re-assigned.":"此函数将清除所有动画的指定动画轨迹,准备重新分配。", + "This function will clear the specified animation track of all animations, ready to be reassigned.":"该函数将清除指定动画轨道上的所有动画,准备重新分配。", + "{}{}OPTIONAL{}{} How long animating the skeleton to setup pose should take, in seconds.":"{}{} 可选{}{} 将骨架动画化以设置姿势需要多长时间 (以秒为单位)。", + "{}{}OPTIONAL{}{} Whether to reset the skeleton to its setup pose. Default is {}false{}.":"{}{} 可选{}{} 是否将骨架重置为其设置姿势。默认值为 {}false{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Animation/skeleton_animation_mix.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Animation/skeleton_animation_mix.json index 6b5d5f6bd..d314e2078 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Animation/skeleton_animation_mix.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Animation/skeleton_animation_mix.json @@ -1,6 +1,7 @@ { "The above code would go in the Create Event of an instance with a skeletal animation sprite and sets the animation mix duration for interpolating between the two animations sets \"walk\" and \"jump\".":"上面的代码将进入具有骨骼动画精灵的实例的创建事件,并设置动画混合持续时间,以便在两个动画设置\"行走\"和\"跳跃\"之间进行插值。", "The duration of the interpolation (from 0 to 1)":"插值的持续时间(从0到1)", + "The duration of the interpolation (in seconds)":"插值的持续时间 (以秒为单位)", "The name (a string) of the first animation set to interpolate from.":"要插值的第一个动画的名称(字符串)。", "The name (a string) of the second animation set to interpolate to.":"要插值的第二个动画的名称(字符串)。", "You can switch animation sets easily using the {}{}skeleton_animation_set(){}{} function, but this may cause a skip or stutter as one animation is swapped for another. To prevent this, you can set the mix value between two animation sets and the sprite will interpolate between them. Normally you would want to do this in the Create Event of the instance with the skeletal animation as it only needs set once, and {}GameMaker{} will interpolate all further changes to the sprite using the animation sets in that instance. Note that the duration value is from 0 to 1, where a value of 0.5 would have a \"half and half\" interpolation from one set to the other.":"您可以使用{}{}skeleton_animation_set(){}{}函数轻松切换动画集,但这可能会在将一个动画切换为另一个动画时导致跳过或不连续。为了防止这种情况,可以在两个动画集之间设置混合值,精灵将在它们之间进行插值。通常情况下,您会希望在实例的创建事件中使用骨骼动画执行此操作,因为它只需要设置一次,并且{}GameMaker{}将使用该实例中的动画设置对精灵的所有进一步更改进行插值。请注意,\"持续时间\"值是从0到1,其中值0.5将具有从一个集到另一个集的\"对半\"插值。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Drawing_And_Miscellaneous/draw_skeleton.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Drawing_And_Miscellaneous/draw_skeleton.json index 1267de26a..0a876a838 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Drawing_And_Miscellaneous/draw_skeleton.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Drawing_And_Miscellaneous/draw_skeleton.json @@ -12,5 +12,6 @@ "The x coordinate of where to draw the sprite.":"绘制精灵的位置的X坐标。", "The y coordinate of where to draw the sprite.":"绘制精灵的位置的Y坐标。", "This function is {}only{} for use with sprites that have been created using a skeletal animation program like Spine. While you can draw these sprites using the normal draw functions (like {}{}draw_self(){}{}), there are times when you may want to draw a single frame or show a change of skin texture without actually changing the sprite properties. In these cases you can draw the sprite with this function, where you give the sprite index and then the name of the animation to get the frame from (a string, as set within the program used to make the sprite). Next you give the name of the skin to use (again, as set when the sprite was made), and a frame value. The frame value is for telling {}GameMaker{} what part of the animation to show and is a value between 0 and the {}{}image_number{}{}. The rest of the arguments are the same as those used for normal sprite drawing and will change the scale, angle, blend colour and alpha of the final animation frame being drawn.{}{}":"此函数{}仅{}用于使用骨骼动画程序(如Spine)创建的精灵。虽然您可以使用正常的绘制函数(如{}{}draw_self(){}{})绘制这些精灵,但有时您可能希望绘制单个帧或显示外观纹理的变化,而不实际更改精灵属性。在这些情况下,您可以使用此函数绘制精灵,在此函数中,您可以给出sprite索引,然后给出要从中获取帧的动画的名称(字符串,在用于制作精灵的程序中设置)。接下来,给出要使用的皮肤的名称(同样,在创建精灵时设置)和帧值。帧值用于告诉{}GameMaker{}要显示动画的哪一部分,并且是介于0和{}{}image_number{}{}之间的值。其余参数与普通精灵绘制所使用的参数相同,并将更改正在绘制的最终动画帧的比例、角度、混合颜色和alpha.{}{}", - "{}WARNING!{} Because of the way skeletal animations are interpolated between various \"key\" frames, there is an additional overhead associated with this call and therefore it is recommended that you avoid drawing skeleton based sprites using this method unless absolutely necessary.":"{}警告!{}由于骨骼动画在各个\"关键\"帧之间的插值方式,此调用会产生额外的开销,因此建议您避免使用此方法绘制基于骨骼的精灵,除非绝对必要。" + "{}WARNING!{} Because of the way skeletal animations are interpolated between various \"key\" frames, there is an additional overhead associated with this call and therefore it is recommended that you avoid drawing skeleton based sprites using this method unless absolutely necessary.":"{}警告!{}由于骨骼动画在各个\"关键\"帧之间的插值方式,此调用会产生额外的开销,因此建议您避免使用此方法绘制基于骨骼的精灵,除非绝对必要。", + "{}{}{}WARNING{}{} {}Because of the way skeletal animations are interpolated between various \"key\" frames, there is an additional overhead associated with this call and therefore it is recommended that you avoid drawing skeleton based sprites using this method unless absolutely necessary.":"{}{}{} 警告{}{}{} 由于骨骼动画在各个 \" 关键 \" 帧之间的插值方式,因此会产生与此调用相关的额外开销,因此建议您避免使用以下方式绘制基于骨骼的精灵除非绝对必要,否则使用此方法。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Drawing_And_Miscellaneous/draw_skeleton_instance.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Drawing_And_Miscellaneous/draw_skeleton_instance.json index 423711d74..ba8795fc5 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Drawing_And_Miscellaneous/draw_skeleton_instance.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Drawing_And_Miscellaneous/draw_skeleton_instance.json @@ -12,5 +12,6 @@ "The x coordinate of where to draw the sprite.":"绘制精灵的位置的X坐标。", "The y coordinate of where to draw the sprite.":"绘制精灵的位置的Y坐标。", "This function is {}only{} for use with instances which have sprites assigned to them created using the skeletal animation program Spine. While you can draw these sprites using the normal draw functions (like {}{}draw_self(){}{}), there are times when you may want to draw a single frame or show a change of skin texture without actually changing the sprite properties for an instance. In these cases you can draw the sprite that has been assigned to the instance with this function, where you give the unique Instance ID and then the name of the animation to get the frame from (a string, as set within the program used to make the sprite). Next you give the name of the skin to use (again, as set when the sprite was made), and a frame value. The frame value is for telling {}GameMaker{} what part of the animation to show and is a value between 0 and the {}{}image_number{}{}. The rest of the arguments are the same as those used for normal sprite drawing and will change the scale, angle, blend colour and alpha of the final animation frame being drawn.":"此函数{}仅{}用于指定了使用骨骼动画程序Spine创建的精灵的实例。虽然您可以使用普通的绘制函数(如{}{}draw_self(){}{})绘制这些精灵,但有时您可能希望绘制单个帧或显示外观纹理的更改,而不实际更改实例的精灵属性。在这些情况下,您可以使用此函数绘制已指定给实例的精灵,在此函数中,您可以给出唯一的实例ID,然后给出要从中获取帧的动画的名称(字符串,在用于制作精灵的程序中设置)。接下来,给出要使用的皮肤的名称(同样,在创建精灵时设置)和帧值。帧值用于告诉{}GameMaker{}要显示动画的哪一部分,并且是介于0和{}{}image_number{}{}之间的值。其余参数与用于普通精灵绘制的参数相同,并将更改正在绘制的最终动画帧的比例、角度、混合颜色和alpha.", - "{}WARNING!{} Because of the way skeletal animations are interpolated between various \"key\" frames, there is an additional overhead associated with this call and therefore it is recommended that you avoid drawing skeleton based sprites using this method unless absolutely necessary.":"{}警告!{}由于骨骼动画在各个\"关键\"帧之间的插值方式,此调用会产生额外的开销,因此建议您避免使用此方法绘制基于骨骼的精灵,除非绝对必要。" + "{}WARNING!{} Because of the way skeletal animations are interpolated between various \"key\" frames, there is an additional overhead associated with this call and therefore it is recommended that you avoid drawing skeleton based sprites using this method unless absolutely necessary.":"{}警告!{}由于骨骼动画在各个\"关键\"帧之间的插值方式,此调用会产生额外的开销,因此建议您避免使用此方法绘制基于骨骼的精灵,除非绝对必要。", + "{}{}{}WARNING{}{} {}Because of the way skeletal animations are interpolated between various \"key\" frames, there is an additional overhead associated with this call and therefore it is recommended that you avoid drawing skeleton based sprites using this method unless absolutely necessary.":"{}{}{} 警告{}{}{} 由于骨骼动画在各个 \" 关键 \" 帧之间的插值方式,因此会产生与此调用相关的额外开销,因此建议您避免使用以下方式绘制基于骨骼的精灵除非绝对必要,否则使用此方法。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Skeletal_Animation.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Skeletal_Animation.json index c1bf4a496..17668b65c 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Skeletal_Animation.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Skeletal_Animation.json @@ -14,5 +14,6 @@ "{}NOTE{} For further information on importing skeletal animation sprites made with Spine, please see the section {}Importing Non-Bitmap Sprites{}.":"{}注意{}有关导入使用Spine制作的骨骼动画精灵的更多信息,请参见{}导入非位图精灵{}一节。", "{}Skins{}":"{}皮肤{}", "{}Slots{}":"{}插槽{}", - "{}{}IMPORTANT{}{} Most of the skeletal sprite functions {}do not{} take a sprite or instance reference, as they assume the skeletal sprite is assigned to the current instance (via the IDE or by setting the {}{}sprite_index{}{}). This means that running such functions under a different context (e.g. a global script, or in a constructor) will result in an error, as the current {}{}self{}{} will not have a skeletal sprite in such cases.":"{}{}重要{}{}大多数骨架精灵函数{}不{}采用精灵或实例引用,因为它们假定骨架精灵已分配给当前实例(通过 IDE 或通过设置{}{}sprite_index{}{})。这意味着在不同的上下文(例如全局脚本或构造函数)下运行此类函数将导致错误,因为在这种情况下当前的{}{}self{}{}将不具有骨架精灵。" + "{}{}IMPORTANT{}{} Most of the skeletal sprite functions {}do not{} take a sprite or instance reference, as they assume the skeletal sprite is assigned to the current instance (via the IDE or by setting the {}{}sprite_index{}{}). This means that running such functions under a different context (e.g. a global script, or in a constructor) will result in an error, as the current {}{}self{}{} will not have a skeletal sprite in such cases.":"{}{}重要{}{}大多数骨架精灵函数{}不{}采用精灵或实例引用,因为它们假定骨架精灵已分配给当前实例(通过 IDE 或通过设置{}{}sprite_index{}{})。这意味着在不同的上下文(例如全局脚本或构造函数)下运行此类函数将导致错误,因为在这种情况下当前的{}{}self{}{}将不具有骨架精灵。", + "{}{}NOTE{}{} For further information on importing skeletal animation sprites made with Spine, please see the section {}Importing Non-Bitmap Sprites{}.":"{}{} 注意{}{} 有关导入使用 Spine 制作的骨骼动画精灵的更多信息,请参阅 {} 导入非位图精灵 {} 部分。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Information/sprite_get_info.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Information/sprite_get_info.json index 9a3837452..fa375a82e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Information/sprite_get_info.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Information/sprite_get_info.json @@ -17,6 +17,7 @@ "Array of broadcast messages for this sprite, where each broadcast message is a struct containing information on the message (more information under \"General Sprite Data\")":"此精灵的广播消息数组,其中每个广播消息都是一个包含有关该消息的信息的结构(“常规精灵数据”下的更多信息)", "Array of frames for this sprite, where each frame is a struct containing information on its texture (more information under \"Bitmap Sprite Data\")":"此精灵的帧数组,其中每个帧都是一个包含其纹理信息的结构(“位图精灵数据”下的更多信息)", "Array of frames for this sprite, where each frame is a struct containing information on its timing (more information under \"General Sprite Data\")":"此精灵的帧数组,其中每个帧都是一个包含其计时信息的结构(“常规精灵数据”下的更多信息)", + "Array of frames for this sprite, where each frame is a struct containing information on its timing (more information under \"General Sprite Data\"). For sprites that do not contain any stretched frames, this will be {}undefined{}.":"该精灵的帧数组,其中每个帧都是一个包含其计时信息的结构 (更多信息请参见 \" 通用精灵数据 \")。对于不包含任何拉伸帧的精灵,这将是 {}undefined{}。", "Array of texture IDs used for the atlas":"用于图集的纹理ID的数组", "Attachment name":"附件名称", "Blue component of the slot\u0027s colour (0-1)":"插槽颜色的蓝色分量 (0-1)", @@ -90,6 +91,7 @@ "{}Spine Sprite Data{}{}Spine Sprite Data{}":"{}Spine 精灵数据{}{}Spine 精灵数据{}", "{}These additional variables are available only for Spine sprites:{}":"{}以下附加变量仅适用于 Spine 精灵:{}", "{}This additional variable is available only for Bitmap (regular) sprites:{}":"{}此附加变量仅适用于位图(常规)精灵:{}", + "{}true{} if the sprite is marked as smooth, otherwise {}false{}{} (This can only be specified through {}{}sprite_add(){}{} or similar functions, and will be {}false{} for sprites created in the IDE)":"如果精灵被标记为平滑,则为 {}true{},否则为 {}false{}{}( 这只能通过 {}{}sprite_add(){}{} 或类似函数指定,并且将为 {}false{} 对于在 IDE 中创建的精灵)", "{}true{} if the sprite is marked as smooth, otherwise {}false{}{} (This can only be specified through {}{}sprite_add(){}{} or similar functions, and will be {}false{} for sprites created in the IDE) ":"如果精灵被标记为平滑,则为{}true{},否则为{}false{}{}(这只能通过{}{}sprite_add(){}{}或类似函数指定,并且将为{}false{}对于在 IDE 中创建的精灵)", "{}true{} if the sprite is marked as smooth, otherwise {}false{}{} {}{}(This can only be specified through {}{}sprite_add(){}{} or similar functions, and will be {}false{} for sprites created in the IDE){}{}{}{} ":"如果精灵标记为平滑,则为{}true{},否则为{}false{}{}{}{}(这只能通过{}{}sprite_add(){}{})或类似的函数来指定,并且对于在IDE中创建的精灵将为{}false{}){}{}{}{}", "{}true{} if the sprite is marked as transparent, otherwise {}false{}{} {}(This can only be specified through {}{}sprite_add(){}{} or similar functions, and will be {}false{} for sprites created in the IDE){} ":"如果精灵标记为透明,则为{}true{},否则为{}false{}{}{}(这只能通过{}{}sprite_add(){}{}或类似的函数来指定,并且对于在IDE中创建的精灵将为{}false{}){}", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Information/sprite_get_texture.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Information/sprite_get_texture.json index 2cf9fc3f4..f7d4d1d36 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Information/sprite_get_texture.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Information/sprite_get_texture.json @@ -1,5 +1,6 @@ { "The above code will draw a 4 vertex triangle strip textured with the texture held in the \"tex\" variable.":"上面的代码将绘制一个4顶点三角形条带纹理,纹理保存在“ tex ”变量中。", + "The above code will draw a 4 vertex triangle strip textured with the texture held in the {}tex{} variable.":"上面的代码将绘制一个 4 顶点三角形带,并使用 {}tex{} 变量中保存的纹理进行纹理化。", "The index of the sprite to use.":"要使用的精灵的索引。", "The sub-image of the sprite to use.":"要使用的精灵的子图像。", "This function returns a special {}pointer{} for the sprite on its texture page. This value can then be used in other draw functions, particularly in the {}2D primitive{} functions, as well as the {}Shader{} functions. You can get more information about the returned texture page using the different {}texture_{} functions found on the {}Textures{} page.":"此函数会为其纹理页面上的精灵返回一个特殊的{}指针{}。然后可以在其他绘制函数中使用该值,特别是在{}2D 图元{}函数以及{}Shader{}函数中。您可以使用{}Textures{}页面上的不同{}texture_{}函数获取有关返回的纹理页面的更多信息。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_bottom.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_bottom.json index 4d171129c..b2d8253c5 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_bottom.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_bottom.json @@ -1,4 +1,5 @@ { + "See: {}Bounding Boxes{}":"请参阅:{} 边界框 {}", "The above code checks to see if the bounding box of the instance is outside the room and if it is it sets the instance to a new position.":"上面的代码检查实例的边界框是否在房间外,如果是,则将实例设置到新位置。", "This {}read only{} variable returns the y position (within the room) of the bottom of the bounding box for the instance, where the bounding box is defined by the maximum width and height of the mask for the instance (as set by the {}{}sprite_index{}{} or by the {}{}mask_index{}{}). Even when a sprite has a precise collision mask, the bounding box exists and is used for certain things, and so you can use this variable to find it. Please note that when the instance has no sprite assigned the value returned will be the same as the instance Y position.":"此{}只读{}变量返回实例边界框底部的 Y 位置 (在房间内),其中边界框由实例遮罩的最大宽度和最大高度定义 (由 {}{}sprite_index{}{} 或 {}{}mask_index{}{} 设置)。即使精灵具有精确的碰撞遮罩,边界框也会存在并用于某些事情,因此您可以使用此变量来查找它。请注意,当实例没有指定 sprite 时,返回的值将与实例的 Y 位置相同。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_left.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_left.json index a0ad907ec..6de996b55 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_left.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_left.json @@ -1,4 +1,5 @@ { + "See: {}Bounding Boxes{}":"请参阅:{} 边界框 {}", "The above code checks to see if the bounding box of the instance is outside the room and if it is it sets the instance to a new position.":"上面的代码检查实例的边界框是否在房间外,如果是,则将实例设置到新位置。", "This {}read only{} variable returns the position (along the x-axis) within the room of the left hand bounding box for the instance, where the bounding box is defined by the maximum width and height of the mask for the instance (as set by the {}{}sprite_index{}{} or by the {}{}mask_index{}{}). Even when a sprite has a precise collision mask, the bounding box exists and is used for certain things, and so you can use this variable to find it. Please note that when the instance has no sprite assigned the value returned will be the same as the instance X position.":"此{}只读{}变量返回实例的左侧边界框在空间内的位置(沿X轴),其中边界框由实例的遮罩的最大宽度和高度定义(由{}{}sprite_index{}{}或由{}{}mask_index{}{}设置)。即使精灵具有精确的碰撞遮罩,边界框也会存在并用于某些事情,因此您可以使用此变量来查找它。请注意,当实例未分配sprite时,返回的值将与实例X位置相同。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_right.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_right.json index dda7be91f..01e0d59f7 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_right.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_right.json @@ -1,4 +1,5 @@ { + "See: {}Bounding Boxes{}":"请参阅:{} 边界框 {}", "The above code checks to see if the bounding box of the instance is outside the room and if it is it sets the instance to a new position.":"上面的代码检查实例的边界框是否在房间外,如果是,则将实例设置到新位置。", "This {}read only{} variable returns the position within the room (along the x-axis) of the right hand side of the bounding box for the instance, where the bounding box is defined by the maximum width and height of the mask for the instance (as set by the {}{}sprite_index{}{} or by the {}{}mask_index{}{}). Even when a sprite has a precise collision mask, the bounding box exists and is used for certain things, and so you can use this variable to find it. Please note that when the instance has no sprite assigned the value returned will be the same as the instance X position.":"此{}只读{}变量返回实例边界框右手边的房间内(沿 x轴)的位置,其中边界框由实例遮罩的最大宽度和高度定义(由{}{}sprite_index{}{}或{}{}mask_index{}{}设置)。 即使当sprite有精确的碰撞掩码时,边界框也存在,并且用于某些事情,因此可以使用这个变量来查找它。请注意,当实例没有指定sprite时,返回的值将与实例X位置相同。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_top.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_top.json index 1ce2fda6b..fe3dfbece 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_top.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/bbox_top.json @@ -1,4 +1,5 @@ { + "See: {}Bounding Boxes{}":"请参阅:{} 边界框 {}", "The above code checks to see if the bounding box of the instance is outside the room and if it is it sets the instance to a new position.":"上面的代码检查实例的边界框是否在房间外,如果是,则将实例设置到新位置。", "This {}read only{} variable returns the position within the room (along the y-axis) of the top of the bounding box for the instance, where the bounding box is defined by the maximum width and height of the mask for the instance (as set by the {}{}sprite_index{}{} or by the {}{}mask_index{}{}). Even when a sprite has a precise collision mask, the bounding box exists and is used for certain things, and so you can use this variable to find it. Please note that when the instance has no sprite assigned the value returned will be the same as the instance Y position.":"此{}只读{}变量返回实例边界框顶部的房间内(沿 yaxis)的位置,其中边界框由实例遮罩的最大宽度和高度定义(由{}{}sprite_index{}{}或{}{}mask_index{}{}设置)。 即使当sprite有精确的碰撞掩码时,边界框也存在,并且用于某些事情,因此可以使用这个变量来查找它。请注意,当实例没有指定sprite时,返回的值将与实例Y位置相同。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/sprite_index.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/sprite_index.json index 381d29553..c74388a27 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/sprite_index.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Instance_Variables/sprite_index.json @@ -1,4 +1,7 @@ { + "Changing the sprite does not change the index of the currently visible frame, given that there is a sub-image for the current frame in the new sprite. So if you change the sprite on frame number 3, the new sprite will be drawn with that frame visible. However, if the new sprite does {}not{} contain a sub-image for the current frame, {}{}image_index{}{} will reset to {}0{}, displaying the first frame of the sprite instead.":"更改精灵不会更改当前可见帧的索引,因为新精灵中存在当前帧的子图像。因此,如果您更改第 3 帧上的精灵,则新的精灵将在该帧可见的情况下绘制。不过,如果新精灵 {} 不 {} 包含当前帧的子图像,则 {}{}image_index{}{} 将重置为 {}0{},转而显示精灵的第一帧。", "The above code will loop through all instances of \"obj_Check\" checking for a collision line between them and the instance running the code. The sprite of those instances will be changed depending on the return value (true or false) for the collision line.":"上面的代码将遍历“ OBJ_检查”的所有实例,检查它们与运行该代码的实例之间的冲突线。这些实例的精灵将根据碰撞线的返回值(true或false)进行更改。", - "This variable returns the index of the current sprite for the instance, or -1 if the instance has no sprite associated with it. You can change it to give the instance a different sprite by giving it the name of a sprite from the resource tree or by using a variable that has an externally loaded sprite indexed in it. Changing the sprite does not change the index of the currently visible frame, so if you change the sprite on frame number 3, the new sprite will be drawn with that frame visible (assuming it has the same number of frames).":"此变量返回实例的当前精灵的索引,如果实例没有与之关联的精灵,则返回-1。您可以通过从资源树中为实例指定精灵的名称,或者使用包含外部加载的精灵索引的变量,来更改它以为实例指定不同的精灵.更改sprite不会更改当前可见帧的索引,因此,如果更改编号为3的帧上的精灵,则新的精灵将在该帧可见的情况下绘制(假设它具有相同的帧数)。" + "This variable returns the current sprite set for the instance, or {}-1{} if the instance has no sprite associated with it.":"该变量返回实例的当前精灵集,如果实例没有与之关联的精灵,则返回 {}-1{}。", + "This variable returns the index of the current sprite for the instance, or -1 if the instance has no sprite associated with it. You can change it to give the instance a different sprite by giving it the name of a sprite from the resource tree or by using a variable that has an externally loaded sprite indexed in it. Changing the sprite does not change the index of the currently visible frame, so if you change the sprite on frame number 3, the new sprite will be drawn with that frame visible (assuming it has the same number of frames).":"此变量返回实例的当前精灵的索引,如果实例没有与之关联的精灵,则返回-1。您可以通过从资源树中为实例指定精灵的名称,或者使用包含外部加载的精灵索引的变量,来更改它以为实例指定不同的精灵.更改sprite不会更改当前可见帧的索引,因此,如果更改编号为3的帧上的精灵,则新的精灵将在该帧可见的情况下绘制(假设它具有相同的帧数)。", + "You can change it to give the instance a different sprite, by either giving it the reference of a sprite from {}The Asset Browser{} or by using a variable that has an {}externally loaded sprite{} indexed in it.":"您可以更改它,为实例提供不同的精灵,方法是从 {} 资源浏览器 {} 提供精灵的引用,或者使用在其中建立索引的 {} 外部加载精灵 {} 的变量。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_collision_mask.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_collision_mask.json index ae6b304cf..fb85f1bab 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_collision_mask.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_collision_mask.json @@ -2,12 +2,17 @@ "A diamond collision mask shape":"一种菱形碰撞面罩形状,", "A precise collision mask, where the mask will conform to the non-transparent pixels of the sprite, based on the tolerance value given (see below))":"精确的碰撞遮罩,其中遮罩将与精灵的非透明像素一致,基于给定的公差值(见下文))", "A rectangular (non-rotating) rectangle collision mask shape":"矩形(非旋转)碰撞屏蔽形状", + "A rectangular (non-rotating) rectangle collision mask shape, usable for Spine sprites":"矩形 (非旋转) 矩形碰撞遮罩形状,可用于脊柱精灵", "An elliptical collision mask shape":"椭圆形碰撞掩模形状", + "Apart from rectangle, this is the only valid option for Spine sprites. It enables more precise collision checking against the mesh in the sprite.":"除了矩形之外,这是脊椎精灵的唯一有效选项。它可以对精灵中的网格进行更精确的碰撞检查。", "Bounding Box Kind (Shape) Constant":"Bounding Box种类(形状)常量", + "Bounding Box Mode Constant":"边界框模式常数", + "If you select either automatic or full image as the bounding box mode, then the individual bounding box values can be set to 0. However for a user defined mask, you will have to set these values. The different bounding box values are always relative to the top left corner of the sprite (irrespective of the x and y origin) which is considered position (0, 0).":"如果选择自动或完整图像作为边界框模式,则可以将各个边界框值设置为 0。但是,对于用户定义的蒙版,您必须设置这些值。不同的边界框值始终相对于精灵的左上角 (与 x 和 y 原点无关),即位置 (0, 0)。", "Indicates the tolerance in the transparency value (0=no tolerance, 255=full tolerance).":"指示透明度值中的公差(0=无公差,255=完全公差)。", "Setting the kind of mask sets the general shape for the mask itself, but note that anything other than a rectangular mask will require more processing power when resolving collisions, with a subsequent drop in performance. In general, you should only use mask types other than rectangular when absolutely necessary.":"设置遮罩类型可设置遮罩本身的一般形状,但请注意,在解决冲突时,除矩形遮罩以外的任何遮罩都将需要更多的处理能力,从而导致性能下降。通常,只有在绝对必要的情况下,才应使用矩形以外的遮罩类型。", "The above code loads a sprite from an external source and stores the new index in the variable \"spr\". The code then sets the new sprite to have a precise collision mask for each of its sub-images.":"上面的代码从外部源加载精灵,并将新索引存储在变量“ SPR ”中。然后,代码将新精灵设置为对其每个子图像具有精确的碰撞遮罩。", "The index of the sprite to set the bounding box of.":"要设置边界框的精灵的索引。", + "The kind of mask that can be set will be one of the following constants, passed into the {}kind{} argument:":"可设置的掩码类型将是以下常量之一,传递到 {}kind{} 参数中:", "The kind of mask that can be set will be one of the following constants:":"可以设置的掩码类型为以下常量之一:", "The kind of mask, a constant (see the table in the description).":"掩码的种类,常量(参见说明中的表)。", "The maximum bottom position of the bounding box.":"边界框的最大底部位置。", @@ -17,12 +22,19 @@ "What kind of bounding box to use. 0 = automatic, 1 = full image, 2 = user defined.":"使用哪种边界框。0=自动,1=完整映像,2=用户定义。", "Whether to create collision masks for each sub-image of the sprite ({}true{}), or one mask for all ({}false{}).":"是为精灵的每个子图像创建碰撞遮罩({}true{}),还是为所有子图像创建一个遮罩({}false{})。", "With this function you can set the properties of the collision mask that a sprite should have. If you select either automatic (0) or full image (1) as the bounding box mode then the individual bounding box values can be set to 0. However for a user defined mask (2) you will have to set these values. The different bounding box values are always relative to the top left corner of the sprite (irrespective of the x and y origin) which is considered position (0, 0).":"使用此函数,您可以设置sprite应具有的碰撞遮罩的属性。如果选择“自动”(0)或“完整图像”(1)作为边界框模式,则可以将各个边界框值设置为0。但是,对于用户定义的掩码(2),您必须设置这些值。不同的边界框值始终相对于精灵的左上角(与X和Y原点无关),即位置(0,0)。", + "With this function you can set the properties of the collision mask that a sprite should have. For information on sprite masks, see: {}Collision Mask{}":"使用此函数,您可以设置精灵应具有的碰撞遮罩的属性。有关精灵遮罩的信息,请参阅:{} 碰撞遮罩 {}", + "You can supply one of the following bbox modes for the {}bboxmode{} argument:":"您可以为 {}bboxmode{} 参数提供以下 bbox 模式之一:", "{} Finally, tolerance is used to define how precise the precise the mask is (when used with a \"full image\" mask, this will have no effect), with a tolerance of 0 meaning that the mask will follow every single pixel that has a transparency over 0, while other values will shift the collision mask perimeter depending on the transparency of the pixels.":"{}最后,容差用于定义遮罩的精确程度(当与“全图像”遮罩一起使用时,这将不起作用),容差为0表示遮罩将跟随透明度大于0的每个像素,而其他值将根据像素的透明度移动碰撞遮罩周长。", "{} Finally, tolerance is used to define how precise the mask is (when used with a \"full image\" mask, this will have no effect), with a tolerance of 0 meaning that the mask will follow every single pixel that has a transparency over 0, while other values will shift the collision mask perimeter depending on the transparency of the pixels.":"{}最后,容差用于定义遮罩的精确度(与\"完整图像\"遮罩一起使用时,这不会产生任何效果),容差为 0 意味着遮罩将遵循具有透明度的每个像素超过 0,而其他值将根据像素的透明度改变碰撞蒙版周长。", + "{}Automatic {}- The bounding box will be calculated automatically, based on the tolerance setting for the sprite":"{} 自动 {}- 将根据精灵的容差设置自动计算边界框", + "{}Full Image{} - The bounding box will be set to use the full width and height of the sprite, regardless of the tolerance and \"empty\" pixels":"{} 完整图像 {}- 边界框将设置为使用精灵的完整宽度和高度,无论容差和 \" 空 \" 像素如何", + "{}Manual{} - The bounding box is set manually to user defined values, specified either in {}{}sprite_collision_mask{}{} along with the mode, or separately in {}{}sprite_set_bbox{}{}":"{} 手动 {}- 边界框手动设置为用户定义的值,可以在 {}{}sprite_collision_mask{}{} 中与模式一起指定,也可以在 {}{}sprite_set_bbox{}{} 中单独指定", "{}NOTE{}: This function does not permit the {}rotated rectangle{} collision mask kind.":"{}注意{}:此函数不允许{}旋转矩形{}碰撞掩码类型。", "{}NOTE{}: This function is only useful for {}bitmap{} sprites and will not work with SWF or JSON (Spine) sprites.":"{}注意{}:此函数仅适用于{}位图{}精灵,不适用于SWF或JSON(脊柱)精灵。", "{}NOTE{}: This function will only work on added sprites or duplicated sprites and {}not{} directly on pre-made resources. You can duplicate sprites using the function {}{}{}sprite_duplicate(){}{}{}.":"{}注意{}:此函数只对添加的精灵或复制的精灵起作用,{}不能{}直接对预先制作的资源起作用。您可以使用函数{}{}{}sprite_duplicate(){}{}{})来复制sprite.", + "{}{}NOTE{}{} Spine sprites can only use the {}bboxmode_fullimage{} and {}bboxmode_manual{} modes, using {}bboxkind_rectangular{} on either mode, or {}bboxkind_spine{} only in full image mode.":"{}{} 注意{}{}Spine sprite 只能使用 {}bboxmode_fullimage{} 和 {}bboxmode_manual{} 模式,在任一模式下使用 {}bboxkind_rectangle{},或仅在完整图像模式下使用 {}bboxkind_spine{}。", "{}{}NOTE{}{} This function does not permit the {}rotated rectangle{} collision mask kind.":"{}{}注意{}{}此函数不允许{}旋转矩形{}碰撞掩码类型。", "{}{}NOTE{}{} This function is only useful for {}bitmap{} sprites and will not work with SWF or JSON (Spine) sprites.":"{}{}注意{}{}此函数仅适用于{}位图{}精灵,不适用于 SWF 或 JSON(Spine) 精灵。", + "{}{}NOTE{}{} This function will only work on added sprites or duplicated sprites and {}not{} directly on pre-made assets. You can duplicate sprites using the function {}{}{}sprite_duplicate(){}{}{}.":"{}{} 注意{}{} 此函数仅适用于添加的精灵或重复的精灵,{} 不能 {} 直接适用于预制资源。您可以使用函数 {}{}{}sprite_duplicate(){}{}{} 复制精灵。", "{}{}NOTE{}{} This function will only work on added sprites or duplicated sprites and {}not{} directly on pre-made resources. You can duplicate sprites using the function {}{}{}sprite_duplicate(){}{}{}.":"{}{}注意{}{}此函数仅适用于添加的精灵或重复的精灵,{}不能{}直接适用于预制资源。您可以使用函数{}{}{}sprite_duplicate(){}{}{}复制精灵。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_create_from_surface.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_create_from_surface.json index 5dd36c5f4..d8b0cccb1 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_create_from_surface.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_create_from_surface.json @@ -10,8 +10,10 @@ "Setting the \"removeback\" argument to {}true{} will remove a colour from the sprite, by checking the {}bottom left{} pixel of the sprite for the colour there and then using that as the colour to be removed. When \"removeback\" is enabled, the alpha channel of the surface is ignored, meaning all pixels other than the \"background colour\" ones become fully opaque.":"将 \"removeback\" 参数设置为 {}true{} 将从精灵中删除一种颜色,方法是检查精灵的 {} 左下角 {} 像素中的颜色,然后使用该像素作为要移除的颜色。当启用 \"removeback\" 时,表面的 Alpha 通道将被忽略,这意味着除 \" 背景色 \" 之外的所有像素都变得完全不透明。", "The above code creates a surface and stores its index in the local variable \"surf\". It then targets that surface, clears it and draws several sprites on top of each other. Finally it creates a new sprite from the composite image drawn on the surface and assigns its index to \"spr_Custom\" before freeing up the memory used by the surface.":"上面的代码创建了一个表面,并将其索引存储在局部变量“ surf ”中。然后,它以该表面为目标,清除该表面,并在彼此的顶部绘制多个精灵。最后,它从绘制在表面上的合成图像创建一个新的精灵,并在释放表面使用的内存之前将其索引分配给“ SPR_自定义”。", "The height of the area to be copied (from the y position).":"要复制的区域的高度(从Y位置)。", + "The height of the area to be copied (from the y position). Must be greater than 0.":"要复制的区域的高度 (从 y 位置开始)。必须大于 0。", "The index of the surface to create from.":"要创建的surface的索引。", "The width of the area to be copied (from the x position).":"要复制的区域的宽度(从X位置)。", + "The width of the area to be copied (from the x position). Must be greater than 0.":"要复制的区域的宽度 (从 x 位置开始)。必须大于 0。", "The x position to copy from.":"要从中复制的X位置。", "The y position to copy from.":"要复制的Y位置。", "With this function you can create a sprite from a previously initialised surface (the surface index ID value is returned when you create the surface using {}{}surface_create(){}{}). The x and y coordinates that you then input in the function should be relative to the (0,0) position of the {}surface{} (the top left corner) and not the game window (nor the view if you have one active). The width and height arguments are in pixels and define the width and height of the part of the surface to use.":"使用此函数,您可以从先前初始化的表面创建sprite(当您使用{}{}Surface_create(){}{}创建表面时,将返回表面索引ID值)。然后你在函数中输入的X和y坐标应该相对于{}表面{}(左上角)的(0,0)位置,而不是游戏窗口(也不是视图,如果你有一个活动的)。宽度和高度参数以像素为单位,并定义要使用的表面部分的宽度和高度。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_delete.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_delete.json index 38384704e..644373533 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_delete.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_delete.json @@ -1,5 +1,8 @@ { "The above code creates a local variable and then stores the index of the sprite created from the application surface. This sprite is then merged with the asset indexed in the variable \"spr_Player\" before being removed from memory again.":"上面的代码创建一个局部变量,然后存储从应用程序图面创建的精灵的索引。然后,在再次从存储器中移除之前,将该精灵与在变量“ SPR_播放器”中索引的资源合并。", "The index of the sprite to be deleted.":"要删除的精灵的索引。", - "This function will delete a sprite from the game, freeing any memory that was reserved for it. This is a very important function for those moments when you need to create and change sprites from external sources (like loading a sprite from a file with {}{}sprite_add(){}{}, or duplicating a sprite using {}{}sprite_duplicate(){}{}) and should always be used to remove those assets that are no longer needed by a game, or to clear an indexed asset from a variable before re-assigning another asset to that variable. {}This cannot be used to delete sprites that are included in the game as part of the assets in the Asset Browser{}.":"此函数将从游戏中删除一个精灵,释放为其保留的任何内存。当您需要从外部源创建和更改sprite时(如从文件加载sprite),这是一个非常重要的函数。{}{}sprite_add(){}{},或使用{}{}sprite_duplicate(){}{}复制精灵,并应始终用于删除那些不再游戏所需要的,或者在将另一个资源重新分配给该变量之前,从变量中清除索引资源。{}这不能用于删除作为资源浏览器中资源的一部分包含在游戏中的精灵{}。" + "This function will delete a sprite from the game, freeing any memory that was reserved for it. This is a very important function for those moments when you need to create and change sprites from external sources (like loading a sprite from a file with {}{}sprite_add(){}{}, or duplicating a sprite using {}{}sprite_duplicate(){}{}) and should always be used to remove those assets that are no longer needed by a game, or to clear an indexed asset from a variable before re-assigning another asset to that variable.":"此函数将从游戏中删除精灵,释放为其保留的所有内存。当您需要从外部源创建和更改精灵时 (例如使用 {}{}sprite_add(){}{} 从文件加载精灵,或使用{}{}sprite_duplicate(){}{}复制精灵),这是一个非常重要的函数 ),并且应始终用于删除游戏不再需要的资源,或者在将另一个资源重新分配给该变量之前从变量中清除索引资源。", + "This function will delete a sprite from the game, freeing any memory that was reserved for it. This is a very important function for those moments when you need to create and change sprites from external sources (like loading a sprite from a file with {}{}sprite_add(){}{}, or duplicating a sprite using {}{}sprite_duplicate(){}{}) and should always be used to remove those assets that are no longer needed by a game, or to clear an indexed asset from a variable before re-assigning another asset to that variable. {}This cannot be used to delete sprites that are included in the game as part of the assets in the Asset Browser{}.":"此函数将从游戏中删除一个精灵,释放为其保留的任何内存。当您需要从外部源创建和更改sprite时(如从文件加载sprite),这是一个非常重要的函数。{}{}sprite_add(){}{},或使用{}{}sprite_duplicate(){}{}复制精灵,并应始终用于删除那些不再游戏所需要的,或者在将另一个资源重新分配给该变量之前,从变量中清除索引资源。{}这不能用于删除作为资源浏览器中资源的一部分包含在游戏中的精灵{}。", + "This function will return {}true{} if the sprite was successfully deleted, or {}false{} in case of an invalid sprite (e.g. it was already deleted).":"如果精灵已成功删除,则此函数将返回 {}true{}; 如果精灵无效 (例如,精灵已被删除),则返回 {}false{}。", + "{}{}IMPORTANT{}{} This cannot be used to delete sprites that are included in the game as part of the assets in the Asset Browser.":"{}{} 重要{}{} 这不能用于删除游戏中作为资产浏览器资产一部分包含的精灵。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_flush.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_flush.json index d677817f4..6416c40a7 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_flush.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_flush.json @@ -1,5 +1,6 @@ { "The above code flushes the sprite \"spr_Player_Aura\" from memory.":"上面的代码将精灵 \"spr_Player_Aura\" 从内存中清除。", + "The above code flushes the sprite {}spr_Player_Aura{} from memory.":"上述代码从内存中刷新精灵 {}spr_Player_Aura{}。", "The index (resource name) of the sprite asset to flush":"要刷新的精灵资源的索引(资源名称)", "This function removes the texture page for the given sprite from texture memory (VRAM). The texture will stay in RAM after being flushed.":"此函数从纹理内存(VRAM) 中删除给定精灵的纹理页。刷新后纹理将保留在 RAM 中。", "With this function you can remove the texture page for the given sprite from texture memory (VRAM). The texture will stay in RAM after being flushed.":"使用此函数,您可以从纹理内存(VRAM)中删除给定精灵的纹理页面。刷新后,纹理将保留在RAM中。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_set_bbox_mode.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_set_bbox_mode.json index 5bf683965..9c6d84b7f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_set_bbox_mode.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_set_bbox_mode.json @@ -7,5 +7,6 @@ "{}Automatic {}- The bounding box will be calculated automatically, based on the tolerance setting for the sprite":"{}自动{}-将根据精灵的公差设置自动计算边界框。", "{}Full Image{} - The bounding box will be set to use the full width and height of the sprite, regardless of the tolerance and \"empty\" pixels":"{}完整图像{}-边界框将被设置为使用精灵的完整宽度和高度,而不考虑公差和“空”像素。", "{}Manual{} - The bounding box is being set manually to user defined values, which requires the use of the function {}{}sprite_set_bbox(){}{}":"{}手动{}-边界框被手动设置为用户定义的值,这需要使用函数{}{}sprite_set_bbox(){}{}", + "{}Manual{} - The bounding box is set manually to user defined values, specified either in {}{}sprite_collision_mask{}{} along with the mode, or separately in {}{}sprite_set_bbox{}{}":"{} 手动{}- 边界框手动设置为用户定义的值,可以在 {}{}sprite_collision_mask{}{} 中与模式一起指定,也可以在 {}{}sprite_set_bbox{}{} 中单独指定", "{}NOTE{} This function affects the sprite {}asset {}so that all further instances with this sprite will have the same bounding box mode.":"{}注意{}此函数影响sprite{}资源{},以便此精灵的所有其他实例将具有相同的边界框模式。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Timelines/Timelines.json b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Timelines/Timelines.json index b3af1b15e..60af83724 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Timelines/Timelines.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Asset_Management/Timelines/Timelines.json @@ -3,5 +3,7 @@ "The following functions are for adding and manipulating Timelines from within your game:":"以下函数用于添加和处理游戏中的时间线:", "The following variables are \"built in\" to all instances to make working with Timelines easier and give you control over them:":"所有实例都\"内置\"了以下变量,以便更轻松地使用时间线并对其进行控制:", "Timelines":"时间线", - "Timelines are a powerful mechanism for controlling events in your game, and are based on \"moments\", where a \"moment\" is simply a single game step. These timelines are generally created from the {}Asset Browser{} using the {}Timeline Editor{} in a similar way to an object, ie: you create a timeline, then in each moment that you require it to perform an action you add some code or a GML Visual icon for it to perform. Once created, you can then stop, start, and manipulate timelines through code. You can even modify individual moments by defining a {}script function{} and adding it into the timeline dynamically from a controller object (for example), making this a very powerful and versatile tool when creating your games.":"时间线是控制游戏中事件的强大机制,并且基于 \"时刻\",其中 \"时刻\" 只是一个游戏步骤。这些时间线通常是使用{}时间线编辑器{}从{}资源浏览器{}以类似于对象的方式创建的,即: 您创建时间线,然后,在每个时刻,你需要它执行一个动作,你添加一些代码或GML视觉图标,以使它执行。一旦创建,您就可以通过代码停止、启动和操作时间线。您甚至可以通过定义{}脚本函数{}并将其从控制器对象动态添加到时间轴中 (例如) 来修改单个时刻,从而使其成为创建游戏时非常强大且通用的工具。" + "Timelines are a powerful mechanism for controlling events in your game, and are based on \"moments\", where a \"moment\" is simply a single game step. These timelines are generally created from the {}Asset Browser{} using the {}Timeline Editor{} in a similar way to an object, ie: you create a timeline, then in each moment that you require it to perform an action you add some code or a GML Visual icon for it to perform. Once created, you can then stop, start, and manipulate timelines through code. You can even modify individual moments by defining a {}script function{} and adding it into the timeline dynamically from a controller object (for example), making this a very powerful and versatile tool when creating your games.":"时间线是控制游戏中事件的强大机制,并且基于 \"时刻\",其中 \"时刻\" 只是一个游戏步骤。这些时间线通常是使用{}时间线编辑器{}从{}资源浏览器{}以类似于对象的方式创建的,即: 您创建时间线,然后,在每个时刻,你需要它执行一个动作,你添加一些代码或GML视觉图标,以使它执行。一旦创建,您就可以通过代码停止、启动和操作时间线。您甚至可以通过定义{}脚本函数{}并将其从控制器对象动态添加到时间轴中 (例如) 来修改单个时刻,从而使其成为创建游戏时非常强大且通用的工具。", + "Timelines are used for controlling events in your game, and are based on \"moments\", where a \"moment\" is simply a single game step. These timelines are generally created from the {}Asset Browser{} using the {}Timeline Editor{} in a similar way to an object, ie: you create a timeline, then in each moment that you require it to perform an action you add some code or a GML Visual icon for it to perform. Once created, you can then stop, start, and manipulate timelines through code. You can even modify individual moments by defining a {}script function{} and adding it into the timeline dynamically from a controller object (for example), making this a very powerful and versatile tool when creating your games.":"时间线用于控制游戏中的事件,并且基于 \" 时刻\",其中 \" 时刻 \" 只是一个游戏步骤。这些时间线通常是使用 {} 时间线编辑器 {} 从 {} 资产浏览器 {} 创建的,其方式与对象类似,即:创建时间线,然后在需要它执行您添加的操作的每个时刻一些代码或 GML Visual 图标供其执行。创建后,您可以通过代码停止、启动和操作时间线。您甚至可以通过定义 {} 脚本函数 {} 并将其从控制器对象 (例如) 动态添加到时间线中来修改各个时刻,从而使其成为创建游戏时非常强大且多功能的工具。", + "{}{}IMPORTANT{}{} Timelines have been replaced by {}Sequences{} and currently only exist for legacy purposes. {}Moments can be programmed{} in a Sequence for functions to be executed at given frames in the Sequence.":"{}{} 重要{}{} 时间线已被 {} 序列 {} 取代,目前仅用于遗留目的。{} 可以在序列中对时刻进行编程 {},以便在序列中的给定帧处执行函数。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Display.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Display.json index 342f887f5..e7afc1564 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Display.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Display.json @@ -1,8 +1,14 @@ { "Cameras And Display":"相机及显示", "Cameras And View Ports":"相机和视口", + "Display":"展示", "However, sometimes it\u0027s not enough to get information about the game window and views only, and you really need to know things about the {}display{} itself (essentially the screen that the game window is being displayed on). The following function all give you details about the size and orientation of the display, details about the GUI layer, and information on the mouse:":"但是,有时仅仅获取有关游戏窗口和视图的信息是不够的,您确实需要了解{}显示器{}本身(实际上是游戏窗口显示的屏幕)的相关信息。以下函数均提供有关显示器大小和方向的详细信息、有关 GUI 层的详细信息以及有关鼠标的信息:", + "However, sometimes it\u0027s not enough to get information about the game window and views only, and you really need to know things about the {}display{} itself (essentially the screen that the game window is being displayed on). The following functions all give you details about the size and orientation of the display, details about the GUI layer, and information on the mouse:":"不过,有时仅获取有关游戏窗口和视图的信息是不够的,您确实需要了解有关 {} 显示器 {} 本身 (本质上是显示游戏窗口的屏幕) 的信息。以下函数都为您提供有关显示器的大小和方向的详细信息、有关 GUI 层的详细信息以及有关鼠标的信息:", + "Screen Saves":"屏幕保存", "The Game Window":"游戏窗口", "The {}window{} is where {}GameMaker{} displays your game, and, depending on the target device, there are different things that can be done with it, like set it to fullscreen or not, for example. {}Cameras{} (and {}view ports{}), however, govern {}what{} you see within that window, and so have another series of functions dedicated to them. The following two sections deal with these two aspects of displaying your game:":"{}窗口{}是 {}GameMaker{} 显示游戏的位置,根据目标设备的不同,可以使用不同的设备完成不同的操作,例如,是否将游戏设置为全屏。{}摄像头{}(和{}视口{}),但是,控制{}您在该窗口中看到的内容{},因此还有一系列专用于它们的函数。以下两个部分涉及显示游戏的以下两个方面:", - "There are also a few special functions that can be used to save the display, or part of it, to an image file, either as {}*.png{} or {}*.gif{}:":"还有一些特殊函数可用于将显示器或其一部分保存到图像文件,如 {}*.png{} 或 {}*.gif{}:" + "The {}window{} is where {}GameMaker{} displays your game, and, depending on the target device, there are different things that can be done with it, like set it to fullscreen or not, for example. {}Cameras{} (and {}viewports{}), however, govern {}what{} you see within that window, and so have another series of functions dedicated to them. The following two sections deal with these two aspects of displaying your game:":"{} 窗口 {} 是 {}GameMaker{} 显示游戏的地方,根据目标设备,可以使用它执行不同的操作,例如将其设置为全屏或不全屏。然而,{} 相机 {}( 和 {} 视口 {}) 控制着您在该窗口中看到的 {} 内容 {},因此还有另外一系列专用于它们的功能。以下两部分涉及展示游戏的两个方面:", + "There are also a few special functions that can be used to save the display, or part of it, to an image file, either as {}*.png{} or {}*.gif{}:":"还有一些特殊函数可用于将显示器或其一部分保存到图像文件,如 {}*.png{} 或 {}*.gif{}:", + "There are also a few special functions that can be used to save the display, or part of it, to an image file, either as {}*.png{} or {}*.gif{}: ":"还有一些特殊函数可用于将显示内容或其一部分保存到图像文件 (例如 {}*.png{} 或 {}*.gif{}):", + "{}Cameras And Display{}":"{} 相机和显示器 {}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/Cameras_And_View_Ports.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/Cameras_And_View_Ports.json index 93ffc18d3..7aff28f99 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/Cameras_And_View_Ports.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/Cameras_And_View_Ports.json @@ -2,27 +2,42 @@ "Camera Information":"相机信息", "Cameras And Viewports":"相机和视口", "Create & Destroy":"创建 & 破坏", + "Frustum Culling":"视锥体剔除", "Function Reference{}{}":"函数参考 {}{}", "Something to note about cameras and view ports is that the total area of the bounding box for {}all active view ports in the first room of the game{} is what defines the {}background canvas size{} (or window size for macOS, Ubuntu (Linux) and Windows), and any areas that are not covered by a view port will default to drawing using the window colour as illustrated by the image below:":"有关相机和视口的一些注意事项是,游戏第一个房间中{}所有活动视口的边框总面积{}是定义{}背景画布大小{}(或 MacOS、Ubuntu(Linux) 和 Windows 的窗口大小)的因素,视口未覆盖的任何区域将默认使用下图所示的窗口颜色绘制:", + "Something to note about cameras and viewports is that the total area of the bounding box for {}all active viewports in the first room of the game{} is what defines the {}background canvas size{} (or window size for macOS, Ubuntu (Linux) and Windows), and any areas that are not covered by a viewport will default to drawing using the window colour as illustrated by the image below:":"关于相机和视口,需要注意的是,{} 游戏第一个房间中的所有活动视口 {} 的边界框总面积定义了 {} 背景画布大小 {}( 或 macOS、Ubuntu 的窗口大小 )(Linux) 和 Windows),并且任何未被视口覆盖的区域将默认使用窗口颜色进行绘制,如下图所示:", "The following functions are available: ":"可以使用以下功能:", "The following functions can be used to create and destroy cameras:":"以下函数可用于创建和销毁相机:", "The following {}global scope{} built-in variables are available:":"以下{}全局范围{}内置变量可用:", + "The {}viewports{} are, basically, little windows into your game world that enable you to show the player parts of a room, either scaled or 1:1, and as such they are essential when your game room is larger than the display size. The {}cameras{} are what define exactly what will be shown in each viewport.":"{} 视口 {} 基本上是进入游戏世界的小窗口,使您能够按比例或 1:1 向玩家显示房间的各个部分,因此当您的游戏房间大于显示屏时,它们是必不可少的尺寸。{} 相机 {} 准确定义了每个视口中将显示的内容。", "There also exist the following functions for dealing with view ports:":"还存在以下用于处理视口的函数:", "There are also a number of functions for setting and getting camera information:":"还有许多函数可用于设置和获取相机信息:", + "Views":"视口", "When creating rooms in {}GameMaker{} you need to set up different {}view ports{} and/or {}cameras{} to control what is displayed to the player. The {}view ports{} are, basically, little windows into your game world that enable you to show the player parts of a room, either scaled or 1:1, and as such they are essential when your game room is larger than the display size. The {}cameras{} are what define exactly what will be shown in each view port.":"在 {}GameMaker{} 中创建房间时,您需要设置不同的{}视口{}和/或{}相机{}来控制显示给玩家的内容。基本上,{}视口{}是进入游戏世界的小窗口,可以让你显示房间的玩家部分,缩放或1:1,因此,当你的游戏房间比显示大小更大时,它们是必不可少的。{}相机{}确切地定义了在每个视图端口中显示的内容。", + "When creating rooms in {}GameMaker{} you need to set up different {}{}cameras and viewports{}{} to control what is displayed to the player.":"在 {}GameMaker{} 中创建房间时,您需要设置不同的 {}{} 摄像机和视口 {}{} 来控制向玩家显示的内容。", "When working with cameras, you have to assign them to a {}view port{} for them to be \"active\" and display anything. These view ports are numbered from 0 to 7 and can be changed and positioned using different variable arrays and functions, and you can also check to see which one is currently drawing or which camera is currently attached to it.":"使用摄像头时,必须将它们分配到{}视口{},以使它们\"活动\"并显示任何内容。这些视口的编号为0到7,可以使用不同的可变数组和函数进行更改和定位,还可以检查当前正在绘制的视口或当前附着到该视口的相机。", "When working with cameras, you have to assign them to a {}viewport{} for them to be \"active\" and display anything. These view ports are numbered from 0 to 7 and can be changed and positioned using different variable arrays and functions, and you can also check to see which one is currently drawing or which camera is currently attached to it.":"使用相机时,您必须将它们分配到 {} 视口 {},以便它们处于 \" 活动状态 \" 并显示任何内容。这些视口的编号从 0 到 7,可以使用不同的变量数组和函数进行更改和定位,您还可以检查当前正在绘制哪个视口或当前连接了哪个相机。", + "When working with cameras, you have to assign them to a {}viewport{} for them to be \"active\" and display anything. These viewports are numbered from 0 to 7 and can be changed and positioned using different variable arrays and functions, and you can also check to see which one is currently drawing or which camera is currently attached to it.":"使用相机时,您必须将它们分配到 {} 视口 {},以便它们处于 \" 活动状态 \" 并显示任何内容。这些视口的编号从 0 到 7,可以使用不同的变量数组和函数进行更改和定位,您还可以检查当前正在绘制哪个视口或当前连接了哪个相机。", "You can find an overview of all the available functions from the different sections below, but it\u0027s worth noting that some of these functions require the setting up and use of different matrices, so you may want to look at the section of the manual for the {}Matrix Functions{}. Also note that there are a few room functions that can be used to get and set cameras and view port values in rooms other than the current one (see{} the section on{} {}Rooms{}).":"您可以从下面的不同章节中找到所有可用函数的概述,但值得注意的是,其中一些函数需要设置和使用不同的矩阵,因此您可能需要查看{}矩阵函数{}手册的章节。另请注意,有一些房间函数可用于获取和设置相机以及查看当前房间之外的房间中的视口值(请参见{}房间{}章节)。", + "You can find an overview of all the available functions from the different sections below, but it\u0027s worth noting that some of these functions require the setting up and use of different matrices, so you may want to look at the section of the manual for the {}Matrix Functions{}. Also note that there are a few room functions that can be used to get and set cameras and viewport values in rooms other than the current one (see{} the section on {}Rooms{}{}).":"您可以从下面的不同部分找到所有可用函数的概述,但值得注意的是,其中一些函数需要设置和使用不同的矩阵,因此您可能需要查看手册的 {} 矩阵函数 {}。另请注意,有一些房间函数可用于获取和设置当前房间以外的房间中的摄像机和视口值 (请参阅 {}有关 {} 房间 {}{} 的部分)。", + "You should take care when using multiple cameras as the Draw event for all instances is called once for each visible view, so if you have three camera views active in one room, the Draw event will be run three times every step (basically doing three times the work) which can be a cause for slowdown if the game is large or complex. The {}{}view_current{}{} variable can be used to help limit these draw calls, however, by checking which view is being drawn and only drawing items that are specific to a given viewport. Also be careful when creating your own cameras, as if you create one in a room and don\u0027t remove it using the {}{}camera_destroy{}{} function you can get a memory leak.":"使用多个摄像机时应小心,因为每个可见视图都会调用一次所有实例的 Draw 事件,因此,如果一个房间中有三个活动摄像机视图,则 Draw 事件将在每个步骤运行三次 (基本上执行三次如果游戏很大或很复杂,这可能会导致速度变慢。不过,通过检查正在绘制哪个视图以及仅绘制特定于给定视口的项目,可以使用 {}{}view_current{}{} 变量来帮助限制这些绘制调用。创建自己的相机时也要小心,如果您在房间中创建一个相机并且不使用 {}{}camera_destroy{}{} 函数将其删除,则可能会导致内存泄漏。", "You should take care when using multiple cameras as the draw event for all instances is called once for each visible view, so if you have three camera views active in one room, the draw event will be run three times every step (basically doing three times the work) which can be a cause for slowdown if the game is large or complex. The {}view_current{} variable can be used to help limit these draw calls however by checking which view is being drawn and only drawing items that are specific to a given view port. Also be careful when creating your own cameras, as if you create one in a room and don\u0027t remove it using the {}{}camera_destroy(){}{} you can get a memory leak.":"使用多个相机时应注意,因为所有实例的绘制事件对于每个可见视图都调用一次,所以如果在一个房间中有三个活动的相机视图,则绘制事件将每个步骤运行三次(基本上是执行三次工作),如果游戏规模大或复杂,这可能会导致速度放慢。{}view_current{} 变量可用于帮助限制这些绘制调用,但是,可以通过检查正在绘制的视图以及仅检查特定于给定视口的绘制项目来限制这些绘制调用。在创建自己的相机时也要小心,就好像您在房间中创建了一个相机,但不要使用 {}{}camera_destroy(){}{} 删除它一样,这样可能会导致内存泄漏。", "You should take care when using multiple cameras as the draw event for all instances is called once for each visible view, so if you have three camera views active in one room, the draw event will be run three times every step (basically doing three times the work) which can be a cause for slowdown if the game is large or complex. The {}{}view_current{}{} variable can be used to help limit these draw calls however by checking which view is being drawn and only drawing items that are specific to a given view port. Also be careful when creating your own cameras, as if you create one in a room and don\u0027t remove it using the {}{}camera_destroy{}{} function you can get a memory leak.":"使用多个摄像机时应小心,因为每个可见视图都会调用一次所有实例的绘制事件,因此,如果一个房间中有三个活动的摄像机视图,则绘制事件将在每个步骤运行三次 (基本上执行三次如果游戏很大或很复杂,这可能会导致速度减慢。{}{}view_current{}{} 变量可用于帮助限制这些绘制调用,方法是检查正在绘制哪个视图,并且仅绘制特定于给定视口的项目。创建自己的相机时也要小心,如果您在房间中创建一个相机并且不使用 {}{}camera_destroy{}{} 函数将其删除,则可能会导致内存泄漏。", + "{}Cameras And Viewports{}":"{} 相机和视口 {}", "{}GameMaker{} permits you 8 independent view ports (numbered from 0 - 7) and an unlimited number of cameras, of which only 8 can be {}active{} at any one time - one assigned to each of the available ports - although normally you\u0027ll only need one or two view ports. Cameras can show different parts of the same room and can be activated and deactivated as well as assigned to view ports at any time, meaning that you can use cameras to draw HUD elements or to have split screen effects, or to create cut-scenes for example. Essentially, you position a camera within a room and define the \"view\" (area) of the room that will be visible to it, and then this view is drawn to a view {}port{} - note that the view port can be a different size to the camera view and as such you can distort and scale the camera view if it is a size other than 1:1 with the view port.":"{}GameMaker{} 允许您使用8个独立的视口(编号为0-7)和无限数量的相机,其中任何时候只能有8个处于{}活动状态{}(每个可用端口分配一个),尽管通常您只需要一个或两个视口。相机可以显示同一房间的不同部分,并且可以随时激活和取消激活以及指定给视口,这意味着您可以使用相机绘制 HUD 元素或具有分割屏幕效果,或者创建剪切场景。实际上,您可以将相机放置在房间内并定义房间可见的\"视图\"(区域),然后将此视图绘制到视图{}端口{}-请注意,视图端口的大小可能与相机视图的大小不同,因此,如果相机视图的大小与视口的大小不是1:1,则可以扭曲并缩放相机视图。", + "{}GameMaker{} permits you 8 independent viewports (numbered from 0 - 7) and an unlimited number of cameras, of which only 8 can be {}active{} at any one time - one assigned to each of the available ports - although normally you\u0027ll only need one or two viewports. Cameras can show different parts of the same room and can be activated and deactivated as well as assigned to viewports at any time, meaning that you can use cameras to draw HUD elements or to have split screen effects, or to create cutscenes for example. Essentially, you position a camera within a room and define the \"view\" (area) of the room that will be visible to it, and then this view is drawn to a {}viewport{} - note that the viewport can be a different size to the camera view and as such you can distort and scale the camera view if it is a size other than 1:1 with the viewport.":"{}GameMaker{} 允许您使用 8 个独立视口 (编号为 0 - 7) 和无限数量的摄像头,其中任一时间只能 {} 活动 {}8 个摄像头 - 分配给每个可用端口一个 - 尽管通常您只需要一两个视口。摄像机可以显示同一房间的不同部分,并且可以随时激活和停用以及分配给视口,这意味着您可以使用摄像机绘制 HUD 元素或具有分屏效果,或者创建过场动画等。本质上,您将摄像机放置在房间内并定义对其可见的房间 \" 视图 \"( 区域),然后将该视图绘制到 {} 视口 {}- 请注意,视口可以是不同的大小适合相机视图,因此,如果相机视图与视口的尺寸不是 1:1,则可以扭曲和缩放相机视图。", "{}IMPORTANT!{} It\u0027s easy to get confused when talking about cameras, views and view ports, so to clarify:":"{}重要!{} 在谈论相机、视图和视口时,很容易出现混淆,因此需要澄清:", "{}If you are adding cameras through the {}Room Editor{} then you can retrieve their {}camera ID{} value using the {}view_camera{} variable. You can then manipulate the view using the functions below and you can even destroy the default cameras if required, although you will need to assign a new camera to the view otherwise you will get some very unpredictable behaviour. Cameras added to a view port in the Room Editor are {}global{} in scope, meaning that they are created once when you start the game, and then as you enter each room they are set to the values set in the room editor, so if you destroy a default camera in {}any{} room, it will cease to exist for {}all rooms{}.":"{}如果通过{}房间编辑器{}添加相机,则可以使用{}view_camera{}变量检索其{}相机 ID {}值。然后,您可以使用下面的函数操纵视图,甚至可以在需要时销毁默认相机,尽管您需要为视图指定一个新相机,否则会出现一些非常不可预测的行为。添加到\"房间编辑器\"中视口的相机在范围内为{}全局{},这意味着它们在您开始游戏时创建一次,然后当您进入每个房间时,它们被设置为在房间编辑器中设置的值,因此,如果您在{}任何{}房间中销毁默认相机,它将不再存在于{}所有房间{}中。", "{}If you are adding cameras through {}The Room Editor{}{}{} then you can retrieve their {}camera ID{} value using the {}{}view_camera{}{} variable. You can then manipulate the view using the functions below and you can even destroy the default cameras if required, although you will need to assign a new camera to the view otherwise you will get some very unpredictable behaviour. Cameras added to a view port in the Room Editor are {}global{} in scope, meaning that they are created once when you start the game, and then as you enter each room they are set to the values set in the Room Editor, so if you destroy a default camera in {}any{} room, it will cease to exist for {}all rooms{}.":"{} 如果您通过 {} 房间编辑器 {}{}{} 添加摄像头,那么您可以使用 {}{}view_camera{}{} 变量检索其 {5} 摄像头 ID{6} 值。然后,您可以使用下面的函数来操纵视图,如果需要,您甚至可以销毁默认摄像机,尽管您需要为视图分配一个新摄像机,否则您将得到一些非常不可预测的行为。添加到房间编辑器中视口的摄像机的范围是 {} 全局 {},这意味着它们会在您启动游戏时创建一次,然后当您进入每个房间时,它们会设置为在房间编辑器中设置的值,因此,如果您销毁 {} 任意 {} 房间中的默认摄像头,则该摄像头将不再存在于 {} 所有房间 {} 中。", + "{}If you are adding cameras through {}The Room Editor{}{}{} then you can retrieve their {}camera ID{} value using the {}{}view_camera{}{} variable. You can then manipulate the view using the functions below and you can even destroy the default cameras if required, although you will need to assign a new camera to the view otherwise you will get some very unpredictable behaviour. Cameras added to a viewport in the Room Editor are {}global{} in scope, meaning that they are created once when you start the game, and then as you enter each room they are set to the values set in the Room Editor, so if you destroy a default camera in {}any{} room, it will cease to exist for {}all rooms{}.":"{} 如果您通过 {} 房间编辑器 {}{}{} 添加摄像头,那么您可以使用 {}{}view_camera{}{} 变量检索其 {5} 摄像头 ID{6} 值。然后,您可以使用下面的函数来操纵视图,如果需要,您甚至可以销毁默认摄像机,尽管您需要为视图分配一个新摄像机,否则您将得到一些非常不可预测的行为。添加到房间编辑器中视口的摄像机的范围是 {} 全局 {},这意味着它们在您启动游戏时创建一次,然后当您进入每个房间时,它们会设置为房间编辑器中设置的值,因此如果您销毁 {} 任意 {} 房间中的默认摄像头,则该摄像头将不再存在于 {} 所有房间 {} 中。", "{}NOTE{}: By default you need to select \"Clear Display Buffer\" in the room editor for the colour to be shown, and you can only set the colour using the function {}window_set_colour(){}. If you don\u0027t use this function it will default to black.":"{}注意{}:默认情况下,您需要在房间编辑器中选择\"清除显示缓冲区\"以显示颜色,并且只能使用函数 {}window_set_colour(){} 设置颜色。如果不使用此函数,则默认为黑色。", "{}The Camera{}: A point within the room that will be used to set how the room is displayed - typically with position, orientation, field of view and aspect ratio":"{}相机{}:房间内用于设置房间显示方式的点-通常使用位置、方向、视野和纵横比", + "{}The Camera{}: Placed at a point within the room and used to set how the room is displayed - typically with position, orientation, field of view and aspect ratio":"{}相机{}:放置在房间内的某个点,用于设置房间的显示方式 - 通常包括位置、方向、视野和宽高比", "{}The View Port{}: The area of the screen where the camera view will be displayed":"{}视口{}:将显示相机视图的屏幕区域", + "{}The Viewport{}: The area of the screen where the camera view will be displayed":"{}视口{}:将显示相机视图的屏幕区域", "{}The View{}: What the camera sees, based on the position, projection and rotation of the camera":"{}视图{}:相机看到的内容,基于相机的位置、投影和旋转", "{}{}IMPORTANT{}{} It\u0027s easy to get confused when talking about cameras, views and view ports, so to clarify: ":"{}{} 重要提示{}{} 在谈论相机、视图和视口时很容易让人感到困惑,因此需要澄清一下:", - "{}{}NOTE{}{} By default you need to select {}Clear Display Buffer{} in the Room Editor for the colour to be shown, and you can only set the colour using the function {}{}window_set_colour{}{}. If you don\u0027t use this function it will default to black.":"{}{} 注意{}{} 默认情况下,您需要在房间编辑器中选择 {}Clear Display Buffer{} 才能显示颜色,并且您只能使用函数 {}{}window_set_colour{} 设置颜色 {}。如果您不使用此功能,它将默认为黑色。" + "{}{}IMPORTANT{}{} It\u0027s easy to get confused when talking about cameras, views and viewports, so to clarify: ":"{}{} 重要{}{} 在谈论相机、视图和视口时很容易让人感到困惑,因此需要澄清一下:", + "{}{}NOTE{}{} By default you need to select {}Clear Display Buffer{} in the Room Editor for the colour to be shown, and you can only set the colour using the function {}{}window_set_colour{}{}. If you don\u0027t use this function it will default to black.":"{}{} 注意{}{} 默认情况下,您需要在房间编辑器中选择 {}Clear Display Buffer{} 才能显示颜色,并且您只能使用函数 {}{}window_set_colour{} 设置颜色 {}。如果您不使用此功能,它将默认为黑色。", + "{}{}NOTE{}{} By default you need to select {}Clear Display Buffer{} in the Room Editor for the colour to be shown, and you can only set the colour using the function {}{}window_set_colour{}{}. The application surface also cannot be drawn, so either {}the application surface itself{} or {}automatic drawing{} needs to be disabled. If you don\u0027t use {}{}window_set_colour{}{} the colour will default to black.":"{}{} 笔记{}{}\n默认情况下,您需要在 Room Editor 中选择 {}Clear Display Buffer{} 才能显示颜色,并且只能使用函数 {}{}window_set_colour{}{} 设置颜色。 \n\n应用程序表面也无法绘制,因此需要禁用 {} 应用程序表面本身 {} 或 {} 自动绘制 {}。 \n\n如果您不使用 {}{}window_set_colour{}{},颜色将默认为黑色。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_border_x.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_border_x.json index 8f1b7572c..dfe8241e5 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_border_x.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_border_x.json @@ -2,5 +2,6 @@ "The above code retrieves the xborder and yborder values of the camera assigned to view port[0] and then checks this to see if it matches the given value. If it does not then the view camera is set to the given value.":"以上代码检索分配给 viewport[0] 的相机的水平边框(xborder)和垂直边框(yborder)值,然后检查该值是否与给定值匹配。如果没有,则将视图的相机设置为给定值。", "The unique camera ID value returned when you created the camera":"创建相机时返回的唯一相机 ID 值。", "This function can be used to retrieve the border value for object/instance following of the given camera along the x axis (horizontal border). The return value will be in pixels.":"此函数可用于检索沿 X 轴(水平边框)跟随给定相机的对象/实例的边框值。返回值将以像素为单位。", + "This function can be used to retrieve the x (horizontal) border value set for the given camera, which can be set in the room properties (see {}Object Following{}) or via the function {}{}camera_set_view_border{}{}). The return value will be in pixels.":"此函数可用于检索为给定摄像头设置的 x(水平) 边框值,该值可在房间属性中设置 (请参阅 {} 对象跟随 {}) 或通过函数 {}{}camera_set_view_border{}{})。返回值将以像素为单位。", "This function can be used to retrieve the x (horizontal) border value set for the given camera. The return value will be in pixels.":"此函数可用于检索为给定相机设置的 x(水平) 边界值。返回值将以像素为单位。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_border_y.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_border_y.json index 57e001272..48b2db533 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_border_y.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_border_y.json @@ -2,5 +2,6 @@ "The above code retrieves the xborder and yborder values of the camera assigned to view port[0] and then checks this to see if it matches the given value. If it does not then the view camera is set to the given value.":"以上代码检索分配给 viewport[0] 的相机的水平边框(xborder)和垂直边框(yborder)值,然后检查该值是否与给定值匹配。如果没有,则将视图的相机设置为给定值。", "The unique camera ID value returned when you created the camera":"创建相机时返回的唯一相机 ID 值。", "This function can be used to retrieve the border value for object/instance following of the given camera along the y axis (vertical border). The return value will be in pixels.":"此函数可用于检索沿 Y 轴(垂直边框)跟随给定相机的对象/实例的边框值。返回值将以像素为单位。", + "This function can be used to retrieve the y (vertical) border value set for the given camera, which can be set in the room properties (see {}Object Following{}) or via the function {}{}camera_set_view_border{}{}). The return value will be in pixels.":"此函数可用于检索为给定相机设置的 y(垂直) 边框值,该值可在房间属性中设置 (请参阅 {} 对象跟随 {}) 或通过函数 {}{}camera_set_view_border{}{})。返回值将以像素为单位。", "This function can be used to retrieve the y (vertical) border value set for the given camera. The return value will be in pixels.":"此函数可用于检索为给定相机设置的 y(垂直) 边界值。返回值将以像素为单位。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_speed_x.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_speed_x.json index 66d1891bf..c0f0f4d67 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_speed_x.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_speed_x.json @@ -1,5 +1,6 @@ { "The above code retrieves the xspeed and yspeed of the camera assigned to view port[0] and then checks this to see if it matches the given value. If it does not then the view camera is set to that speed.":"以上代码检索分配给 viewport[0] 的相机的水平速度(xspeed)和垂直速度(yspeed),然后检查它是否与给定值匹配。如果没有,则将视图的相机设置为该速度。", "The unique camera ID value returned when you created the camera":"创建相机时返回的唯一相机 ID 值。", + "This function can be used to retrieve the movement speed of the given camera along the x axis (horizontal movement), which can be set in the room properties (see {}Object Following{}) or via the function {}{}camera_set_view_speed{}{}). The return value will be in pixels per game frame.":"此函数可用于检索给定相机沿 x 轴的移动速度 (水平移动),该速度可在房间属性中设置 (请参阅 {} 对象跟随 {}) 或通过函数 {}{}camera_set_view_speed{}{})。返回值将以每游戏帧的像素为单位。", "This function can be used to retrieve the movement speed of the given camera along the x axis (horizontal movement). The return value will be in pixels per game frame.":"此函数可用于检索给定相机沿 X 轴的移动速度(水平移动)。返回值将以每个游戏帧的像素为单位。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_speed_y.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_speed_y.json index 8e1d0184e..c555caf27 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_speed_y.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_speed_y.json @@ -1,5 +1,6 @@ { "The above code retrieves the xspeed and yspeed of the camera assigned to view port[0] and then checks this to see if it matches the given value. If it does not then the view camera is set to that speed.":"以上代码检索分配给 viewport[0] 的相机的水平速度(xspeed)和垂直速度(yspeed),然后检查它是否与给定值匹配。如果没有,则将视图的相机设置为该速度。", "The unique camera ID value returned when you created the camera":"创建相机时返回的唯一相机 ID 值。", + "This function can be used to retrieve the movement speed of the given camera along the y axis (vertical movement), which can be set in the room properties (see {}Object Following{}) or via the function {}{}camera_set_view_speed{}{}). The return value will be in pixels per game frame.":"此函数可用于检索给定相机沿 y 轴的移动速度 (垂直移动),该速度可在房间属性中设置 (请参阅 {} 对象跟随 {}) 或通过函数 {}{}camera_set_view_speed{}{})。返回值将以每游戏帧的像素为单位。", "This function can be used to retrieve the movement speed of the given camera along the y axis (vertical movement). The return value will be in pixels per game frame.":"此函数可用于检索给定相机沿 Y 轴(垂直移动)的移动速度。返回值将以每个游戏帧的像素为单位。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_target.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_target.json index 0de7d9a84..38d713471 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_target.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_get_view_target.json @@ -1,6 +1,7 @@ { "The above code retrieves the follow target of the camera assigned to view port[0] and then checks this to see if it matches the object index \"obj_Player\". If it does not then the view camera is set to follow an instance of that object.":"以上代码检索分配给查看 viewport[0] 的相机的以下目标,然后检查该目标是否与对象索引 \"obj_Player\" 匹配。如果不是,则视图的相机将设置为跟随该对象的实例。", "The unique camera ID value returned when you created the camera":"创建相机时返回的唯一相机 ID 值。", + "This function can be used to retrieve the follow target of the given camera, which can be set in the room properties (see {}Object Following{}) or with {}{}camera_set_view_target{}{}. The return value can be an {}{}Object Asset{}{}, an {}{}Object Instance{}{} or -1 if no follow target has been set.":"此函数可用于检索给定摄像机的跟随目标,该目标可在房间属性中设置 (请参阅 {} 对象跟随 {}) 或使用 {}{}camera_set_view_target{}{}。返回值可以是 {}{} 对象资源 {}{}、{}{} 对象实例 {}{}; 如果尚未设置跟随目标,则返回 -1。", "This function can be used to retrieve the follow target of the given camera. The return value can be an object index, an instance ID or -1 if no follow target has been set.":"此函数可用于检索给定相机的跟踪目标。如果未设置跟踪目标,则返回值可以是对象索引、实例 ID 或 -1。", "{}{}Object Asset{}{}, {}{}Instance ID{}{} or -1":"{}{}对象资源{}{}, {}{}实例 ID{}{} 或 -1" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_border.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_border.json index 9b8a784da..23e7f9b59 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_border.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_border.json @@ -2,6 +2,10 @@ "The above code will set the view camera border for the camera assigned to view port[0].":"上述代码将为分配给 viewport[0] 的相机设置视图的相机边框。", "The border (in pixels) for the view camera along the horizontal axis":"沿水平轴的相机边框(以像素为单位)", "The border (in pixels) for the view camera along the vertical axis":"沿垂直轴的相机边框(以像素为单位)", + "The exact point that is checked against this buffer zone is the point at the {}x{} and {}y{} position for that instance, and it does not make use of its {}mask{}.":"针对该缓冲区检查的确切点是该实例的 {}x{} 和 {}y{} 位置处的点,并且它不使用其 {} 掩码 {}。", "The unique camera ID value returned when you created the camera.":"创建相机时返回的唯一相机 ID 值。", - "You can use this function to set the follow border of the view camera within the room. You give the unique camera ID value (as returned by the different {}camera_create{} functions) and then give the x border size and the y border size (horizontal and vertical). These values will only be used when the view camera has been assigned an instance target to follow (either in the Room Editor or using the function {}{}camera_set_view_target(){}{}) and relate to how far from the border of the view the instance needs to be before the view will update its position to follow.":"您可以使用此函数设置房间内视图的相机的跟随边框。给出唯一的相机ID值(由不同的{}camera_create{}函数返回),然后给出 x 边框大小和 y 边框大小(水平和垂直)。只有在为视图的相机指定了要跟随的实例目标(在\"房间编辑器\"中或使用函数 {}{}camera_set_view_target(){}{})并且相关时,到实例需要离视图边框多远才会使用这些值,视图才会更新其位置以跟随。" + "These values will only be used when the view camera has been assigned an instance target to follow (either in the Room Editor - see {}Object Following{} - or using the function {}{}camera_set_view_target(){}{}) and relate to how far from the border of the view the instance needs to be before the view will update its position to follow.":"仅当为视图相机分配了要跟随的实例目标时,才会使用这些值 (在房间编辑器中 - 请参阅 {} 对象跟随 {}- 或使用函数 {}{}camera_set_view_target(){}{}) 并且与视图更新其要跟随的位置之前实例需要距视图边界多远有关。", + "You can use this function to set the border size of the camera within the room.":"您可以使用此功能设置摄像机在房间内的边框大小。", + "You can use this function to set the follow border of the view camera within the room. You give the unique camera ID value (as returned by the different {}camera_create{} functions) and then give the x border size and the y border size (horizontal and vertical). These values will only be used when the view camera has been assigned an instance target to follow (either in the Room Editor or using the function {}{}camera_set_view_target(){}{}) and relate to how far from the border of the view the instance needs to be before the view will update its position to follow.":"您可以使用此函数设置房间内视图的相机的跟随边框。给出唯一的相机ID值(由不同的{}camera_create{}函数返回),然后给出 x 边框大小和 y 边框大小(水平和垂直)。只有在为视图的相机指定了要跟随的实例目标(在\"房间编辑器\"中或使用函数 {}{}camera_set_view_target(){}{})并且相关时,到实例需要离视图边框多远才会使用这些值,视图才会更新其位置以跟随。", + "You give the unique camera ID value (as returned by the different {}camera_create{} functions) and then give the x border size and the y border size (horizontal and vertical).":"您提供唯一的相机 ID 值 (由不同的 {}camera_create{} 函数返回),然后提供 x 边框大小和 y 边框大小 (水平和垂直)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_speed.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_speed.json index a5de79e8a..b0078b135 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_speed.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_speed.json @@ -1,7 +1,12 @@ { "The above code will set the view camera speed for the camera assigned to view port[0].":"上述代码将为分配给 viewport[0] 的相机设置视图的相机速度。", "The speed (number of pixels per game frame) that the view should move on the horizontal (x) axis":"视图应在水平(x)轴上移动的速度(每个游戏帧的像素数)", + "The speed (number of pixels per game frame) that the view should move on the horizontal (x) axis to catch up to the target":"视图在水平 (x) 轴上移动以赶上目标的速度 (每个游戏帧的像素数)", "The speed (number of pixels per game frame) that the view should move on the vertical (y) axis":"视图应在垂直(y)轴上移动的速度(每个游戏帧的像素数)", + "The speed (number of pixels per game frame) that the view should move on the vertical (y) axis to catch up to the target":"视图在垂直 (y) 轴上移动以赶上目标的速度 (每个游戏帧的像素数)", + "The speed is calculated as pixels per step and can be set to \"-1\" to make the camera move instantly, but if the camera is not set to follow any instance then the values set here will have no visible effect.":"速度以每步像素计算,可以设置为 \"-1\" 以使相机立即移动,但如果相机未设置为跟随任何实例,则此处设置的值将不会产生可见效果。", "The unique camera ID value returned when you created the camera.":"创建相机时返回的唯一相机 ID 值。", - "You can use this function to update the speed of the view camera within the room. You give the unique camera ID value (as returned by the different {}{}camera_create(){}{} functions) and then give the x and y (horizontal and vertical) speed that it should move when set to follow a given instance. The speed is calculated as pixels per step and can be set to \"-1\" to make the camera move instantly, but if the camera is not set to follow any instance then the values set here will have no visible effect.":"您可以使用此函数更新房间内相机的速度。给出唯一的相机 ID 值(由不同的 {}{}camera_create(){}{} 函数返回),然后给出 x 和 y (水平和垂直)设置为跟随给定实例时应该移动的速度。速度以每步像素数计算,并且可以设置为\"-1\"以使相机立即移动,但是如果相机未设置为跟随任何实例,则此处设置的值将不具有可见效果。" + "You can use this function to update the speed of the camera within the room when following a target object. This is the speed the camera moves at when the {}target instance{} is outside of the buffer zone. See: {}Object Following{}":"您可以使用此功能来更新摄像机在跟踪目标物体时在房间内的速度。这是当 {} 目标实例 {} 位于缓冲区之外时相机移动的速度。请参阅:{} 对象跟随 {}", + "You can use this function to update the speed of the view camera within the room. You give the unique camera ID value (as returned by the different {}{}camera_create(){}{} functions) and then give the x and y (horizontal and vertical) speed that it should move when set to follow a given instance. The speed is calculated as pixels per step and can be set to \"-1\" to make the camera move instantly, but if the camera is not set to follow any instance then the values set here will have no visible effect.":"您可以使用此函数更新房间内相机的速度。给出唯一的相机 ID 值(由不同的 {}{}camera_create(){}{} 函数返回),然后给出 x 和 y (水平和垂直)设置为跟随给定实例时应该移动的速度。速度以每步像素数计算,并且可以设置为\"-1\"以使相机立即移动,但是如果相机未设置为跟随任何实例,则此处设置的值将不具有可见效果。", + "You give the unique camera ID value (as returned by the different {}{}camera_create(){}{} functions) and then give the x and y (horizontal and vertical) speed that it should move when set to follow a given instance.":"您提供唯一的相机 ID 值 (由不同的 {}{}camera_create(){}{} 函数返回),然后提供设置为跟随给定实例时相机应移动的 x 和 y(水平和垂直) 速度。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_target.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_target.json index 094ca247d..9db4d5b42 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_target.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_set_view_target.json @@ -1,6 +1,9 @@ { "Instance or object to have the camera target for following":"要使相机目标跟随的实例或对象", + "Note that if you supply an object and there is more than one instance of that object in the room, there is no way for {}GameMaker{} to know which instance you wish to follow and so it could be any of them.":"请注意,如果您提供一个对象,并且房间中有多个该对象的实例,则 {}GameMaker{} 无法知道您希望跟踪哪个实例,因此它可能是其中任何一个。", "The above code will set the view camera target for the camera assigned to view port[0] to that of the instance running the code.":"上述代码将分配给 viewport[0] 的相机视图的相机目标设置为运行代码的实例视图的相机目标。", "The unique camera ID value returned when you created the camera":"创建相机时返回的唯一相机 ID 值。", - "You can use this function to set the follow target of the view camera within the room. You give the unique camera ID value (as returned by the different {}{}camera_create(){}{} functions) and then give the target instance or object ID that you wish to set the camera view to. Note that if you choose an object ID and there is more than one instance of that object in the room, there is no way for {}GameMaker{} to know which instance you wish to follow and so it could be any of them.":"您可以使用此函数设置房间内视图相机的跟随目标。提供唯一的相机 ID 值(由不同的 {}{}camera_create(){}{} 函数返回),然后提供要将相机视图设置为的目标实例或对象 ID。请注意,如果您选择一个对象 ID,并且房间存在该对象的多个实例,{}GameMaker{} 无法知道您希望跟随哪个实例,因此可能是其中的任何一个。" + "You can use this function to set the follow target of the camera within the room. See: {}Object Following{}":"您可以使用该功能设置摄像机在房间内的跟随目标。请参阅:{} 对象跟随 {}", + "You can use this function to set the follow target of the view camera within the room. You give the unique camera ID value (as returned by the different {}{}camera_create(){}{} functions) and then give the target instance or object ID that you wish to set the camera view to. Note that if you choose an object ID and there is more than one instance of that object in the room, there is no way for {}GameMaker{} to know which instance you wish to follow and so it could be any of them.":"您可以使用此函数设置房间内视图相机的跟随目标。提供唯一的相机 ID 值(由不同的 {}{}camera_create(){}{} 函数返回),然后提供要将相机视图设置为的目标实例或对象 ID。请注意,如果您选择一个对象 ID,并且房间存在该对象的多个实例,{}GameMaker{} 无法知道您希望跟随哪个实例,因此可能是其中的任何一个。", + "You give the unique camera ID value (as returned by the different {}{}camera_create(){}{} functions) and then give the {}{}Object Instance{}{} or {}{}Object Asset{}{} that you wish to set the camera view to follow.":"您提供唯一的相机 ID 值 (由不同的 {}{}camera_create(){}{} 函数返回),然后提供 {}{} 对象实例 {}{} 或 {}{} 对象资源 {}{ 您希望设置要跟随的相机视图。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_hport.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_hport.json index c6f74c1a2..15e794b85 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_hport.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_hport.json @@ -1,4 +1,5 @@ { "The above code sets the width and height of the camera view to be the same as the width and height of the view port.":"上述代码将相机视图的宽度和高度设置为与视口的宽度和高度相同。", - "This variable can be used to get or to set the height of the specified view port. The height of the view port (or combined view ports if more than one are active) define the height of the game window or background canvas {}at the start of the game{}, so changing this value after the game has started will have no visible effect on the game window size unless called along with the function {}{}window_set_size(){}{}. If you have a larger or smaller port size than that assigned to the camera, then the camera view will be scaled down - or up - to fit, as illustrated by the image below.":"此变量可用于获取或设置指定视口的高度。视口的高度(如果有多个视口处于活动状态)定义了{}游戏开始时{}游戏窗口或背景画布的高度,因此在游戏开始后更改此值将不会对游戏窗口大小产生可见影响,除非随函数 {}{}window_set_size(){}{} 一起调用。如果您的端口大小大于或小于分配给相机的端口大小,则相机视图将按比例缩小或缩小以适应游戏窗口大小,如下图所示。" + "This variable can be used to get or to set the height of the specified view port. The height of the view port (or combined view ports if more than one are active) define the height of the game window or background canvas {}at the start of the game{}, so changing this value after the game has started will have no visible effect on the game window size unless called along with the function {}{}window_set_size(){}{}. If you have a larger or smaller port size than that assigned to the camera, then the camera view will be scaled down - or up - to fit, as illustrated by the image below.":"此变量可用于获取或设置指定视口的高度。视口的高度(如果有多个视口处于活动状态)定义了{}游戏开始时{}游戏窗口或背景画布的高度,因此在游戏开始后更改此值将不会对游戏窗口大小产生可见影响,除非随函数 {}{}window_set_size(){}{} 一起调用。如果您的端口大小大于或小于分配给相机的端口大小,则相机视图将按比例缩小或缩小以适应游戏窗口大小,如下图所示。", + "{}{}NOTE{}{} This variable does not hold a real GML array, so you cannot run any {}array functions{} on it or serialise it (convert it to a string). The only operation you can run on it is accessing a value at an index, with the {}{}view_hport{}[index]{} syntax.":"{}{} 注意{}{} 此变量不保存真正的 GML 数组,因此您无法对其运行任何 {} 数组函数 {} 或对其进行序列化 (将其转换为字符串)。您可以对其运行的唯一操作是使用 {}{}view_hport{}[index]{} 语法访问索引处的值。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_surface_id.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_surface_id.json index 9fcc811f6..98592cecf 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_surface_id.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_surface_id.json @@ -11,6 +11,7 @@ "You can also read this variable to get the index of the surface that has been assigned to the chosen view or it will return -1 if no surface has been assigned, and generally the surface used for this function should be the size of the view camera itself (not the view port). The extended example below shows a basic setup for capturing a view and drawing it in the {}Draw GUI{} event, and for more information on surfaces see the section {}Surfaces{}.":"您也可以读取此变量以获取已指定给所选视图的表面的索引,或者,如果未指定表面,它将返回-1,并且通常用于此函数的表面应为视图的相机本身的大小(而不是视口)。下面的扩展示例显示了在{}绘制GUI{}事件中捕获视图和绘制视图的基本设置,有关表面的详细信息,请参见{}表面{}一节。", "You can also read this variable to get the surface that has been assigned to the chosen view or it will return -1 if no surface has been assigned, and generally the surface used for this function should be the size of the view camera itself (not the view port). The extended example below shows a basic setup for capturing a view and drawing it in the {}Draw GUI{} event, and for more information on surfaces see the section {}Surfaces{}.":"您还可以读取此变量来获取已分配给所选视图的表面,如果没有分配表面,则返回 -1,通常用于此功能的表面应该是视图相机本身的大小 (而不是视口)。下面的扩展示例展示了捕获视图并在 {}Draw GUI{} 事件中绘制视图的基本设置,有关表面的更多信息,请参阅 {} 表面 {} 部分。", "{}IMPORTANT{} Care must be taken when drawing surfaces or textures to a view with a surface assigned to it, because if you try to draw the view\u0027s assigned surface (or its texture) inside that same view, you will get an error as you are essentially trying to draw a texture onto itself.":"{}重要{} 在为具有指定表面的视图绘制表面或纹理时必须小心,因为如果您尝试在同一视图内绘制视图的指定表面(或其纹理),则会遇到一个错误,因为您正在尝试将纹理绘制到自身上。", + "{}{}NOTE{}{} This variable does not hold a real GML array, so you cannot run any {}array functions{} on it or serialise it (convert it to a string). The only operation you can run on it is accessing a value at an index, with the {}{}view_surface_id{}[index]{} syntax.":"{}{} 注意{}{} 此变量不保存真正的 GML 数组,因此您无法对其运行任何 {} 数组函数 {} 或对其进行序列化 (将其转换为字符串)。您可以对其运行的唯一操作是使用 {}{}view_surface_id{}[index]{} 语法访问索引处的值。", "{}{}Surface ID{}{} or -1 (if no surface has been assigned)":"{}{}表面 ID {}{}或 -1 (如果未指定表面)", "{}{}Surface{}{} or -1 (if no surface has been assigned)":"{}{} 表面 {}{} 或 -1( 如果未指定表面)" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_visible.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_visible.json index b9c1e3b09..6b04d06e6 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_visible.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_visible.json @@ -1,4 +1,6 @@ { "The above code checks to see if view[0] is visible or not and if it is not, it then sets it to be visible.":"以上代码检查 view[0] 是否可见,如果不可见,则将其设置为可见。", - "This variable can be used to find out if a particular view port is currently visible or not. You can also set this variable to effectively turn \"on\" or \"off\" a view by setting the value to {}true{} (visible) or {}false{} (invisible). Note that even if you have a view port set to visible, if view ports are not enabled (using the built-in variable {}{}view_enabled{}{} or enabling them in the Room Editor) then they will not be drawn to the screen.":"此变量可用于查看特定视口当前是否可见。通过将值设置为 {}true{} (可见)或 {}false{} (不可见),也可以将此变量设置为有效地打开或关闭视图。请注意,即使视口设置为可见,如果未启用视口(使用内置变量 {}{}view_enabled{}{}}或在\"房间编辑器\"中启用它们),则不会将它们绘制到屏幕。" + "This variable can be used to find out if a particular view port is currently visible or not. You can also set this variable to effectively turn \"on\" or \"off\" a view by setting the value to {}true{} (visible) or {}false{} (invisible). Note that even if you have a view port set to visible, if view ports are not enabled (using the built-in variable {}{}view_enabled{}{} or enabling them in the Room Editor) then they will not be drawn to the screen.":"此变量可用于查看特定视口当前是否可见。通过将值设置为 {}true{} (可见)或 {}false{} (不可见),也可以将此变量设置为有效地打开或关闭视图。请注意,即使视口设置为可见,如果未启用视口(使用内置变量 {}{}view_enabled{}{}}或在\"房间编辑器\"中启用它们),则不会将它们绘制到屏幕。", + "This variable can be used to find out if a particular view port is currently visible or not. You can also set this variable to effectively turn \"on\" or \"off\" a view by setting the value to {}true{} (visible) or {}false{} (invisible). Note that even if you have a view port set to visible, if view ports are not enabled (using the built-in variable {}{}view_enabled{}{} or enabling them in {}The Room Editor{}) then they will not be drawn to the screen.":"该变量可用于查明特定视口当前是否可见。您还可以将此变量设置为 {}true{}( 可见) 或 {}false{}( 不可见),从而有效地 \" 打开 \" 或 \" 关闭 \" 视图。请注意,即使您将视口设置为可见,如果未启用视口 (使用内置变量 {}{}view_enabled{}{} 或在 {} 房间编辑器 {} 中启用它们),它们也会不会被吸引到屏幕上。", + "{}{}NOTE{}{} This variable does not hold a real GML array, so you cannot run any {}array functions{} on it or serialise it (convert it to a string). The only operation you can run on it is accessing a value at an index, with the {}{}view_visible{}[index]{} syntax.":"{}{} 注意{}{} 此变量不保存真正的 GML 数组,因此您无法对其运行任何 {} 数组函数 {} 或对其进行序列化 (将其转换为字符串)。您可以对其运行的唯一操作是使用 {}{}view_visible{}[index]{} 语法访问索引处的值。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_wport.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_wport.json index fe930a707..80c44b838 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_wport.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_wport.json @@ -1,4 +1,5 @@ { "The above code sets the width and height of the camera view to be the same as the width and height of the view port.":"上述代码将相机视图的宽度和高度设置为与视口的宽度和高度相同。", - "This variable can be used to get or to set the width of the specified view port. The width of the view port (or combined view ports if more than one are active) define the width of the game window or background canvas {}at the start of the game{}, so changing this value after the game has started will have no visible effect on the game window size unless called along with the function {}{}window_set_size(){}{}. If you have a larger or smaller port size than that assigned to the camera, then the camera view will be scaled down - or up - to fit, as illustrated by the image below.":"此变量可用于获取或设置指定视口的宽度。视口的宽度(如果有多个视口处于活动状态)定义了{}游戏开始时{}游戏窗口或背景画布的宽度,因此在游戏开始后更改此值将不会对游戏窗口大小产生可见影响,除非随函数 {}{}window_set_size(){}{} 一起调用。如果您的端口大小大于或小于分配给相机的端口大小,则相机视图将按比例缩小或缩小以适应游戏窗口大小,如下图所示。" + "This variable can be used to get or to set the width of the specified view port. The width of the view port (or combined view ports if more than one are active) define the width of the game window or background canvas {}at the start of the game{}, so changing this value after the game has started will have no visible effect on the game window size unless called along with the function {}{}window_set_size(){}{}. If you have a larger or smaller port size than that assigned to the camera, then the camera view will be scaled down - or up - to fit, as illustrated by the image below.":"此变量可用于获取或设置指定视口的宽度。视口的宽度(如果有多个视口处于活动状态)定义了{}游戏开始时{}游戏窗口或背景画布的宽度,因此在游戏开始后更改此值将不会对游戏窗口大小产生可见影响,除非随函数 {}{}window_set_size(){}{} 一起调用。如果您的端口大小大于或小于分配给相机的端口大小,则相机视图将按比例缩小或缩小以适应游戏窗口大小,如下图所示。", + "{}{}NOTE{}{} This variable does not hold a real GML array, so you cannot run any {}array functions{} on it or serialise it (convert it to a string). The only operation you can run on it is accessing a value at an index, with the {}{}view_wport{}[index]{} syntax.":"{}{} 注意{}{} 此变量不保存真正的 GML 数组,因此您无法对其运行任何 {} 数组函数 {} 或对其进行序列化 (将其转换为字符串)。您可以对其运行的唯一操作是使用 {}{}view_wport{}[index]{} 语法访问索引处的值。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_has_focus.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_has_focus.json index de84dae00..05ea3141f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_has_focus.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_has_focus.json @@ -1,5 +1,6 @@ { "The above code will check to see if the game window is in focus or not, and if the function returns {}false{} a function will be called.":"以上代码将检查游戏窗口是否处于焦点状态,如果函数返回 {}false{},将调用函数。", "With this function you can poll the window (or tab) state and if it loses focus the function will return {}false{} otherwise it will return {}true{}. In most cases you can simply use the {}{}os_is_paused(){}{} function to test this, but in some very specific cases (for example games on Chrome Apps) that function will not trigger, in which case you should use this function instead.":"使用此函数,您可以轮询窗口(或选项卡)状态,如果失去焦点,此函数将返回 {}false{},否则将返回 {}true{}。在大多数情况下,您可以简单地使用 {}{}os_is_paused(){}{} 函数进行测试,但在某些非常特殊的情况下(例如 Chrome 应用程序上的游戏),此函数将不会触发,在这种情况下,您应该改用此函数。", - "{}NOTE{}: This function is only valid for the HTML5, Windows, and MacOS.":"{}注意{}:此函数仅对 HTML5、Windows 和 MacOS 有效。" + "{}NOTE{}: This function is only valid for the HTML5, Windows, and MacOS.":"{}注意{}:此函数仅对 HTML5、Windows 和 MacOS 有效。", + "{}{}{}NOTE{}{}{} This function is only valid for the HTML5, Windows, and MacOS.":"{}{}{} 注意{}{}{} 此函数仅对 HTML5、Windows 和 MacOS 有效。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_mouse_get_x.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_mouse_get_x.json index 031cdf7c5..be9b958f6 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_mouse_get_x.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_mouse_get_x.json @@ -1,5 +1,6 @@ { "The above code stores the current x axis window position of the mouse in the variable \"wx\".":"上述代码将鼠标的当前 X 轴窗口位置存储在变量 \"wx\" 中。", "With this function you can get the x position of the mouse cursor (in pixels) within the browser if it is an HTML5 game or within the display if it is a Windows, Ubuntu (Linux) or macOS game.":"使用此函数,如果是 HTML5 游戏,您可以在浏览器中获取鼠标光标的 X 位置(以像素为单位);如果是 Windows、Ubuntu 或 MacOS 游戏,您可以在显示器中获取鼠标光标的 X 位置(以像素为单位)。", - "{}NOTE{}: For regular mouse functions see the section on {}Mouse Input{}":"{}注意{}:有关常规鼠标函数,请参阅{}鼠标输入{}一节" + "{}NOTE{}: For regular mouse functions see the section on {}Mouse Input{}":"{}注意{}:有关常规鼠标函数,请参阅{}鼠标输入{}一节", + "{}{}{}NOTE{}{}{} For regular mouse functions see the section on {}Mouse Input{}.":"{}{}{} 注意{}{}{} 对于常规鼠标功能,请参阅 {} 鼠标输入 {} 部分。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_mouse_get_y.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_mouse_get_y.json index 56a3bec0c..988326e66 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_mouse_get_y.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_mouse_get_y.json @@ -1,5 +1,6 @@ { "The above code stores the current y axis window position of the mouse in the variable \"wy\".":"上述代码将鼠标的当前 Y 轴窗口位置存储在变量 \"wy\" 中。", "With this function you can get the y position of the mouse cursor (in pixels) within the browser if it is an HTML5 game or within the display if it is a Windows, Ubuntu (Linux) or macOS game.":"使用此函数,如果是 HTML5 游戏,您可以在浏览器中获取鼠标光标的 Y 位置(以像素为单位);如果是 Windows、Ubuntu 或 MacOS 游戏,您可以在显示器中获取鼠标光标的 Y 位置(以像素为单位)。", - "{}NOTE{}: For regular mouse functions see the section on {}Mouse Input{}":"{}注意{}:有关常规鼠标函数,请参阅{}鼠标输入{}一节" + "{}NOTE{}: For regular mouse functions see the section on {}Mouse Input{}":"{}注意{}:有关常规鼠标函数,请参阅{}鼠标输入{}一节", + "{}{}{}NOTE{}{}{} For regular mouse functions see the section on {}Mouse Input{}.":"{}{}{} 注意{}{}{} 对于常规鼠标功能,请参阅 {} 鼠标输入 {} 部分。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/display_reset.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/display_reset.json index a0210a3cd..b8143169e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/display_reset.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/display_reset.json @@ -1,8 +1,13 @@ { "Since not all target devices are the same, some may not support 8x or 4x anti-aliasing for example, and so there is a {}read only{} variable available for getting the different levels of AA that the device running the game can display:":"由于并非所有目标设备都相同,例如,某些设备可能不支持 8x 或 4x 抗锯齿,因此有一个{}只读{}变量可用于获取运行游戏的设备可以显示的不同级别的 AA:", + "Since not all target devices are the same, some may not support 8x or 4x anti-aliasing for example, and so there is a {}read-only{} variable available for getting the different levels of AA that the device running the game can display:":"由于并非所有目标设备都相同,有些设备可能不支持 8 倍或 4 倍抗锯齿,因此有一个 {} 只读 {} 变量可用于获取运行游戏的设备可以获取的不同级别的 AA 展示:", "The above code will set the anti-aliasing level to 8 if supported and switch v-sync to on.":"如果支持,上述代码将把抗锯齿级别设置为 8,并将 v-sync 切换到 ON。", + "The available anti-aliasing levels are 0, 2, 4 and 8, with the default startup value being set to 0, and the default v-sync setting to {}false{} (off). Switching v-sync on may give a smoother gaming experience but it will also need more processing power and so its impact must be carefully considered before use, and the same goes for the anti-aliasing where the higher the number the more processing that is required.":"可用的抗锯齿级别为 0、2、4 和 8,默认启动值设置为 0,默认垂直同步设置为 {}false{}( 关闭)。开启垂直同步可能会带来更流畅的游戏体验,但它也需要更多的处理能力,因此在使用前必须仔细考虑其影响,抗锯齿也是如此,数字越高,需要的处理越多。", "The level of anti-aliasing filtering (0, 2, 4 or 8).":"抗锯齿滤波的级别 (0、2、4 或 8)。", "This function Resets the display settings to the ones that were set when the game was started, but also allows you to change the current level of full screen anti-aliasing being used and whether to use vertical synchronisation. The available anti-aliasing levels are 0,2,4 and 8, with the default startup value being set to 0, and the default v-sync setting is false (off). Switching v-sync on may give a smoother gaming experience but it will also need more processing power and so its impact must be considered careful before use, and the same goes for the anti-aliasing where the higher the number the more processing that is required.":"此函数将显示设置重置为游戏开始时设置的显示设置,但也允许您更改正在使用的全屏抗锯齿的当前级别以及是否使用垂直同步。可用的抗锯齿级别为 0、2、4 和 8,默认启动值设置为 0,默认 v-sync 设置为 false(关闭)。开启 v-sync 可能会带来更流畅的游戏体验,但它也需要更多的处理能力,因此在使用前必须谨慎考虑其影响,在抗锯齿方面也是如此,数字越高,所需的处理越多。", + "This function resets the display settings to the ones that were set when the game was started and also allows you to change the current level of fullscreen anti-aliasing being used and whether to use vertical synchronisation.":"此功能将显示设置重置为游戏开始时设置的设置,还允许您更改当前使用的全屏抗锯齿级别以及是否使用垂直同步。", + "This variable stores an integer value based on the setting of bits for the different levels. So for only 2xAA, this will report 2, for 2x and 4x availability it will report 6. For 8 and 4 it will report 12. For all 3 levels (2, 4 and 8) it will report 14.":"该变量根据不同级别的位设置存储整数值。因此,仅对于 2xAA,它将报告 2,对于 2x 和 4x 可用性,它将报告 6。对于 8 和 4,它将报告 12。对于所有 3 个级别 (2、4 和 8),它将报告 14。", "This variable will return an integer value based on the setting of bits for the different levels. So for only 2xAA, this will report 2, for 2x and 4x availability it will report 6. For 8 and 4 it will report 12. For all 3 levels (2,4 and 8) it will report 14.":"此变量将根据不同级别的位设置返回整数值。因此,对于仅 2xAA,它将报告 2,对于 2x和 4x 的可用性,它将报告 6。对于 8 和 4,它将报告 12。对于所有 3 个级别 (2、4 和 8),它将报告 14。", - "Toggle vertical synchronisation to on (true) or off (false).":"将垂直同步切换为开启(true)或关闭(false)。" + "Toggle vertical synchronisation to on (true) or off (false).":"将垂直同步切换为开启(true)或关闭(false)。", + "Toggle vertical synchronisation to on ({}true{}) or off ({}false{}).":"将垂直同步切换为打开 ({}true{}) 或关闭 ({}false{})。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Depth_And_Stencil_Buffer/The_Depth_And_Stencil_Buffer.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Depth_And_Stencil_Buffer/The_Depth_And_Stencil_Buffer.json index 3d4d1e726..a0d82858b 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Depth_And_Stencil_Buffer/The_Depth_And_Stencil_Buffer.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Depth_And_Stencil_Buffer/The_Depth_And_Stencil_Buffer.json @@ -1,20 +1,70 @@ { "An object instance\u0027s depth set through its {}{}depth{}{} variable.":"", + "As a result, the depth test (set to {}{}cmpfunc_lessequal{}{}) passes for all pixels covered by the rectangle and it is fully drawn. Since z-writing is enabled, the depth value for those pixels is replaced with the new value {}0.53125{}. In the third step the depth is set to 2000, written to the depth buffer as {}0.5 + 2000/32000{} = {}0.5625{}, and a circle is drawn at that depth. There are now two possible situations for the depth test:":"因此,矩形覆盖的所有像素的深度测试 (设置为 {}{}cmpfunc_lessequal{}{}) 均通过,并且已完全绘制。由于启用了 z 写入,这些像素的深度值将替换为新值 {}0.53125{}。在第三步中,深度设置为 2000,以 {}0.5 + 2000/32000{}={}0.5625{} 的形式写入深度缓冲区,并在该深度绘制一个圆。现在深度测试有两种可能的情况:", "By default, the depth buffer is {}enabled{} in {}GameMaker{}, which means that every surface is {}created{} with a depth buffer. This also applies to the {}{}application_surface{}{}, which is the surface that\u0027s drawn to by default.":"默认情况下,深度缓冲区在 {}GameMaker{} 中 {} 启用 {},这意味着每个表面都是使用深度缓冲区 {} 创建 {} 的。这也适用于 {}{}application_surface{}{},它是默认绘制的表面。", + "Clear the depth buffer to a value of 1 using {}{}draw_clear_depth{}{}. 1 is the maximum depth value and corresponds to zfar, so that any object that\u0027s closer than zfar will always pass the {}{}cmpfunc_lessequal{}{} test. {}draw_clear_depth(1);{} ":"使用 {}{}draw_clear_depth{}{} 将深度缓冲区的值清除为 1。 1 是最大深度值,对应于 zfar,因此任何比 zfar 更近的对象都将始终通过 {}{}cmpfunc_lessequal{}{} 测试。{}draw_clear_depth(1);{}", + "Clear the stencil buffer to a certain value using {}{}draw_clear_stencil{}{}.":"使用 {}{}draw_clear_stencil{}{} 将模板缓冲区清除为特定值。", + "Copy the contents of the depth buffer to a regular buffer with {}{}buffer_get_surface_depth{}{} or update the contents of the depth buffer with data stored in a regular buffer with {}{}buffer_set_surface_depth{}{}.":"使用 {}{}buffer_get_surface_depth{}{} 将深度缓冲区的内容复制到常规缓冲区,或者使用 {}{}buffer_set_surface_depth{}{} 使用存储在常规缓冲区中的数据更新深度缓冲区的内容。", + "Decrements the stencil buffer value, clamping at 0.":"减少模板缓冲区值,固定为 0。", + "Decrements the stencil buffer value, wrapping to the maximum value at 0.":"递减模板缓冲区值,回绕到最大值 0。", "Depth vs. Depth Buffer Depth":"深度与深度缓冲区深度", + "Draw sprites, text, particles, 3D models, etc. Note that if you draw to the {}{}application_surface{}{}, the depth used is the depth of the layer that a visual element is on ({}{}layer_get_depth{}{}), the instance\u0027s {}{}depth{}{} or the depth value that you set manually using {}{}gpu_set_depth{}{}.":"绘制精灵、文本、粒子、3D 模型等。请注意,如果您绘制到 {}{}application_surface{}{},则使用的深度是视觉元素所在图层的深度 ({}{}layer_get_depth{}{})、实例的 {}{} 深度 {}{} 或您使用 {}{}gpu_set_depth{}{} 手动设置的深度值。", + "Draw to the surface. Before drawing, you can change the stencil reference value to use with {}{}gpu_set_stencil_ref{}{}. For example, to draw a rectangle of 50x50 pixels using a reference value of 10:  {}gpu_set_stencil_ref(10);{} draw_rectangle(0, 0, 49, 49, false);{} ":"绘制到表面。在绘制之前,您可以更改要与 {}{}gpu_set_stencil_ref{}{} 一起使用的模板参考值。例如,要使用参考值 10 绘制 50x50 像素的矩形:{}gpu_set_stencil_ref(10);{}draw_rectangle(0, 0, 49, 49, false);{}", + "Enable depth testing with {}{}gpu_set_ztestenable{}{}. Possibly also restore other GPU settings to their default values (commented out) in case you changed them (e.g. the default z-test comparison function):  {}// surface_depth_disable(false);{} // gpu_set_zwriteenable(true);{} gpu_set_ztestenable(true);{} // gpu_set_zfunc({}cmpfunc_lessequal{});{} ":"使用 {}{}gpu_set_ztestenable{}{} 启用深度测试。如果您更改了其他 GPU 设置 (例如默认的 z 测试比较函数),也可能将其恢复为默认值 (已注释掉):{}// surface_depth_disable(false);{}// gpu_set_zwriteenable(true);{}gpu_set_ztestenable(true);{}// gpu_set_zfunc({}cmpfunc_lessequal{});{}", + "Enable the stencil test using {}{}gpu_set_stencil_enable{}{}, set the stencil comparison function using {}{}gpu_set_stencil_func{}{} (default {}{}cmpfunc_always{}{}) and set the pass and fail operations using {}{}gpu_set_stencil_pass{}{} and {}{}gpu_set_stencil_fail{}{}. By default, both operations are set to {}{}stencilop_keep{}{}.":"使用 {}{}gpu_set_stencil_enable{}{} 启用模板测试,使用 {}{}gpu_set_stencil_func{}{} 设置模板比较函数 (默认为 {}{}cmpfunc_always{}{}),并使用设置通过和失败操作 {}{}gpu_set_stencil_pass{}{} 和 {}{}gpu_set_stencil_fail{}{}。默认情况下,这两个操作均设置为 {}{}stencilop_keep{}{}。", "For the default orthographic camera the values can be converted as follows: ":"对于默认正交相机,可以按如下方式转换值:", + "Functions":"函数", + "If a pixel passes the depth test, it is passed to the stencil test (when enabled). If all tests pass, the pixel is finally drawn.":"如果像素通过深度测试,则会传递到模板测试 (启用时)。如果所有测试都通过,则最终绘制像素。", + "In the image above, a red rectangle (not filled) is drawn with a stencil reference value of 4. The sprite you see is then drawn using a value of 2. 2 is greater than 0 but less than 4, so the sprite\u0027s pixels that overlap the red rectangle are discarded.":"在上图中,使用模板参考值 4 绘制了一个红色矩形 (未填充)。然后使用值 2 绘制了您看到的精灵。2 大于 0 但小于 4,因此精灵的像素重叠的红色矩形被丢弃。", + "Increments the stencil buffer value, clamping at the maximum value.":"增加模板缓冲区值,限制在最大值。", + "Increments the stencil buffer value, wrapping to 0 at the maximum value.":"增加模板缓冲区值,在最大值处回绕到 0。", + "Keeps the current value in the stencil buffer.":"将当前值保留在模板缓冲区中。", + "Like the depth test, the stencil test is performed on every pixel that\u0027s drawn to a surface. It\u0027s disabled by default and can be enabled with {}{}gpu_set_stencil_enable{}{}. The comparison is one of the values under the {}{}Comparison Function Constant{}{}. The test itself compares a stencil reference value to the current value in the stencil buffer: ":"与深度测试一样,模板测试是对绘制到表面的每个像素执行的。它默认处于禁用状态,可以通过 {}{}gpu_set_stencil_enable{}{} 启用。比较是 {}{} 比较函数常量 {}{} 下的值之一。测试本身将模板参考值与模板缓冲区中的当前值进行比较:", "Like the surfaces they belong to, the depth and stencil buffer are also stored in video memory ({}VRAM{}).":"与它们所属的表面一样,深度和模板缓冲区也存储在视频内存 ({}VRAM{}) 中。", + "Optionally use the depth buffer in a subsequent draw pass, e.g. by passing the surface which it belongs to as the second parameter to {}{}surface_set_target{}{} or by using the depth buffer\u0027s texture in a shader to sample the depth values. The depth buffer\u0027s texture can be retrieved with {}{}surface_get_texture_depth{}{}. The depth values are stored in the red colour channel.":"可以选择在后续绘制过程中使用深度缓冲区,例如通过将其所属的表面作为第二个参数传递给 {}{}surface_set_target{}{} 或通过在着色器中使用深度缓冲区的纹理来采样深度值。可以使用 {}{}surface_get_texture_depth{}{} 检索深度缓冲区的纹理。深度值存储在红色通道中。", + "Other functions for setting/getting values related to the depth/stencil buffers are listed on {}GPU Control{}.":"{}GPU 控制 {} 中列出了用于设置 / 获取与深度 / 模板缓冲区相关的值的其他函数。", + "Performs a bitwise inversion on the current stencil buffer value.":"对当前模板缓冲区值执行按位反转。", + "Perspective Projection":"透视投影", + "Replaces the value in the buffer to the new stencil reference value.":"将缓冲区中的值替换为新的模板参考值。", + "See the code example on the {}{}surface_get_texture_depth{}{} function page for a complete example.":"有关完整示例,请参阅 {}{}surface_get_texture_depth{}{} 函数页面上的代码示例。", + "Sets the stencil buffer value to 0.":"将模板缓冲区值设置为 0。", "The Depth Buffer":"深度缓冲区", + "The Depth Test":"深度测试", + "The Stencil Buffer":"模板缓冲区", + "The Stencil Test":"模板测试", "The depth and stencil buffer always exist together, i.e.: if a surface has a depth buffer, it also has a stencil buffer, if it has no depth buffer, it also has no stencil buffer.":"深度和模板缓冲区总是一起存在,即:如果一个表面有深度缓冲区,它也有一个模板缓冲区,如果它没有深度缓冲区,它也没有模板缓冲区。", "The depth and stencil buffer are two data buffers that are used for advanced graphical effects in both 2D and 3D games, which include shadow mapping, deferred rendering, volumetric rendering, ambient occlusion and many more.":"深度和模板缓冲区是两个数据缓冲区,用于 2D 和 3D 游戏中的高级图形效果,其中包括阴影贴图、延迟渲染、体积渲染、环境光遮挡等等。", "The depth buffer can be displayed as a grayscale image, where {}white{} (a value of 1) indicates the pixel is as far away as it can be (at the far plane) and {}black{} (a value of 0) indicates the closest pixel (at znear).":"深度缓冲区可以显示为灰度图像,其中 {} 白色 {}( 值为 1) 表示像素尽可能远 (在远平面),{} 黑色 {}( 值为 1)0) 表示最近的像素 (在 znear 处)。", "The depth buffer stores the values after all transformations have been applied. {}{}draw_clear_depth{}{} can be used to reset all values in the depth buffer to any value between 0 (znear) and 1 (zfar).":"深度缓冲区存储应用所有变换后的值。{}{}draw_clear_depth{}{} 可用于将深度缓冲区中的所有值重置为 0(znear) 和 1(zfar) 之间的任何值。", "The depth buffer, also called z-buffer, is a graphics buffer created with the same dimensions as the surface that it\u0027s created for. It stores a 24-bit depth value for every pixel of the surface, which holds the distance away from the surface.":"深度缓冲区也称为 z 缓冲区,是一种图形缓冲区,其创建尺寸与其创建的表面相同。它为表面的每个像素存储一个 24 位深度值,该值保存距表面的距离。", "The depth buffer, which stores a depth value for every pixel of a surface (i.e. render target). This depth value is the fraction of the distance between the near plane and the far plane. A value of 0 corresponds to znear, a value of 1 corresponds to zfar. The value depends on the {}camera{} currently in use and its type of {}projection{} ({}perspective{} or {}orthographic{}).":"深度缓冲区,存储表面 (即渲染目标) 每个像素的深度值。该深度值是近平面和远平面之间距离的分数。值 0 对应于 znear,值 1 对应于 zfar。该值取决于当前使用的 {} 相机 {} 及其 {} 投影 {} 类型 ({} 透视 {} 或 {} 正交 {})。", - "The depth value assigned to anything that\u0027s drawn, either automatically by {}GameMaker{} or manually using code. This can be:  {} {}The layer depth of layers in {}The Room Editor{}.{} {}An object instance\u0027s depth set through its {}{}depth{}{} variable.{} {}The depth value you set manually in {}GML Code{} using {}{}gpu_set_depth{}{}.{} {} This depth is the z coordinate of the vertex that {}GameMaker{} writes to the vertex buffer, {}before{} any transformations have taken place on the vertex. (For any geometry drawn by {}GameMaker{}, this is the value stored in {}in_Position.z{}). {} {} ":"", + "The depth test is a test using the depth buffer that can be performed on the pixels that you draw to. It is disabled by default and can be enabled with {}{}gpu_set_ztestenable{}{}.":"深度测试是使用深度缓冲区的测试,可以对您绘制的像素执行。它默认处于禁用状态,可以通过 {}{}gpu_set_ztestenable{}{} 启用。", + "The depth value assigned to anything that\u0027s drawn, either automatically by {}GameMaker{} or manually using code. This can be:  {} {}The layer depth of layers in {}The Room Editor{}.{} {}An object instance\u0027s depth set through its {}{}depth{}{} variable.{} {}The depth value you set manually in {}GML Code{} using {}{}gpu_set_depth{}{}.{} {} This depth is the z coordinate of the vertex that {}GameMaker{} writes to the vertex buffer, {}before{} any transformations have taken place on the vertex. (For any geometry drawn by {}GameMaker{}, this is the value stored in {}in_Position.z{}). {} {} ":"分配给任何绘制内容的深度值,由 {}GameMaker{} 自动分配或使用代码手动分配。 \n\n这可以是:{}{}{} 房间编辑器 {} 中各层的层深度。\n\n{}{} 对象实例的深度通过其 {}{}depth{}{} 变量设置。\n\n{}{} 您使用 {}{}gpu_set_depth{}{} 在 {14}GML 代码 {15} 中手动设置的深度值。\n\n{}{} 该深度是 {}GameMaker{} 写入顶点缓冲区的顶点的 z 坐标,\n\n 在顶点上发生任何转换{}之前{}。 \n\n(对于 {}GameMaker{} 绘制的任何几何图形,这是存储在 {}in_Position.z{} 中的值)。{}{}", + "The following function can be used in the fragment shader to convert non-linear depth values to linear ones: ":"片段着色器中可以使用以下函数将非线性深度值转换为线性深度值:", + "The following functions can be used to clear the depth and stencil buffers: ":"以下函数可用于清除深度和模板缓冲区:", + "The following gives a general overview on how to use the depth buffer and the depth test: ":"下面概述了如何使用深度缓冲区和深度测试:", + "The following is an overview of how to use the stencil buffer: ":"以下是如何使用模板缓冲区的概述:", "The layer depth of layers in {}The Room Editor{}.":"", + "The light blue pixels are drawn since their depth is less than the maximum depth at zfar. Since z-writing is enabled, the depth value for those pixels is replaced with the new value {}0.5625{}. The pixels shown in white, however, aren\u0027t drawn as the depth value of {}0.5625{} is greater than {}0.53125{}, not less than or equal to {}0.53125{} ({}{}cmpfunc_lessequal{}{}). The depth values for those pixels remain unchanged, i.e. remain at {}0.53125{}.":"绘制浅蓝色像素是因为它们的深度小于 zfar 处的最大深度。由于启用了 z 写入,这些像素的深度值将替换为新值 {}0.5625{}。不过,由于 {}0.5625{} 的深度值大于 {}0.53125{},且不小于或等于 {}0.53125{}({}{}cmpfunc_lessequal{}),因此不会绘制以白色显示的像素 {})。这些像素的深度值保持不变,即保持为 {}0.53125{}。", + "The ratio of the projection\u0027s {}zfar / znear{} should be passed to the shader as a uniform variable and then passed to the function.":"投影的 {}zfar / znear{} 比率应作为统一变量传递给着色器,然后传递给函数。", + "The stencil buffer, like the depth buffer, is a graphics buffer stored in video memory, created with the same dimensions as the surface it\u0027s created for. It stores an 8-bit integer stencil value for every pixel of a render target, allowing for 256 possible values, ranging from 0 to 255.":"与深度缓冲区一样,模板缓冲区是存储在视频内存中的图形缓冲区,其创建尺寸与其创建的表面相同。它为渲染目标的每个像素存储一个 8 位整数模板值,允许 256 个可能的值,范围从 0 到 255。", + "The stencil test is more flexible than the depth test as it allows you to set the operation to perform when the test passes and when it fails. This operation is set using {}{}gpu_set_stencil_pass{}{} and {}{}gpu_set_stencil_fail{}{} respectively, to one of the following constants:":"模板测试比深度测试更灵活,因为它允许您设置测试通过和失败时要执行的操作。此操作分别使用 {}{}gpu_set_stencil_pass{}{} 和 {}{}gpu_set_stencil_fail{}{} 设置为以下常量之一:", "There are two different uses of the term depth in {}GameMaker{}: ":"在 {}GameMaker{} 中,术语深度有两种不同的用法:", "They store, for every pixel, a 24-bit {}depth{} value and an 8-bit {}stencil{} value respectively. They are created for every {}{}Surface{}{} when the depth buffer is enabled. By default, surfaces are created with a depth buffer (and a stencil buffer), {}z-writing{} is enabled, {}z-testing{} is disabled and the {}stencil test{} is disabled.":"它们分别为每个像素存储一个 24 位 {} 深度 {} 值和一个 8 位 {} 模板 {} 值。当深度缓冲区启用时,它们会为每个 {}{} 表面 {}{} 创建。默认情况下,表面是使用深度缓冲区 (和模板缓冲区) 创建的,启用 {}z-writing{},禁用 {}z-testing{} 并禁用 {}stencil test{}。", + "Using the Depth Buffer":"使用深度缓冲区", + "Using the Stencil Buffer":"使用模板缓冲区", + "Using the depth test allows you to draw things in a random order, while still making sure that objects are sorted correctly according to their distance from the viewpoint that you\u0027re looking from.":"使用深度测试可以让您以随机顺序绘制事物,同时仍然确保对象根据距您所观察的视点的距离正确排序。", + "When enabled, the GPU performs a test on all pixels affected by the current draw command (e.g. a {}draw_*{} function). This test is set to {}{}cmpfunc_lessequal{}{} by default, but you can change it to another comparison using {}{}gpu_set_zfunc{}{}.":"启用后,GPU 会对受当前绘制命令 (例如 {}draw_*{} 函数) 影响的所有像素执行测试。该测试默认设置为 {}{}cmpfunc_lessequal{}{},但您可以使用 {}{}gpu_set_zfunc{}{} 将其更改为其他比较。", + "When using a perspective projection ({}{}matrix_build_projection_perspective{}{} / {}{}matrix_build_projection_perspective_fov{}{}) the values stored in the depth buffer are not linear and the conversion formula for an orthographic projection cannot be used.":"使用透视投影 ({}{}matrix_build_projection_perspective{}{}/{}{}matrix_build_projection_perspective_fov{}{}) 时,深度缓冲区中存储的值不是线性的,并且无法使用正交投影的转换公式。", + "When z-testing is enabled, every time you draw something to a surface that has a depth buffer, the depth value of the new pixel is compared to the value at the corresponding pixel in the depth buffer. For example: ":"启用 z 测试后,每次在具有深度缓冲区的表面上绘制某些内容时,都会将新像素的深度值与深度缓冲区中相应像素的值进行比较。例如:", + "the comparison of the depth of the pixels of the circle that do overlap with the rectangle (in white)":"与矩形重叠的圆圈像素深度的比较 (白色)", + "the comparison of the depth of the pixels of the circle that don\u0027t overlap with the rectangle to zfar (in light blue)":"与矩形不重叠的圆的像素深度与 zfar 的比较 (浅蓝色)", + "{}In the first step the background is cleared to a grey colour and the depth buffer is cleared to 1, which corresponds to zfar. In the second step the depth is set to 1000 (note that this is the GM depth and not the 0-1 buffer depth), written to the depth buffer as {}0.5 + 1000/32000{} = {}0.53125{}, which is in front of (i.e. {}less than{}) zfar (at 1).":"{} 在第一步中,背景被清除为灰色,深度缓冲区被清除为 1,对应于 zfar。在第二步中,深度设置为 1000( 请注意,这是 GM 深度,而不是 0-1 缓冲区深度),以 {}0.5 + 1000/32000{}={}0.53125{} 的形式写入深度缓冲区,它位于 (即 {} 小于 {})zfar(1 处) 之前。", "{}The Depth And Stencil Buffer{}":"{} 深度和模板缓冲区 {}", - "{}{}NOTE{}{} Automatic depth buffer and stencil buffer generation can be turned off using {}{}surface_depth_disable{}{}.":"{}{} 注意{}{} 可以使用 {}{}surface_depth_disable{}{} 关闭自动深度缓冲区和模板缓冲区生成。" + "{}depth_of_pixel_being_written cmp_func value_at_pixel_in_depth_buffer{}":"", + "{}{}IMPORTANT{}{} If your game is 2D and relies only on the drawing order of the layers as you defined them in {}The Room Editor{} (or the {}depth order{} of your instances), then you don\u0027t need to enable the depth test. The depth buffer itself can be disabled as well in this case using {}{}surface_depth_disable{}{}.":"{}{} 重要{}{} 如果您的游戏是 2D 游戏并且仅依赖于您在 {} 房间编辑器 {} 中定义的图层绘制顺序 (或实例的 {} 深度顺序 {}),那么你不需要启用深度测试。在这种情况下,也可以使用 {}{}surface_depth_disable{}{} 禁用深度缓冲区本身。", + "{}{}NOTE{}{} Automatic depth buffer and stencil buffer generation can be turned off using {}{}surface_depth_disable{}{}.":"{}{} 注意{}{} 可以使用 {}{}surface_depth_disable{}{} 关闭自动深度缓冲区和模板缓冲区生成。", + "{}{}NOTE{}{} Both sides of the comparison are binary AND-ed {}&{} with a read bitmask, which defaults to all ones ({}0b11111111{}). You can set this mask, if needed, using {}{}gpu_set_stencil_read_mask{}{}. The comparison then changes to: {}{}(ref & read_mask) cmp_func (stencil & read_mask){}{}.":"{}{} 注意{}{} 比较的双方都是带有读取位掩码的二进制 AND 运算 {}&{},默认为全 1({}0b11111111{})。如果需要,您可以使用 {}{}gpu_set_stencil_read_mask{}{} 设置此掩码。然后比较变为:{}{}(ref & read_mask) cmp_func(stencil & read_mask){}{}。", + "{}{}NOTE{}{} You can also set the operation to perform in case the stencil test passes but the depth test fails using {}{}gpu_set_stencil_depth_fail{}{}.":"{}{} 注意{}{} 您还可以使用 {}{}gpu_set_stencil_depth_fail{}{} 设置在模板测试通过但深度测试失败时要执行的操作。", + "{}{}NOTE{}{} Z-writing must be enabled in order for the depth value to be overwritten if the depth test passes. This is enabled by default. See {}{}gpu_set_zwriteenable{}{}.":"{}{} 注意{}{} 必须启用 Z 写入,以便在深度测试通过时覆盖深度值。默认情况下启用此功能。请参阅 {}{}gpu_set_zwriteenable{}{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Drawing.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Drawing.json index 1b20c4067..f5881ee4d 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Drawing.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Drawing.json @@ -3,10 +3,13 @@ "Drawing":"绘制", "Mipmapping":"纹理映射", "Shaders":"着色器", + "The Depth And Stencil Buffer":"深度和模板缓冲区", "There are two special functions available too, one which is used for enabling or disabling the {}Draw Event{} for your project, and the other for flushing the entire draw pipeline:":"还有两个特殊函数可用,一个用于启用或禁用项目的{}绘制事件{},另一个用于刷新整个绘制管道:", + "This section contains all the functions related to drawing within the game room, as well as for controlling {}how{} things will be drawn (blending, alpha, culling, etc.). There are a great number of different functions for drawing, and they are split over the following categories to make it easier to find what you need:":"本部分包含与游戏室内绘图相关的所有功能,以及控制事物绘制的 {} 方式 {}( 混合、Alpha、剔除等)。有大量不同的绘图功能,它们分为以下类别,以便更轻松地找到您需要的功能:", "This section contains all the functions related to drawing within the game room, as well as for controlling {}how{} things will be drawn (blending, alpha, culling, etc...). There are a great number of different functions for drawing, and they are split over the following categories to make it easier to find what you need:":"此部分包含与游戏室内绘制相关的所有函数,以及用于控制{}如何绘制{}内容(混合、Alpha、剔除等等)的函数。绘制有许多不同的函数,它们分为以下几类,以便更容易地找到所需的内容:", "Video Playback":"视频播放", "{}Basic Forms{}":"{}基本绘制{}", + "{}Drawing{}":"{} 绘制 {}", "{}GPU Control{}":"{}GPU 控制{}", "{}Lighting{}":"{}光照{}", "{}Particles{}":"{}粒子{}", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_blendmode.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_blendmode.json index 4ee9db2f0..24a6de90c 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_blendmode.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_blendmode.json @@ -3,7 +3,10 @@ "Blend Mode Constant":"混合模式常量", "Max blending. Similar to additive blending.":"最大混合。类似于添加剂混合。", "Normal blending (the default blend mode).":"正常混合(默认混合模式)。", + "Reverse subtractive blending. Destination is subtracted from the source.":"反向减法混合。从源中减去目标。", + "Smaller value from source and destination is selected.":"选择源和目标中较小的值。", "Subtractive blending. Luminosity values of light areas are subtracted.":"减法混合。减去灯光区域的亮度值。", + "Subtractive blending. Source is subtracted from the destination.":"减法混合。从目标中减去源。", "The above code gets the current blend mode and if it is not {}bm_normal{} it is set to that constant.":"以上代码获取当前混合模式,如果不是{}bm_normal{},则设置为该常量。", "This function can be used to retrieve the current blend mode being used for drawing. The returned value will be one of the following constants (the default value is {}bm_normal{}):":"此函数可用于检索用于绘制的当前混合模式。返回的值将是以下常量之一(默认值为{}bm_normal{}):", "{}{}Blend Mode Constant{}{} (see above for constants)":"{}{}Blend Mode Constant{}{} (有关常量,请参见上文)" diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_colourwriteenable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_colourwriteenable.json index bfb7b0536..79f938638 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_colourwriteenable.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_colourwriteenable.json @@ -1,6 +1,8 @@ { "Array (4 elements only; see above for details)":"Array (仅限4个元素;详情见上文)", "The above code gets the current colour write values and then sets the alpha component to {}false{}.":"以上代码获取当前颜色写入值,然后将Alpha组件设置为{}false{}。", + "The function returns a 4 element 1D array with the following elements in it which will be either {}true{} (enabled) or {}false{} (disabled). By default all colour writing is set to {}true{}:":"该函数返回一个 4 元素一维数组,其中包含以下元素,这些元素可以是 {}true{}( 启用) 或 {}false{}( 禁用)。默认情况下,所有颜色写入均设置为 {}true{}:", + "This function can be used to retrieve the current colour write-enable values.":"此函数可用于检索当前颜色写入启用值。", "This function can be used to retrieve the current colour write-enable values. The function returns a 4 element 1D array with the following elements in it which will be either {}true{} (enabled) or {}false{} (disabled). By default all colour writing is set to {}true{}:":"此函数可用于检索当前彩色写入启用值。函数返回一个 4 元素 1D 数组,其中包含以下元素:{}true{} (已启用) 或 {}false{} (已禁用)。默认情况下,所有彩色写入均设置为 {}true{}:", "[0] = Red channel enabled/disabled":"[0] = 红色通道启用 / 禁用", "[1] = Green channel enabled/disabled":"[1] = 绿色通道启用 / 禁用", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_scissor.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_scissor.json new file mode 100644 index 000000000..b4cf9b0c4 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_scissor.json @@ -0,0 +1,8 @@ +{ + "The X position of the scissor region":"剪刀区域的 X 位置", + "The Y position of the scissor region":"剪刀区域的 Y 位置", + "The height of the scissor region":"剪刀区域的高度", + "The width of the scissor region":"剪刀区域的宽度", + "This function returns the current scissor region as a struct with the following members:":"此函数将当前剪刀区域作为具有以下成员的结构体返回:", + "This gets the current scissor region and stores it in a local variable. It then changes the scissor region, draws something, and resets the scissor region to what it was before the {}gpu_set_scissor(){} call.":"这会获取当前的剪刀区域并将其存储在局部变量中。然后,它会更改剪刀区域、绘制某些内容,并将剪刀区域重置为调用 {}gpu_set_scissor(){} 之前的状态。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_sprite_cull.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_sprite_cull.json new file mode 100644 index 000000000..3e4f6264b --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_sprite_cull.json @@ -0,0 +1,4 @@ +{ + "The above code calls {}{}gpu_get_sprite_cull{}{} to retrieve whether sprites are currently culled against the view frustum when they\u0027re drawn. The value is stored in a temporary variable {}_cull_sprites{}.":"上面的代码调用 {}{}gpu_get_sprite_cull{}{} 来检索精灵在绘制时是否针对视锥体进行剔除。该值存储在临时变量 {}_cull_sprites{} 中。", + "This function returns whether (frustum) culling of sprites and tile maps is enabled or not. It is enabled by default.":"此函数返回是否启用精灵和图块地图的 (视锥体) 剔除。默认情况下它是启用的。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_state.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_state.json index a4d2455f6..790c38725 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_state.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_state.json @@ -1,4 +1,6 @@ { "The above code stores the current GPU state in a variable.":"上述代码将当前 GPU 状态存储在变量中。", + "This can then be manipulated or even saved, and you can return this map to the GPU using the function {}{}gpu_set_state{}{}.":"然后可以对其进行操作甚至保存,并且您可以使用函数 {}{}gpu_set_state{}{} 将此映射返回给 GPU。", + "This function gets the current GPU state and returns it as a {}DS Map{}.":"此函数获取当前 GPU 状态并将其作为 {}DS Map{} 返回。", "This function will get the current GPU state, returning it as a {}DS Map{}. This can then be manipulated or even saved, and you can return this map to the GPU using the function {}{}gpu_set_state(){}{}.":"此函数将获取当前 GPU 状态,将其作为 {}DS 映射 {} 返回。 然后可以操作甚至保存此映射,并且可以使用函数 {}{}gpu_set_state(){}{} 将此映射返回 GPU。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_depth_fail.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_depth_fail.json new file mode 100644 index 000000000..1d50c876a --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_depth_fail.json @@ -0,0 +1,4 @@ +{ + "The above code gets the stencil operation that\u0027s performed {}when the stencil test passes but the depth test fails.{}":"上述代码获取当模板测试通过但深度测试失败时执行的模板操作。{}", + "This function gets the stencil operation that\u0027s executed {}when the stencil test passes but the depth test fails.{}":"此函数获取当模板测试通过但深度测试失败时执行的模板操作。{}" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_enable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_enable.json new file mode 100644 index 000000000..5c4953399 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_enable.json @@ -0,0 +1,4 @@ +{ + "The code above retrieves whether the stencil test is currently enabled with a call to {}{}gpu_get_stencil_enable{}{} and stores the result in a temporary variable {}_enabled{}.":"上述代码通过调用 {}{}gpu_get_stencil_enable{}{} 来检索当前是否启用了模板测试,并将结果存储在临时变量 {}_enabled{} 中。", + "This function returns whether the stencil test is currently enabled.":"此函数返回当前是否启用了模板测试。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_fail.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_fail.json new file mode 100644 index 000000000..d9e5d9011 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_fail.json @@ -0,0 +1,4 @@ +{ + "The code above first gets the current stencil fail operation and stores it in a temporary variable {}_op_current{}. It then sets the stencil fail operation to {}stencilop_replace{} with a call to {}{}gpu_set_stencil_fail{}{}. After that, it draws a disk of radius 10 at position (20, 20). Finally, it resets the stencil fail operation to the value stored in {}_op_current{}.":"上面的代码首先获取当前模板失败操作并将其存储在临时变量 {}_op_current{} 中。然后,它通过调用 {4}{5}gpu_set_stencil_fail{6}{7} 将模板失败操作设置为 {}stencilop_replace{}。之后,它在位置 (20, 20) 处绘制一个半径为 10 的圆盘。最后,它将模板失败操作重置为存储在 {}_op_current{} 中的值。", + "This function retrieves the stencil operation that\u0027s performed when the stencil test fails.":"此函数检索模板测试失败时执行的模板操作。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_func.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_func.json new file mode 100644 index 000000000..aa06cef3b --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_func.json @@ -0,0 +1,4 @@ +{ + "The above code calls {}{}gpu_get_stencil_func{}{} to get the stencil function that\u0027s currently used and stores the result in a temporary variable {}_func{}.":"上述代码调用 {}{}gpu_get_stencil_func{}{} 来获取当前使用的模板函数,并将结果存储在临时变量 {}_func{} 中。", + "This function gets the comparison function currently used for comparisons in the stencil buffer.":"该函数获取当前用于模板缓冲区中比较的比较函数。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_pass.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_pass.json new file mode 100644 index 000000000..c7337c0fd --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_stencil_pass.json @@ -0,0 +1,5 @@ +{ + "The above code gets the stencil operation that\u0027s used when the stencil test passes and stores it in a local variable {}_pass_op{} for further use.":"上述代码获取模板测试通过时使用的模板操作,并将其存储在局部变量 {}_pass_op{} 中以供进一步使用。", + "The default operation performed when the stencil test passes is {}stencilop_keep{}.":"模板测试通过时执行的默认操作是 {}stencilop_keep{}。", + "This function gets the operation that\u0027s performed on pixels for which the stencil test passes.":"此函数获取对模板测试通过的像素执行的操作。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_zfunc.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_zfunc.json index 0d2677b7e..a55a06ef3 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_zfunc.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_zfunc.json @@ -10,5 +10,7 @@ "Never":"从不", "Not Equal":"不等于", "The above code checks to see if the z-testing method is set to {}cmpfunc_greater{} and if not then it is set to that constant.":"以上代码检查z-测试方法是否设置为{}cmpfunc_greater{},如果不是,则将其设置为该常量。", + "The value returned will be one of the following constants (the default value is {}{}cmpfunc_lessequal{}{}):":"返回的值将是以下常量之一 (默认值为 {}{}cmpfunc_lessequal{}{}):", + "This function can be used to retrieve the z comparison mode, i.e. the comparison to use for {}The Depth Test{}.":"此函数可用于检索 z 比较模式,即用于 {} 深度测试 {} 的比较。", "This function can be used to retrieve the z comparison mode. The value returned will be one of the following constants (the default value is {}cmpfunc_lessequal{}):":"此函数可用于检索Z比较模式。返回的值将是以下常量之一(默认值为{}cmpfunc_lessequal{}):" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_ztestenable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_ztestenable.json index 8b301b3d7..9373aa504 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_ztestenable.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_ztestenable.json @@ -1,4 +1,6 @@ { "The above code checks to see if z-testing is enabled or not and if it is disabled it is then enabled again.":"上述代码检查z-测试是否已启用,以及是否已禁用,然后再次启用。", + "The default value is that z-testing is {}disabled{}, so the function will return {}false{}.":"默认值是 z 测试已 {} 禁用 {},因此该函数将返回 {}false{}。", + "This function can be used to retrieve whether z-testing is enabled (the function returns {}true{}) or not (the function returns {}false{}).":"此函数可用于检索 z 测试是否已启用 (该函数返回 {}true{}) 或未启用 (该函数返回 {}false{})。", "This function can be used to retrieve whether z-testing is enabled (the function returns {}true{}) or not (the function returns {}false{}). The default value is that z-testing is {}disabled{}, so the function will return {}false{}.":"此函数可用于检索是否启用Z-测试(函数返回{}true{})(函数返回{}false{})。默认值为Z-测试被{}禁用{},因此函数将返回{}false{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_zwriteenable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_zwriteenable.json index de6e94827..75b127a84 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_zwriteenable.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_zwriteenable.json @@ -1,4 +1,6 @@ { "The above code checks to see if z-writing is enabled or not and if it is disabled it is then enabled again.":"上述代码检查是否启用了Z写操作,如果禁用了Z写操作,则会再次启用。", + "The default value is that z-writing is {}enabled{}, so the function will return {}true{}.":"默认值是 z 写入已 {} 启用 {},因此该函数将返回 {}true{}。", + "This function can be used to retrieve whether z-writing is enabled (the function returns {}true{}) or not (the function returns {}false{}).":"此函数可用于检索是否启用 z 写入 (该函数返回 {}true{}) 或未启用 (该函数返回 {}false{})。", "This function can be used to retrieve whether z-writing is enabled (the function returns {}true{}) or not (the function returns {}false{}). The default value is that z-writing is {}enabled{}, so the function will return {}true{}.":"此函数可用于检索是否启用Z-写入(函数返回{}true{})(函数返回{}false{})。默认值为Z-写入为{}启用{},因此函数将返回{}true{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendequation_sepalpha.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendequation_sepalpha.json new file mode 100644 index 000000000..67b0503a6 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendequation_sepalpha.json @@ -0,0 +1,15 @@ +{ + "Add both together (the default equation).":"将两者相加 (默认方程)。", + "Blend mode equation used for RGB components.":"用于 RGB 分量的混合模式方程。", + "Blend mode equation used for the alpha component.":"用于 alpha 分量的混合模式方程。", + "Subtract destination from source.":"从源中减去目的地。", + "Subtract source from destination.":"从目的地减去源。", + "The blending here will function as the following: it will multiply the source pixel with the source alpha, and the destination pixel with 1 (keeping it the same as it was). It will then subtract the source RGB from the destination RGB, and use whichever alpha value is larger.":"这里的混合将按如下方式运行:它将源像素与源 Alpha 相乘,并将目标像素与 1 相乘 (保持与原来相同)。然后,它将从目标 RGB 中减去源 RGB,并使用较大的 alpha 值。", + "This changes the blend mode factors and then the equation, draws a circle and resets both the blend mode and equation (by switching to the normal blend mode) so they don\u0027t affect things drawn after this.":"这会更改混合模式因子,然后更改方程,绘制一个圆并重置混合模式和方程 (通过切换到正常混合模式),以便它们不会影响此后绘制的内容。", + "This function is the same as {}{}gpu_set_blendequation{}{}, however it allows you to set two separate equations: the first one is used for the RGB components of the source and destination, and the second one is used for the alpha component.":"此函数与 {}{}gpu_set_blendequation{}{} 相同,但它允许您设置两个单独的方程:第一个用于源和目标的 RGB 分量,第二个用于 Alpha 成分。", + "To help you get the most from blend modes and to help understand how they work and how they affect the final image being drawn to the screen, we recommend that you read the following guide:":"为了帮助您充分利用混合模式并帮助了解它们的工作原理以及它们如何影响绘制到屏幕上的最终图像,我们建议您阅读以下指南:", + "Use whichever value is larger.":"使用较大的值。", + "Use whichever value is smaller.":"使用较小的值。", + "You can choose from the following equations for each:":"您可以从以下方程中为每个方程进行选择:", + "{}{}IMPORTANT{}{} {}Blend factors{} are not applied when {}bm_eq_min{} or {}bm_eq_max{} is used as the blend equation, which is effectively the same as using {}bm_one{} as the factors.":"{}{} 重要{}{} 当使用 {}bm_eq_min{} 或 {}bm_eq_max{} 作为混合方程时,不会应用 {} 混合因子{},这实际上与使用 {}bm_one{} 作为混合方程相同的因素。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode.json index ddf9d35bd..b0c57f856 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode.json @@ -1,14 +1,21 @@ { "Additive blending. Luminosity values of light areas are added.":"添加剂混合。将添加灯光区域的亮度值。", + "As you can see from the above table, these blend modes are really composites of {}extended{} blend modes which can be found on the page describing {}{}gpu_set_blendmode_ext(){}{}. Some of them also make use of a different {}blend equation{}.":"从上表中可以看出,这些混合模式实际上是 {} 扩展 {} 混合模式的组合,可以在描述 {}{}gpu_set_blendmode_ext(){}{} 的页面上找到这些模式。其中一些还使用不同的 {} 混合方程 {}。", "As you can see from the above table, these four blend modes are really composites of {}extended{} blend modes which can be found on the page describing {}{}gpu_set_blendmode_ext(){}{}.":"如上表所示,这四种混合模式实际上是{}扩展{}混合模式的组合,可在描述{}{}gpu_set_blendmode_ext(){}{}的页面上找到。", "Blend Mode Constant":"混合模式常量", + "Each component of the colours is stored as a floating point value between 0 and 1, and the new colour is calculated by multiplying each component of the source colour by some factor and by multiplying each component of destination colour by some other factor and then adding the results together component by component. The source and destination can also be mixed differently depending on the selected {}equation{}.":"颜色的每个分量存储为 0 到 1 之间的浮点值,新颜色的计算方法是将源颜色的每个分量乘以某个因子,将目标颜色的每个分量乘以某个其他因子,然后加上结果逐个组件组合在一起。源和目标也可以根据所选的 {} 方程 {} 进行不同的混合。", "Guide To Using Blendmodes":"混合模式使用指南", "Max blending. Similar to additive blending.":"最大混合。类似于添加剂混合。", "Normal blending (the default blend mode).":"正常混合(默认混合模式)。", + "Reverse subtractive blending. Destination is subtracted from the source.":"反向减法混合。从源中减去目标。", + "Smaller value from source and destination is selected.":"选择源和目标中较小的值。", "Subtractive blending. Luminosity values of light areas are subtracted.":"减法混合。减去灯光区域的亮度值。", + "Subtractive blending. Source is subtracted from the destination.":"减法混合。从目标中减去源。", "The blend mode to use (see the table above)":"要使用的混合模式(请参见上表)", "This function permits you to set the blend mode in four basic ways using the following constants:":"此函数允许您使用以下常量以四种基本方式设置混合模式:", + "This function permits you to set the blend mode in six basic ways using the following constants:":"此函数允许您使用以下常量以六种基本方式设置混合模式:", "This will turn the black into transparency, creating a \u0027glow\u0027 effect from the white being strong on the outside and gradually weakening further from the circle centre. The blend mode is reset after the circle is drawn to ensure additive blending is not also applied to everything else after it.":"这将使黑色变成透明,从白色在外面强烈到从圆心逐渐减弱的\u0027发光\u0027效果。绘制圆之后将重置混合模式,以确保在绘制圆之后不会将添加混合应用于其他任何对象。", "To help you get the most from blend modes and to help understand how they work and how they affect the final image being drawn to the screen, we recommend that you read the following guide:":"为了帮助您充分利用混合模式,并帮助您了解它们如何工作以及它们如何影响绘制到屏幕的最终图像,建议您阅读以下指南:", + "When {}GameMaker{} goes to draw a pixel there is a source colour (the colour of the pixel we\u0027re going to draw) and a destination colour (the colour that\u0027s already in the pixel we\u0027re drawing to), so when determining the new colour of the pixel, the source and destination colours are calculated according to the chosen blend mode.":"当 {}GameMaker{} 绘制像素时,会存在源颜色 (我们要绘制的像素的颜色) 和目标颜色 (我们要绘制到的像素中已有的颜色),因此当确定像素的新颜色后,将根据所选的混合模式计算源颜色和目标颜色。", "When {}GameMaker{} goes to draw a pixel there is a source colour (the colour of the pixel we\u0027re going to draw) and a destination colour(the colour that\u0027s already in the pixel we\u0027re drawing to), so when determining the new colour of the pixel, the source and destination colours are calculated according to the chosen blend mode. Each component of the colours is stored as a floating point value between 0 and 1, and the new colour is calculated by multiply each component of the source colour by some factor and by multiplying each component of destination colour by some other factor and then adding the results together component by component.":"{}GameMaker{}在绘制像素时,会显示源颜色(我们要绘制的像素的颜色)和目标颜色(我们要绘制的像素中已有的颜色),因此在确定像素的新颜色时,会根据所选的混合模式计算源颜色和目标颜色。将颜色的每个分量存储为介于0和1之间的浮点值,并且通过将源颜色的每个分量乘以某个因子,并通过将目标颜色的每个分量乘以某个其他因子,然后将结果与分量相加来计算新颜色。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode_ext.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode_ext.json index 5fb17970a..a1b887f69 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode_ext.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode_ext.json @@ -1,12 +1,16 @@ { "Blend Mode Factor Constant":"混合模式系数常量", "Destination blend mode factor (see constants above)":"目标混合模式因子(参见上面的常量)", + "Destination blend mode factor (see constants above).":"目标混合模式因子 (请参阅上面的常量)。", + "Each component of the colours is stored as a floating point value between 0 and 1, and the new colour is calculated by multiplying each component of the source colour by some factor and by multiplying each component of destination colour by some other factor and then adding the results together component by component (or using a different {}equation{}).":"颜色的每个分量存储为 0 到 1 之间的浮点值,新颜色的计算方法是将源颜色的每个分量乘以某个因子,将目标颜色的每个分量乘以某个其他因子,然后加上逐个组件 (或使用不同的 {} 方程 {}) 将结果组合在一起。", "Guide To Using Blendmodes":"混合模式使用指南", "Note that you can either supply two individual arguments to this function or you can supply an array of arguments (as returned by the function {}{}gpu_get_blendmode_ext(){}{} for example). If supplying an array it should have the following two elements:":"请注意,您可以为此函数提供两个单独的参数,也可以提供一个参数数组(例如,由函数{}{}gpu_get_blendmode_ext(){}{}返回)。如果提供数组,则应具有以下两个元素:", "Source blend mode factor (see constants above).":"源混合模式因子(请参见上面的常量)。", + "This function permits you to set how the different component parts that should be factored together to create a custom blend mode. The source and destination both have a red, green, blue and alpha component, and in the following chart the source\u0027s RGBA are considered (Rs, Gs, Bs, As) while the destination\u0027s are (Rd, Gd, Bd, Ad). The eleven constants that are available for use can be either source or destination (or both) when used in this function.":"此功能允许您设置如何将不同的组成部分组合在一起以创建自定义混合模式。源和目标都具有红色、绿色、蓝色和 alpha 分量,在下图中,源的 RGBA 被视为 (Rs、Gs、Bs、As),而目标的 RGBA 被视为 (Rd、Gd、Bd、Ad)。在此函数中使用时,可用的 11 个常量可以是源或目标 (或两者)。", "This function permits you to set the different component parts that should be factored together to create a custom blend mode. The source and destination both have a red, green, blue and alpha component, and in the following chart the source\u0027s RGBA are considered (Rs, Gs, Bs, As) while the destination\u0027s are (Rd, Gd, Bd, Ad). The eleven constants that are available for use can be either source or destination (or both) when used in this function.":"此函数允许您设置不同的零部件,这些零部件应该被系数化在一起以创建自定义混合模式。源和目的地都有红色、绿色、蓝色和Alpha分量,在下表中,源的 RGBA 被视为(R、G、B、As),而目的地的 RGBA 被视为(Rd、Gd、Bd、Ad)。在此函数中使用时,可用的十一个常量可以是源或目标(或两者)。", "This will turn the black into transparency, creating a \u0027glow\u0027 effect from the white being strong on the outside and gradually weakening further from the circle centre. The blend mode is reset after the circle is drawn to ensure additive blending is not also applied to everything else after it.":"这将使黑色变成透明,从白色在外面强烈到从圆心逐渐减弱的\u0027发光\u0027效果。绘制圆之后将重置混合模式,以确保在绘制圆之后不会将添加混合应用于其他任何对象。", "To help you get the most from blend modes and to help understand how they work and how they affect the final image being drawn to the screen, we recommend that you read the following guide:":"为了帮助您充分利用混合模式,并帮助您了解它们如何工作以及它们如何影响绘制到屏幕的最终图像,建议您阅读以下指南:", + "When {}GameMaker{} goes to draw a pixel there is a source colour (the colour of the pixel we\u0027re going to draw) and a destination colour (the colour that\u0027s already in the pixel we\u0027re drawing to), so when determining the new colour of the pixel, the source and destination colours are calculated according to the chosen blend mode.":"当 {}GameMaker{} 绘制像素时,会存在源颜色 (我们要绘制的像素的颜色) 和目标颜色 (我们要绘制到的像素中已有的颜色),因此当确定像素的新颜色后,将根据所选的混合模式计算源颜色和目标颜色。", "When {}GameMaker{} goes to draw a pixel there is a source colour (the colour of the pixel we\u0027re going to draw) and a destination colour (the colour that\u0027s already in the pixel we\u0027re drawing to), so when determining the new colour of the pixel, the source and destination colours are calculated according to the chosen blend mode. Each component of the colours is stored as a floating point value between 0 and 1, and the new colour is calculated by multiply each component of the source colour by some factor and by multiplying each component of destination colour by some other factor and then adding the results together component by component.":"{}GameMaker{}在绘制像素时,会显示源颜色(我们要绘制的像素的颜色)和目标颜色(我们要绘制的像素中已有的颜色),因此在确定像素的新颜色时,会根据所选的混合模式计算源颜色和目标颜色。将颜色的每个分量存储为介于0和1之间的浮点值,并且通过将源颜色的每个分量乘以某个因子,并通过将目标颜色的每个分量乘以某个其他因子,然后将结果与分量相加来计算新颜色。", "[0] = Source blend mode (default is {}bm_src_alpha{})":"[ 0 ]=源混合模式(默认为{}bm_src_alpha{})", "[1] = Destination blend mode (default is {}bm_inv_src_alpha{})":"[ 1 ]=目标混合模式(默认为{}bm_inv_src_alpha{})", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode_ext_sepalpha.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode_ext_sepalpha.json index a6b4574c8..9580657ca 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode_ext_sepalpha.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_blendmode_ext_sepalpha.json @@ -19,5 +19,6 @@ "[1] = Destination blend mode minus the alpha component (default is {}bm_inv_src_alpha{} (1-As, 1-As, 1-As))":"[1] = 目标混合模式减去 Alpha 分量 (默认为 {}bm_inv_src_alpha{}(1-As,1-As,1-As))", "[2] = Source alpha component (default is {}bm_src_alpha{} (As))":"[2] = 源 Alpha 组件 (默认为 {}bm_src_alpha{}(As))", "[3] = Destination alpha component (default is {}bm_inv_src_alpha{} (1-As))":"[3] = 目标 Alpha 组件 (默认为 {}bm_inv_src_alpha{}(1-As))", + "{}IMPORTANT!{} HTML5 without WebGL enabled will {}not{} be able to display following modes correctly:":"{} 重要提示!{} 未启用 WebGL 的 HTML5 将 {} 无法 {} 正确显示以下模式:", "{}IMPORTANT!{} HTML5 without WebGL enabled will {}not{} be able to display use following modes correctly:":"{}重要!{}未启用WebGL的HTML5将无法{}正确显示以下使用模式:" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_colourwriteenable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_colourwriteenable.json index d8732ad55..5501f6198 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_colourwriteenable.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_colourwriteenable.json @@ -2,6 +2,7 @@ "Enable/disable the red channel, or an array containing all four values":"启用/禁用红色通道或包含全部四个值的数组", "The above code gets the current colour write values and then sets the alpha component to {}false{}.":"以上代码获取当前颜色写入值,然后将Alpha组件设置为{}false{}。", "The default value for each of the components is {}true{}, and can be supplied as either four unique arguments or as a 4 element 1D array with the following elements in it which will be either {}true{} (enabled) or {}false{} (disabled):":"每个组件的默认值为{}true{},并且可以作为四个唯一参数提供,也可以作为包含以下元素的4 element 1D数组提供,这些元素将为{}true{}(已启用)或{}false{}(已禁用):", + "With this function you can switch on or off the colour channels and the alpha channel for all further drawing. For example, you can use this function to create alpha channel only surfaces (switch off the RGB writing before using the surface), or to create special effects while drawing to the screen.":"使用此功能,您可以打开或关闭颜色通道和 Alpha 通道以进行所有进一步的绘制。例如,您可以使用此函数创建仅 alpha 通道的表面 (在使用表面之前关闭 RGB 写入),或者在绘制到屏幕时创建特殊效果。", "With this function you can switch on or off the colour channels and the alpha channel for all further drawing. For example, you can use this function to create alpha-channel only surfaces (switch off the RGB writing before using the surface), or to create special effects while drawing to the screen.":"使用此函数,您可以打开或关闭颜色通道和 Alpha 通道,以便进一步绘制。例如,您可以使用此函数创建仅 Alpha 通道的表面 (在使用表面之前关闭 RGB 写入),或者在绘制到屏幕时创建特殊效果。", "[0] = Red channel enabled/disabled":"[0] = 红色通道启用 / 禁用", "[1] = Green channel enabled/disabled":"[1] = 绿色通道启用 / 禁用", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_depth.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_depth.json index 7cda3e24a..9d1251537 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_depth.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_depth.json @@ -11,6 +11,7 @@ "This function sets the depth (i.e. the z coordinate) for {}GameMaker{}\u0027s 2D drawing functions (sprites, shapes, primitives, text, etc.)":"此函数为{}GameMaker{}的2D绘图功能(精灵、形状、图元、文本等)设置深度(即z坐标)。", "{}By default, {}GameMaker{} uses the layer\u0027s depth when drawing flat graphics, but this function allows you to use your own. This can be used to draw at a different depth, or draw individual sprites/primitives at their own depths.{}":"{}默认情况下,{}GameMaker{} 在绘制平面图形时使用层的深度,但此功能允许您使用自己的深度。此功能可用于在不同的深度绘制,或在各自的深度绘制单个精灵/图元。{}", "{}{}IMPORTANT{}{} This function doesn\u0027t change the depth of the layer when called in a layer begin script (see {}{}layer_script_begin{}{}). If you need to change the depth of a specific layer in the layer begin script you should do so using {}{}layer_force_draw_depth{}{} instead.":"{}{} 重要信息{}{} 在层开始脚本中调用此函数时,不会更改层的深度 (请参阅 {}{}layer_script_begin{}{})。如果您需要更改图层开始脚本中特定图层的深度,您应该使用 {}{}layer_force_draw_depth{}{} 来执行此操作。", + "{}{}IMPORTANT{}{} This function doesn\u0027t change the depth of the layer when called in a layer begin script (see {}{}layer_script_begin{}{}). If you need to change the depth of a specific layer in the layer begin script you should do so using {}{}layer_force_draw_depth{}{} instead.{} {} Also note that the depth set with {}{}layer_force_draw_depth{}{} will take precedence over the depth set in this function. ":"{}{} 重要{}{} 在层开始脚本中调用此函数时,不会更改层的深度 (请参阅 {}{}layer_script_begin{}{})。如果您需要更改图层开始脚本中特定图层的深度,则应使用 {}{}layer_force_draw_depth{}{} 来实现。{}{} 另请注意,使用 {}{}layer_force_draw_depth{}{} 设置的深度将优先于该函数中设置的深度。", "{}{}NOTE{}{} Depth values are approximate. If you try to draw things at depth values close to the maximum depth and minimum depth, they may not be drawn due to inaccuracies introduced by the calculations.":"{}{} 注意{}{} 深度值是近似值。如果您尝试以接近最大深度和最小深度的深度值绘制事物,则可能会由于计算引入的不准确性而无法绘制它们。", "{}{}NOTE{}{} {}GameMaker{}{} only changes the depth when it starts drawing a new layer, so you may want to restore the original depth (saved previously from {}{}gpu_get_depth{}{}{}{}) after you\u0027re done drawing, so any subsequent calls will not be affected by your depth change.{}":"{}{} 注意{}{}{}GameMaker{}{} 仅在开始绘制新图层时更改深度,因此您可能需要恢复原始深度 (之前从 {}{}gpu_get_depth{}{} 保存 ){}{}) 在您完成绘制后,因此任何后续调用都不会受到深度更改的影响。{}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_scissor.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_scissor.json new file mode 100644 index 000000000..90f88f513 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_scissor.json @@ -0,0 +1,10 @@ +{ + "Coordinates are rounded to integers and are local to the render target region, i.e. {}(0, 0){} is the top-left corner of the surface you are drawing to.":"坐标四舍五入为整数,并且是渲染目标区域的本地坐标,即 {}(0, 0){} 是您要绘制的表面的左上角。", + "The X position of the scissor region, or a struct containing {}x{}, {}y{}, {}w{}, {}h{}":"剪刀区域的 X 位置,或包含 {}x{}、{}y{}、{}w{}、{}h{} 的结构体", + "This function defines a rectangular \"scissor\" region within the {}render target{}. Anything you draw after this function will only be output within the scissor region, essentially being cropped, as anything outside of it will be \"cut out\".":"此函数在 {} 渲染目标 {} 内定义一个矩形 \" 剪刀 \" 区域。在此函数之后绘制的任何内容都只会在剪刀区域内输出,本质上会被裁剪,因为剪裁区域之外的任何内容都会被 \" 剪掉\"。", + "This gets the current scissor region and stores it in a local variable. It then changes the scissor region, draws something, and resets the scissor region to what it was before the {}gpu_set_scissor(){} call.":"这会获取当前的剪刀区域并将其存储在局部变量中。然后,它会更改剪刀区域、绘制某些内容,并将剪刀区域重置为调用 {}gpu_set_scissor(){} 之前的状态。", + "{}{}NOTE{}{} Changing the surface target or viewport will reset the scissor region to cover the entirety of the new render target.":"{}{} 注意{}{} 更改表面目标\u200B\u200B或视口将重置剪刀区域以覆盖整个新渲染目标。", + "{}{}OPTIONAL{}{} The Y position of the scissor region, must be specified if first argument is not a struct":"{}{} 可选{}{} 如果第一个参数不是结构体,则必须指定剪刀区域的 Y 位置", + "{}{}OPTIONAL{}{} The height of the scissor region, must be specified if first argument is not a struct":"{}{} 可选{}{} 如果第一个参数不是结构体,则必须指定剪刀区域的高度", + "{}{}OPTIONAL{}{} The width of the scissor region, must be specified if first argument is not a struct":"{}{} 可选{}{} 如果第一个参数不是结构体,则必须指定剪刀区域的宽度" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_sprite_cull.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_sprite_cull.json index 79ecf7c6c..2464bfa17 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_sprite_cull.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_sprite_cull.json @@ -1,10 +1,18 @@ { "(View) Frustum Culling":"(视图) 视锥体剔除", + "Any sprites that are fully outside of the Camera View (or Frustum) are culled, i.e. not submitted to the GPU for drawing":"任何完全位于相机视图 (或视锥体) 之外的精灵都会被剔除,即不会提交给 GPU 进行绘制", "The above code enables sprite frustum culling in the Create event of an object.":"上面的代码在对象的 Create 事件中启用了精灵平截头体剔除。", "The {}view frustum{} is the region of the game world that a camera sees. It is determined by the camera\u0027s position and orientation in the game world as well as by the projection it has set: ":"{} 视锥体 {} 是相机看到的游戏世界区域。它由摄像机在游戏世界中的位置和方向以及它设置的投影决定:", + "This function sets whether (frustum) culling of sprites and tile maps is enabled globally or not. It is enabled by default.":"此函数设置是否全局启用精灵和图块地图的 (视锥体) 剔除。默认情况下它是启用的。", "This function sets whether (frustum) culling of sprites is enabled globally or not.":"此函数设置是否全局启用精灵 (视锥体) 剔除。", + "Tile maps are culled in a different way than sprites: only {}the tiles in the tile map that fall into a rectangle defined by the intersection of the room borders and the viewport rectangle are drawn.{}":"图块地图的剔除方式与精灵不同:{} 仅绘制图块地图中落入由房间边界与视口矩形的交集定义的矩形内的图块。{}", + "To determine if a sprite is visible {}GameMaker{} calculates a sphere around the sprite and checks if this sphere is inside the view frustum. When the sphere is fully outside of it, the sprite must be, too, and is culled, i.e. not submitted for drawing.":"为了确定精灵是否可见,{}GameMaker{} 会计算精灵周围的球体并检查该球体是否位于视锥体内。当球体完全位于其外部时,精灵也必须位于其外部,并且被剔除,即不提交进行绘制。", + "View frustum culling is one type of visibility culling, where the CPU checks if a shape is inside the view frustum or not.":"视锥体剔除是可见性剔除的一种类型,其中 CPU 检查形状是否位于视锥体内部。", + "When enabled, sprites are checked against the view frustum on the CPU and {}culled{} (i.e. removed) if they\u0027re fully outside. Sprites that are culled are not submitted to the GPU (i.e. drawn).":"启用后,系统会根据 CPU 上的视锥体检查精灵,如果精灵完全位于外部,则将其 {} 剔除 {}( 即删除)。被剔除的精灵不会提交给 GPU(即绘制)。", "When enabled, sprites will be {}culled{} against the view frustum, i.e. they\u0027re not submitted to the GPU and aren\u0027t drawn when fully out of sight.":"启用后,精灵将针对视锥体进行 {} 剔除 {},即它们不会提交给 GPU,并且在完全看不见时也不会进行绘制。", "Whether to enable sprite culling globally":"是否全局启用精灵剔除", "in case of a {}perspective{} {}projection{} it is a truncated pyramid shape.":"如果是 {} 透视 {}{} 投影 {},则它是截棱锥形状。", - "in case of an {}orthographic projection{} it is a box shape.":"如果是 {} 正交投影 {},则它是一个盒子形状。" + "in case of an {}orthographic projection{} it is a box shape.":"如果是 {} 正交投影 {},则它是一个盒子形状。", + "{}{}NOTE{}{} Sprite culling applies to all sprites that are drawn in your game, either manually using the {}draw_sprite_*{} functions, as elements on asset layers or as part of sequences.":"{}{} 注意{}{} 精灵剔除适用于游戏中绘制的所有精灵,无论是使用 {}draw_sprite_*{} 函数手动绘制,还是作为资产层上的元素或作为序列的一部分。", + "{}{}NOTE{}{} The sprite\u0027s scale factor and the {}world matrix{} are taken into account when performing sprite culling.":"{}{} 注意 {}{} 执行精灵剔除时会考虑精灵的比例因子和 {} 世界矩阵 {}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_state.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_state.json index 1e47e79db..4ccb0d81e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_state.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_state.json @@ -1,5 +1,44 @@ { + "A bitmask consisting of 4 bits, ordered ABGR, where each bit indicates whether the channel is written to or not. Corresponds to {}{}gpu_set_colourwriteenable{}{}.":"由 4 位组成的位掩码,有序 ABGR,其中每个位指示通道是否被写入。对应于 {}{}gpu_set_colourwriteenable{}{}。", + "A {}read-only{} value that indicates the comparison function used by {}GameMaker{} for the alpha test. Always set to {}cmpfunc_greater{}.":"一个 {} 只读 {} 值,指示 {}GameMaker{} 用于 Alpha 测试的比较函数。始终设置为 {}cmpfunc_greater{}。", + "A {}read-only{} value that indicates whether separate blend mode factors for the RGB and alpha channels are enabled. It will be {}true{} if you\u0027ve set the blend mode using {}{}gpu_set_blendmode_ext_sepalpha{}{}, {}false{} in all other cases.":"一个 {} 只读 {} 值,指示是否启用 RGB 和 Alpha 通道的单独混合模式因子。如果您使用 {}{}gpu_set_blendmode_ext_sepalpha{}{} 设置混合模式,则该值为 {2}true{3}; 在所有其他情况下,该值为 {}false{}。", + "An 8 bit bitmask that determines the bits to compare in the stencil test. As set with {}{}gpu_set_stencil_read_mask{}{}.":"8 位位掩码,用于确定在模板测试中要比较的位。使用 {}{}gpu_set_stencil_read_mask{}{} 设置。", + "An 8 bit bitmask that determines which bits in the stencil buffer can be written to. As set with {}{}gpu_set_stencil_write_mask{}{}.":"8 位位掩码,确定可以写入模板缓冲区中的哪些位。使用 {}{}gpu_set_stencil_write_mask{}{} 设置。", "The GPU state to set as a {}DS Map{}.":"要设置为 {}DS 映射 {} 的 GPU 状态。", "The above code sets the GPU state using the map supplied in the variable \"gpu_map\".":"上述代码使用变量 \"gpu_map\" 中提供的映射设置 GPU 状态。", - "This function will set the current GPU state using the passed-in {}DS Map{}. The supplied map can be created using the function {}{}gpu_get_state(){}.{}":"此函数将使用传入的 {}DS 映射 {} 设置当前 GPU 状态。可以使用函数 {}{}gpu_get_state(){}{} 创建提供的映射。" + "The above code sets the GPU state using the map supplied in the variable {}gpu_map{}.":"上述代码使用变量 {}gpu_map{} 中提供的映射设置 GPU 状态。", + "The backface culling mode. As set with {}{}gpu_set_cullmode{}{}.":"背面剔除模式。使用 {}{}gpu_set_cullmode{}{} 设置。", + "The bias value to use for mipmapping. As set with {}{}gpu_set_tex_mip_bias{}{}.":"用于 mipmap 的偏差值。使用 {}{}gpu_set_tex_mip_bias{}{} 设置。", + "The comparison function to use for the stencil test. As set with {}{}gpu_set_stencil_func{}{}.":"用于模板测试的比较功能。使用 {}{}gpu_set_stencil_func{}{} 设置。", + "The comparison function to use for z-testing. As set with {}{}gpu_set_zfunc{}{}.":"用于 z 测试的比较函数。使用 {}{}gpu_set_zfunc{}{} 设置。", + "The destination blend mode factor of the alpha channel.":"Alpha 通道的目标混合模式因子。", + "The destination blend mode factor.":"目标混合模式因子。", + "The distance at which the fog ends. The fourth element in the array passed to {}{}gpu_set_fog{}{}.":"雾结束的距离。数组中的第四个元素传递给 {}{}gpu_set_fog{}{}。", + "The distance at which the fog starts. The third element in the array passed to {}{}gpu_set_fog{}{}.":"雾开始的距离。数组中的第三个元素传递给 {}{}gpu_set_fog{}{}。", + "The fog colour to use, if enabled. The second element in the array passed to {}{}gpu_set_fog{}{}.":"要使用的雾颜色 (如果启用)。数组中的第二个元素传递给 {}{}gpu_set_fog{}{}。", + "The maximum level of anisotropy to use with the {}tf_anisotropic{} filter. As set with {}{}gpu_set_tex_max_aniso{}{}.":"与 {}tf_anisotropic{} 过滤器一起使用的各向异性的最大级别。使用 {}{}gpu_set_tex_max_aniso{}{} 设置。", + "The maximum mipmap level to use. As set with {}{}gpu_set_tex_max_mip{}{}.":"要使用的最大 mipmap 级别。使用 {}{}gpu_set_tex_max_mip{}{} 设置。", + "The minimum mipmap level to use. As set with {}{}gpu_set_tex_min_mip{}{}.":"要使用的最小 mipmap 级别。使用 {}{}gpu_set_tex_min_mip{}{} 设置。", + "The mip filter to use with mipmapping. As set with {}{}gpu_set_tex_mip_filter{}{}.":"与 mipmap 一起使用的 mip 过滤器。使用 {}{}gpu_set_tex_mip_filter{}{} 设置。", + "The reference value to use for the alpha test, as a value from 0 to 255. As set with {}{}gpu_set_alphatestref{}{}.":"用于 alpha 测试的参考值,范围为 0 到 255。使用 {}{}gpu_set_alphatestref{}{} 设置。", + "The reference value used for the stencil test. As set with {}{}gpu_set_stencil_ref{}{}.":"用于模板测试的参考值。使用 {}{}gpu_set_stencil_ref{}{} 设置。", + "The source blend mode factor of the alpha channel.":"Alpha 通道的源混合模式因子。", + "The source blend mode factor.":"源混合模式因子。", + "The stencil operation to perform when the stencil test fails. As set with {}{}gpu_set_stencil_fail{}{}.":"模板测试失败时要执行的模板操作。使用 {}{}gpu_set_stencil_fail{}{} 设置。", + "The stencil operation to perform when the stencil test passes. As set with {}{}gpu_set_stencil_pass{}{}.":"模板测试通过时要执行的模板操作。使用 {}{}gpu_set_stencil_pass{}{} 设置。", + "The stencil operation to perform when the {}stencil test passes but the depth test fails. As set with {}{}gpu_set_stencil_depth_fail{}{}.{}":"当模板测试通过但深度测试失败时要执行的模板操作。{} 按照 {}{}gpu_set_stencil_depth_fail{}{} 设置。{}", + "The supplied map can be created using the function {}{}gpu_get_state{}{}. It contains the following keys: ":"可以使用函数 {}{}gpu_get_state{}{} 创建提供的地图。它包含以下键:", + "The texture wrapping/clamping mode in the horizontal direction. As set with {}{}gpu_set_texrepeat{}{}.":"水平方向的纹理环绕 / 夹紧模式。使用 {}{}gpu_set_texrepeat{}{} 设置。", + "The texture wrapping/clamping mode in the vertical direction. As set with {}{}gpu_set_texrepeat{}{}.":"垂直方向的纹理环绕 / 夹紧模式。使用 {}{}gpu_set_texrepeat{}{} 设置。", + "This function will set the current GPU state using the passed-in {}DS Map{}. The supplied map can be created using the function {}{}gpu_get_state(){}.{}":"此函数将使用传入的 {}DS 映射 {} 设置当前 GPU 状态。可以使用函数 {}{}gpu_get_state(){}{} 创建提供的映射。", + "This function will set the current GPU state using the passed-in {}{}DS Map{}{}.":"此函数将使用传入的 {}{}DS Map{}{} 设置当前 GPU 状态。", + "Whether colour blending is enabled. As set with {}{}gpu_set_blendenable{}{}.":"是否启用颜色混合。使用 {}{}gpu_set_blendenable{}{} 设置。", + "Whether fog is set to enabled. The first element in the array passed to {}{}gpu_set_fog{}{}.":"雾是否设置为启用。数组中的第一个元素传递给 {}{}gpu_set_fog{}{}。", + "Whether to enable alpha testing. As set with {}{}gpu_set_alphatestenable{}{}.":"是否启用 alpha 测试。使用 {}{}gpu_set_alphatestenable{}{} 设置。", + "Whether to enable mipmapping. As set with {}{}gpu_set_tex_mip_enable{}{}.":"是否启用 mipmap。通过 {}{}gpu_set_tex_mip_enable{}{} 设置。", + "Whether to enable the stencil test. As set with {}{}gpu_set_stencil_enable{}{}.":"是否启用模板测试。通过 {}{}gpu_set_stencil_enable{}{} 设置。", + "Whether z-testing is enabled. As set with {}{}gpu_set_ztestenable{}{}.":"是否启用 z 测试。使用 {}{}gpu_set_ztestenable{}{} 设置。", + "Whether z-writing is enabled. As set with {}{}gpu_set_zwriteenable{}{}.":"是否启用 z 写入。通过 {}{}gpu_set_zwriteenable{}{} 设置。", + "{}The filtering mode used when textures are drawn magnified. Determined by {}{}gpu_set_texfilter{}{}.{}":"{} 放大绘制纹理时使用的过滤模式。由 {}{}gpu_set_texfilter{}{} 确定。{}", + "{}The filtering mode used when textures are drawn minified. Determined by {}{}gpu_set_texfilter{}{}.{}":"{} 缩小纹理绘制时使用的过滤模式。由 {}{}gpu_set_texfilter{}{} 确定。{}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_depth_fail.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_depth_fail.json new file mode 100644 index 000000000..537bbb045 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_depth_fail.json @@ -0,0 +1,13 @@ +{ + "A constant indicating the stencil operation to perform on pixels for which the stencil test passes but the depth test fails.":"一个常量,指示对模板测试通过但深度测试失败的像素执行的模板操作。", + "Decrements the stencil buffer value, clamping at 0.":"递减模板缓冲区值,固定为 0。", + "Decrements the stencil buffer value, wrapping to the maximum value at 0.":"递减模板缓冲区值,回绕到最大值 0。", + "Increments the stencil buffer value, clamping at the maximum value.":"增加模板缓冲区值,限制在最大值。", + "Increments the stencil buffer value, wrapping to 0 at the maximum value.":"增加模板缓冲区值,在最大值处回绕到 0。", + "Keeps the current value in the stencil buffer.":"将当前值保留在模板缓冲区中。", + "Performs a bitwise inversion on the current stencil buffer value.":"对当前模板缓冲区值执行按位反转。", + "Replaces the value in the buffer to the new stencil reference value.":"将缓冲区中的值替换为新的模板参考值。", + "Sets the stencil buffer value to 0.":"将模板缓冲区值设置为 0。", + "The code above sets the stencil operation to use {}when the stencil test passes but the depth test fails to {}stencilop_keep{}, i.e. for every pixel for which this is the case the value in the stencil buffer remains unchanged.{}":"上面的代码将模板操作设置为{}在模板测试通过但深度测试未能 {}stencilop_keep{} 时使用,即对于这种情况下的每个像素,模板缓冲区中的值保持不变。{}", + "This function sets the stencil operation that\u0027s executed {}when the stencil test passes but the depth test fails. You can use one of the following constants:{}":"此函数设置当模板测试通过但深度测试失败时执行的模板操作。{} 您可以使用以下常量之一:{}" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_enable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_enable.json new file mode 100644 index 000000000..981c46306 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_enable.json @@ -0,0 +1,11 @@ +{ + "Depending on the result of the comparison, the stencil test either passes or fails. The operation to perform when it passes is set with {}{}gpu_set_stencil_pass{}{}, the one to perform when it fails with {}{}gpu_set_stencil_fail{}{}. The operation can be to keep the current stencil value ({}stencilop_keep{}, the default both on pass and on fail), to replace it ({}stencilop_replace{}) or to apply a mathematical operation on it (set to 0, increment/decrement, invert bitwise).":"根据比较的结果,模板测试要么通过,要么失败。通过 {}{}gpu_set_stencil_pass{}{} 时执行的操作,通过 {}{}gpu_set_stencil_fail{}{} 失败时执行的操作。该操作可以是保留当前模板值 ({}stencilop_keep{},通过和失败时的默认值)、替换它 ({}stencilop_replace{}) 或对其应用数学运算 (设置为 0,递增 / 递减,按位反转)。", + "Finally, the stencil buffer is disabled again with another call to {}{}gpu_set_stencil_enable{}{}.":"最后,通过再次调用 {}{}gpu_set_stencil_enable{}{} 再次禁用模板缓冲区。", + "First the stencil test is enabled with a call to {}{}gpu_set_stencil_enable{}{} and the stencil buffer is cleared to 0 using {}{}draw_clear_stencil{}{}. After that, the stencil comparison function is set to {}cmpfunc_greaterequal{} using {}{}gpu_set_stencil_func{}{} and the operation to perform when the stencil test passes set to {}stencilop_replace{} with a call to {}{}gpu_set_stencil_pass{}{} (the operation to perform when the stencil test fails remains at the default {}stencilop_keep{}).":"首先,通过调用 {}{}gpu_set_stencil_enable{}{} 启用模板测试,并使用 {}{}draw_clear_stencil{}{} 将模板缓冲区清除为 0。之后,使用 {}{}gpu_set_stencil_func{}{} 将模板比较函数设置为 {8}cmpfunc_greaterequal{9},并通过调用 将模板测试通过时要执行的操作设置为 {14}stencilop_replace{15}{}{} gpu_set_stencil_pass{}{}( 模板测试失败时执行的操作保持默认的 {}stencilop_keep{})。", + "Next, the stencil reference value is set to 128 using {}{}gpu_set_stencil_ref{}{} and a filled red circle is drawn. The stencil test passes for every pixel covered by the circle (because the comparison that takes place is {}128 >= 0{}) and the value in the stencil buffer is replaced. A filled blue rectangle is then drawn with the stencil ref value set to 64 instead. For all pixels of the rectangle that overlap with the circle\u0027s pixels the comparison will be {}64 >= 128{}. These pixels don\u0027t pass the stencil test, the current stencil value is kept and the pixel isn\u0027t drawn. For all pixels of the rectangle that {}don\u0027t{} overlap with the circle\u0027s pixels the comparison will be {}64 >= 0{}. These pixels pass the stencil test, the current stencil value is replaced and the pixel is drawn.":"接下来,使用 {}{}gpu_set_stencil_ref{}{} 将模板参考值设置为 128,并绘制一个实心红色圆圈。对于圆圈覆盖的每个像素,模板测试都会通过 (因为进行的比较是 {}128 >= 0{}),并且模板缓冲区中的值将被替换。然后绘制一个填充的蓝色矩形,并将模板参考值设置为 64。对于与圆形像素重叠的矩形的所有像素,比较结果将为 {}64 >= 128{}。这些像素未通过模板测试,保留当前模板值并且不绘制像素。对于矩形中与圆形像素 {} 不 {} 重叠的所有像素,比较结果将为 {}64 >= 0{}。这些像素通过了模板测试,当前的模板值被替换并绘制像素。", + "See {}The Depth And Stencil Buffer{} for detailed information.":"有关详细信息,请参阅 {} 深度和模板缓冲区 {}。", + "The code example above shows how to draw shapes with the stencil buffer enabled.":"上面的代码示例展示了如何在启用模板缓冲区的情况下绘制形状。", + "The stencil test is a test performed on every pixel that\u0027s affected by the current draw command. It compares the stencil reference value set with {}{}gpu_set_stencil_ref{}{} to the value in the stencil buffer at that pixel, using the comparison set with {}{}gpu_set_stencil_func{}{}: ":"模板测试是对受当前绘制命令影响的每个像素执行的测试。它使用 {}{}gpu_set_stencil_func{}{} 的比较集,将 {}{}gpu_set_stencil_ref{}{} 设置的模板参考值与模板缓冲区中该像素处的值进行比较:", + "This function enables or disables the stencil test.":"此功能启用或禁用模板测试。", + "Whether to enable the stencil test for subsequent draw commands":"是否为后续绘制命令启用模板测试" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_fail.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_fail.json new file mode 100644 index 000000000..febf78e8d --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_fail.json @@ -0,0 +1,15 @@ +{ + "A constant indicating the stencil operation to perform on pixels for which the stencil test fails.":"一个常量,指示对模板测试失败的像素执行的模板操作。", + "Decrements the stencil buffer value, clamping at 0.":"递减模板缓冲区值,固定为 0。", + "Decrements the stencil buffer value, wrapping to the maximum value at 0.":"递减模板缓冲区值,回绕到最大值 0。", + "Increments the stencil buffer value, clamping at the maximum value.":"增加模板缓冲区值,限制在最大值。", + "Increments the stencil buffer value, wrapping to 0 at the maximum value.":"增加模板缓冲区值,在最大值处回绕到 0。", + "Keeps the current value in the stencil buffer.":"将当前值保留在模板缓冲区中。", + "Performs a bitwise inversion on the current stencil buffer value.":"对当前模板缓冲区值执行按位反转。", + "Replaces the value in the buffer to the new stencil reference value.":"将缓冲区中的值替换为新的模板参考值。", + "Sets the stencil buffer value to 0.":"将模板缓冲区值设置为 0。", + "Stencil Op Constant":"模板操作常数", + "The above code sets the stencil operation to replace for pixels that fail the stencil test. This operation replaces the current value in the stencil buffer with the currently set stencil reference value (set earlier with {}{}gpu_set_stencil_ref{}{}).":"上面的代码设置模板操作来替换未通过模板测试的像素。此操作将模板缓冲区中的当前值替换为当前设置的模板参考值 (之前使用 {}{}gpu_set_stencil_ref{}{} 设置)。", + "The default operation when the stencil test fails is {}{}stencilop_keep{}{}. You can set it to one of the following:":"模板测试失败时的默认操作是 {}{}stencilop_keep{}{}。您可以将其设置为以下之一:", + "This function sets the stencil operation to perform when the stencil test fails.":"该函数设置当模板测试失败时要执行的模板操作。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_func.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_func.json new file mode 100644 index 000000000..07c6725e4 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_func.json @@ -0,0 +1,11 @@ +{ + "Finally, the stencil buffer is disabled again with another call to {}{}gpu_set_stencil_enable{}{}.":"最后,通过再次调用 {}{}gpu_set_stencil_enable{}{} 再次禁用模板缓冲区。", + "First the stencil test is enabled with a call to {}{}gpu_set_stencil_enable{}{} and the stencil buffer is cleared to 0 using {}{}draw_clear_stencil{}{}. After that, the stencil comparison function is set to {}cmpfunc_greaterequal{} using {}{}gpu_set_stencil_func{}{} and the operation to perform when the stencil test passes set to {}stencilop_replace{} with a call to {}{}gpu_set_stencil_pass{}{} (the operation to perform when the stencil test fails remains at the default {}stencilop_keep{}).":"首先,通过调用 {}{}gpu_set_stencil_enable{}{} 启用模板测试,并使用 {}{}draw_clear_stencil{}{} 将模板缓冲区清除为 0。 \n\n之后,使用 {}{}gpu_set_stencil_func{}{} 将模板比较函数设置为 {8}cmpfunc_greaterequal{9}\n\n以及通过调用 {}{}gpu_set_stencil_pass{}{} 将模板测试通过时执行的操作设置为 {14}stencilop_replace{15}( 模板测试失败时执行的操作保持默认的 {}stencilop_keep{})。", + "Next, the stencil reference value is set to 128 using {}{}gpu_set_stencil_ref{}{} and a filled red circle is drawn. The stencil test passes for every pixel covered by the circle (because the comparison that takes place is {}128 >= 0{}) and the value in the stencil buffer is replaced. A filled blue rectangle is then drawn with the stencil ref value set to 64 instead. For all pixels of the rectangle that overlap with the circle\u0027s pixels the comparison will be {}64 >= 128{}. These pixels don\u0027t pass the stencil test, the current stencil value is kept and the pixel isn\u0027t drawn. For all pixels of the rectangle that {}don\u0027t{} overlap with the circle\u0027s pixels the comparison will be {}64 >= 0{}. These pixels pass the stencil test, the current stencil value is replaced and the pixel is drawn.":"接下来,使用 {}{}gpu_set_stencil_ref{}{} 将模板参考值设置为 128,并绘制一个实心红色圆圈。对于圆圈覆盖的每个像素,模板测试都会通过 (因为进行的比较是 {}128 >= 0{}),并且模板缓冲区中的值将被替换。然后绘制一个填充的蓝色矩形,并将模板参考值设置为 64。对于与圆形像素重叠的矩形的所有像素,比较结果将为 {}64 >= 128{}。这些像素未通过模板测试,保留当前模板值并且不绘制像素。对于矩形中与圆形像素 {} 不 {} 重叠的所有像素,比较结果将为 {}64 >= 0{}。这些像素通过了模板测试,当前的模板值被替换并绘制像素。", + "The code example above shows how to draw shapes with the stencil buffer enabled.":"上面的代码示例展示了如何在启用模板缓冲区的情况下绘制形状。", + "The comparison function to use for comparing the stencil reference value to the stencil value at the current pixel, i.e. {}{}ref cmp_func stencil{}{}":"用于将模板参考值与当前像素处的模板值进行比较的比较函数,即 {}{}ref cmp_func stencil{}{}", + "The default is {}{}cmpfunc_always{}{}, i.e. the stencil test always passes.":"默认值为 {}{}cmpfunc_always{}{},即模板测试始终通过。", + "The stencil ref value is compared to the stencil value as follows: ":"模板参考值与模板值的比较如下:", + "{}This function sets the comparison function to use for the stencil test.{}":"{} 此函数设置用于模板测试的比较函数。{}", + "{}{}NOTE{}{} The stencil ref value can be set with {}{}gpu_set_stencil_ref{}{}.":"{}{} 注意{}{} 可以使用 {}{}gpu_set_stencil_ref{}{} 设置模板引用值。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_pass.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_pass.json new file mode 100644 index 000000000..fbe9d4611 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_pass.json @@ -0,0 +1,12 @@ +{ + "Decrements the stencil buffer value, clamping at 0.":"递减模板缓冲区值,固定为 0。", + "Decrements the stencil buffer value, wrapping to the maximum value at 0.":"递减模板缓冲区值,回绕到最大值 0。", + "Increments the stencil buffer value, clamping at the maximum value.":"增加模板缓冲区值,限制在最大值。", + "Increments the stencil buffer value, wrapping to 0 at the maximum value.":"增加模板缓冲区值,在最大值处回绕到 0。", + "Keeps the current value in the stencil buffer.":"将当前值保留在模板缓冲区中。", + "Performs a bitwise inversion on the current stencil buffer value.":"对当前模板缓冲区值执行按位反转。", + "Replaces the value in the buffer to the new stencil reference value.":"将缓冲区中的值替换为新的模板参考值。", + "Sets the stencil buffer value to 0.":"将模板缓冲区值设置为 0。", + "The default operation when the stencil test passes is {}{}stencilop_keep{}{}. You can change it to one of the following:":"模板测试通过时的默认操作是 {}{}stencilop_keep{}{}。您可以将其更改为以下之一:", + "This function sets the stencil operation to perform when the stencil test passes.":"此函数设置模板测试通过时要执行的模板操作。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_read_mask.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_read_mask.json new file mode 100644 index 000000000..31b71a10c --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_read_mask.json @@ -0,0 +1,8 @@ +{ + "By default, the stencil read mask is set to all ones, i.e. {}0b11111111{} so the stencil test becomes: ":"默认情况下,模板读取掩码设置为全 1,即 {}0b11111111{},因此模板测试变为:", + "See {}Bitwise Operators{} for more information on how to work with bitmask values.":"请参阅 {} 按位运算符 {},了解有关如何使用位掩码值的更多信息。", + "The bitmask to use, a value in the range [0, 255], or, [{}0x00{}, {}0xFF{}].":"要使用的位掩码,范围为 [0, 255] 或 [{}0x00{},{}0xFF{}] 的值。", + "The code above sets the stencil read mask to all ones by passing the binary literal {}0b11111111{} as the parameter to the function.":"上面的代码通过将二进制文字 {}0b11111111{} 作为参数传递给函数,将模板读取掩码设置为全 1。", + "The stencil read mask is a bitmask of 8 bits that\u0027s bitwise AND-ed {}&{} with both the stencil ref value and the current stencil value {}before{} the values are compared in the stencil test, i.e. only the bits in the read mask are compared: ":"模板读取掩码是 8 位的位掩码,在模板测试中比较这些值之前 {} 与当前模板值进行按位与运算,即仅比较位在读取掩码中进行比较:", + "This function sets the stencil read mask.":"该函数设置模板读取掩码。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_ref.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_ref.json new file mode 100644 index 000000000..4a37cd97c --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_ref.json @@ -0,0 +1,10 @@ +{ + "Finally, the stencil buffer is disabled again with another call to {}{}gpu_set_stencil_enable{}{}.":"最后,通过再次调用 {}{}gpu_set_stencil_enable{}{} 再次禁用模板缓冲区。", + "First the stencil test is enabled with a call to {}{}gpu_set_stencil_enable{}{} and the stencil buffer is cleared to 0 using {}{}draw_clear_stencil{}{}. After that, the stencil comparison function is set to {}cmpfunc_greaterequal{} using {}{}gpu_set_stencil_func{}{} and the operation to perform when the stencil test passes set to {}stencilop_replace{} with a call to {}{}gpu_set_stencil_pass{}{} (the operation to perform when the stencil test fails remains at the default {}stencilop_keep{}).":"首先,通过调用 {}{}gpu_set_stencil_enable{}{} 启用模板测试,并使用 {}{}draw_clear_stencil{}{} 将模板缓冲区清除为 0。 \n\n之后,使用 {}{}gpu_set_stencil_func{}{} 将模板比较函数设置为 {8}cmpfunc_greaterequal{9}\n\n以及通过调用 {}{}gpu_set_stencil_pass{}{} 将模板测试通过时执行的操作设置为 {14}stencilop_replace{15}( 模板测试失败时执行的操作保持默认的 {}stencilop_keep{})。", + "Next, the stencil reference value is set to 128 using {}{}gpu_set_stencil_ref{}{} and a filled red circle is drawn. The stencil test passes for every pixel covered by the circle (because the comparison that takes place is {}128 >= 0{}) and the value in the stencil buffer is replaced. A filled blue rectangle is then drawn with the stencil ref value set to 64 instead. For all pixels of the rectangle that overlap with the circle\u0027s pixels the comparison will be {}64 >= 128{}. These pixels don\u0027t pass the stencil test, the current stencil value is kept and the pixel isn\u0027t drawn. For all pixels of the rectangle that {}don\u0027t{} overlap with the circle\u0027s pixels the comparison will be {}64 >= 0{}. These pixels pass the stencil test, the current stencil value is replaced and the pixel is drawn.":"接下来,使用 {}{}gpu_set_stencil_ref{}{} 将模板参考值设置为 128,并绘制一个实心红色圆圈。对于圆圈覆盖的每个像素,模板测试都会通过 (因为进行的比较是 {}128 >= 0{}),并且模板缓冲区中的值将被替换。然后绘制一个填充的蓝色矩形,并将模板参考值设置为 64。对于与圆形像素重叠的矩形的所有像素,比较结果将为 {}64 >= 128{}。这些像素未通过模板测试,保留当前模板值并且不绘制像素。对于矩形中与圆形像素 {} 不 {} 重叠的所有像素,比较结果将为 {}64 >= 0{}。这些像素通过了模板测试,当前的模板值被替换并绘制像素。", + "The code example above shows how to draw shapes with the stencil buffer enabled.":"上面的代码示例展示了如何在启用模板缓冲区的情况下绘制形状。", + "The stencil ref value is compared to the stencil value as follows: ":"模板参考值与模板值的比较如下:", + "The{} stencil test reference value, clamped within range 0 to 255 (inclusive){}":"模板测试参考值,限制在 0 到 255( 含) 范围内 {}", + "This {}function sets the stencil test reference value used for draw functions.{}":"此 {} 函数设置用于绘制函数的模板测试参考值。{}", + "{}{}NOTE{}{} The comparison function can be set with {}{}gpu_set_stencil_func{}{}.":"{}{} 注意{}{} 可以使用 {}{}gpu_set_stencil_func{}{} 设置比较函数。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_write_mask.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_write_mask.json new file mode 100644 index 000000000..75ce44900 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_stencil_write_mask.json @@ -0,0 +1,7 @@ +{ + "See {}Bitwise Operators{} for detailed information on how to work with bitmask values.":"请参阅 {} 按位运算符 {},了解有关如何使用位掩码值的详细信息。", + "The above code sets the stencil write mask to the hexadecimal value {}0xFF{}, or the decimal value 255, meaning that all bits can be written to.":"上面的代码将模板写入掩码设置为十六进制值 {}0xFF{} 或十进制值 255,这意味着所有位都可以写入。", + "The stencil write mask is used when writing values to the stencil buffer and defines for every bit whether it can be written to or not.":"模板写入掩码在将值写入模板缓冲区时使用,并定义每个位是否可以写入。", + "The write mask to use, a bitmask value of 8 bits.":"要使用的写掩码,8 位的位掩码值。", + "This function sets the stencil write mask.":"该函数设置模板写入掩码。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_texrepeat.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_texrepeat.json index 7de582102..42783cae9 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_texrepeat.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_texrepeat.json @@ -1,7 +1,11 @@ { "Enable or disable texture filtering ({}true{} / {}false{})":"启用或禁用纹理过滤 ({}true{}/{}false{})", + "Normally texture widths and heights lie in the range 0 - 1, but if you specify a value larger than 1 by default the rest is not drawn (the entire texture will be drawn with an \"empty\" section corresponding to the percentage over 1 that is used. So a value of 2 for a texture width or height would draw the texture in half the space and leave the other half empty). However, by using this function to set repeat to {}true{} the texture is repeated automatically over all models and primitives. The likely use case for these functions is for repeating a texture in 3D but in order for it to work and not pull images from the rest of the texture page, the sprite used will need to be marked as being on a \"Separate Texture Page\" in {}The Sprite Editor{}.":"通常纹理的宽度和高度在 0 - 1 的范围内,但如果默认情况下指定大于 1 的值,则不会绘制其余部分 (整个纹理将绘制一个 \" 空 \" 部分,对应于超过 1 的百分比,即因此,纹理宽度或高度的值为 2 会在一半空间中绘制纹理,而将另一半留空)。不过,通过使用此函数将重复设置为 {}true{},纹理会在所有模型和图元上自动重复。这些函数的可能用例是在 3D 中重复纹理,但为了使其正常工作并且不从纹理页面的其余部分提取图像,所使用的精灵需要标记为位于 \" 单独的纹理页面 \" 上在 {}Sprite 编辑器 {} 中。", "The above code checks to see if texture repeating is on or off and switches it accordingly.":"上述代码检查纹理重复是打开还是关闭,并相应地将其切换。", + "This function can be used to indicate to {}GameMaker{} whether textures should repeat ({}true{}) or not ({}false{}) when used for models and primitives.":"此函数可用于向 {}GameMaker{} 指示纹理在用于模型和基元时是否应重复 ({}true{}) 或不重复 ({}false{})。", "This function can be used to indicate to {}GameMaker{} whether textures should repeat ({}true{}) or not ({}false{}) when used for models and primitives. Normally texture widths and heights lie in the range 0 - 1, but if you specify a value larger than 1 by default the rest is not drawn (the entire texture will be drawn with an \"empty\" section corresponding to the percentage over 1 that is used. So a value of 2 for a texture width or height would draw the texture in half the space and leave the other half empty). However, by using this function to set repeat to true the texture is repeated automatically over all models and primitives. The likely use case for these functions is for repeating a texture in 3D but in order for it to work and not pull images from the rest of the texture page, the sprite used will need to be marked as being on a \"Separate Texture Page\" in the Sprite Editor.":"此函数可用于向 {}GameMaker{} 指示在用于模型和基本体时纹理是否应该重复 ({}true{}) 或 ({}false{})。通常,纹理宽度和高度在 0-1 范围内,但如果默认情况下指定的值大于 1,则不会绘制其余部分 (整个纹理将使用与所使用的大于 1 的百分比相对应的 \" 空 \" 部分绘制)。因此,如果纹理宽度或高度的值为 2,则会在一半的空间中绘制纹理,并将另一半留空)。但是,通过使用此函数将重复设置为 true,会在所有模型和基本体上自动重复纹理。这些函数的可能使用情形是在 3D 中重复纹理,但为了使其工作而不是从纹理页面的其余部分拉出图像,需要在精灵编辑器中将使用的精灵标记为 \" 单独的纹理页面\"。", "{}NOTE{}: Sprites and backgrounds are always drawn without repeating, so once you draw a sprite or background this value is reset to {}false{}. This default behaviour will not affect texture stage settings (ie: calling the function will, but the internal setting to false will not).":"{}注意{}:始终绘制精灵和背景而不重复,因此一旦绘制精灵或背景,此值将重置为 {}false{}。此默认行为不会影响纹理载物台设置 (即:调用函数将会影响纹理载物台设置,但内部设置为 false 不会影响纹理载物台设置)。", - "{}NOTE{}: This setting will over-ride any texture stage repeats set for shaders when using the function {}{}gpu_set_texrepeat_ext(){}{}.":"{}注意{}:使用函数 {}{}gpu_set_texrepeat_ext(){}{} 时,此设置将覆盖为着色器设置的任何纹理载物台重复项。" + "{}NOTE{}: This setting will over-ride any texture stage repeats set for shaders when using the function {}{}gpu_set_texrepeat_ext(){}{}.":"{}注意{}:使用函数 {}{}gpu_set_texrepeat_ext(){}{} 时,此设置将覆盖为着色器设置的任何纹理载物台重复项。", + "{}{}{}NOTE{}{} {}Sprites and backgrounds are always drawn without repeating, so once you draw a sprite or background this value is reset to {}false{}. This default behaviour will not affect texture stage settings (i.e.: calling the function will, but the internal setting to {}false{} will not).":"{}{}{} 注意{}{}{} 精灵和背景始终会不重复地绘制,因此一旦您绘制精灵或背景,该值就会重置为 {}false{}。此默认行为不会影响纹理阶段设置 (即:调用函数会影响,但内部设置为 {}false{} 则不会)。", + "{}{}{}NOTE{}{} {}This setting will override any texture stage repeats set for shaders when using the function {}{}gpu_set_texrepeat_ext{}{}.":"{}{}{} 注意{}{}{} 在使用函数 {}{}gpu_set_texrepeat_ext{}{} 时,此设置将覆盖为着色器设置的任何纹理阶段重复。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_texrepeat_ext.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_texrepeat_ext.json index 646ce8542..a005bbb24 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_texrepeat_ext.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_texrepeat_ext.json @@ -4,5 +4,7 @@ "The above code checks to see if texture filtering is on or off for a specific sampler ID (stored in a local variable) and switches it accordingly.":"上述代码检查特定采样器 ID (存储在局部变量中)的纹理过滤是打开还是关闭,并相应地进行切换。", "The sampler id from the shader.":"着色器中的采样器 ID。", "This function can be used to set whether a single sampler \"slot\" repeats the given texture when using {}Shaders{} in {}GameMaker{} . Setting it to {}true{} will repeat the texture if the uv coordinates are out with the 0-1 range, while a setting of {}false{} will mean no repeating. The likely use case for these functions is for repeating a texture in 3D but in order for it to work and not pull images from the rest of the texture page, the sprite used will need to be marked as being on a \"Separate Texture Page\" in the Sprite Editor.":"此函数可用于设置在 {}GameMaker{} 中使用{}着色器{}时,单个\"采样器插槽\"是否重复给定的纹理。如果 UV 坐标超出 0-1 范围,则将其设置为 {}true{} 将重复该纹理,而设置为 {}false{} 将意味着不重复该操作。这些函数的可能使用情形是在 3D 中重复纹理,但为了使其工作而不是从纹理页面的其余部分拉出图像,需要在精灵编辑器中将使用的精灵标记为\"单独的纹理页面\"。", - "{}{}NOTE{} {}This setting will be over-ridden by the value set when calling the function {}{}{}gpu_set_texrepeat(){}{}{}.":"{}{}注意{}{} 调用函数 {}{}{}gpu_set_texrepeat(){}{}{} 时设置的值将覆盖此设置。" + "This function can be used to set whether a single sampler \"slot\" repeats the given texture when using {}Shaders{} in {}GameMaker{}. Setting it to {}true{} will repeat the texture if the uv coordinates are out of the 0-1 range, while a setting of {}false{} will mean no repeating. The likely use case for these functions is for repeating a texture in 3D but in order for it to work and not pull images from the rest of the texture page, the sprite used will need to be marked as being on a \"Separate Texture Page\" in {}The Sprite Editor{}.":"此函数可用于设置在 {}GameMaker{} 中使用 {} 着色器 {} 时单个采样器 \" 槽 \" 是否重复给定纹理。如果 uv 坐标超出 0-1 范围,则将其设置为 {}true{} 将重复纹理,而设置为 {}false{} 将意味着不重复。这些函数的可能用例是在 3D 中重复纹理,但为了使其正常工作并且不从纹理页面的其余部分提取图像,所使用的精灵需要标记为位于 \" 单独的纹理页面 \" 上在 {}Sprite 编辑器 {} 中。", + "{}{}NOTE{} {}This setting will be over-ridden by the value set when calling the function {}{}{}gpu_set_texrepeat(){}{}{}.":"{}{}注意{}{} 调用函数 {}{}{}gpu_set_texrepeat(){}{}{} 时设置的值将覆盖此设置。", + "{}{}NOTE{} {}This setting will be overridden by the value set when calling the function {}{}{}gpu_set_texrepeat(){}{}{}.":"{}{} 注意{}{} 此设置将被调用函数 {}{}{}gpu_set_texrepeat(){}{}{} 时设置的值覆盖。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_zfunc.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_zfunc.json index d5a09c44f..124bae386 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_zfunc.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_zfunc.json @@ -10,5 +10,7 @@ "Not Equal":"不等于", "The above code switches on z-buffer testing and sets its comparison mode before drawing a background sprite and then switches it back off again to continue drawing.":"上述代码在绘制背景精灵之前打开z缓冲区测试并设置其比较模式,然后再次关闭该精灵以继续绘制。", "The comparison mode to use (see list above)":"要使用的比较模式(请参阅上面的列表)", - "This function can be used to set the z-buffer testing comparison mode (see {}{}gpu_set_ztestenable(){}{} for more information). The values available for use are any of the following constants (the default value is {}cmpfunc_lessequal{}):":"此函数可用于设置z缓冲区测试比较模式(有关详细信息,请参阅{}{}gpu_set_ztestenable(){}{})。可用的值是以下任何常量(默认值为{}cmpfunc_lessequal{}):" + "The values available for use are any of the following constants (the default value is {}{}cmpfunc_lessequal{}{}):":"可供使用的值为以下任意常量 (默认值为 {}{}cmpfunc_lessequal{}{}):", + "This function can be used to set the z-buffer testing comparison mode (see {}{}gpu_set_ztestenable(){}{} for more information). The values available for use are any of the following constants (the default value is {}cmpfunc_lessequal{}):":"此函数可用于设置z缓冲区测试比较模式(有关详细信息,请参阅{}{}gpu_set_ztestenable(){}{})。可用的值是以下任何常量(默认值为{}cmpfunc_lessequal{}):", + "This function sets the z-buffer testing comparison mode (see {}{}gpu_set_ztestenable{}{} for more information).":"此函数设置 z 缓冲区测试比较模式 (有关详细信息,请参阅 {}{}gpu_set_ztestenable{}{})。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_ztestenable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_ztestenable.json index 33eb97d0c..2c0fe6920 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_ztestenable.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_ztestenable.json @@ -1,6 +1,9 @@ { "By default z-buffer testing is off ({}false{}).":"默认情况下,z缓冲区测试处于关闭状态({}false{})。", "Enable or disable z-buffer testing ({}true{} or {}false{}).":"启用或禁用z缓冲区测试({}true{}或{}false{})。", + "Essentially, by default, when z-testing is off and you have two objects drawing to the same space, {}both{} objects will be rendered regardless of whether one will over-draw the other, resulting in unnecessary draw calls. If you switch this on then the z-buffer is tested to see whether an object will be \"visible\" and not drawn if it\u0027s not.":"本质上,默认情况下,当 z 测试关闭并且您有两个对象绘制到同一空间时,无论一个对象是否会过度绘制另一个对象,都会渲染 {} 两个 {} 对象,从而导致不必要的绘制调用。如果打开此功能,则会测试 z 缓冲区以查看对象是否 \" 可见\",如果不可见则不会绘制。", "The above code switches on z-buffer testing to draw a background sprite and then switches it back off again to continue drawing.":"上述代码打开z缓冲区测试以绘制背景精灵,然后再次将其关闭以继续绘制。", - "This function can be used to toggle z-buffer testing on or off, affecting how things will be drawn (in general only of use when working with 3D projects). Essentially, by default when z-testing is off and you have two objects drawing to the same space, {}both{} objects will be rendered regardless of whether one will over-draw the other, resulting in unnecessary draw calls. If you switch this on then the z-buffer is tested to see whether an object will be \"visible\" and not drawn if it\u0027s not. Note that this is the {}default{} behaviour, but you can change this by changing the type of comparison used for z-buffer testing (see the function {}{}gpu_set_zfunc(){}{}.":"此函数可用于打开或关闭z缓冲区测试,从而影响绘制内容的方式(通常仅在使用3D项目时使用)。实际上,默认情况下,如果禁用了z-测试,并且有两个对象绘制到同一个空间,{}两个{}对象都将呈现,无论其中一个是否会透支另一个,都会导致不必要的绘制调用。如果打开此选项,则会测试z-缓冲区,以确定对象是否\"可见\"并且不会被绘制没有。请注意,这是{}默认的{}行为,但您可以通过更改用于z-缓冲区测试的比较类型来更改此行为(请参见函数{}{}gpu_set_zfunc(){}{})。" + "This function can be used to toggle z-buffer testing on or off, affecting how things will be drawn (in general only of use when working with 3D projects).":"此函数可用于打开或关闭 z 缓冲区测试,从而影响绘制内容的方式 (通常仅在处理 3D 项目时使用)。", + "This function can be used to toggle z-buffer testing on or off, affecting how things will be drawn (in general only of use when working with 3D projects). Essentially, by default when z-testing is off and you have two objects drawing to the same space, {}both{} objects will be rendered regardless of whether one will over-draw the other, resulting in unnecessary draw calls. If you switch this on then the z-buffer is tested to see whether an object will be \"visible\" and not drawn if it\u0027s not. Note that this is the {}default{} behaviour, but you can change this by changing the type of comparison used for z-buffer testing (see the function {}{}gpu_set_zfunc(){}{}.":"此函数可用于打开或关闭z缓冲区测试,从而影响绘制内容的方式(通常仅在使用3D项目时使用)。实际上,默认情况下,如果禁用了z-测试,并且有两个对象绘制到同一个空间,{}两个{}对象都将呈现,无论其中一个是否会透支另一个,都会导致不必要的绘制调用。如果打开此选项,则会测试z-缓冲区,以确定对象是否\"可见\"并且不会被绘制没有。请注意,这是{}默认的{}行为,但您可以通过更改用于z-缓冲区测试的比较类型来更改此行为(请参见函数{}{}gpu_set_zfunc(){}{})。", + "{}{}NOTE{}{} This is the {}default{} behaviour, but you can change this by changing the type of comparison used for z-buffer testing (see the function {}{}gpu_set_zfunc{}{}).":"{}{} 注意{}{} 这是 {} 默认 {} 行为,但您可以通过更改用于 z 缓冲区测试的比较类型来更改此行为 (请参阅函数 {}{}gpu_set_zfunc{}{})。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_zwriteenable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_zwriteenable.json index 465299a1c..d0d3bcee4 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_zwriteenable.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_zwriteenable.json @@ -1,6 +1,11 @@ { + "However, this is not always what you wish to happen and there are moments when you may want something to be drawn over everything else, no matter what its z value is. In those cases you can use this function to switch off writing to the z-buffer and so force whatever is being drawn to be drawn over everything else.":"然而,这并不总是您希望发生的事情,有时您可能希望将某些东西绘制在其他所有东西上,无论它的 z 值是多少。在这些情况下,您可以使用此函数来关闭对 \u200B\u200Bz 缓冲区的写入,从而强制正在绘制的任何内容都覆盖其他所有内容。", "The above code switches off z-buffer writing, draws a number of objects, and then switches it back on again to continue drawing.":"上述代码关闭Z缓冲区写入,绘制多个对象,然后再次打开以继续绘制。", "The comparison mode to use (see list above)":"要使用的比较模式(请参阅上面的列表)", "The default value is that z-buffering is enabled ({}true{}).":"默认值为已启用z缓冲({}true{})。", - "This function can be used to toggle on ({}true{}) and off ({}false{}) depth ordering using the z-buffer. When an instance is rendered in {}GameMaker{} , the depth of a generated pixel (its z coordinate) is stored in the z-buffer, then, if another instance of the scene must be rendered at the same pixel, the two depths are compared (z-testing - see {}{}gpu_set_ztestenable(){}{}) and the one \"closer\" to the observer is then saved to the z-buffer, replacing the old one. However, this is not always what you wish to happen and there are moments when you may want something to be drawn over everything else, no matter what its z value is. In those cases you can use this function to switch off writing to the z-buffer and so force whatever is being drawn to be drawn over everything else. Note that the description given here is for the {}default{} z-testing comparison mode, but that can be changed":"此函数可用于使用z缓冲区打开({}true{})和关闭({}false{})深度排序。在{}GameMaker{}中渲染实例时,生成的像素(其z坐标)的深度存储在z-缓冲区中,然后,如果必须在同一像素上渲染场景的另一个实例,则比较两个深度(z-测试-参见{}{}gpu_set_ztestenable(){}{}),然后将\"靠近\"观察器的\"一个\"保存到z-缓冲区中,替换旧的\"一个\"。然而,这并不总是你希望发生的事情,有时你可能希望某些事情被描绘在其他一切之上,无论它的z值是什么。在这些情况下,您可以使用此函数关闭对z缓冲区的写入,从而强制绘制的任何内容覆盖所有其他内容。请注意,此处给出的描述适用于{}默认{}z-测试比较模式,但可以更改" + "The default value is that z-writing is enabled ({}true{}).":"默认值是启用 z 写入 ({}true{})。", + "This function can be used to toggle on ({}true{}) and off ({}false{}) depth ordering using the z-buffer.":"此函数可用于使用 z 缓冲区打开 ({}true{}) 和关闭 ({}false{}) 深度排序。", + "This function can be used to toggle on ({}true{}) and off ({}false{}) depth ordering using the z-buffer. When an instance is rendered in {}GameMaker{} , the depth of a generated pixel (its z coordinate) is stored in the z-buffer, then, if another instance of the scene must be rendered at the same pixel, the two depths are compared (z-testing - see {}{}gpu_set_ztestenable(){}{}) and the one \"closer\" to the observer is then saved to the z-buffer, replacing the old one. However, this is not always what you wish to happen and there are moments when you may want something to be drawn over everything else, no matter what its z value is. In those cases you can use this function to switch off writing to the z-buffer and so force whatever is being drawn to be drawn over everything else. Note that the description given here is for the {}default{} z-testing comparison mode, but that can be changed":"此函数可用于使用z缓冲区打开({}true{})和关闭({}false{})深度排序。在{}GameMaker{}中渲染实例时,生成的像素(其z坐标)的深度存储在z-缓冲区中,然后,如果必须在同一像素上渲染场景的另一个实例,则比较两个深度(z-测试-参见{}{}gpu_set_ztestenable(){}{}),然后将\"靠近\"观察器的\"一个\"保存到z-缓冲区中,替换旧的\"一个\"。然而,这并不总是你希望发生的事情,有时你可能希望某些事情被描绘在其他一切之上,无论它的z值是什么。在这些情况下,您可以使用此函数关闭对z缓冲区的写入,从而强制绘制的任何内容覆盖所有其他内容。请注意,此处给出的描述适用于{}默认{}z-测试比较模式,但可以更改", + "When an instance is rendered in {}GameMaker{}, the depth of a generated pixel (its z coordinate) is stored in the z-buffer, then, if another instance of the scene must be rendered at the same pixel, the two depths are compared (z-testing - see {}{}gpu_set_ztestenable{}{}) and the one \"closer\" to the observer is then saved to the z-buffer, replacing the old one.":"当在 {}GameMaker{} 中渲染实例时,生成的像素的深度 (其 z 坐标) 将存储在 z 缓冲区中,然后,如果必须在同一像素处渲染场景的另一个实例,则两个深度进行比较 (z 测试 - 请参阅 {}{}gpu_set_ztestenable{}{}),然后将距离观察者 \" 更近 \" 的那个保存到 z 缓冲区,替换旧的。", + "{}{}NOTE{}{} The description given here is for the {}default{} z-testing comparison mode, but that can be changed.":"{}{} 注意{}{} 此处给出的描述适用于 {} 默认 {}z 测试比较模式,但可以更改。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/Lighting.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/Lighting.json index 9ea485d4a..93c1d404f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/Lighting.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/Lighting.json @@ -1,7 +1,11 @@ { + "For using these properties in your shaders, see: {}Built-In Shader Constants{}":"要在着色器中使用这些属性,请参阅:{} 内置着色器常量 {}", "For using these properties in your shaders, see: {}Shader Uniforms{}":"有关在着色器中使用这些属性的信息,请参见:{}着色器常量{}", + "Function Reference":"功能参考", "Lighting":"光照", "When working with 3D scenes, what you draw with the {}GameMaker{} functions may look rather \"flat\" because there is no lighting to give them realism and life. This means that the colour of the primitive faces are equal all over, independent of their orientation or position, therefore, to create more realistic looking scenes you must enable lighting and place lights at the correct places within the 3D world. This section outlines the functions available to help you achieve that.":"处理 3D 场景时,您使用 {}GameMaker{} 函数绘制的内容可能看起来相当 \" 平坦\",因为没有光照来赋予它们真实感和生命力。这意味着原始面的颜色全部相同,与其方向或位置无关,因此,要创建更逼真的场景,您必须启用照明并将灯光放置在 3D 世界中的正确位置。本节概述了可帮助您实现这一目标的功能。", "When working with 3D scenes, what you draw with the {}GameMaker{} functions may look rather \"flat\" because there is no lighting to give them realism and life. This means that the colour of the primitive faces are equal all over, independent of their orientation or position, therefore, to create more realistic looking scenes you must enable lighting and place lights at the correct places within the 3D world. This section outlines the functions available to help you achieve that:":"使用3D场景时,使用{}GameMaker{}函数绘制的内容可能看起来更\"平坦\",因为没有照明可以赋予它们真实感和生活。这意味着基本体面的颜色完全相等,与其方向或位置无关,因此,要创建更逼真的场景,必须启用照明并将光照放置在3D世界中的正确位置。本节概述了可用于帮助您实现以下目标的函数:", - "{}Lighting{}":"{} 灯光 {}" + "When working with 3D scenes, what you draw with the {}GameMaker{} functions may look rather \"flat\" because there is no lighting to give them realism and life. This means that the colours of the primitive faces are equal all over, independent of their orientation or position, therefore, to create more realistic looking scenes you must enable lighting and place lights at the correct places within the 3D world. This section outlines the functions available to help you achieve that.":"处理 3D 场景时,您使用 {}GameMaker{} 函数绘制的内容可能看起来相当 \" 平坦\",因为没有光照来赋予它们真实感和生命力。这意味着原始面的颜色全部相同,与其方向或位置无关,因此,要创建更逼真的场景,您必须启用照明并将灯光放置在 3D 世界中的正确位置。本节概述了可帮助您实现这一目标的功能。", + "{}Lighting{}":"{} 灯光 {}", + "{}{}NOTE{}{} The lighting functions require a {}normal{} property in the {}vertex format{} of whatever\u0027s being drawn. This means this will not work with regular draw functions like {}{}draw_sprite{}{}, and vertex buffers that need to use lighting will need to use a vertex format with normals.":"{}{} 注意{}{} 照明函数需要所绘制的任何内容的 {} 顶点格式 {} 的 {} 法线 {} 属性。这意味着这不适用于 {}{}draw_sprite{}{} 等常规绘制函数,并且需要使用光照的顶点缓冲区将需要使用带有法线的顶点格式。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_define_direction.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_define_direction.json index f3ba4e31c..d263f5959 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_define_direction.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_define_direction.json @@ -1,10 +1,14 @@ { "The above code will enable lighting for the whole scene, then define a white directional light in the room space, and then finally turn that light on.":"以上代码将为整个场景启用照明,然后在房间空间中定义白色方向光,然后最终打开该光照。", + "The colour to use for the light (either a constant, a real or a hex value)":"用于灯光的颜色 (常数、实数或十六进制值)", "The colour to use for the light (either a constant, a real or a hex value).":"用于光照的颜色(常数、实数或十六进制值)。", + "The direction and intensity are set by the values input for the x, y and z unit vector (meaning that they must be between -1 and 1, where 1 or -1 is full intensity, and 0 is no intensity). The lights can also be given a colour, which will also affect the perceived intensity of the light as certain colours appear \"darker\" than others. You must also give the light an index number which is used in other functions to reference it.":"方向和强度由 x、y 和 z 单位向量的输入值设置 (这意味着它们必须介于 -1 和 1 之间,其中 1 或 -1 是完整强度,0 是无强度)。灯光还可以被赋予颜色,这也会影响灯光的感知强度,因为某些颜色看起来比其他颜色 \" 更暗\"。您还必须为灯光提供一个索引号,用于在其他函数中引用它。", "The index number of the light (arbitrary)":"光源的索引号(任意)", "The x component of the light vector":"光矢量的x分量", "The y component of the light vector":"光矢量的y分量", "The z component of the light vector":"光向量的z分量", + "This function defines a directional light.":"该函数定义了定向光。", "This function is for defining a directional light, where the direction and intensity are set by the values input for the x, y and z unit vector (meaning that they must be between -1 and 1, where 1 or -1 is full intensity, and 0 is no intensity). The lights can also be given a colour, which will also affect the perceived intensity of the light as certain colours appear \"darker\" than others. You must also give the light an index number which what will be used in other functions to reference it.":"此函数用于定义平行光,其中方向和强度由x、y和z单位向量的输入值设置(意味着它们必须介于-1和1之间,其中1或-1表示全强度,0表示无强度)。的光照也可以被赋予一种颜色,这也会影响感知到的光的强度,因为某些颜色看起来比其他颜色\"更深\"。您还必须为光照提供一个索引号,该索引号将用于其他函数中以供参考它。", - "{}NOTE{}: There are only 8 hardware lights available, so only 8 defined lights can be enabled at any one time (although more can be defined).":"{}注意{}:只有8个硬件指示灯可用,因此任何时候只能启用8个定义的指示灯(尽管可以定义更多)。" + "{}NOTE{}: There are only 8 hardware lights available, so only 8 defined lights can be enabled at any one time (although more can be defined).":"{}注意{}:只有8个硬件指示灯可用,因此任何时候只能启用8个定义的指示灯(尽管可以定义更多)。", + "{}{}NOTE{}{} There are only 8 hardware lights available, so only 8 defined lights can be enabled at any one time (although more can be defined).":"{}{} 注意{}{} 只有 8 个可用的硬件灯光,因此一次只能启用 8 个定义的灯光 (尽管可以定义更多灯光)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_define_point.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_define_point.json index 61e698812..6e0299060 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_define_point.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_define_point.json @@ -1,11 +1,18 @@ { "The above code will enable lighting for the whole scene, then define a white light at a specific point in the room space, and then finally turn that light on.":"上述代码将为整个场景启用照明,然后在房间空间的特定点定义白光,然后最终打开该光照。", + "The colour to use for the light (either a constant, a real or a hex value)":"用于灯光的颜色 (常数、实数或十六进制值)", "The colour to use for the light (either a constant, a real or a hex value).":"用于光照的颜色(常数、实数或十六进制值)。", "The index number of the light (arbitrary)":"光源的索引号(任意)", "The light range (in pixels)":"光线范围(以像素为单位)", + "The x component of the light position":"灯光位置的 x 分量", "The x position of the light":"光照的x位置", + "The y component of the light position":"灯光位置的 y 分量", "The y position of the light":"光照的y位置", + "The z component of the light position":"灯光位置的 z 分量", "The z position of the light":"光照的z位置", + "This function defines a positional light.":"该函数定义了位置光。", "This function is for defining a positional light, where you can define the x, y and z position of the light, the light range and its colour (which will also affect the perceived intensity of the light as certain colours appear \"darker\" than others). You must also give the light an index number which what will be used in other functions to reference it.{}{}":"此函数用于定义位置光照,您可以在其中定义光照的x、y和z位置、光照范围及其颜色(当某些颜色比其他)。您还必须为光照提供一个索引号,其他函数将使用该索引号来引用它。{}{}", - "{}NOTE{}: There are only 8 hardware lights available, so only 8 defined lights can be enabled at any one time (although more can be defined).":"{}注意{}:只有8个硬件指示灯可用,因此任何时候只能启用8个定义的指示灯(尽管可以定义更多)。" + "You can define the x, y and z position of the light, the light range and its colour (which will also affect the perceived intensity of the light as certain colours appear \"darker\" than others). You must also give the light an index number which is used in other functions to reference it.{}{}":"您可以定义灯光的 x、y 和 z 位置、灯光范围及其颜色 (这也会影响灯光的感知强度,因为某些颜色看起来比其他颜色 \" 更暗 \")。您还必须为灯光指定一个索引号,以便在其他函数中引用它。{}{}", + "{}NOTE{}: There are only 8 hardware lights available, so only 8 defined lights can be enabled at any one time (although more can be defined).":"{}注意{}:只有8个硬件指示灯可用,因此任何时候只能启用8个定义的指示灯(尽管可以定义更多)。", + "{}{}NOTE{}{} There are only 8 hardware lights available, so only 8 defined lights can be enabled at any one time (although more can be defined).":"{}{} 注意{}{} 只有 8 个可用的硬件灯光,因此一次只能启用 8 个定义的灯光 (尽管可以定义更多灯光)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_enable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_enable.json index fa3f84670..3a7c4b78b 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_enable.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_enable.json @@ -3,5 +3,6 @@ "The above code will enable lighting for the whole scene, then define a white directional light in the room space, and then finally turn that light on.":"以上代码将为整个场景启用照明,然后在房间空间中定义白色方向光,然后最终打开该光照。", "The index number of the light (from 0 to 7)":"光照的索引号(从0到7)", "This function is used to enable a defined light. When you define a positional or a directional light you must assign it an index number which is then used by this function to switch the light on or off. Default is disabled ({}false{}).":"此函数用于启用定义的光照。定义位置光照或平行光时,必须为其指定一个索引号,然后该函数将使用该索引号来打开或关闭光照。默认设置为禁用({}false{})。", - "{}NOTE{}: There are only 8 hardware lights available, so only 8 defined lights can be enabled at any one time (although more can be defined).":"{}注意{}:只有8个硬件指示灯可用,因此任何时候只能启用8个定义的指示灯(尽管可以定义更多)。" + "{}NOTE{}: There are only 8 hardware lights available, so only 8 defined lights can be enabled at any one time (although more can be defined).":"{}注意{}:只有8个硬件指示灯可用,因此任何时候只能启用8个定义的指示灯(尽管可以定义更多)。", + "{}{}NOTE{}{} There are only 8 hardware lights available, so only 8 defined lights can be enabled at any one time (although more can be defined).":"{}{} 注意{}{} 只有 8 个可用的硬件灯光,因此一次只能启用 8 个定义的灯光 (尽管可以定义更多灯光)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_get.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_get.json index 2a3e36f3b..0bbc78f6b 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_get.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_get.json @@ -1,16 +1,23 @@ { "Light Type Constant":"光照类型常量", + "The above code will get the values used to define the light at index 1, then check the radius and if it is less than 200 it will be increased and the light radius set to the new value.":"上面的代码将获取用于定义索引 1 处灯光的值,然后检查半径,如果它小于 200,则会增加该半径,并将灯光半径设置为新值。", "The above code will get the values used to define the light indexed as \"1\", then check the radius and if it is less than 200 it will be increased and the light radius set to the new value.":"上述代码将获取用于将光源步进定义为\"1\"的值,然后检查半径,如果小于200,则会增加半径,并将光源半径设置为新值。", "The index number of the light (from 0 to 7)":"光照的索引号(从0到7)", "The light is a directional light":"光照是方向性光照", "The light is a point light":"光照是点光源", "The light type (element [1]) can be one of the following two constants:":"光照类型(element[ 1 ])可以是以下两个常量之一:", "This function will get the specified light parameters as an array with the following 6 elements -":"该函数将获得指定的光照参数,作为具有以下6个元素的数组-", + "This function will get the specified light parameters as an array with the following 6 elements:":"该函数将以数组形式获取指定的灯光参数,其中包含以下 6 个元素:", "[0] = enabled / disabled ({}true{} / {}false{})":"[0] = 启用 / 禁用 ({}true{}/{}false{})", "[1] = {}{}Light Type Constant{}{} (see table below)":"[1] = {}{}光照类型常数{}{}(参见下表)", "[2] = x position":"[2] = x 位置", + "[2] = x value":"[2] = x 值", "[3] = y position":"[3] = y 位置", + "[3] = y value":"[3] = y 值", "[4] = z position":"[4] = z 位置", + "[4] = z value":"[4] = z 值", + "[5] = light radius (only for point lights, will always be 1 for directional)":"[5] = 光半径 (仅适用于点光源,定向光源始终为 1)", "[5] = light radius (only for point lights, will be 0 for directional)":"[5] = 光照半径 (仅适用于点光源,对于定向光源为 0)", - "[6] = light colour (a real)":"[6] = 浅色 (实数)" + "[6] = light colour (a real)":"[6] = 浅色 (实数)", + "{}{}NOTE{}{} The x, y and z values store the light\u0027s {}position{} in case of a point light and the light\u0027s {}direction vector{} in case of a directional light.":"{}{} 注意{}{}x、y 和 z 值在点光源的情况下存储光源的 {} 位置 {},在定向光源的情况下存储光源的 {} 方向矢量 {}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_get_ambient.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_get_ambient.json index e621a9020..f5f5cadee 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_get_ambient.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_light_get_ambient.json @@ -1,4 +1,5 @@ { "The above code will get the current ambient light colour and store it in a variable.":"上述代码将获得当前环境光颜色并存储在变量中。", + "This function returns the current colour used for ambient lighting.":"此函数返回用于环境照明的当前颜色。", "This function will return the current colour used for ambient lighting.":"此函数将返回用于环境照明的当前颜色。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_set_lighting.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_set_lighting.json index 3ad36d319..464707ce2 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_set_lighting.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Lighting/draw_set_lighting.json @@ -1,5 +1,6 @@ { "Enable or disable all lighting ({}true{} or false)":"启用或禁用所有照明 ({}true{} 或 false)", "The above code will enable lighting for the whole scene, then define a white directional light in the room space, and then finally turn that light on.":"以上代码将为整个场景启用照明,然后在房间空间中定义白色方向光,然后最终打开该光照。", - "This function is used to enable all lighting effects. Default is disabled ({}false{}).":"此函数用于启用所有照明效果。默认设置为禁用({}false{})。" + "This function is used to enable all lighting effects. Default is disabled ({}false{}).":"此函数用于启用所有照明效果。默认设置为禁用({}false{})。", + "Whether to enable or disable all lighting ({}true{} or {}false{})":"是否启用或禁用所有照明 ({}true{} 或 {}false{})" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Mipmapping/gpu_set_tex_mip_filter.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Mipmapping/gpu_set_tex_mip_filter.json index 17a35c8c5..4f9f08884 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Mipmapping/gpu_set_tex_mip_filter.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Mipmapping/gpu_set_tex_mip_filter.json @@ -5,5 +5,6 @@ "This will disable the filtering between mipmap levels, which can cause visible texture transitions, but gives the best performance.":"这将禁用mipmap级别之间的过滤,这可能会导致可见纹理过渡,但会提供最佳性能。", "This will enable anisotropic filtering between mipmap levels, which greatly improves texture transition quality and can reduce the blurring visible with other filtering modes, but it has the highest hit on performance.":"这将启用mipmap级别之间的各向异性过滤,从而大大提高了纹理过渡质量,并可以减少与其他过滤模式一起可见的模糊,但对性能的影响最大。", "This will enable linear filtering between mipmap levels (this is also known as {}trilinear filtering{}), which smooths the texture transitions, but it will give a minor hit to performance.":"这将启用mipmap级别之间的线性过滤(也称为{}三线性过滤{}),从而平滑纹理过渡,但对性能的影响较小。", - "With this function you can set the current mip filter mode to one of the three types supported. You give the constant that refers to the mip filtering mode that you require, where you can choose between {}point{} filtering (default setting, meaning no filtering), {}linear{} filtering (this is also known as {}trilinear filtering{}) or {}aniostropic{} filtering (see the constants table below).":"使用此函数,您可以将当前mip过滤器模式设置为支持的三种类型之一。给出常量,该常量指的是所需的mip过滤模式,您可以在{}点{}过滤(默认设置,表示无过滤)、{}线性{}过滤(也称为{}三线性过滤{})或{}反时针{}过滤(请参阅下面的常量表)之间进行选择。" + "With this function you can set the current mip filter mode to one of the three types supported. You give the constant that refers to the mip filtering mode that you require, where you can choose between {}point{} filtering (default setting, meaning no filtering), {}linear{} filtering (this is also known as {}trilinear filtering{}) or {}aniostropic{} filtering (see the constants table below).":"使用此函数,您可以将当前mip过滤器模式设置为支持的三种类型之一。给出常量,该常量指的是所需的mip过滤模式,您可以在{}点{}过滤(默认设置,表示无过滤)、{}线性{}过滤(也称为{}三线性过滤{})或{}反时针{}过滤(请参阅下面的常量表)之间进行选择。", + "With this function you can set the current mip filter mode to one of the three types supported. You give the constant that refers to the mip filtering mode that you require, where you can choose between {}point{} filtering (default setting, meaning no filtering), {}linear{} filtering (this is also known as {}trilinear filtering{}) or {}anisostropic{} filtering (see the constants table below).":"使用此功能,您可以将当前的 mip 过滤器模式设置为支持的三种类型之一。您提供的常量代表您所需的 mip 过滤模式,您可以在 {} 点 {} 过滤 (默认设置,表示无过滤)、{} 线性 {} 过滤 (也称为 {} 三线性) 之间进行选择过滤 {}) 或 {} 各向异性 {} 过滤 (请参阅下面的常量表)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/Particle_Types.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/Particle_Types.json index b34a99016..ff7d00158 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/Particle_Types.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/Particle_Types.json @@ -2,14 +2,17 @@ "It is worth noting that creating particles through code can often be a laborious and time-consuming process due to the large number of parameters that can be changed and tweaked. For that reason it is recommended that you search around and get a hold of some type of {}Particle Designer{} (or make one yourself!) to take the drudgery out of particle creation.":"值得注意的是,由于可以更改和调整大量参数,通过代码创建粒子往往是一个费时费力的过程。因此,建议您四处搜索并获取某种类型的{}粒子设计器{}(或者自己制作一个),以使干燥的粒子不再创建。", "Once you have created your particle type you should give it a {}shape{}. This can be one of the 14 built in shapes which are 64x64 pixel sprites with alpha blending, or you can use your own sprites which can be animated, static or use random sub-images. The following functions define the visual base shape of each particle:":"创建粒子类型后,应为其赋予{}形状{}。这可以是14个内置形状之一,这些形状为64 x 64像素带Alpha混合的精灵,也可以使用自己的精灵,这些精灵可以设置动画、静态或使用随机子图像。以下函数定义每个粒子的可视基础形状:", "Once you have created your particle type you should give it a {}shape{}. This can be one of the 14 built in shapes which are 64x64 pixel sprites with alpha blending, or you can use your own sprites which can be animated, static, random sub-images or a specific sub-image. The following functions define the visual base shape of each particle:":"创建粒子类型后,应给予{}形状{}。这可以是14个内置的形状之一,这些形状是64 x64像素的精灵,带有alpha混合,或者您可以使用自己的精灵,可以是动画,静态,随机子图像或特定的子图像。以下函数定义每个粒子的视觉基础形状:", + "Once you have created your particle type you should give it a {}shape{}. This can be one of the 14 built-in shapes which are 64x64 pixel sprites with alpha blending, or you can use your own sprites which can be animated, static, random sub-images or a specific sub-image. The following functions define the visual base shape of each particle:":"创建粒子类型后,您应该为其指定一个 {} 形状 {}。这可以是 14 个内置形状之一,它们是具有 Alpha 混合的 64x64 像素精灵,或者您可以使用自己的精灵,它们可以是动画、静态、随机子图像或特定子图像。以下函数定义每个粒子的视觉基本形状:", "Once you have the style and movement of your particles sorted out, you can then set their colour and alpha values, both of which can be set as an absolute value during the whole lifespan of the particle, or as a scale of values that go from one to the other gradually. Note that there is also a special function that permits you to set the blending for particles and their surroundings, and this can be either normal or additive and gives some fantastic effects- The functions governing colour, alpha and blending are:":"一旦对粒子的样式和运动进行了排序,就可以设置其颜色和Alpha值,这两个值可以设置为粒子整个寿命期间的绝对值,也可以设置为逐渐从一个值到另一个值的比例。请注意,还有一个特殊的函数允许您为粒子及其周围环境设置混合,这可以是正常的,也可以是相加的,并提供一些奇妙的效果-控制颜色、Alpha和混合的函数包括:", "Particle Types":"粒子类型", "Particles are created from particle types, which need to be created and have their index stored in a variable so that all further particle routines can access them correctly. The following functions are used to create, check for, clear and destroy particle types: ":"粒子是从粒子类型创建的,需要创建粒子类型并将其索引存储在变量中,以便所有其他粒子例程可以正确访问它们。以下函数用于创建、检查、清除和销毁粒子类型:", "Particles are the graphic effects that can be created by the use of particle systems in a game. The particles that you define using these functions can be used in any system that you create and the normal procedure would be to define all your particles once at the start of a game and store their index values in global variables. These global variables can then be used to burst, emit or create particles at any time throughout the game. You can also create, use and then destroy particles as needed if memory is an issue or if you wish many different types but only at specific points in your game. Whatever you choose, particles are a very versatile resource!":"粒子是在游戏中使用粒子系统可以创建的图形效果。使用这些函数定义的粒子可以在创建的任何系统中使用,常规过程是在游戏开始时定义所有粒子一次,并将其索引值存储在全局变量中。这些全局变量随后可用于在整个游戏过程中随时爆发、发射或创建粒子。如果内存有问题,或者您希望有许多不同类型但仅限于游戏中的特定点,则还可以根据需要创建、使用和销毁粒子。无论您选择什么,粒子都是一种非常多函数的资源!", "Particles can also have an orientation and motion. As with most particle functions, the speed, direction and orientation are resolved as a random value that is selected from a given range and can be set with the following functions:":"粒子也可以具有方向和运动。与大多数粒子函数一样,速度、方向和方向被解析为从给定范围中选择的随机值,可以使用以下函数进行设置:", + "Particles exist on-screen for a limited amount of time and this is called their \"lifetime\". Particle lifetimes are measured in steps and (like previous functions) this is expressed as a range of values from which the particle will be given a specific lifetime. There are also a couple of interesting functions which can be used to make particles generate {}other{} particles, either each step or when they \"die\" (i.e.: Are removed from the screen), but be very careful with these functions as they can quickly create thousands of particles and crash the game! The functions that set lifetime and step or death emitting are as follows:":"粒子在屏幕上存在的时间有限,这称为它们的 \" 生命周期\"。粒子寿命是按步骤测量的,并且 (与之前的函数一样) 这表示为一系列值,根据该值范围,粒子将被赋予特定的寿命。还有一些有趣的函数可用于使粒子生成 {} 其他 {} 粒子,无论是在每个步骤中还是在粒子 \" 消亡 \" 时 (即:从屏幕上移除),但请务必小心使用这些函数,因为他们可以快速创建数千个粒子并使游戏崩溃!设置生命周期和步骤或死亡发射的函数如下:", "Particles exist on-screen for a limited amount of time and this is called their \"lifetime\". Particle lifetimes are measured in steps and (like previous functions) this is expressed as a range of values from which the particle will be given a specific lifetime. There are also a couple of interesting functions which can be used to make particles generate {}other{} particles, either each step or when they \"die\" (ie: Are removed from the screen), but be very careful with these functions as they can quickly create thousands of particles and crash the game! The functions that set lifetime and step or death emitting are as follows:":"粒子在屏幕上存在的时间有限,这被称为它们的\"寿命\"。粒子寿命按步骤进行测量,并且(像以前的函数一样)这表示为一个值范围,从该值开始粒子将被赋予特定的寿命。还有一些有趣的函数可以用来使粒子产生{}其他{}粒子,无论是每一步还是当它们\"死亡\"时(即:都从屏幕上移除),但是对于这些函数要非常小心,因为它们可以快速创建成千上万个粒子并使游戏崩溃!设置寿命和阶跃或死亡发射的函数如下:", "Particles need to be created and have their index stored in a variable so that all further particle routines can access them correctly. The following functions are used to create, check for, clear and destroy particle types:":"需要创建粒子并将其索引存储在变量中,以便所有其他粒子例程都可以正确访问它们。以下函数用于创建、检查、清除和销毁粒子类型:", "The following image shows the 14 built in particle types that you can choose from:":"下图显示了可以从中进行选择的14种内置粒子类型:", + "The following image shows the 14 built-in particle types that you can choose from:":"下图显示了您可以选择的 14 种内置粒子类型:", "{}Once you have chosen the sprite for the particle type (either a default shape or your own) you can indicate the size and scale of it. The size can be specified as a range and all particles will be created with a size chosen from within the given range. The scale is the \"base\" value for the x and y axis scale of the particle {}before{} any size variations are added and the following functions are used to control these values:":"{}为粒子类型(默认形状或自己的形状)选择sprite后,可以指定其大小和比例。可以将大小指定为范围,并且将使用从给定范围内选择的大小创建所有粒子。在添加{}任何尺寸变化之前,比例是粒子{}的{\\f 2 x }和{\\f 2 y }轴比例的\"基本\"值,并且使用以下函数来控制这些值:", "{}{}NOTE{}{} Some particle properties have an {}*_incr{} and {}*_wiggle{} parameter; changing these will affect {}existing{} particles of the given particle type. This gives you a limited way to influence existing particles in a particle system.":"{}{}注意{}{}某些粒子属性具有{}*_incr{}和{}*_wiggle{}参数;更改这些将影响给定粒子类型的{}现有{}粒子。这为您提供了影响粒子系统中现有粒子的有限方法。", "{}{}TIP{}{} If you prefer a more visual approach to creating particles and don\u0027t need the extensive functionality that {}GML Code{} offers, you can also create a {}{}Particle System Asset{}{} using {}The Particle System Editor{}.":"{}{} 提示{}{} 如果您更喜欢使用更直观的方法来创建粒子,并且不需要 {}GML 代码 {} 提供的大量功能,也可以使用 {} 粒子系统编辑器 {} 创建 {6}{7} 粒子系统资源 {8}{9}。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour1.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour1.json index 22c0a7a7c..8523513be 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour1.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour1.json @@ -1,7 +1,10 @@ { "The above code will set all particles created of the particle type indexed in the global variable \"Snow_Part\" to be white only.":"以上代码将在全局变量\"Snow_Part\"中为索引的粒子类型创建的所有粒子设置为仅白色。", + "The above code will set all particles created of the particle type indexed in the global variable {}Snow_Part{} to be white only.":"上述代码会将全局变量 {}Snow_Part{} 中索引的粒子类型创建的所有粒子设置为仅白色。", "The index of the particle type to change.":"要更改的粒子类型的索引。", "The single colour to make the particle type.":"要创建粒子类型的单一颜色。", "This function is used to set a particle type to be a single colour for the total duration of the lifetime of each individual particle.":"此函数用于将粒子类型设置为每个单个粒子寿命的总持续时间内的单个颜色。", - "This function sets a particle type\u0027s colour to be a single colour for the total duration of the lifetime of each individual particle.":"此函数将粒子类型的颜色设置为单个颜色,持续时间为每个粒子的生命周期的总持续时间。" + "This function sets a particle type\u0027s colour to be a single colour for the total duration of the lifetime of each individual particle.":"此函数将粒子类型的颜色设置为单个颜色,持续时间为每个粒子的生命周期的总持续时间。", + "This function sets the colour of newly created particles of the given type to be a single colour for the total duration of the lifetime of each individual particle.":"此函数将给定类型的新创建粒子的颜色设置为在每个粒子的整个生命周期的总持续时间内为单一颜色。", + "{}{}NOTE{}{} Existing particles of the given type are unaffected.":"{}{} 注意{}{} 给定类型的现有粒子不受影响。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour2.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour2.json index 5d9c26454..ef8191c79 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour2.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour2.json @@ -5,5 +5,7 @@ "The first colour is that which all particles will start with, and the second colour is the one on which the particle will end with, and a smooth gradient change will occur to the colour over the particle\u0027s lifetime from one colour to the other.":"第一种颜色是所有粒子将开始的颜色,第二种颜色是粒子将结束的颜色,并且在粒子的寿命期间,颜色将发生从一种颜色到另一种颜色的平滑梯度变化。", "The index of the particle type to change.":"要更改的粒子类型的索引。", "This function can be used to set a two colour gradient for each particle created of the given type. The first colour is that which all particles will start with, and the second colour is the one on which the particle will end with, and a smooth gradient change will occur to the colour over the particles lifetime from one colour to the other.":"此函数可用于为给定类型创建的每个粒子设置两个颜色渐变。第一种颜色是所有粒子开始的颜色,第二种颜色是粒子结束的颜色,并且粒子寿命从一种颜色到另一种颜色的颜色将发生平滑的梯度变化。", - "This function sets a two colour gradient for each particle created of the given type.":"该函数为给定类型创建的每个粒子设置两种颜色的渐变。" + "This function sets a two colour gradient for each newly created particle of the given type.":"此函数为每个新创建的给定类型的粒子设置两种颜色渐变。", + "This function sets a two colour gradient for each particle created of the given type.":"该函数为给定类型创建的每个粒子设置两种颜色的渐变。", + "{}{}NOTE{}{} Existing particles of the given type are unaffected.":"{}{} 注意{}{} 给定类型的现有粒子不受影响。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour3.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour3.json index aeaabed31..8a2983512 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour3.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour3.json @@ -6,5 +6,7 @@ "The first colour is that which all particles will start with, and the second colour is the one that will be blended to half way through its lifetime and the third colour is the one with which the particle will end with. A smooth gradient change will occur through the colours over the particle\u0027s lifetime from one colour to the other.":"第一种颜色是所有颗粒开始时的颜色,第二种颜色是混合到其寿命一半的颜色,第三种颜色是颗粒结束时的颜色。在粒子的寿命期间,从一种颜色到另一种颜色的平滑梯度变化将通过颜色发生。", "The index of the particle type to change.":"要更改的粒子类型的索引。", "This function can be used to set a three colour gradient for each particle created of the given type. The first colour is that which all particles will start with, and the second colour is the one that will be blended to half way through its lifetime and the third colour is the one with which the particle will end with. A smooth gradient change will occur through the colours over the particles lifetime from one colour to the other.":"此函数可用于为给定类型创建的每个粒子设置三种颜色渐变。第一种颜色是所有粒子开始的颜色,第二种颜色是在其寿命的一半时间内混合的颜色,第三种颜色是粒子结束的颜色。从一种颜色到另一种颜色,粒子寿命期间的颜色会发生平滑的渐变。", - "This function sets a three colour gradient for each particle created of the given type.":"该函数为给定类型创建的每个粒子设置三种颜色的渐变。" + "This function sets a three colour gradient for each newly created particle of the given type.":"此函数为每个新创建的给定类型的粒子设置三色渐变。", + "This function sets a three colour gradient for each particle created of the given type.":"该函数为给定类型创建的每个粒子设置三种颜色的渐变。", + "{}{}NOTE{}{} Existing particles of the given type are unaffected.":"{}{} 注意{}{} 给定类型的现有粒子不受影响。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_hsv.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_hsv.json index 7dfe9967a..526a5d7c3 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_hsv.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_hsv.json @@ -8,7 +8,9 @@ "The minimum the final colour\u0027s hue component can be.":"最终颜色的色调分量可以是最小值。", "The minimum the final colour\u0027s saturation component can be.":"最终颜色的饱和度分量可以是最小值。", "The minimum the final colour\u0027s value component can be.":"最终颜色的值分量可以是最小值。", + "This function sets a hue, saturation and value range for all newly created particles of the given type.":"此函数为给定类型的所有新创建的粒子设置色调、饱和度和值范围。", "This function sets a hue, saturation and value range for all particles of the given type.":"此函数为给定类型的所有粒子设置色调、饱和度和值范围。", "With this function you can set a hue, saturation and value range for all particles of the given type. You supply a minimum value and a maximum value for each of the three components and the particles created will have a random colour based on the given range of parameters. In this way you can create particles of the same hue but different saturations, or of different hues but the same value (luminosity) etc... All values must be between 0 and 255.":"使用此函数,可以为给定类型的所有粒子设定色调、饱和度和值范围。为三个组件中的每个组件提供最小值和最大值,创建的粒子将具有基于给定参数范围的随机颜色。通过这种方式,你可以创建色调相同但饱和度不同的粒子,或者色调不同但值(亮度)相同的粒子。所有值必须介于0和255之间。", - "You supply a minimum value and a maximum value for each of the three components and the particles created will have a random colour based on the given range of parameters. In this way you can create particles of the same hue but different saturations, or of different hues but the same value (luminosity), etc. All values must be between 0 and 255 (inclusive).":"您为三个组件中的每一个组件提供最小值和最大值,创建的粒子将具有基于给定参数范围的随机颜色。通过这种方式,您可以创建具有相同色调但不同饱和度的粒子,或者具有不同色调但具有相同值(亮度)的粒子,等等。所有值必须介于0和255之间(含0和255)。" + "You supply a minimum value and a maximum value for each of the three components and the particles created will have a random colour based on the given range of parameters. In this way you can create particles of the same hue but different saturations, or of different hues but the same value (luminosity), etc. All values must be between 0 and 255 (inclusive).":"您为三个组件中的每一个组件提供最小值和最大值,创建的粒子将具有基于给定参数范围的随机颜色。通过这种方式,您可以创建具有相同色调但不同饱和度的粒子,或者具有不同色调但具有相同值(亮度)的粒子,等等。所有值必须介于0和255之间(含0和255)。", + "{}{}NOTE{}{} Existing particles of the given type are unaffected.":"{}{} 注意{}{} 给定类型的现有粒子不受影响。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_mix.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_mix.json index b896c288d..a4e7672f8 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_mix.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_mix.json @@ -1,7 +1,10 @@ { "The above code will set the colour for each particle emitted of the particle type indexed in the global variable \"P_Damage\" to be a random mix between the colours red and yellow.":"上述代码将全局变量\"P_Damage\"中索引的粒子类型的每个发射粒子的颜色设置为红色和黄色之间的随机混合。", + "The above code will set the colour for each particle emitted of the particle type indexed in the global variable {}P_Damage{} to be a random mix between the colours red and yellow.":"上述代码会将全局变量 {}P_Damage{} 中索引的粒子类型的每个发射粒子的颜色设置为红色和黄色之间的随机混合。", "The first colour the blend will take from.":"混合将采用的第一种颜色。", "The index of the particle type to change.":"要更改的粒子类型的索引。", "The second colour the blend will take from.":"混合将使用的第二种颜色。", - "With this function you can set the given particle type to be a random blend of two colours.":"使用此函数,可以将给定的粒子类型设置为两种颜色的随机混合。" + "This function sets the colour of newly created particles of the given type to be a random blend of two colours.":"此函数将新创建的给定类型粒子的颜色设置为两种颜色的随机混合。", + "With this function you can set the given particle type to be a random blend of two colours.":"使用此函数,可以将给定的粒子类型设置为两种颜色的随机混合。", + "{}{}NOTE{}{} Existing particles of the given type are unaffected.":"{}{} 注意{}{} 给定类型的现有粒子不受影响。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_rgb.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_rgb.json index 363d85300..0e2bddb75 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_rgb.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_colour_rgb.json @@ -5,8 +5,17 @@ "The maximum the final colour\u0027s blue component can be.":"最终颜色的蓝色分量的最大值。", "The maximum the final colour\u0027s green component can be.":"最终颜色的绿色组件可以达到的最大值。", "The maximum the final colour\u0027s red component can be.":"最终颜色的红色分量的最大值。", + "The maximum value the final colour\u0027s blue component can have.":"最终颜色的蓝色分量可以具有的最大值。", + "The maximum value the final colour\u0027s green component can have.":"最终颜色的绿色分量可以具有的最大值。", + "The maximum value the final colour\u0027s red component can have.":"最终颜色的红色分量可以具有的最大值。", "The minimum the final colour\u0027s blue component can be.":"最终颜色的蓝色分量的最小值。", "The minimum the final colour\u0027s green component can be.":"最终颜色的绿色分量可以是最小值。", "The minimum the final colour\u0027s red component can be.":"最终颜色的红色分量的最小值。", - "With this function you can set the mix of red, green and blue colours for all particles created of the given type. You supply a minimum value and a maximum value for each of the three components and the particles created will have a random colour based on the given range of parameters. All values must be between 0 and 255.":"使用此函数,可以为创建的给定类型的所有粒子设定红色、绿色和蓝色的混合颜色。为三个组件中的每个组件提供最小值和最大值,创建的粒子将具有基于给定参数范围的随机颜色。所有值必须介于0和255之间。" + "The minimum value the final colour\u0027s blue component can have.":"最终颜色的蓝色分量可以具有的最小值。", + "The minimum value the final colour\u0027s green component can have.":"最终颜色的绿色分量可以具有的最小值。", + "The minimum value the final colour\u0027s red component can have.":"最终颜色的红色分量可以具有的最小值。", + "This function sets the mix of red, green and blue colours for all newly created particles of the given type.":"此函数为给定类型的所有新创建的粒子设置红色、绿色和蓝色的混合。", + "With this function you can set the mix of red, green and blue colours for all particles created of the given type. You supply a minimum value and a maximum value for each of the three components and the particles created will have a random colour based on the given range of parameters. All values must be between 0 and 255.":"使用此函数,可以为创建的给定类型的所有粒子设定红色、绿色和蓝色的混合颜色。为三个组件中的每个组件提供最小值和最大值,创建的粒子将具有基于给定参数范围的随机颜色。所有值必须介于0和255之间。", + "You supply a minimum value and a maximum value for each of the three components and the particles created will have a random colour based on the given range of parameters. All values must be between 0 and 255.":"您为三个组件中的每一个提供最小值和最大值,创建的粒子将具有基于给定参数范围的随机颜色。所有值必须介于 0 到 255 之间。", + "{}{}NOTE{}{} Existing particles of the given type are unaffected.":"{}{} 注意{}{} 给定类型的现有粒子不受影响。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_create.json index 465cf2c24..3c4f2c426 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_create.json @@ -1,4 +1,5 @@ { "This will create a new particle type, storing its index in the variable \"mypart\".":"这将创建一个新的粒子类型,将其索引存储在可变的\"mypart\"中。", + "This will create a new particle type, storing its index in the variable {}mypart{}.":"这将创建一个新的粒子类型,并将其索引存储在变量 {}mypart{} 中。", "With this function you can create a new particle type and the return value should be stored in a variable for use in all subsequent particle functions.":"使用此函数可以创建新的粒子类型,并且返回值应存储在变量中,以便在所有后续粒子函数中使用。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/particle_get_info.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/particle_get_info.json index 9b549c9d2..0c6d513c1 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/particle_get_info.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/particle_get_info.json @@ -33,7 +33,7 @@ "The Y origin of the particle system.":"粒子系统的 Y 原点。", "The Y scale of the particle image (sprite or shape).":"粒子图像的 Y 比例 (精灵或形状)。", "The above code first calls {}{}particle_get_info{}{} to retrieve information about an existing {}{}Particle System Asset{}{} {}ps_Environment{}. The asset\u0027s name is stored in a temporary variable {}_asset_name{}. After that, an array of emitter names is generated from the {}{}Particle System Info Struct{}{}\u0027s {}emitters{} variable and converted to a string listing all names, separated by a comma, using {}{}string_join_ext{}{}. Finally a debug message displays the information in a readable form.":"上面的代码首先调用 {}{}particle_get_info{}{} 以检索有关现有{}{}粒子系统资源{}{} {}ps_Environment{} 的信息。资产名称存储在临时变量{}_asset_name{}中。之后,从{}{}粒子系统信息结构{}{}的{}emitters{}变量生成发射器名称数组,并使用 {}{}string_join_ext{}{} 将其转换为列出所有名称的字符串,以逗号分隔。最后,调试消息以可读的形式显示信息。", - "The above code first gets information from an existing {}{}Particle System Asset{}{} {}ps_Clouds{} using {}{}particle_get_info{}{} and assigns the returned struct to a temporary variable {}_particle_info{}. It then looks up the emitters in the particle system through the {}{}Particle System Info Struct{}{}\u0027s {}emitters{} variable. If the particle system contains any emitters (i.e. the array\u0027s length is greater than 0), the first emitter\u0027s {}parttype{} variable is assigned to a temporary variable {}_type_info{} and checked for additive blending ({}bm_add{}). Finally a debug message is shown if additive blending is used for the particle type.":"上面的代码首先从现有的{}{}粒子系统资源{}{}使用 {}{}particle_get_info{}{} 获取 {4}ps_Clouds{5} 信息,并将返回的结构赋给一个临时变量 {}_particle_info{}。然后,它通过粒子系统信息结构{}{}{}发射器{}{}{}的变量在粒子系统中查找发射器。如果粒子系统包含任何发射器(即数组的长度大于0),则将第一个发射器的 {}parttype{} 变量赋给临时变量{}_type_info{}并检查是否进行加性混合 ({}bm_add{})。最后,如果粒子类型使用加性混合,则会显示调试消息。", + "The above code first gets information from an existing {}{}Particle System Asset{}{} {}ps_Clouds{} using {}{}particle_get_info{}{} and assigns the returned struct to a temporary variable {}_particle_info{}. It then looks up the emitters in the particle system through the {}{}Particle System Info Struct{}{}\u0027s {}emitters{} variable. If the particle system contains any emitters (i.e. the array\u0027s length is greater than 0), the first emitter\u0027s {}parttype{} variable is assigned to a temporary variable {}_type_info{} and checked for additive blending ({}bm_add{}). Finally a debug message is shown if additive blending is used for the particle type.":"上述代码首先使用 {}{}particle_get_info{}{} 从现有的 {0}{1}Particle System Asset{2}{3}{4}ps_Clouds{5} 获取信息,并将返回的结构分配给临时变量 {}_particle_info{}。 \n\n\n\n然后,它通过 {}{}Particle System Info Struct{}{} 的 {}emitters{} 变量查找粒子系统中的发射器。 \n\n\n如果粒子系统包含任何发射器 (即数组的长度大于 0), \n\n第一个发射器的 {}parttype{} 变量被分配给临时变量 {}_type_info{},并检查加性混合 ({}bm_add{})。最后,如果添加混合用于粒子类型,则会显示调试消息。", "The alpha of the particle at the end of its lifespan.":"粒子寿命结束时的透明度。", "The alpha of the particle when created.":"粒子创建时的透明度。", "The alpha of the particle when halfway through its lifespan.":"粒子在其寿命的一半时的透明度。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/draw_primitive_begin.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/draw_primitive_begin.json index f8679ecdf..8657197ed 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/draw_primitive_begin.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/draw_primitive_begin.json @@ -1,10 +1,16 @@ { "A line list":"行列表", + "A line list - A line is drawn between the first and the second vertex, between the third and fourth vertex, etc.":"线列表 - 在第一个和第二个顶点之间、第三个和第四个顶点之间等绘制一条线。", "A line strip":"线条", + "A line strip - A line is drawn between the first and the second vertex, between the second and the third vertex, the third and the fourth vertex, etc.":"线带 - 在第一个和第二个顶点之间、第二个和第三个顶点之间、第三个和第四个顶点等之间绘制一条线。", "A point list":"点列表", + "A point list - A point is drawn for every vertex.":"点列表 - 为每个顶点绘制一个点。", "A triangle fan":"三角形风扇", + "A triangle fan - Every two vertices connect to the first vertex to make a triangle.{} {} {}{}WARNING{}{} {}This primitive type is not natively supported on some platforms and there could be a performance hit if you use it.{} ":"三角形扇形 - 每两个顶点连接到第一个顶点以形成三角形。{}\n\n{}{}{} 警告 {}{}{} 某些平台本身不支持此基元类型,如果您使用它,可能会影响性能。{}", "A triangle list":"三角形列表", + "A triangle list - A triangle is drawn for the first, second and third vertex, then for the fourth, fifth and sixth vertex, etc.":"三角形列表 - 为第一个、第二个和第三个顶点绘制三角形,然后为第四个、第五个和第六个顶点绘制三角形,依此类推。", "A triangle strip":"三角形条", + "A triangle strip - A triangle is drawn for the first, second and third vertex, then for the second, third and fourth vertex, etc.":"三角形带 - 为第一个、第二个和第三个顶点绘制三角形,然后为第二个、第三个和第四个顶点绘制三角形,依此类推。", "Primitive Type Constant":"基元类型常量", "The above code will draw three quarters of a circle made from primitives.":"上述代码将绘制由基元组成的圆的四分之三。", "The following image illustrates basically how these should look and also the order in which you should define the vertexes:":"下图基本上说明了这些顶点的外观以及定义顶点的顺序:", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_submit.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_submit.json index ab5e9737b..be5a97638 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_submit.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_submit.json @@ -1,11 +1,18 @@ { + "A line list - A line is drawn between the first and the second vertex, between the third and fourth vertex, etc.":"线列表 - 在第一个和第二个顶点之间、第三个和第四个顶点之间等绘制一条线。", + "A line strip - A line is drawn between the first and the second vertex, between the second and the third vertex, the third and the fourth vertex, etc.":"线带 - 在第一个和第二个顶点之间、第二个和第三个顶点之间、第三个和第四个顶点等之间绘制一条线。", + "A point list - A point is drawn for every vertex.":"点列表 - 为每个顶点绘制一个点。", "A primitive consisting of a list of points.":"由点列表组成的基元。", "A primitive made up of a consecutive strip of lines.":"由连续的线条组成的基元。", "A primitive made up of a consecutive strip of triangles.":"由连续的三角形条组成的基元。", "A primitive made up of a individual lines in a list.":"由列表中的单个行组成的基元。", "A primitive made up of individual triangles in a list.":"由列表中的各个三角形组成的基元。", + "A triangle fan - Every two vertices connect to the first vertex to make a triangle.{} {} {}{}WARNING{}{} {}This primitive type is not natively supported on some platforms and there could be a performance hit if you use it.{} ":"三角形扇形 - 每两个顶点连接到第一个顶点以形成三角形。{}\n{}{}{} 警告 {}{}{} 某些平台本身不支持此基元类型,如果您使用它,可能会影响性能。{}", + "A triangle list - A triangle is drawn for the first, second and third vertex, then for the fourth, fifth and sixth vertex, etc.":"三角形列表 - 为第一个、第二个和第三个顶点绘制三角形,然后为第四个、第五个和第六个顶点绘制三角形,依此类推。", + "A triangle strip - A triangle is drawn for the first, second and third vertex, then for the second, third and fourth vertex, etc.":"三角形带 - 为第一个、第二个和第三个顶点绘制三角形,然后为第二个、第三个和第四个顶点绘制三角形,依此类推。", "For a visual example of the different base primitives available, see the image below:":"有关可用的不同基本基元的可视示例,请参见下图:", "For a visual example of the different base primitives available, see the image below: ":"有关可用的不同基本基元的视觉示例,请参见下图:", + "Primitive Type Constant":"基本类型常量", "The above code submits the vertex buffer in the variable {}buff{} for drawing with the shader {}shader_prim{}, using a triangle list as the base primitive and the texture of the sprite for the instance running the code.":"上述代码将顶点缓冲区提交到变量 {}buff{} 中,以便使用着色器 {}shader_prim{} 进行绘制,使用三角形列表作为基本基元,并使用运行代码的实例的精灵纹理。", "The above code will submit the vertex buffer indexed in the variable \"buff\" for drawing with the shader \"shader_prim\", using a triangle list as the base primitive and the texture of the sprite for the instance running the code.":"上述代码将提交在变量\"buff\"中索引的顶点缓冲区,以便使用着色器\"shader_prim\"绘制,并使用三角形列表作为运行代码的实例的基元和sprite纹理。", "The buffer to use.":"要使用的缓冲区。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_submit_ext.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_submit_ext.json index 4f39ba72d..550621f55 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_submit_ext.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_submit_ext.json @@ -16,6 +16,7 @@ "The vertex buffer to use.":"要使用的顶点缓冲区。", "This function can only be used in the {}Draw Events{}.":"此函数只能在 {} 绘制事件 {} 中使用。", "This function submits a range of vertices in the given vertex buffer to the GPU for drawing.":"该函数将给定顶点缓冲区中的一系列顶点提交给 GPU 进行绘制。", + "Triangle fans ({}pr_trianglefan{}) are converted to {}pr_trianglelist{} internally on platforms that don\u0027t support them when you call this function.":"三角扇 ({}pr_trianglefan{}) \n当您调用此函数时,会在不支持它们的平台上内部转换为 {}pr_trianglelist{}。", "Usage Notes":"使用说明", "You can use {}{}vertex_submit{}{} if you need to submit the entire vertex buffer.":"如果您需要提交整个顶点缓冲区,可以使用 {}{}vertex_submit{}{}。", "{}{}WARNING{}{} When using a surface as the texture (returned by {}{}surface_get_texture{}{}), you should make sure that the surface itself exists ({}{}surface_exists{}{}).":"{}{} 警告{}{} 使用表面作为纹理 (由 {}{}surface_get_texture{}{} 返回) 时,应确保表面本身存在 ({}{}surface_exists{}{}) 。" diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_vertex.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_vertex.json index f419f439d..de83df5b8 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_vertex.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_vertex.json @@ -1,6 +1,6 @@ { "Finally, in the Draw event, {}vb2{} is drawn using {}{}vertex_submit{}{}.":"最后,在 Draw 事件中,使用 {}{}vertex_submit{}{} 绘制 {0}vb2{1}。", - "First, in the Create event, a vertex format identical to the {}Passthrough Vertex Format{} is created and stored in a variable {}vertex_format{}. Then, a new vertex buffer is created and filled with three vertices, according to the vertex format. After that, a second vertex buffer {}vb2{} is created and updated with the vertex data in {}vb{} using {}{}vertex_update_buffer_from_vertex{}{}. After the function call, the vertex data in {}vb2{} will be identical to that in {}vb{}.":"首先,在 Create 事件中,创建与 {} 直通顶点格式 {} 相同的顶点格式并将其存储在变量 {}vertex_format{} 中。然后,根据顶点格式创建一个新的顶点缓冲区并用三个顶点填充。之后,使用 {}{}vertex_update_buffer_from_vertex{}{} 创建第二个顶点缓冲区 {}vb2{},并使用 {}vb{} 中的顶点数据进行更新。函数调用后,{}vb2{} 中的顶点数据将与 {}vb{} 中的相同。", + "First, in the Create event, a vertex format identical to the {}Passthrough Vertex Format{} is created and stored in a variable {}vertex_format{}. Then, a new vertex buffer is created and filled with three vertices, according to the vertex format. After that, a second vertex buffer {}vb2{} is created and updated with the vertex data in {}vb{} using {}{}vertex_update_buffer_from_vertex{}{}. After the function call, the vertex data in {}vb2{} will be identical to that in {}vb{}.":"首先,在 Create 事件中,创建与 {} 直通顶点格式 {} 相同的顶点格式并将其存储在变量 {}vertex_format{} 中。 \n\n然后,根据顶点格式创建一个新的顶点缓冲区并用三个顶点填充。在那之后, \n使用 {}{}vertex_update_buffer_from_vertex{}{} 创建第二个顶点缓冲区 {4}vb2{5},并使用 {6}vb{7} 中的顶点数据进行更新。 \n函数调用后,{}vb2{} 中的顶点数据将与 {}vb{} 中的相同。", "If the destination vertex buffer never had any vertices added to it, the vertices will be added using the source buffer\u0027s vertex format.":"如果目标顶点缓冲区从未添加任何顶点,则将使用源缓冲区的顶点格式添加顶点。", "The above code shows how to duplicate a vertex buffer\u0027s contents to another, newly created vertex buffer.":"上面的代码显示了如何将顶点缓冲区的内容复制到另一个新创建的顶点缓冲区。", "The destination vertex buffer to copy vertices to":"将顶点复制到的目标顶点缓冲区", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Sprites_And_Tiles/draw_sprite.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Sprites_And_Tiles/draw_sprite.json index 9de429855..ffb27e743 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Sprites_And_Tiles/draw_sprite.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Sprites_And_Tiles/draw_sprite.json @@ -4,6 +4,7 @@ "The x coordinate of where to draw the sprite.":"绘制精灵的位置的x坐标。", "The y coordinate of where to draw the sprite.":"绘制精灵的位置的y坐标。", "This function draws the given sprite and sub-image at a position within the game room. For the sprite you can use the instance variable {}{}sprite_index{}{} to get the current sprite that is assigned to the instance running the code, or you can use any other sprite asset. The same goes for the sub-image, as this can also be set to the instance variable {}{}image_index{}{} which will set the sub-image to that selected for the current instance sprite (note, that you can draw a different sprite and still use the sub-image value for the current instance), or you can use any other value for this to draw a specific sub-image of the chosen sprite. If the value is larger than the number of sub-images, then {}GameMaker{} will automatically loop the number to select the corresponding image (for example, if the sprite being drawn has 5 sub-images numbered 0 to 4 and we set the index value to 7, then the function will draw sub-image 3, numbered 0). Finally, the x and y position is the position within the room that the sprite will be drawn, and it is centered on the sprite {}x offset{} and {}y offset{}.":"该函数在游戏室内的某个位置绘制给定的精灵和子图像。对于精灵,您可以使用实例变量{}{}sprite_index{}{}获取分配给运行代码的实例的当前精灵,也可以使用任何其他精灵资源。子图像也是如此,因为这也可以设置为实例变量{}{}image_index{}{},该变量将把子图像设置为为当前实例精灵选择的子图像(请注意,您可以绘制不同的精灵,并仍然使用当前实例的子图像值),或者您可以为此使用任何其他值来绘制所选精灵的特定子图像。如果该值大于子图像的数量,{}GameMaker{}将自动循环该数量以选择相应的图像(例如,如果正在绘制的精灵具有编号为0到4的5个子图像,并且我们将索引值设置为7,则函数将绘制编号为0的子图像3)。最后,x和y位置是房间内将绘制精灵的位置,它位于精灵{}x偏移量{}和{}y偏移量{}的中心。", + "This function draws the given sprite and sub-image at a position within the game room. For the sprite you can use the instance variable {}{}sprite_index{}{} to get the current sprite that is assigned to the instance running the code, or you can use any other sprite asset. The same goes for the sub-image, as this can also be set to the instance variable {}{}image_index{}{} which will set the sub-image to that selected for the current instance sprite (note, that you can draw a different sprite and still use the sub-image value for the current instance), or you can use any other value for this to draw a specific sub-image of the chosen sprite. If the value is larger than the number of sub-images, then {}GameMaker{} will automatically loop the number to select the corresponding image (for example, if the sprite being drawn has 5 sub-images numbered 0 to 4 and we set the index value to 7, then the function will draw the third sub-image, numbered 2). Finally, the x and y position is the position within the room that the sprite will be drawn, and it is centered on the sprite {}x offset{} and {}y offset{}.":"该函数在游戏室内的某个位置绘制给定的精灵和子图像。对于精灵,您可以使用实例变量 {}{}sprite_index{}{} 来获取分配给运行代码的实例的当前精灵,或者您可以使用任何其他精灵资源。子图像也是如此,因为它也可以设置为实例变量 {}{}image_index{}{},它将把子图像设置为为当前实例精灵选择的图像 (注意,您可以绘制不同的精灵并仍然使用当前实例的子图像值),或者您可以使用任何其他值来绘制所选精灵的特定子图像。如果该值大于子图像的数量,则 {}GameMaker{} 将自动循环该数字来选择相应的图像 (例如,如果正在绘制的精灵有 5 个编号为 0 到 4 的子图像,并且我们设置将索引值设置为 7,则函数将绘制第三个子图像,编号为 2)。最后,x 和 y 位置是将绘制精灵的房间内的位置,它以精灵的 {}x 偏移量 {} 和 {}y 偏移量 {} 为中心。", "This will draw the instances assigned sprite (sprite_index) with the current sub-image at the x and y position of the instance within the room. It will then draw the first frame of the sprite indexed by \"spr_Halo\" at the same x and y position but 32 pixels \u0027above\u0027.":"这将在房间内实例的x和y位置绘制指定了sprite(sprite_index)的实例,其中包含当前子图像。然后,它将在相同的x和y位置绘制由\"spr_Halo\"索引的精灵的第一帧,但是在上面的32个像素处。", "{}NOTE{} This function may not work as expected when using skeleton animation sprites, and you may find that the function only draws the first frame of the default pose. You should be using the {}draw_skeleton_*{} functions instead.":"{}注意{}使用骨骼动画精灵时,此函数可能无法按预期工作,您可能会发现此函数仅绘制默认姿势的第一帧。您应该改用{}draw_skeleton_*{}函数。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/Surfaces.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/Surfaces.json index d797db99d..c092b4927 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/Surfaces.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/Surfaces.json @@ -1,43 +1,69 @@ { + "Another thing you can do with surfaces is use them as textures to be manipulated, or to create sprites \"on the fly\", or to create complex overlays. In fact, the uses for surfaces are endless!":"您可以使用表面做的另一件事是将它们用作要操纵的纹理,或 \" 动态 \" 创建精灵,或创建复杂的叠加层。事实上,表面的用途是无穷无尽的!", + "Apart from the application surface, you can also create your own surfaces and use them to create stunning or subtle special effects in your game.":"除了应用程序表面之外,您还可以创建自己的表面并使用它们在游戏中创建令人惊叹或微妙的特效。", + "Application Surface":"应用表面", + "Application Surface Event Order":"应用程序表面事件顺序", "As mentioned above, {}GameMaker{} doesn\u0027t actually render most things to the screen directly, but instead it renders them to the {}application surface{}. This is essentially a surface - just like any that you can make yourself using the surface functions - and as such it can be manipulated, drawn to, sent to shaders, etc. Basically, anything that you would normally do with a surface you created can also be applied to the application surface.":"如上所述,{}GameMaker{} 实际上并不将大多数内容直接渲染到屏幕上,而是将它们渲染到 {} 应用程序界面 {}。这本质上是一个表面 - 就像您可以使用表面函数自己制作的任何表面一样 - 因此它可以被操纵、绘制、发送到着色器等。基本上,您通常对您创建的表面执行的任何操作都可以也可应用于应用表面。", "As mentioned above, {}GameMaker{} doesn\u0027t actually render most things to the screen directly, but instead it renders them to the {}application surface{}. This is essentially a surface - just like any that you can make yourself using the surface functions - and as such it can be manipulated, drawn to, sent to shaders, etc... Basically, anything that you would normally do with a surface you created can also be applied to the application surface.":"如上所述,{}GameMaker{}实际上并不直接将大部分内容渲染到屏幕,而是将它们渲染到{}应用程序表面{}。这本质上是一个表面,就像任何可以使用表面函数创建自己的表面一样,因此可以对其进行操作、绘制、发送到着色器等...基本上,通常对创建的表面执行的任何操作也可以应用于应用程序表面。", + "Custom Surfaces":"定制表面", + "Depth and Stencil Buffer":"深度和模板缓冲区", "Draw GUI End event":"绘制 GUI 结束事件", "Draw GUI end event":"绘制 GUI 结束事件", "Draw GUI event":"绘制 GUI 事件", "Finally, it is worth noting that drawing to a surface will take into consideration the colour {}and{} the alpha component of each pixel, both from the surface itself and also from what is being drawn to it. This may lead to some rather unintuitive results (for example, drawing a sprite with 0.5 alpha to a surface with 0 alpha will give a final alpha of 0.25). The reasons for this are explained on the following page, and we recommend that you read it before working with surfaces: {}Guide To Using Blendmodes{}":"最后,值得注意的是,绘制到表面将考虑每个像素的颜色{}和{}的Alpha分量,这两个分量既来自表面本身,也来自绘制到表面的内容。这可能会导致一些相当不直观的结果(例如,将具有0.5 Alpha的精灵绘制到具有0 Alpha的表面将给出0.25的最终Alpha)。下一页说明了这样做的原因,我们建议您在处理表面之前阅读这些原因:{}使用混合模式指南{}", "Finally, you have two functions for storing and retrieving surfaces in {}Buffers{}:":"最后,您有两个用于在{}缓冲区{}中存储和检索表面的函数:", "Finally, you would draw the surface (or use it in a shader, or whatever is required).":"最后,绘制表面(或者在着色器中使用,或者根据需要使用)。", + "Finally, you would draw the surface (or {}use it in a shader{}, or whatever is required).":"最后,您将绘制表面 (或 {} 在着色器中使用它 {},或任何需要的内容)。", "First, you should realise that surfaces ({}except{} the application surface) are \"volatile\". This means that if the device or window loses focus or is minimised (good examples are when you ALT +Tab to different window and back again on Windows, or on an Android device when the app loses focus due to a call) then the surface {}may be destroyed{}. This is because it is stored {}only{} in the texture memory ({}VRAM{}) and may be overwritten when the target platform needs that memory for something else which means that you should {}{}always{}{} have some type of fail-safe code in place, usually with the {}{}surface_exists(){}{} function.":"首先,您应该意识到表面(应用程序表面{}除外{})是\"易变的\"。这意味着,如果设备或窗口失去焦点或被最小化(很好的例子是,当您 Alt+ Tab 键切换到不同的窗口,然后在 Windows 上返回,或者当应用程序由于调用而失去焦点时,在 Android 设备上返回),则表面{}可能会被破坏{}。这是因为它{}仅{}存储在纹理内存 ({}VRAM{})中,并且可能会在目标平台需要该内存进行其他操作时被覆盖,这意味着您应该{}{}始终{}{}具有某种类型的失败安全代码,通常具有 {}{}surface_exists(){}{} 函数。", "First, you should realise that surfaces ({}except{} the application surface) are \"volatile\". This means that if the device or window loses focus or is minimised (good examples are when you ALT +Tab to different window and back again on Windows, or on an Android device when the app loses focus due to a call) then the surface {}may be destroyed{}. This is because it is stored {}only{} in the texture memory ({}VRAM{}) and may be overwritten when the target platform needs that memory for something else which means that you should {}{}always{}{} have some type of fail-safe code in place, usually with the {}{}surface_exists{}{} function.":"首先,您应该认识到表面 (应用程序表面{}除外{}) 是 \" 易失性的\"。这意味着,如果设备或窗口失去焦点或最小化 (很好的例子是,在 Windows 上,当您按 ALT +Tab 切换到不同的窗口并再次返回时,或者在 Android 设备上,当应用程序由于调用而失去焦点时),则表面 {} 可能会被破坏 {}。这是因为它 {} 仅 {} 存储在纹理内存 ({}VRAM{}) 中,并且当目标平台需要该内存用于其他用途时可能会被覆盖,这意味着您应该 {}{} 始终 {}{} 具有某种类型的故障安全代码,通常使用 {}{}surface_exists{}{} 函数。", + "For example, you can use surfaces to \"catch\" instances, which can then be destroyed, and in this way you can create a decal effect where the sprite for the instance is displayed on the surface as if it still existed, permitting graphical effects like debris, blood, etc. without any real processing overhead.":"例如,您可以使用表面 \" 捕获 \" 实例,然后将其销毁,通过这种方式,您可以创建贴花效果,其中实例的精灵显示在表面上,就好像它仍然存在一样,允许诸如碎片、血液等,没有任何实际的处理开销。", "Fourth, when drawing to a surface manually, the surface is {}always{} at the position of (0, 0). This means that you may need to convert {}absolute{} coordinates into {}relative{} coordinates for the surface. For example, if you have a camera-sized surface and wish to draw something that is currently visible in the camera to that surface, you should subtract the camera view x and y coordinates from the actual x and y coordinates to get a relative position to the surface (0, 0) position. So, the code would look something like this:":"第四,手动绘制表面时,表面 {} 始终 {} 位于 (0, 0) 位置。这意味着您可能需要将表面的 {} 绝对 {} 坐标转换为 {} 相对 {} 坐标。例如,如果您有一个相机大小的表面,并且希望将相机中当前可见的内容绘制到该表面,则应从实际 x 和 y 坐标中减去相机视图 x 和 y 坐标,以获得相对位置表面 (0, 0) 位置。所以,代码看起来像这样:", "Fourth, when drawing to a surface manually, the surface is {}always{} at the position of (0,0). This means that you may need to convert {}absolute{} coordinates into {}relative{} coordinates for the surface. For example, if you have a camera-sized surface and wish to draw something that is currently visible in the camera to that surface, you should subtract the camera view x and y coordinates from the actual x and y coordinates to get a relative position to the surface (0,0) position. So, the code would look something like this:":"第四,当手动绘制到表面时,表面总是{}处于(0,0 )的位置。这意味着您可能需要将{}绝对{}坐标转换为表面的{}相对{}坐标。例如,如果具有摄影机大小的表面,并希望将摄影机中当前可见的内容绘制到该表面,则应从实际的x和y坐标中减去摄影机视图x和y坐标,以获得与表面(0,0 )位置的相对位置。因此,代码看起来像这样:", + "Function Reference":"功能参考", "However, apart from this application surface, you can also create your own surfaces and use them to create stunning or subtle special effects in your game. For example, you can use surfaces to \"catch\" instances, which can then be destroyed, and in this way you can create a decal effect where the sprite for the instance is displayed on the surface as if it still existed, permitting graphical effects like debris, blood, etc. without any real processing overhead. Another thing you can do with surfaces is use them as textures to be manipulated, or to create sprites \"on the fly\", or to create complex overlays. in fact, the uses for surfaces are endless!":"然而,除了这个应用程序表面之外,您还可以创建自己的表面并使用它们在游戏中创建令人惊叹或微妙的特殊效果。例如,您可以使用表面 \" 捕获 \" 实例,然后将其销毁,通过这种方式,您可以创建贴花效果,其中实例的精灵显示在表面上,就好像它仍然存在一样,允许诸如碎片、血液等,没有任何实际的处理开销。您可以使用表面做的另一件事是将它们用作要操纵的纹理,或 \" 动态 \" 创建精灵,或创建复杂的叠加层。事实上,表面的用途是无穷无尽的!", "However, apart from this application surface, you can also create your own surfaces and use them to create stunning or subtle special effects in your game. For example, you can use surfaces to \"catch\" instances, which can then be destroyed, and in this way you can create a decal effect where the sprite for the instance is displayed on the surface as if it still existed, permitting graphical effects like debris, blood, etc... without any real processing overhead. Another thing you can do with surfaces is use them as textures to be manipulated, or to create sprites \"on the fly\", or to create complex overlays. in fact, the uses for surfaces are endless!":"但是,除了这个应用程序表面,你还可以创建自己的表面,并使用它们在游戏中创建令人惊叹或微妙的特殊效果。例如,可以使用表面来\"捕捉\"实例,然后可以销毁这些实例,通过这种方式,可以创建贴花效果,其中实例的精灵显示在表面上,就好像它仍然存在一样,允许出现碎片、血液等图形效果,而不会产生任何实际的处理开销。你可以对表面做的另一件事情是把它们当作纹理来操纵,或者创建\"飞行中的精灵\",或者创建复杂的叠加,实际上对表面的用途是无穷的!", + "In a Draw event (or any other event) {}before{} you want to draw something to the surface, do a check to see if it exists, and if not, create it:":"在 Draw 事件 (或任何其他事件) 中,您想要在表面上绘制某些内容之前 {},请检查它是否存在,如果不存在,则创建它:", + "In case the surface is automatically removed from the memory while you need it, this will catch that and recreate the surface.":"如果表面在您需要时自动从内存中删除,这将捕获该表面并重新创建表面。", + "In the normal draw events, {}GameMaker{} doesn\u0027t actually draw directly to the screen, but rather draws to a {}surface{} called the {}application surface{}.":"在正常绘制事件中,{}GameMaker{} 实际上并不直接绘制到屏幕,而是绘制到称为 {} 应用程序表面 {} 的 {} 表面 {}。", "In the normal draw events, {}GameMaker{} doesn\u0027t actually draw directly to the screen, but rather draws to a {}surface{} called the {}application surface{}. This surface is basically a blank \"canvas\" that can then later be manipulated before being drawn to the screen when needed, and in most cases {}GameMaker{} handles this for you (although you can also manipulate it yourself in code for shaders, scaling and many other things - further details are given below).":"在正常绘制事件中,{}GameMaker{} 实际上并不直接绘制到屏幕,而是绘制到称为{}应用程序表面{}的{2}表面{3}。此表面基本上是一个空白的\"画布\",稍后可以在需要时在绘制到屏幕之前对其进行操作,并且在大多数情况下 {}GameMaker{} 会为您处理此事件(尽管您也可以在着色器、缩放和许多其他事情的代码中自行操作它,但下面会提供进一步的详细信息)。", "Next, you would draw the things you wish as well as perform any other manipulations.":"接下来,您将绘制所需的内容以及执行任何其他操作。", - "Normal surfaces are quite easy to use, but there are a few basic rules to be followed when you use them:":"法线表面非常容易使用,但使用它们时需要遵循一些基本规则:", + "Next, you would draw the things you wish as well as perform any other manipulations. It is recommended to clear the surface before drawing anything.":"接下来,您将绘制您想要的东西并执行任何其他操作。建议在绘制任何内容之前先清理表面。", + "Normal surfaces are quite easy to use, but there are a few basic rules to be followed when you use them:":"普通表面非常易于使用,但使用它们时需要遵循一些基本规则:", + "Once you are done drawing to the surface, you reset the draw target so that all further drawing happens on the screen again.":"完成在表面上的绘制后,您可以重置绘制目标,以便所有进一步的绘制再次在屏幕上进行。", "Once you are done you reset the drawing target so that all further drawing happens on the screen again.":"完成后,将重置绘制目标,以便所有进一步的绘制再次出现在屏幕上。", "One thing to note is that should you require drawing the whole display to a surface (including tiles, backgrounds etc.) you can simply access the application surface itself (see below for further details) or you could assign a surface to a view port using the variable {}{}view_surface_id[0..7]{}{} as with this, all that is visible in that view port will be drawn to the corresponding surface.":"需要注意的一件事是,如果您需要将整个显示绘制到表面 (包括图块、背景等),您可以简单地访问应用程序表面本身 (有关更多详细信息,请参阅下文),或者您可以使用以下命令将表面分配给视口:变量 {}{}view_surface_id[0..7]{}{} 与此一样,该视口中的所有可见内容都将绘制到相应的表面。", "One thing to note is that should you require drawing the whole display to a surface (including tiles, backgrounds etc...) you can simply access the application surface itself (see below for further details) or you could assign a surface to a view port using the variable {}{}view_surface_id[0..7]{}{} as with this, all that is visible in that view port will be drawn to the corresponding surface.":"需要注意的一点是,如果需要将整个显示绘制到一个表面(包括图块、背景等),可以简单地访问应用程序表面本身(有关详细信息,请参阅下面的内容),或者可以使用变量{}{}view_surface_id[ 0..7 ]{}{}将表面指定给视口,因此,在该视口中可见的所有内容都将绘制到相应的表面。", "Pre-Draw event{}          --- > {}the application surface is created (if it doesn\u0027t exist) and the render target is set{}":"预绘制事件 {}   --- >{} 创建应用程序界面 (如果不存在) 并设置渲染目标 {}", "Pre-draw event{}          --- > {}the application surface is created (if it doesn\u0027t exist) and the render target is set{}":"绘制前事件{}--->{}将创建应用程序表面(如果它不存在)并设置渲染目标{}", "Second, you should note that surfaces can require large quantities of VRAM to be used, and so you should attempt to keep them as small as possible. Normally you would try and keep them no larger than the size of the view or display window.":"其次,应注意,表面可能需要大量 VRAM 才能使用,因此应尝试将其保持尽可能小的尺寸。通常,您会尝试使它们不大于视图或显示窗口的大小。", + "See {}The Depth And Stencil Buffer{} for detailed information.":"有关详细信息,请参阅 {} 深度和模板缓冲区 {}。", + "Surface Rules":"表面规则", "Surfaces":"表面", "The basic use of a surface would be as follows:":"表面的基本用途如下:", "The following functions exist for drawing surfaces:":"绘制表面具有以下函数:", "The following functions exist to deal with surfaces (these functions are specific for creating and manipulating surfaces, but to actually draw them to the screen you should be using the specific draw functions that can be found below):":"以下函数用于处理表面(这些函数专用于创建和操作表面,但要将它们实际绘制到屏幕,应使用下面可以找到的特定绘制函数):", + "The most straightforward use for surfaces is to draw sprites, text, particle effects, etc. to it, i.e. visual elements with a colour and possibly a transparency (alpha) value for every pixel. By default, surfaces also have a depth and stencil buffer that can be used to achieve all kinds of advanced graphical effects.":"表面最直接的用途是在其上绘制精灵、文本、粒子效果等,即每个像素具有颜色和可能的透明度 (alpha) 值的视觉元素。默认情况下,表面还具有深度和模板缓冲区,可用于实现各种高级图形效果。", "The use of this surface means that you can easily create incredible transitions using shaders, or take the screen and wrap it around a 3D form, or simply scale a low-res game up to any resolution screen... The possibilities are endless!":"使用此表面意味着您可以使用着色器轻松创建令人难以置信的过渡,或者将屏幕包裹在3D形状周围,或者简单地将低分辨率游戏缩放到任何分辨率屏幕...可能性是无穷的!", + "Third, you should {}only create surfaces in the Draw event{}. If you create a surface in the Create Event of an instance, you could potentially get the {}same{} index as the {}{}application_surface{}{}. This can then cause lots of problems and confusion as you think you are using your own surface, but you are actually using the current render target. You should also always try to limit {}drawing{} to a surface in the Draw event too, since due to the optimised way in which {}GameMaker{} draws to the screen, it is recommended that you keep all draw functions {}within the Draw event{} - this includes clearing a surface when it is first created, etc. Drawing to a surface outside of the Draw event is possible and may even be necessary for some effects, but it\u0027s not how it {}should{} be done.":"第三,您应该 {} 仅在 Draw 事件中创建表面 {}。如果您在实例的 Create 事件中创建表面,您可能会获得与 {}{}application_surface{}{}{2} 相同的 {3} 索引。这可能会导致很多问题和混乱,因为您认为您正在使用自己的表面,但实际上您正在使用当前的渲染目标。您还应该始终尝试将 Draw 事件中的 {} 绘制 {} 限制为表面,因为由于 {}GameMaker{} 绘制到屏幕的优化方式,建议您保留所有绘制函数 {} 在 Draw 事件内 {}- 这包括在首次创建表面时清除表面等。在 Draw 事件之外绘制表面是可能的,甚至对于某些效果可能是必要的,但这不是它 {} 应该 {} 的方式做完了。", "Third, you should {}only create surfaces in the draw event{}. If you create a surface in the Create Event of an instance, you could potentially get the {}same{} index as the {}application_surface{}. This can then cause lots of problems and confusion as you think you are using your own surface, but you are actually using the current render target. You should also always try to limit {}drawing{} to a surface in the draw event too, since due to the optimised way in which {}GameMaker{} draws to the screen, it is recommended that you keep all draw functions {}within the draw event{} - this includes clearing a surface when it is first created, etc... Drawing to a surface outside of the draw event is possible and may even be necessary for some effects, but it\u0027s not how it {}should{} be done.":"第三,{}只应在绘制事件中创建表面{}。如果在实例的\"创建事件\"中创建表面,则可能会获得与 {}application_surface{} {2}相同的{3}个索引。这可能会导致许多问题和混淆,因为您认为使用的是自己的表面,但实际上使用的是当前渲染目标。您还应该始终尝试将{}绘制{}限制在绘制事件中的表面,因为 {}GameMaker{} 绘制到屏幕的优化方式,建议您将所有绘制函数{}保留在绘制事件{}-这包括在首次创建表面时清除表面,等等...绘制到绘制事件外部的表面是可能的,甚至对于某些效果可能是必需的,但这不是{}应该如何进行{}。", "Third, you should {}only create surfaces in the draw event{}. If you create a surface in the Create Event of an instance, you could potentially get the {}same{} index as the {}{}application_surface{}{}. This can then cause lots of problems and confusion as you think you are using your own surface, but you are actually using the current render target. You should also always try to limit {}drawing{} to a surface in the draw event too, since due to the optimised way in which {}GameMaker{} draws to the screen, it is recommended that you keep all draw functions {}within the draw event{} - this includes clearing a surface when it is first created, etc. Drawing to a surface outside of the draw event is possible and may even be necessary for some effects, but it\u0027s not how it {}should{} be done.":"第三,您应该 {} 仅在绘制事件中创建表面 {}。如果您在实例的 Create 事件中创建表面,您可能会获得与 {}{}application_surface{}{}{2} 相同的 {3} 索引。这可能会导致很多问题和混乱,因为您认为您正在使用自己的表面,但实际上您正在使用当前的渲染目标。您还应该始终尝试将 {} 绘制 {} 限制在绘制事件中的表面,因为由于 {}GameMaker{} 绘制到屏幕的优化方式,建议您保留所有绘制函数 {} 在绘制事件内 {}- 这包括在首次创建表面时清除表面等。在绘制事件之外绘制表面是可能的,甚至对于某些效果可能是必要的,但这不是它 {} 应该 {} 的方式做完了。", + "This surface is basically a blank \"canvas\" that can be manipulated before being drawn to the screen when needed, and in most cases {}GameMaker{} handles this for you (although you can also manipulate it yourself in code for shaders, scaling and many other things - further details are given below).":"该表面基本上是一个空白的 \" 画布\",可以在需要时在绘制到屏幕之前对其进行操作,并且在大多数情况下,{}GameMaker{} 会为您处理此操作 (尽管您也可以在着色器、缩放和缩放代码中自行操作它) 许多其他事情 - 下面给出了更多详细信息)。", "To access this surface, you need to use the built-in global variable {}application_surface{} which is explained on the following page:":"要访问此表面,您需要使用内置全局变量 {}application_surface{},该变量在以下页面中进行了说明:", + "Using Surfaces":"使用表面", + "When you no longer need the surface, remove it from memory:":"当您不再需要该表面时,将其从内存中删除:", + "When you run your game, this surface is created the first time that a {}draw event{} is called in each new room that you enter, which means that nothing is drawn until that point. However, you can still get the application surface position and resize it in the {}Create Event{} or any other event without getting any errors and the values used will be relevant to the surface when it is created. The actual sequence of events for the creation and drawing of the application surface is as follows:":"当您运行游戏时,系统会在您进入的每个新房间中首次调用 {} 绘制事件 {} 时创建此表面,这意味着在此之前不会绘制任何内容。不过,您仍然可以在 {} 创建事件 {} 或任何其他事件中获取应用表面位置并调整其大小,而不会出现任何错误,并且使用的值将与创建表面时相关。创建和绘制应用程序表面的实际事件顺序如下:", "When you run your game, this surface is created the first time that the {}draw event{} is called in each new room that you enter, which means that nothing is drawn until that point. However, you can still get the application surface position and resize it in the {}Create Event{} or any other event without getting any errors and the values used will be relevant to the surface when it is created. The actual sequence of events for the creation and drawing of the application surface is as follows:":"运行游戏时,在您进入的每个新房间中第一次调用{}绘制事件{}时会创建此表面,这意味着在此之前不会绘制任何内容。但是,您仍然可以在{}创建事件{}或任何其他事件中获取应用程序表面位置并调整其大小,而不会出现任何错误,并且在创建表面时使用的值将与表面相关。创建和绘制应用程序表面的实际事件顺序如下:", + "You also have a few functions that are designed {}only {}for use with the application surface:":"您还拥有一些{}专为{}与应用程序界面一起使用而设计的功能:", "You also have a few specialist functions that are designed {}only {}for use with the application surface:":"您还具有一些专业函数,这些函数仅设计为{}用于应用程序表面:", "You first create a surface and assign it to a variable.":"首先创建一个表面并将其分配给一个变量。", "You first create a surface and assign its index to a variable.":"首先创建表面并将其索引指定给变量。", + "You first create a variable to hold the surface, e.g. in the Create event:":"首先创建一个变量来保存曲面,例如在创建事件中:", + "You would then set the drawing target to the surface rather than the display, when you actually want to draw something to it, e.g. in the Draw event:":"然后,当您实际想要在其上绘制某些内容时,例如,将绘图目标设置为表面而不是显示器。在抽奖活动中:", "You would then set the drawing target to the surface rather than the display.":"然后将绘制目标设置为表面而不是显示。", "{}NOTE{} This is not true of the {}application surface{}, only user-created surfaces.":"{}注意{}这不适用于{}应用表面{},只适用于用户创建的表面。", "{}NOTE{}: The only thing you {}cannot{} do with the application surface is free it. It always exists, although the index value to access it may change.":"{}注意{}:{}不能对应用程序表面执行的唯一操作是将其释放。它始终存在,尽管用于访问它的索引值可能会更改。", "{}NOTE{}{} {}This doesn\u0027t appear to happen with sprites or other visual assets (but actually does!) as they are also stored in regular memory (RAM) and when they are removed from texture memory (VRAM) they immediately get restored from regular memory when the game regains focus.":"{}注意{}{}{}这种情况似乎不会发生在精灵或其他视觉资源上(但实际上会发生!),因为它们也存储在常规存储器 (RAM) 中,当它们从纹理存储器 (VRAM) 中移除时,当游戏重新聚焦时,它们会立即从常规存储器中恢复。", + "{}Surfaces{}":"{} 表面 {}", "{}{}Draw GUI Begin event":"{}{}绘制 GUI 开始事件", "{}{}Draw GUI begin event":"{}{}绘制 GUI 开始事件", "{}{}For each visible view port, or, if no views ports are active, once {} {}Draw Begin event{} {}Draw event{} {}Draw End event{}         --- > {}the application surface render target is reset here{}{} {} ":"{}{}对于每个可见视口,或者,如果没有活动视口,则执行一次 {}{} 绘制开始事件 {}{} 绘制事件 {}{} 绘制结束事件 {}--- >{} 应用程序表面渲染目标在此处重置 {}{}{}", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_create.json index 171a84039..eee930942 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_create.json @@ -1,11 +1,13 @@ { "Any one of the following formats can be used when creating a surface:":"创建表面 时,可以使用以下任何一种格式:", "Formats":"格式", + "If automatic depth buffer generation is enabled (the default), a depth buffer and stencil buffer are also created for the surface. This can be turned off using {}{}surface_depth_disable{}{}.":"如果启用自动深度缓冲区生成 (默认),还会为表面创建深度缓冲区和模板缓冲区。可以使用 {}{}surface_depth_disable{}{} 关闭此功能。", "It is highly recommended that all surfaces are created with a size that is a power of 2, e.g. 16, 128, 512 or 1024 pixels in size. This is not exactly necessary on certain platforms (like Windows and MacOS) but it will certainly increase compatibility on those targets, while for HTML5 and devices it is essential and very it\u0027s important that you remember this or you may run into problems later.":"强烈建议所有表面的大小均为 2 的幂,例如大小为 16、128、512 或 1024 像素。这在某些平台 (如 Windows 和 MacOS) 上并不是完全必要的,但它肯定会提高这些目标的兼容性,而对于 HTML5 和设备来说,这是必不可少的,并且记住这一点非常重要,否则以后可能会遇到问题。", "It is highly recommended that all surfaces be created with a size that is a power of 2, i.e. 16, 128, 512 or 1024 pixels in size, for example. This is not exactly necessary on certain platforms (like Windows and MacOS) but it will certainly increase compatibility on those targets, while for HTML5 and devices it is essential and very it\u0027s important that you remember this or you may run into problems later.":"强烈建议创建的所有表面 的大小均为 2 的幂,例如,大小为 16、128、512 或 1024 像素。这在某些平台 (如 Windows 和 MacOS) 上并不是完全必要的,但它肯定会增加这些目标上的兼容性,而对于 HTML5 和设备来说,这是必不可少的,而且非常重要的是,你要记住这一点,否则你以后可能会遇到问题。", "It is highly recommended that all surfaces be created with a size that is a power of 2, ie: 16, 128, 512 or 1024 pixels in size, for example. This is not exactly necessary on certain platforms (like Windows and MacOS) but it will certainly increase compatibility on those targets, while for HTML5 and devices it is essential and very it\u0027s important that you remember this or you may run into problems later.":"强烈建议创建大小为2的所有表面,即:例如,尺寸为16, 128,512或1024像素。在某些平台(如Windows和MacOS)上,这并不是完全必要的,但它肯定会提高这些目标的兼容性,而对于HTML5和设备来说,这是至关重要的,记住这一点非常重要,否则以后可能会遇到问题。", "Surface Format Type Constant":"表面格式类型常量", "The above code checks to see if a surface exists and if it does not it will create a surface that is 1024 pixels wide and 1024 pixels high, assigning it to the variable \"surf\". The drawing target is then set to the new surface, which is cleared and made transparent before having the drawing target reset to the display. Finally the surface is assigned to a view.":"上面的代码检查表面是否存在,如果不存在,则会创建一个宽 1024 像素、高 1024 像素的表面,并将其分配给变量 \"surf\"。然后将绘图目标设置为新表面,在将绘图目标重置为显示器之前,该表面将被清除并变得透明。最后将表面分配给视图。", + "The above code checks to see if a surface exists and if it does not it will create a surface that is 1024 pixels wide and 1024 pixels high, assigning it to the variable {}surf{}. The drawing target is then set to the new surface, which is cleared and made transparent before having the drawing target reset to the display. Finally the surface is assigned to a view.":"上面的代码检查表面是否存在,如果不存在,则会创建一个宽 1024 像素、高 1024 像素的表面,并将其分配给变量 {}surf{}。然后将绘图目标设置为新表面,在将绘图目标重置为显示器之前,该表面将被清除并变得透明。最后将表面分配给视图。", "The above code checks to see if a surface exists and if it does not it will create a surface that is 1024 pixels wide and 1024 pixels high, assigning the index to the variable \"surf\". The drawing target is then set to the new surface, which is cleared and made transparent before having the drawing target reset to the display. Finally the surface is assigned to a view.":"上述代码检查表面是否存在,如果不存在,将创建一个宽度为1024像素、高度为1024像素的表面,并将索引指定给可变的\"浏览\"。然后将绘制目标设置为新表面,在将绘制目标重置为显示之前,新表面将被清除并变为透明。最后,将表面指定给视图。", "The height of the surface to be created":"要创建的表面的高度", "The height of the surface to be created.":"要创建的表面的高度。", @@ -23,5 +25,6 @@ "When the surface is first created, it may contain \"noise\" as basically it is just an area of memory that is put aside for the purpose (and that memory may still contain information), so you may want to clear the surface before use with a function like {}{}draw_clear_alpha{}{}.":"首次创建表面时,它可能包含 \" 噪声\",因为基本上它只是为此目的而保留的内存区域 (并且该内存可能仍然包含信息),因此您可能需要在使用之前清除表面类似 {}{}draw_clear_alpha{}{} 的函数。", "You can optionally specify the format that will be used to store the surface data in memory. The default format is {}surface_rgba8unorm{}.":"您可以选择指定将用于在内存中存储表面 数据的格式。默认格式为 {}surface_rgba8unorm{}。", "{}(Default) {}This format supports 4 channels (red, green, blue, alpha) with 8 bits each, meaning each channel has a 0-255 range{} {} \"unorm\" refers to these values being normalised into a 0-1 range when read in shaders ":"{}(默认){} 此格式支持 4 个通道 (红、绿、蓝、Alpha),每个通道 8 位,这意味着每个通道的范围为 0-255{}{} \"unorm\" 是指在读取着色器时将这些值归一化为 0-1 范围", + "{}{}NOTE{}{} It is highly recommended that all surfaces are created with a size that is a power of 2, e.g. 16, 128, 512 or 1024 pixels in size. This is not exactly necessary on certain platforms (like Windows and MacOS) but it will certainly increase compatibility on those targets, while for HTML5 and devices it is essential and very it\u0027s important that you remember this or you may run into problems later.":"{}{} 注意{}{} 强烈建议创建的所有曲面的尺寸均为 2 的幂,例如大小为 16、128、512 或 1024 像素。这在某些平台 (如 Windows 和 MacOS) 上并不是完全必要的,但它肯定会提高这些目标的兼容性,而对于 HTML5 和设备来说,这是必不可少的,并且记住这一点非常重要,否则以后可能会遇到问题。", "{}{}OPTIONAL{}{} The format to use for storing surface data, default is {}surface_rgba8unorm{}":"{}{}可选{}{} 用于存储表面数据的格式,默认为 {}surface_rgba8unorm{}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_depth_disable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_depth_disable.json index 341063342..92131ab59 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_depth_disable.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_depth_disable.json @@ -1,11 +1,18 @@ { + "By default, {}the depth and stencil buffer are enabled{}, i.e. a depth {}and{} stencil buffer are automatically created for surfaces. This applies to surfaces that you create manually using {}{}surface_create{}{} as well as to the {}{}application_surface{}{}.":"默认情况下,{} 启用深度和模板缓冲区 {},即自动为表面创建深度和 {} 模板缓冲区。这适用于您使用 {}{}surface_create{}{} 手动创建的表面以及 {}{}application_surface{}{}。", "If set to {}true{} the depth buffer will be disabled for created surfaces.":"如果设置为{}true{},则将对创建的表面禁用深度缓冲区。", + "If set to {}true{} the depth buffer will be disabled for newly created surfaces.":"如果设置为 {}true{},将为新创建的表面禁用深度缓冲区。", "The above code stores the current depth buffer setting in a variable and then creates two surfaces, one with depth buffering enabled and one without, before restoring the original setting again.":"上述代码将当前深度缓冲区设置存储在变量中,然后创建两个表面,一个启用了深度缓冲,另一个不启用,然后再次恢复原始设置。", + "This function disables ({}true{}) or re-enables ({}false{}) automatic depth and stencil buffer creation for {}all{} surfaces.":"此函数会为 {4} 所有{5} 表面禁用 ({}true{}) 或重新启用 ({}false{}) 自动深度和模板缓冲区创建。", "This function disables the automatic depth buffer generation for {}all{} surfaces that are created after it has been disabled. Normally all surfaces have depth buffers so if you draw 3D objects to them then it\u0027ll sort them properly by depth in order to maintain functional parity between rendering to surfaces and rendering to the back buffer, however allocating depth buffers essentially doubles the amount of memory required for surfaces, which could be an excessive and unnecessary overhead especially if your game is very memory intensive, and for 2D games they aren\u0027t generally required.":"此函数禁用在禁用后创建的{}所有{}表面的自动深度缓冲区生成。通常情况下,所有表面都有深度缓冲区,因此如果绘制3D对象到这些表面,它将按深度对它们进行正确排序为了在渲染到表面和渲染到后缓冲区之间保持函数奇偶校验,然而,分配深度缓冲区实际上使表面所需的内存量加倍,这可能是过度的和不必要的开销尤其是如果您的游戏非常耗费内存,并且2D游戏通常不需要这些内容。", + "To use this function you call it {}before{} creating a surface, and then you can enable it again later (if required). All surfaces created when this setting is disabled will not be created with a depth buffer and so cannot use it when drawn to. This results in the things being drawn to the surface having parity of depth. The images below illustrate this in practice:":"要使用此函数,您可以在创建表面之前调用它,然后您可以稍后再次启用它 (如果需要)。禁用此设置时创建的所有曲面都不会使用深度缓冲区创建,因此在绘制时无法使用它。这导致被吸引到表面的事物具有相同的深度。下图在实践中说明了这一点:", "To use this function you would call it {}before{} creating a surface, and then you can enable it again after (if required). All surfaces created when the depth buffer is disabled will no longer use a depth buffer when being drawn to, this results in the things being drawn to the surface having parity of depth. The images below illustrate this in practice:":"若要使用此函数,请在{}创建表面之前调用它{},然后可以在创建表面之后再次启用它(如果需要)。禁用深度缓冲区时创建的所有表面在绘制到时将不再使用深度缓冲区,这将产生在具有同等深度的物体被吸引到表面上。下图说明了实践中的情况:", "{}In the above image, we are drawing a rectangle and a triangle using a vertex buffer in 3D. The coordinates for the red triangle places it behind the green rectangle, but the code for drawing the triangle is called {}after{} the code for the rectangle, and when the depth buffer is enabled, the triangle is still drawn behind the rectangle as the 3D depth is being respected. However when we disable the depth buffer for the surface, only the code order is respected and so the triangle is drawn over the rectangle.":"{}在上图中,我们使用3D中的顶点缓冲区绘制矩形和三角形。的红色三角形的坐标将其置于绿色矩形的后面,但绘制三角形的代码在{}矩形的代码之后被称为{},并且当启用深度缓冲区时,三角形仍然绘制在矩形的后面因为3D深度受到尊重。但是,当我们禁用表面的深度缓冲区时,只遵循代码顺序,因此在矩形上绘制三角形。", + "{}In the above image, we draw a rectangle and a triangle using a vertex buffer in 3D. The coordinates for the red triangle place it behind the green rectangle, but the code to draw the triangle is called {}after{} the code that draws the rectangle. With the depth buffer enabled, the triangle is still drawn behind the rectangle as the 3D depth is being respected. However, when we disable the depth buffer for the surface, only the code order is respected and so the triangle is drawn over the rectangle.":"{} 在上图中,我们使用 3D 顶点缓冲区绘制了一个矩形和一个三角形。红色三角形的坐标将其置于绿色矩形后面,但绘制三角形的代码在绘制矩形的代码 {} 之后 {} 调用。启用深度缓冲区后,三角形仍会绘制在矩形后面,因为会考虑 3D 深度。但是,当我们禁用表面的深度缓冲区时,仅遵循代码顺序,因此三角形会绘制在矩形上。", "{}NOTE{}: If your game is 100% 2D or you know that you don\u0027t need a surface depth buffer, then it should be fine to simply call this function once at the start of the game to disable the buffer.":"{}注意{}:如果您的游戏为100% 2D,或者您知道不需要表面深度缓冲区,则在游戏开始时只需调用此函数一次即可禁用缓冲区。", "{}NOTE{}: To properly preserve depth in 3D when using surfaces, not only should you have the depth buffer enabled, but you should also have z-writing and z-testing enabled. See the functions {}{}{}gpu_set_ztestenable(){}{}{} and {}{}{}gpu_set_zwriteenable(){}{}{} for more information.":"{}注意{}:要在使用表面时正确保留 3D 深度,不仅应启用深度缓冲区,还应启用 Z 写入和 Z 测试。有关详细信息,请参阅函数 {}{}{}gpu_set_ztestenable(){}{}{} 和 {}{}{}gpu_set_zwriteenable(){}{}{}。", + "{}{}WARNING{}{} Allocating depth buffers essentially {}doubles the amount of memory required for surfaces{}. This could be an excessive and unnecessary overhead, especially if your game is very memory intensive.":"{}{} 警告{}{} 分配深度缓冲区实际上会 {} 使表面所需的内存量增加一倍 {}。这可能会产生过多且不必要的开销,尤其是当您的游戏内存非常密集时。", "{}{}{}NOTE{}{} {}If your game is 100% 2D or you know that you don\u0027t need a surface depth buffer, then it should be fine to simply call this function once at the start of the game to disable the buffer.":"{}{}{} 注意{}{}{} 如果您的游戏是 100% 2D 或者您知道不需要表面深度缓冲区,那么只需在游戏开始时调用此函数一次就可以了。游戏禁用缓冲区。", + "{}{}{}NOTE{}{} {}To properly preserve depth in 3D when drawing to a surface, not only should you have the depth buffer enabled, you should also have z-writing and z-testing enabled. See the functions {}{}gpu_set_zwriteenable{}{} and {}{}gpu_set_ztestenable{}{} more information.":"{}{}{} 注意{}{}{} 为了在绘制表面时正确保留 3D 深度,您不仅应该启用深度缓冲区,还应该启用 z 写入和 z 测试。请参阅函数 {}{}gpu_set_zwriteenable{}{} 和 {}{}gpu_set_ztestenable{}{} 了解更多信息。", "{}{}{}NOTE{}{} {}To properly preserve depth in 3D when using surfaces, not only should you have the depth buffer enabled, but you should also have z-writing and z-testing enabled. See the functions {}{}gpu_set_ztestenable{}{} and {}{}gpu_set_zwriteenable{}{} for more information.":"{}{}{} 注意{}{}{} 为了在使用表面时正确保留 3D 深度,您不仅应该启用深度缓冲区,还应该启用 z 写入和 z 测试。有关详细信息,请参阅函数 {}{}gpu_set_ztestenable{}{} 和 {}{}gpu_set_zwriteenable{}{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_exists.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_exists.json index b8a85149d..22f23ed75 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_exists.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_exists.json @@ -2,6 +2,7 @@ "The ID of the surface to check.":"要检查的表面 ID。", "The above code checks to see if a surface indexed in the variable {}surf{} exists, and if it does not, it will re-create it. If it does exist, it then checks to see which view is currently being drawn and if it is view[1] it draws the surface.":"上面的代码检查变量 {}surf{} 中索引的表面是否存在,如果不存在,则会重新创建它。如果确实存在,则它会检查当前正在绘制哪个视图,如果是 view[1],则绘制表面。", "The above code will check to see if a surface indexed in the variable \"surf\" exists, and if it does not, it will re-create it. If it does exist, it then checks to see which view is currently being drawn and if it is view[1] it draws the surface.":"上面的代码将检查在变量\"surf\"中索引的表面是否存在,如果不存在,它将重新创建它。如果确实存在,则检查查看当前正在绘制的视图,如果是视图[ 1],则绘制表面。", + "The surface to check.":"要检查的表面。", "This function checks if a surface exists.":"该函数检查表面是否存在。", "This function is essential when working with surfaces due to their volatile nature. Surfaces are always held in texture memory which means that they can be destroyed from one moment to the next (for example, when a screensaver starts on windows, or when minimised on an Android device), so you should always check that a surface exists before doing anything with it (this includes drawing it to the screen). The example code below shows a typical use of this command in the draw event of an instance to check for a surface and re-create it if it has been removed (note that the surface will have been originally created in the create event of the object).":"由于表面的挥发性,在处理表面时,此函数是必不可少的。表面总是保存在纹理内存中,这意味着它们可以从一个时刻到下一个时刻被销毁(例如,当屏幕保护程序在Windows上启动时,或者当在Android设备上最小化时),因此在对表面进行任何操作之前,您应该始终检查表面是否存在(这包括将其绘制到屏幕上)。下面的示例代码显示了此命令在实例的\"绘制\"事件中的典型用法,用于检查表面并在其已被删除的情况下重新创建它(请注意,该表面最初是在对象的\"创建\"事件中创建的)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_depth_disable.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_depth_disable.json index 92d80c92f..a4f5d13ad 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_depth_disable.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_depth_disable.json @@ -1,5 +1,6 @@ { "Normally all surfaces have depth buffers so if you draw 3D objects to them then it\u0027ll sort them properly by depth, however allocating depth buffers essentially doubles the size of surfaces, which could be an excessive and unnecessary overhead especially if your game is very memory intensive or predominantly 2D. In these cases you can check this using this function and disable the depth buffer for surfaces if required using the function {}{}surface_depth_disable{}{}.":"通常,所有表面都有深度缓冲区,因此如果您向其中绘制 3D 对象,那么它会按深度对它们进行正确排序,但是分配深度缓冲区本质上会使表面的大小加倍,这可能是过多且不必要的开销,特别是如果您的游戏内存很大的话密集或主要是 2D。在这些情况下,您可以使用此函数进行检查,并根据需要使用函数 {}{}surface_depth_disable{}{} 禁用表面的深度缓冲区。", + "Normally all surfaces have depth buffers so if you draw 3D objects to them then it\u0027ll sort them properly by depth. However, allocating depth buffers essentially doubles the size of surfaces, which could be an excessive and unnecessary overhead, especially if your game is very memory intensive or predominantly 2D. In these cases you can check this using this function and disable the depth buffer for surfaces if required using the function {}{}surface_depth_disable{}{}.":"通常,所有表面都有深度缓冲区,因此如果您向其中绘制 3D 对象,那么它会按深度对它们进行正确排序。然而,分配深度缓冲区本质上会使表面的大小加倍,这可能会产生过多且不必要的开销,特别是当您的游戏内存非常密集或主要是 2D 时。在这些情况下,您可以使用此函数进行检查,并根据需要使用函数 {}{}surface_depth_disable{}{} 禁用表面的深度缓冲区。", "The above code will check to see if the given surface exists, and if it does not, then it checks the current state of the surface depth buffer and if it is enabled, it will disable it instead, before finally creating the surface.":"上述代码将检查给定表面是否存在,如果不存在,则检查表面深度缓冲区的当前状态;如果启用了,则在最终创建表面之前,将禁用该代码。", "This function checks to see if the automatic depth buffer generation for surfaces is enabled.":"此函数检查是否启用了表面的自动深度缓冲区生成。", "This function checks to see if the automatic depth buffer generation for surfaces is enabled. Normally all surfaces have depth buffers so if you draw 3D objects to them then it\u0027ll sort them properly by depth, however allocating depth buffers essentially doubles the size of surfaces, which could be an excessive and unnecessary overhead especially if your game is very memory intensive or predominantly 2D. In these cases you can check this using this function and disable the depth buffer for surfaces if required using the function {}{}surface_depth_disable(){}{}.":"此函数检查是否启用了表面的自动深度缓冲区生成。通常,所有表面都有深度缓冲区,因此如果绘制3D对象,则会按深度对其进行适当排序,但是,分配深度缓冲区实际上会使表面大小加倍,这可能会导致过多且不必要的开销,尤其是在游戏内存非常密集或主要是2D的情况下。在这些情况下,可以使用此函数进行检查,如果需要,可以使用函数{}{}surface_depth_disable(){}{}禁用表面的深度缓冲区。" diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_depth.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_depth.json new file mode 100644 index 000000000..ea8ad0e13 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_depth.json @@ -0,0 +1,4 @@ +{ + "The code above gets the surface whose depth buffer is currently used for drawing and stores the result in a temporary variable {}_surf_depth{}.":"上面的代码获取当前用于绘制的深度缓冲区的表面,并将结果存储在临时变量 {}_surf_depth{} 中。", + "This function returns the surface whose depth buffer is currently used for drawing. A surface different than the current draw target can be set for depth when calling {}{}surface_set_target{}{}.":"该函数返回当前用于绘图的深度缓冲区的表面。调用 {}{}surface_set_target{}{} 时,可以设置与当前绘制目标不同的表面的深度。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_ext.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_ext.json index 4038e0db4..22bb26aee 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_ext.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_ext.json @@ -4,5 +4,6 @@ "The render target index to check (from 0 to 3).":"要检查的渲染目标索引(从0到3)。", "This function retrieves the surface assigned to one of the 4 render targets available to surfaces.":"此函数检索分配给表面可用的 4 个渲染目标之一的表面。", "This function will retrieve the surface ID assigned to one of the 4 render targets available to surfaces. You supply the index of the render target to check, and the function will return -1 if no surface is assigned, or an integer value >= 0, representing the ID of the surface assigned (as returned by the function {}{}surface_create(){}{}).":"此函数将检索指定给表面可用的 4 个渲染目标之一的表面 ID。提供要检查的渲染目标的索引,如果未指定任何表面,则函数将返回 -1,或者整数值 \n >= 0,表示指定的表面的 Id(由函数 {}{}surface_create(){}{} 返回)。", - "You supply the index of the render target to check, and the function will return -1 if no surface is assigned, or an integer value >= 0, representing the surface assigned (as returned by the functions {}{}surface_create{}{} / {}{}surface_create_ext{}{}).":"您提供要检查的渲染目标的索引,如果未分配表面,则该函数将返回 -1,或者整数值 >= 0,表示分配的表面 (由函数 {}{}surface_create{}{}/{}{}surface_create_ext{}{} 返回)。" + "You supply the index of the render target to check, and the function will return -1 if no surface is assigned, or an integer value >= 0, representing the surface assigned (as returned by the functions {}{}surface_create{}{} / {}{}surface_create_ext{}{}).":"您提供要检查的渲染目标的索引,如果未分配表面,则该函数将返回 -1,或者整数值 >= 0,表示分配的表面 (由函数 {}{}surface_create{}{}/{}{}surface_create_ext{}{} 返回)。", + "{}{}Surface{}{} or -1 (if no target surface is set)":"{}{} 表面 {}{} 或 -1( 如果未设置目标表面)" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_texture_depth.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_texture_depth.json new file mode 100644 index 000000000..cf62f77fc --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_texture_depth.json @@ -0,0 +1,15 @@ +{ + "Finally, in the Draw GUI event the depth texture of the {}{}application_surface{}{} is retrieved with a call to {}{}surface_get_texture_depth{}{} and stored in a temporary variable {}_texture{}. The depth texture is then drawn in the top-right corner of the window on top of the application surface. It is displayed on a textured primitive drawn using the {}Primitive Functions{}, using a shader {}sh_display_depth{} that uses the fragment shader code and the {}LinearizeDepth() {}function provided on this page.":"最后,在 Draw GUI 事件中,通过调用 {4}{5}surface_get_texture_depth{6}{7} 检索 {}{}application_surface{}{} 的深度纹理,并将其存储在临时变量 {}_texture{} 中。然后,在应用程序表面顶部窗口的右上角绘制深度纹理。它显示在使用 {}Primitive Functions{}、使用片段着色器代码的着色器 {}sh_display_depth{} 和本页提供的 {}LinearizeDepth(){} 函数绘制的纹理图元上。", + "Fragment Shader":"片段着色器", + "In the Create event, the {}znear{} and {}zfar{} values of the perspective projection are initialised, as well as the ratio {}zfar / znear{}. The shader uniform is also retrieved. After that, views are enabled and {}view[0]{} is made visible. This view\u0027s camera is then assigned a projection and view matrix.":"在 Create 事件中,透视投影的 {}znear{} 和 {}zfar{} 值以及比率 {}zfar / znear{} 被初始化。着色器制服也被检索。之后,视图将启用并且 {}view[0]{} 可见。然后为该视图的相机分配一个投影和视图矩阵。", + "In the Draw event a few shapes are then drawn at various depth values. Depth testing is first enabled with a call to {}{}gpu_set_ztestenable{}{}, then the shapes are drawn. Before each shape is drawn its depth is set with a call to the {}{}gpu_set_depth{}{} function. Drawing is done on the {}{}application_surface{}{}, since this is the draw target that {}GameMaker{} uses by default. At the end of the Draw event, z-testing is disabled again.":"在绘制事件中,然后以不同的深度值绘制一些形状。首先通过调用 {}{}gpu_set_ztestenable{}{} 启用深度测试,然后绘制形状。在绘制每个形状之前,通过调用 {}{}gpu_set_depth{}{} 函数来设置其深度。绘制是在 {}{}application_surface{}{} 上完成的,因为这是 {}GameMaker{} 默认使用的绘制目标。在 Draw 事件结束时,z 测试再次被禁用。", + "In the code above the calculated depth value is assigned to all three colour channels (R, G and B) to output a greyscale image.":"在上面的代码中,计算出的深度值被分配给所有三个颜色通道 (R、G 和 B) 以输出灰度图像。", + "In the shader you can then use this function as follows: ":"在着色器中,您可以按如下方式使用此函数:", + "The above code shows an extended example on how to use the depth buffer with a perspective projection. A few shapes are drawn to the application surface, the application surface\u0027s depth texture is then retrieved and the depth texture drawn on top of the application surface.":"上面的代码显示了有关如何将深度缓冲区与透视投影结合使用的扩展示例。将一些形状绘制到应用程序表面,然后检索应用程序表面的深度纹理并将深度纹理绘制在应用程序表面的顶部。", + "The depth value is stored in the red channel and can be accessed in a shader as follows: ":"深度值存储在红色通道中,可以在着色器中访问,如下所示:", + "The surface of which to get the depth texture":"要获取深度纹理的表面", + "The texture can then be passed to {}{}texture_set_stage{}{} for use in {}Shaders{}.":"然后可以将纹理传递到 {}{}texture_set_stage{}{} 以在 {} 着色器 {} 中使用。", + "This function returns the depth texture of the given surface or -1 if no depth texture exists.":"此函数返回给定表面的深度纹理,如果不存在深度纹理,则返回 -1。", + "Vertex Shader":"顶点着色器", + "When you write to the depth buffer with a {}perspective{} {}projection{} set, the depth values stored in the texture will not be linear and you need to convert the values to linear ones in a custom shader, using the following shader function: ":"当您使用 {} 透视 {}{} 投影 {} 集写入深度缓冲区时,存储在纹理中的深度值将不是线性的,您需要在自定义着色器中使用以下方法将这些值转换为线性值着色器功能:" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_has_depth.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_has_depth.json new file mode 100644 index 000000000..ee609d7ab --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_has_depth.json @@ -0,0 +1,6 @@ +{ + "The above code calls {}{}surface_has_depth{}{} to check if the surface held in a variable {}surf_colour{} has a depth buffer and stores the result in a local variable {}_has_depth{}. If the surface has no depth buffer, a debug message is shown.":"上述代码调用 {}{}surface_has_depth{}{} 来检查变量 {}surf_colour{} 中保存的表面是否具有深度缓冲区,并将结果存储在局部变量 {}_has_depth{} 中。如果表面没有深度缓冲区,则会显示调试消息。", + "The surface to check":"要检查的表面", + "This function returns whether the given surface has a depth buffer (and by relation, a stencil buffer, as depth buffer creation needs to be enabled for stencil buffers to also be created).":"此函数返回给定表面是否具有深度缓冲区 (并且根据关系,返回模板缓冲区,因为需要启用深度缓冲区创建才能创建模板缓冲区)。", + "{}{}NOTE{}{} You can use {}{}surface_depth_disable{}{} to enable/disable whether surfaces are {}created{} with a depth buffer or not.":"{}{} 注意{}{} 您可以使用 {}{}surface_depth_disable{}{} 来启用 / 禁用是否使用深度缓冲区 {} 创建 {} 表面。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_reset_target.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_reset_target.json index b2379ced1..d850cd7c6 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_reset_target.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_reset_target.json @@ -6,5 +6,6 @@ "With this function you reset all further drawing from the target surface back to the screen. Please note that to start drawing to a surface you must first have called the function {}{}surface_set_target(){}{} and then this one after you have finished, {}for each surface target that you have set{} or else nothing will be drawn on the screen as all further drawing (even in other instances) will be done on the surface. You should also realise that nothing will be seen if the surface itself is not drawn on the screen in the draw event of an instance.":"使用此函数,可以将所有进一步绘制从目标表面重置回屏幕。请注意,要开始绘制表面,必须首先调用函数{}{}surface_set_target(){}{},然后在完成后调用此函数,{}对于已设置的每个表面目标{},否则将不会在屏幕上绘制任何内容,因为所有进一步绘制(即使在其他实例中)都将在表面上完成。您还应该意识到,如果在实例的绘制事件中没有在屏幕上绘制表面本身,则不会看到任何内容。", "{}NOTE{}: If you have not previously set a render target with the function {}{}{}surface_set_target(){}{}{}, using this function will silently (ie: without any error messages) end all further code execution for the event.":"{}注意{}:如果以前没有使用函数{}{}{}surface_set_target(){}{}{}设置呈现目标,则使用此函数将静默(即:没有任何错误消息)结束事件的所有其他代码执行。", "{}{}Boolean{}{} Whether the render target was reset successfully":"{}{}Boolean{}{} 渲染目标是否重置成功", + "{}{}NOTE{}{} If you have not previously set a render target with the function {}{}surface_set_target{}{}, calling this function will throw a fatal error.":"{}{} 注意{}{} 如果您之前没有使用函数 {}{}surface_set_target{}{} 设置渲染目标,则调用此函数将引发致命错误。", "{}{}NOTE{}{} If you have not previously set a render target with the function {}{}surface_set_target{}{}, using this function will silently (i.e. without any error messages) end all further code execution for the event.":"{}{} 注意{}{} 如果您之前没有使用函数 {}{}surface_set_target{}{} 设置渲染目标,则使用此函数将静默 (即没有任何错误消息) 结束该函数的所有进一步代码执行事件。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_set_target.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_set_target.json index ceddfb567..bee9009ff 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_set_target.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_set_target.json @@ -1,16 +1,26 @@ { + "All surfaces that you pass to this function must exist. An error is thrown if any surface passed to the function doesn\u0027t exist.":"传递给此函数的所有表面都必须存在。如果传递给函数的任何表面不存在,则会引发错误。", + "By default, the target surface\u0027s depth buffer is used (if it has one). If you pass another surface as the optional {}depth{} parameter, that surface\u0027s depth buffer is used if it has one. No depth buffer is used if the surface passed as the {}depth{} parameter has no depth buffer.":"默认情况下,使用目标表面的深度缓冲区 (如果有的话)。如果您将另一个表面作为可选的 {} 深度 {} 参数传递,则将使用该表面的深度缓冲区 (如果有的话)。如果作为 {} 深度 {} 参数传递的表面没有深度缓冲区,则不会使用深度缓冲区。", + "If you do not call {}{}surface_reset_target{}{} after you have finished, nothing will be drawn on the screen as all further drawing (even in other instances) will be done on the surface. You should also realise that nothing will be seen if the surface itself is not drawn on the screen in the Draw event of an instance. You can check the return value of this function too as a debug tool to check whether the surface target was set or not, with a return value of 0 being a failure to set the target and any other positive value being a success.":"如果您在完成后不调用 {}{}surface_reset_target{}{},则屏幕上不会绘制任何内容,因为所有进一步的绘制 (即使在其他情况下) 都将在表面上完成。您还应该意识到,如果表面本身没有在实例的 Draw 事件中绘制在屏幕上,则什么也看不到。您也可以检查此函数的返回值作为调试工具来检查表面目标是否设置,返回值 0 表示设置目标失败,任何其他正值表示成功。", "Instead, you must reset the target for each of the surfaces that you set, much like you must use opening and closing brackets {} for code blocks. So the above should be written as either this:":"相反,必须为所设置的每个表面重置目标,就像必须对代码块使用左括号和右括号{}一样。因此,上面的内容应该写成以下两种情况:", "Instead, you must reset the target for each of the surfaces that you set, much like you must use opening and closing brackets {} for code blocks. So the above should be written either like this:":"相反,您必须为您设置的每个表面重置目标,就像您必须对代码块使用左括号和右括号 { } 一样。所以上面的内容应该这样写:", + "Instead, you must reset the target for each of the surfaces that you set, much like you must use opening and closing brackets {}{ }{} for code blocks. So the above should be written either like this:":"相反,您必须为您设置的每个表面重置目标,就像您必须对代码块使用左括号和右括号 {}{ }{} 一样。所以上面的内容应该这样写:", "One thing that should be noted is that surfaces are {}stacked{} so you cannot jump from target to target and then reset to the normal draw target at the end, but rather you must open and close rendering targets. For example, this will {}not{} work correctly:":"需要注意的一点是,表面是{}层叠的{},因此不能从一个目标跳到另一个目标,然后在结束时重置为法线绘制目标,而是必须打开并关闭渲染目标。例如,这将导致{}无法正常工作:", "Please note that if you do not call {}{}surface_reset_target{}{} after you have finished, nothing will be drawn on the screen as all further drawing (even in other instances) will be done on the surface. You should also realise that nothing will be seen if the surface itself is not drawn on the screen in the draw event of an instance. You can check the return value of this function too as a debug tool to check whether the surface target was set or not, with a return value of 0 being a failure to set the target and any other positive value being a success.":"请注意,如果您完成后不调用 {}{}surface_reset_target{}{},则屏幕上不会绘制任何内容,因为所有进一步的绘制 (即使在其他情况下) 都将在表面上完成。您还应该意识到,如果在实例的绘制事件中没有在屏幕上绘制表面本身,则什么也看不到。您也可以检查此函数的返回值作为调试工具来检查表面目标是否设置,返回值 0 表示设置目标失败,任何其他正值表示成功。", + "Surfaces are {}stacked{} so you cannot jump from target to target and then reset to the normal draw target at the end, but rather you must open and close rendering targets. For example, this will {}not{} work correctly: {}{}surface_set_target{}(surf1);{} {}draw_text{}({}32{}, {}32{}, {}\"surface1\"{});{} {}surface_set_target{}(surf2);{} {}draw_text{}({}32{}, {}64{}, {}\"surface2\"{});{} {}surface_reset_target{}();{} {}Instead, you must reset the target for each of the surfaces that you set, much like you must use opening and closing brackets {}{ }{} for code blocks. So the above should be written either like this:{} {}{}surface_set_target{}(surf1);{} {}draw_text{}({}32{}, {}32{}, {}\"surface1\"{});{} {}surface_reset_target{}();{} {}surface_set_target{}(surf2);{} {}draw_text{}({}32{}, {}64{}, {}\"surface2\"{});{} {}surface_reset_target{}();{} {}or like this:{} {}{}surface_set_target{}(surf1);{} {}draw_text{}({}32{}, {}32{}, {}\"surface1\"{});{} {}surface_set_target{}(surf2);{} {}draw_text{}({}32{}, {}64{}, {}\"surface2\"{});{} {}surface_reset_target{}();{} {}surface_reset_target{}();{} ":"表面是 {} 堆叠 {} 的,因此您无法从一个目标跳转到另一个目标,然后在最后重置为正常绘制目标,而是必须打开和关闭渲染目标。例如,这将 {} 无法 {} 正常工作:\n{}{}surface_set_target{}(surf1);{} {}draw_text{}({}32{}, {}32{}, {}\"surface1\"{});{} {}surface_set_target{}(surf2);{} {}draw_text{}({}32{}, {}64{}, {}\"surface2\"{});{} {}surface_reset_target{}();{} {}Instead, you must reset the target for each of the surfaces that you set, much like you must use opening and closing brackets {}{ }{} for code blocks. So the above should be written either like this:{} {}{}surface_set_target{}(surf1);{} {}draw_text{}({}32{}, {}32{}, {}\"surface1\"{});{} {}surface_reset_target{}();{} {}surface_set_target{}(surf2);{} {}draw_text{}({}32{}, {}64{}, {}\"surface2\"{});{} {}surface_reset_target{}();{} {}or like this:{} {}{}surface_set_target{}(surf1);{} {}draw_text{}({}32{}, {}32{}, {}\"surface1\"{});{} {}surface_set_target{}(surf2);{} {}draw_text{}({}32{}, {}64{}, {}\"surface2\"{});{} {}surface_reset_target{}();{} {}surface_reset_target{}();{} ", "The ID of the surface to set as the drawing target.":"要设置为绘制目标的表面的ID。", "The above code checks to see which view is currently being drawn, and if it is view[0] it sets the draw target to a surface and draws all instances of the object {}obj_Effect{} before resetting the draw target again. If the view is not view[0] the surface is drawn to the screen.":"上面的代码检查当前正在绘制哪个视图,如果是 view[0],则会将绘制目标设置为表面并绘制对象 {}obj_Effect{} 的所有实例,然后再次重置绘制目标。如果视图不是 view[0],则表面将绘制到屏幕上。", + "The above code checks to see which view is currently being drawn, and if it is view[0] it sets the draw target to a surface and draws all instances of the object {}obj_effect{} before resetting the draw target again. If the view is not view[0] the surface is drawn to the screen.":"上面的代码检查当前正在绘制哪个视图,如果是 view[0],则会将绘制目标设置为表面并绘制对象 {}obj_effect{} 的所有实例,然后再次重置绘制目标。如果视图不是 view[0],则表面将绘制到屏幕上。", "The above code will check to see which view is currently being drawn, and if it is view[0] it sets the draw target to a surface and draws all instances of the object \"obj_Effect\" before resetting the draw target again. If the view is not view[0] the surface is drawn to the screen.":"上述代码将检查当前正在绘制的视图,如果是view[ 0 ],则会将绘制目标设置为表面,并在再次重置绘制目标之前绘制对象\"obj_Effect\"的所有实例。如果视图不是视图[ 0 ],则将表面绘制到屏幕上。", "The surface to set as the drawing target.":"设置为绘图目标的表面。", + "This function sets all further drawing to the target surface rather than the screen. In this way you can tell {}GameMaker{} to only draw specific things to the specified surface.":"此函数将所有进一步的绘图设置到目标表面而不是屏幕。通过这种方式,您可以告诉 {}GameMaker{} 仅将特定内容绘制到指定表面。", + "Usage Notes":"使用说明", "With this function you set all further drawing to the target surface rather than the screen and in this way you can tell {}GameMaker{} to only draw specific things to the specified surface.":"通过此函数,您可以将所有进一步绘制设置到目标表面而不是屏幕,这样您就可以告诉 {}GameMaker{} 仅将特定内容绘制到指定表面。", "With this function you set all further drawing to the target surface rather than the screen and in this way you can tell {}GameMaker{} to only draw specific things to the specified surface. Please note that if you do not call {}{}surface_reset_target(){}{} after you have finished, nothing will be drawn on the screen as all further drawing (even in other instances) will be done on the surface. You should also realise that nothing will be seen if the surface itself is not drawn on the screen in the draw event of an instance. You can check the return value of this function too as a debug tool to check whether the surface target was set or not, with a return value of 0 being a failure to set the target and any other positive value being a success.":"使用此函数,您可以将所有进一步绘制设置为目标表面而不是屏幕,并通过这种方式告诉{}GameMaker{}仅将特定内容绘制到指定表面。请注意,如果完成后不调用{}{}surface_reset_target(){}{},屏幕上将不会绘制任何内容,因为所有进一步绘制(即使在其他实例中)都将在表面上完成。您还应该意识到,如果在实例的绘制事件中没有在屏幕上绘制表面本身,则不会看到任何内容。您也可以作为调试工具检查此函数的返回值,以检查是否设置了表面目标,返回值0表示设置目标失败,其他任何正值表示成功。", "or like this:":"或者像这样:", "{}NOTE{}: When working with surfaces there is the possibility that they can cease to exist at any time due to them being stored in texture memory. You should {}ALWAYS{} check that a surface exists using {}{}{}surface_exists(){}{}{} before referencing them directly.":"{}注意{}:使用表面时,由于表面存储在纹理内存中,因此表面可能随时停止存在。在直接引用表面之前,应该{}始终{}使用{}{}{}surface_exists(){}{}{}检查表面是否存在。", "{}{}Boolean{}{} Whether the render target was set successfully":"{}{}Boolean{}{} 渲染目标是否设置成功", - "{}{}NOTE{}{} If you have not previously set a render target with the function {}{}surface_set_target{}{}, using this function will silently (i.e. without any error messages) end all further code execution for the event.":"{}{} 注意{}{} 如果您之前没有使用函数 {}{}surface_set_target{}{} 设置渲染目标,则使用此函数将静默 (即没有任何错误消息) 结束该函数的所有进一步代码执行事件。" + "{}{}NOTE{}{} If you have not previously set a render target with the function {}{}surface_set_target{}{}, calling this function will throw a fatal error.":"{}{} 注意{}{} 如果您之前没有使用函数 {}{}surface_set_target{}{} 设置渲染目标,则调用此函数将引发致命错误。", + "{}{}NOTE{}{} If you have not previously set a render target with the function {}{}surface_set_target{}{}, using this function will silently (i.e. without any error messages) end all further code execution for the event.":"{}{} 注意{}{} 如果您之前没有使用函数 {}{}surface_set_target{}{} 设置渲染目标,则使用此函数将静默 (即没有任何错误消息) 结束该函数的所有进一步代码执行事件。", + "{}{}OPTIONAL{}{} The surface whose depth buffer to use (if this surface has one).":"{}{} 可选{}{} 要使用其深度缓冲区的表面 (如果该表面有深度缓冲区)。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Textures/Textures.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Textures/Textures.json index 175c6c86a..d20bd6a11 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Textures/Textures.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Textures/Textures.json @@ -7,8 +7,10 @@ "Textures":"纹理", "Textures refer to: ":"纹理参考:", "The first set of functions available are used to retrieve information about specific images and their position or size on the {}Texture Page{}, as well as set certain texture features:":"第一组可用函数用于检索有关特定图像及其在{}纹理页面{}上的位置或大小的信息,以及设置某些纹理函数:", + "The following functions are all related to \"textures\", i.e.: images that are stored in {}VRAM{} to be used as sprites or other graphical elements within your game.":"以下函数均与 \" 纹理 \" 相关,即:存储在 {}VRAM{} 中的图像,用作游戏中的精灵或其他图形元素。", "The following functions are all related to \"textures\", i.e.: images that are stored in {}VRAM{} to be used as sprites or other things within your game.":"以下函数都与\"纹理\"相关,即存储在 {}VRAM{} 中的图像,用作游戏中的精灵或其他东西。", "The following functions are primarily for use to debug the project and ensure efficient use of texture memory:":"以下函数主要用于调试项目并确保纹理内存的有效使用:", + "The following functions are related to managing the VRAM associated with individual textures as well as whole texture groups:":"以下功能与管理与单个纹理以及整个纹理组关联的 VRAM 相关:", "The following functions are related to the managing the VRAM associated with individual textures as well as whole texture groups:":"以下功能与管理与单个纹理以及整个纹理组关联的 VRAM 相关:", "The following functions are used to retrieve information about specific images and their position or size on the {}Texture Page{}, as well as set certain texture features:":"以下函数用于检索有关特定图像及其在 {} 纹理页面 {} 上的位置或大小的信息,以及设置某些纹理特征:", "The following functions are used with {}Dynamic Texture Pages{}:":"以下函数用于{}动态纹理页{}:", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.json index 0f559e611..ea60677a5 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.json @@ -3,5 +3,6 @@ "The texture page pointer {}or{} a texture group name (a string)":"纹理页面指针{}或{}纹理组名称(字符串)", "This function can be used to \"prefetch\" a texture page or a group of texture pages, i.e.: load them into VRAM when required.":"该函数可用于 \" 预取 \" 一个纹理页面或一组纹理页面,即:在需要时将它们加载到 VRAM 中。", "This function can be used to \"prefetch\" a texture page or a group of texture pages, ie: load them into VRAM when required. You supply the unique {}texture page ID{} (as returned by the {}texturegroup_*{} functions) to prefetch a single page, or you can supply a {}texture group name{} (as defined in the {}Texture Group Editor{}) to prefetch all the texture pages in the group.":"此函数可用于\"预取\"一个纹理页面或一组纹理页面,即:在需要时将其加载到VRAM中。您可以提供唯一的{}纹理页Id{}(由{}texturegroup_*{}函数返回)来预取单个页面,也可以提供{}纹理组名称{}(如{}纹理组编辑器{}中所定义)来预取组中的所有纹理页面。", - "You supply the unique {}texture page ID{} (as returned by the {}texturegroup_*{} functions) to prefetch a single page, or you can supply a {}texture group name{} (as defined in the {}Texture Group Editor{}) to prefetch all the texture pages in the group.":"您可以提供唯一的 {} 纹理页面 ID{}( 由 {}texturegroup_*{} 函数返回) 来预取单个页面,也可以提供 {} 纹理组名称 {}( 如 {}Texture Group Editor{}) 来预取组中的所有纹理页面。" + "You supply the unique {}texture page ID{} (as returned by the {}texturegroup_*{} functions) to prefetch a single page, or you can supply a {}texture group name{} (as defined in the {}Texture Group Editor{}) to prefetch all the texture pages in the group.":"您可以提供唯一的 {} 纹理页面 ID{}( 由 {}texturegroup_*{} 函数返回) 来预取单个页面,也可以提供 {} 纹理组名称 {}( 如 {}Texture Group Editor{}) 来预取组中的所有纹理页面。", + "{}{}NOTE{}{} There is a performance hit as the texture is uploaded to texture memory on most devices, so it\u0027s recommended that you call {}{}texture_prefetch{}{} {}{}{} {}{}{}on any required graphics at the start of a level to avoid any stalls. ":"{}{} 注意{}{} 在大多数设备上,当纹理上传到纹理内存时,性能会受到影响,因此建议您调用 {}{}texture_prefetch{}{}{}{}{}{}{}{} 在关卡开始时的任何所需图形上,以避免任何停顿。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Videos/video_get_format.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Videos/video_get_format.json index 6cd4d15e0..16228a927 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Videos/video_get_format.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Videos/video_get_format.json @@ -3,5 +3,7 @@ "The video surface uses the RGBA color model":"视频表面使用 RGBA 颜色模型", "The video surface uses the YUV color model":"视频表面使用 YUV 颜色模型", "This function returns the colour format of the currently loaded video. This can be any one of the following constants:":"此函数返回当前加载的视频的颜色格式。这可以是以下常量中的任意一个:", - "Windows, macOS, GX.games, Android, iOS, and HTML5 use the RGBA model for videos. All other platforms use the YUV model.":"Windows、macOS、GX.games、Android、iOS和HTML5使用RGBA模式制作视频。所有其他平台都使用YUV模式。" + "Windows, macOS, GX.games, Android, iOS, and HTML5 use the RGBA model for videos. All other platforms use the YUV model.":"Windows、macOS、GX.games、Android、iOS和HTML5使用RGBA模式制作视频。所有其他平台都使用YUV模式。", + "{}Video Format Constant{}":"{} 视频格式常量 {}", + "{}Windows, macOS, GX.games, Android, iOS, and HTML5 use the RGBA model for videos. All other platforms use the YUV model.{}":"{}Windows、macOS、GX.games、Android、iOS 和 HTML5 对视频使用 RGBA 模型。所有其他平台均使用 YUV 模型。{}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/draw_clear_depth.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/draw_clear_depth.json new file mode 100644 index 000000000..b0b0e9273 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/draw_clear_depth.json @@ -0,0 +1,6 @@ +{ + "The above code clears the depth buffer to a value of 1.":"上面的代码将深度缓冲区的值清除为 1。", + "The value 0 corresponds to znear, the value 1 corresponds to zfar.":"值 0 对应于 znear,值 1 对应于 zfar。", + "The value to clear the current render target\u0027s depth buffer to. A value ranging from 0 (representing znear) to 1 (representing zfar).":"将当前渲染目标的深度缓冲区清除到的值。值范围从 0( 代表 znear) 到 1( 代表 zfar)。", + "This function clears the depth buffer of the {}current render target{} to the given depth value, which can be a value from 0 to 1.":"此函数将 {} 当前渲染目标 {} 的深度缓冲区清除为给定深度值,该值可以是 0 到 1 之间的值。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/draw_clear_ext.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/draw_clear_ext.json new file mode 100644 index 000000000..3a5c2dde1 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/draw_clear_ext.json @@ -0,0 +1,9 @@ +{ + "The above code calls {}{}draw_clear_ext{}{} to clear the colour to white, the alpha channel to 1, the depth buffer to 0 and the stencil buffer to 20.":"上面的代码调用 {}{}draw_clear_ext{}{} 将颜色清除为白色,将 Alpha 通道清除为 1,将深度缓冲区清除为 0,将模板缓冲区清除为 20。", + "{}This function clears the current render target along with the depth and stencil buffers.{}":"{} 此函数会清除当前渲染目标以及深度和模板缓冲区。{}", + "{}{}NOTE{}{} If all arguments are {}undefined{} the function does nothing.":"{}{} 注意{}{} 如果所有参数都 {}undefined{},则该函数不执行任何操作。", + "{}{}OPTIONAL{}{} The alpha value to clear the alpha channel with. Use {}undefined{} to skip clearing the alpha channel. A value from 0 to 1 (inclusive). Must be specified if {}colour{} is specified.":"{}{} 可选{}{} 用于清除 Alpha 通道的 Alpha 值。使用 {}undefined{} 跳过清除 Alpha 通道。 0 到 1( 含) 之间的值。如果指定了 {} 颜色 {},则必须指定。", + "{}{}OPTIONAL{}{} The colour to clear the current render target with. Use {}undefined{} to skip clearing the colour buffer. Must be specified if {}alpha{} is specified.":"{}{} 可选{}{} 用于清除当前渲染目标的颜色。使用 {}undefined{} 跳过清除颜色缓冲区的过程。如果指定了 {}alpha{},则必须指定。", + "{}{}OPTIONAL{}{} The value to clear the current depth buffer with. Use {}undefined{} to skip clearing the depth buffer. A value from 0 (znear) to 1 (zfar) (inclusive).":"{}{} 可选{}{} 用于清除当前深度缓冲区的值。使用 {}undefined{} 跳过清除深度缓冲区。 0(znear) 到 1(zfar)( 含) 之间的值。", + "{}{}OPTIONAL{}{} The value to clear the current stencil buffer with. Use {}undefined{} to skip clearing the stencil buffer. An integer value from 0 to 255 (inclusive).":"{}{} 可选{}{} 用于清除当前模板缓冲区的值。使用 {}undefined{} 跳过清除模板缓冲区的过程。 0 到 255( 含) 之间的整数值。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/draw_clear_stencil.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/draw_clear_stencil.json new file mode 100644 index 000000000..5391ba192 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/draw_clear_stencil.json @@ -0,0 +1,5 @@ +{ + "The above code clears the stencil buffer to the value 1.":"上面的代码将模板缓冲区清除为值 1。", + "The value to clear the stencil buffer to. An integer value in the range [0, 255].":"清除模板缓冲区的值。 [0, 255] 范围内的整数值。", + "This function clears the stencil buffer of the {}current render target{} to the given stencil value, an integer value from 0 to 255.":"此函数将 {} 当前渲染目标 {} 的模板缓冲区清除为给定的模板值 (0 到 255 之间的整数值)。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels.json index 085b4222f..9e98813e5 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels.json @@ -1,6 +1,7 @@ { "By setting up nodes inside nodes (inside nodes...), you can create a layout tree. Each node can have properties that define how large it is, how it should be positioned in relation to the nodes in its container, how its own child nodes should behave, and so on.":"通过在节点内部设置节点 (节点内部 ...),您可以创建布局树。每个节点都可以具有定义其大小、相对于其容器中的节点应如何定位、其自己的子节点应如何表现等的属性。", "Creating a layout is as simple as calling {}{}flexpanel_create_node{}{} and passing it a struct or a JSON string. That struct/JSON should define the properties of the root node and all nodes nested under the root node. The structure of that struct/JSON is {}outlined on this page{}.":"创建布局就像调用 {}{}flexpanel_create_node{}{} 并向其传递一个结构体或 JSON 字符串一样简单。该 struct/JSON 应该定义根节点以及嵌套在根节点下的所有节点的属性。{} 本页概述了该结构体 /JSON 的结构 {}。", + "Each node has styling properties, which define its position, size and behaviour within its container. You can specify these styling properties in the struct/JSON that you pass while creating a node, which are all listed here: {}Styling Properties{}.":"每个节点都有样式属性,这些属性定义其在其容器内的位置、大小和行为。您可以在创建节点时传递的 struct/JSON 中指定这些样式属性,这些属性均在此处列出:{} 样式属性 {}。", "Flex Panel Functions":"柔性面板功能", "Flex Panel Struct Members":"柔性面板结构成员", "How To Create Layouts":"如何创建布局", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/GamePad_Input/Gamepad_Input.json b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/GamePad_Input/Gamepad_Input.json index 4bf30bc70..d8fd787a0 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/GamePad_Input/Gamepad_Input.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/GamePad_Input/Gamepad_Input.json @@ -1,10 +1,12 @@ { + "An extra button that may be mapped to anything":"可以映射到任何东西的额外按钮", "Below you can find a list of all the gamepad functions:":"下面,您可以找到所有gamepad函数的列表:", "Compatibility":"兼容性", "D-pad down":"D-pad 下", "D-pad left":"D-pad 左", "D-pad right":"D-pad 右", "D-pad up":"D-pad 上", + "Finally, there is one function for updating the list of connected gamepad devices on Android:":"最后,Android 上有一个更新已连接游戏手柄设备列表的函数:", "Functions":"函数", "Gamepad Axis Constant":"游戏手柄轴常数", "Gamepad Button Constant":"游戏手柄按钮常数", @@ -13,7 +15,9 @@ "Ideally, on {}all{} target platforms, you want to enumerate a list of available gamepad \"slots\" and then check them to see if any devices are detected, something like this:":"理想情况下,在{}所有{}目标平台上,您要枚举可用的游戏手柄 “插槽” 列表,然后检查它们以查看是否检测到任何设备,如下:", "Input Constants":"输入常数", "It is worth noting that Direct Input gamepads are run in {}cooperative mode{} which means that your game only has access to them when it is the foreground application, which in turn will cause Direct Input controllers to be \"lost\" if the game loses focus and then \"found\" again when it comes back into focus (this can be detected in the System Event and dealt with). Similarly, no input from gamepads will be detected while the game is not in focus, and we recommend that you use the function {}{}os_is_paused(){}{} or {}{}window_has_focus(){}{} to detect this and pause the game or something similar as any button being held down at the time the game loses focus will maintain the held down state until the game regains focus.":"值得注意的是,直接输入游戏手柄以{}合作模式{}运行,这意味着您的游戏只有在前台应用程序时才能访问它们,反过来,如果游戏失去焦点,则会导致直接输入控制器 “丢失”,然后在重新聚焦时再次 “找到” (这可以在系统事件中检测到并处理)。同样,当游戏不在焦点中时,不会检测到来自游戏手柄的输入,并且我们建议您使用函数{}{}os_is_pauzed(){}{}或{}{}window_has_focus(){}{}来检测到这一点,并暂停游戏或类似在游戏失去焦点时被按住的任何按钮将保持被按住的状态,直到游戏重新获得焦点。", + "It is worth noting that DirectInput gamepads are run in {}cooperative mode{} which means that your game only has access to them when it is the foreground application, which in turn will cause DirectInput controllers to be \"lost\" if the game loses focus and then \"found\" again when it comes back into focus (this can be detected in the System Event and dealt with). Similarly, no input from gamepads will be detected while the game is not in focus, and we recommend that you use the function {}{}os_is_paused{}{} or {}{}window_has_focus{}{} to detect this and pause the game or something similar as any button being held down at the time the game loses focus will maintain the held down state until the game regains focus.":"值得注意的是,DirectInput 游戏手柄在 {} 合作模式 {} 下运行,这意味着您的游戏只有在前台应用程序时才能访问它们,如果游戏失去焦点,这将导致 DirectInput 控制器 \" 丢失 \" 然后当它回到焦点时再次 \" 找到 \"( 这可以在系统事件中检测到并进行处理)。同样,当游戏未聚焦时,不会检测到来自游戏手柄的输入,我们建议您使用函数 {}{}os_is_paused{}{} 或 {}{}window_has_focus{}{} 来检测此情况并暂停游戏游戏或类似的东西,在游戏失去焦点时按住任何按钮将保持按住状态,直到游戏重新获得焦点。", "It is worth noting that when using DirectInput gamepads on Windows, or generic gamepads on other platforms, the constants given below {}may not match exactly the buttons that you expect when they are pressed{}, due to the fragmented and non-standardised way that the API is implemented by controller manufacturers. Because of this, it is recommend that you have some kind of gamepad setup screen in your games where people can redefine the gamepad buttons based on input from any connected device to mitigate any issues (there are gamepad \"mapping\" functions that can help with this on Windows Desktop, Ubuntu, macOS, and Android targets, while on all others you would need to do this yourself using code).":"值得注意的是,当在Windows上使用DirectInput游戏手柄或在其他平台上使用通用游戏手柄时,下面给出的常量{}可能与您在按下按钮时所期望的完全匹配{},这是由于控制器制造商实现API的零散和非标准化方式。因此,建议您在游戏中有某种游戏手柄设置屏幕,人们可以根据来自任何连接设备的输入重新定义游戏手柄按钮,以缓解任何问题 (有游戏手柄 “映射” 函数可以帮助在Windows桌面,Ubuntu,macOS,和Android的目标,而在所有其他的,你将需要做到这一点自己使用代码)。", + "It is worth noting that when using DirectInput gamepads on Windows, or generic gamepads on other platforms, the constants given below {}may not match exactly the buttons that you expect when they are pressed{}, due to the fragmented and non-standardised way that the API is implemented by controller manufacturers. Because of this, it is recommended that you have some kind of gamepad setup screen in your games where people can redefine the gamepad buttons based on input from any connected device to mitigate any issues (there are gamepad \"mapping\" functions that can help with this on Windows Desktop, Ubuntu, macOS, and Android targets, while on all others you would need to do this yourself using code).":"值得注意的是,当在 Windows 上使用 DirectInput 游戏手柄或在其他平台上使用通用游戏手柄时,由于碎片化和非标准化的方式,下面给出的常量 {} 可能与您按下时所期望的按钮不完全匹配 {} 该 API 是由控制器制造商实现的。因此,建议您在游戏中设置某种游戏手柄设置屏幕,人们可以根据任何连接设备的输入重新定义游戏手柄按钮,以缓解任何问题 (游戏手柄 \" 映射 \" 功能可以帮助解决此问题) 在 Windows 桌面、Ubuntu、macOS 和 Android 目标上,而在所有其他目标上,您需要使用代码自行执行此操作)。", "Left shoulder button":"左肩按钮", "Left shoulder trigger":"左肩扳机", "Left stick horizontal axis (analog)":"左摇杆水平轴(模拟)", @@ -24,9 +28,12 @@ "Right shoulder trigger":"右肩扳机", "Right stick horizontal axis (analog)":"右摇杆水平轴(模拟)", "Right stick vertical axis (analog)":"右摇杆垂直轴(模拟)", + "The \"home\" button on Switch controllers, and the PS/XBOX logo buttons on some controllers":"Switch 控制器上的 \" 主页 \" 按钮以及某些控制器上的 PS/XBOX 徽标按钮", "The following gamepad functions also exist and are used for remapping the built in constants to the direct physical inputs of a given gamepad. These functions are only for the Windows Desktop, Ubuntu, macOS, and Android target platforms and on Windows, they will only be valid for Direct input devices. While {}GameMaker{} comes with mappings for a number of different gamepads based on {}SDL Gamepad Controller DB{}, however due to the huge number of controller types and brands out there, it is impossible to map the GML constants to the correct inputs for every make and model, so with these functions you have the possibility to create your own custom mappings.":"以下游戏板函数也存在,并且用于将内置常数重新映射到给定游戏手柄的直接物理输入。这些函数仅适用于 Windows 桌面、Ubuntu、macOS 和 Android 目标平台,在 Windows 上仅对直接输入设备有效。{}GameMaker{}提供基于{}SDL Gamepad Controller DB{}的多种不同游戏手柄的映射,但由于控制器类型和品牌数量巨大,无法将 GML 常量映射到每个品牌和型号的正确输入,因此使用这些函数,您可以创建自己的自定义映射。", + "The following gamepad functions also exist and are used for remapping the built-in constants to the direct physical inputs of a given gamepad. These functions are only for the Windows Desktop, Ubuntu, macOS, and Android target platforms and on Windows, they will only be valid for DirectInput devices. While {}GameMaker{} comes with mappings for a number of different gamepads based on {}SDL Gamepad Controller DB{}, however due to the huge number of controller types and brands out there, it is impossible to map the GML constants to the correct inputs for every make and model, so with these functions you have the possibility to create your own custom mappings.":"还存在以下游戏手柄函数,用于将内置常量重新映射到给定游戏手柄的直接物理输入。这些函数仅适用于 Windows 桌面、Ubuntu、macOS 和 Android 目标平台,并且在 Windows 上,它们仅对 DirectInput 设备有效。虽然 {}GameMaker{} 附带了基于 {}SDL Gamepad Controller DB{} 的多种不同游戏手柄的映射,但由于控制器类型和品牌数量巨大,无法将 GML 常量映射到每个品牌和型号的正确输入,因此通过这些功能,您可以创建自己的自定义映射。", "The following list shows current compatibility across the platforms (note that this will change with future updates):":"以下列表显示了当前跨平台的兼容性(请注意,这将随着以后的更新而改变):", "The gamepad \"slots\" are indexed from 0 upwards, and the actual slot that a gamepad assigned will depend on a variety of factors, not least of which is the OS that the project is running on. On the {}Windows{} target, slots 0 - 3 inclusive are {}only for Xinput gamepads{}, ie: Xbox360 controllers and compatibles. However you can also check slots 4 - 11 inclusive for {}DirectInput{} gamepads, which means you can detect many other models of controller when connected through these slots. On other platforms, pads may be detected on {}any{} slot that the OS has assigned it, which could slot 3 or slot 20 or more. For example, {}Android{} devices will store bluetooth gamepads in a slot and then reserve that slot for that gamepad in the future, whether it is connected or not, so you {}cannot{} assume that a single connected gamepad is connected to slot 0, as this will probably not be the case.":"游戏手柄 “插槽” 是从 0 向上索引的,而游戏手柄分配的实际插槽将取决于多种因素,尤其是运行项目的操作系统。在{}Windows{}目标上,包括 0-3 在内的插槽{}仅适用于 Xinput 游戏手柄{},即:Xbox360 控制器和兼容产品。但是,您也可以查看{}DirectInput{}游戏手柄的插槽 4-11(含),这意味着通过这些插槽连接时,您可以检测到许多其他型号的控制器。在其他平台上,可以在操作系统分配的{}任何{}插槽上检测到 pad,这些插槽可能是插槽 3 或插槽 20 或更多。例如,{}Android{}设备会将蓝牙游戏手柄存储在插槽中,然后在将来为该游戏手柄保留该插槽,无论它是否连接,因此{}不能{}假设单个连接的游戏手柄已连接到插槽 0,因为事实可能并非如此。", + "The gamepad \"slots\" are indexed from 0 upwards, and the actual slot that a gamepad gets assigned will depend on a variety of factors, not least of which is the OS that the project is running on. On the {}Windows{} target, slots 0 - 3 inclusive are {}only for Xinput gamepads{}, i.e.: Xbox360 controllers and compatibles. However, you can also check slots 4 - 11 inclusive for {}DirectInput{} gamepads, which means you can detect many other models of controller when connected through these slots. On other platforms, pads may be detected on {}any{} slot that the OS has assigned it, which could slot 3 or slot 20 or more. For example, {}Android{} devices will store bluetooth gamepads in a slot and then reserve that slot for that gamepad in the future, whether it\u0027s connected or not, so you {}cannot{} assume that a single connected gamepad is connected to slot 0, as this will probably not be the case.":"游戏手柄 \" 插槽 \" 从 0 向上索引,分配游戏手柄的实际插槽将取决于多种因素,其中最重要的是项目运行的操作系统。在 {}Windows{} 目标上,插槽 0 - 3( 含 ){} 仅适用于 Xinput 游戏手柄 {},即:Xbox360 控制器和兼容机。不过,您还可以检查插槽 4 - 11( 包括 {}DirectInput{} 游戏手柄),这意味着通过这些插槽连接时您可以检测到许多其他型号的控制器。在其他平台上,可以在操作系统为其分配的 {} 任何 {} 插槽 (可能是插槽 3、插槽 20 或更多) 上检测到 pad。例如,{}Android{} 设备会将蓝牙游戏手柄存储在一个插槽中,然后在将来为该游戏手柄保留该插槽,无论该游戏手柄是否已连接,因此您 {} 不能 {} 假设单个已连接的游戏手柄已连接到插槽 0,因为情况可能并非如此。", "The gamepad\u0027s W orientation":"游戏手柄的 W 方向", "The gamepad\u0027s X orientation":"游戏手柄的 X 方向", "The gamepad\u0027s Y orientation":"游戏手柄的 Y 方向", @@ -43,6 +50,7 @@ "The select button (on a PS controller, this triggers when you press the touchpad down)":"选择按钮 (在 PS 控制器上,按下触摸板时会触发)", "The start button (this is the \"options\" button on a PS controller)":"开始按钮 (这是 PS 控制器上的 \" 选项 \" 按钮)", "The start button (this is the \"options\" button on a PS4 controller)":"启动按钮(这是PS4控制器上的“选项”按钮)", + "The touchpad button on a PS controller":"PS 控制器上的触摸板按钮", "To better understand exactly what part of the controller each constant represents, you can refer to the following image of a standard XInput gamepad:":"为了更好地了解每个常量代表控制器的哪一部分,您可以参考标准XInput游戏手柄的以下图像:", "Top button 1 (this maps to the {}\"A\"{} on an Xbox 360 controller and the {}cross{} on a PS controller)":"顶部按钮1(映射到Xbox 360控制器上的{}“A”{}和PS控制器上的{}交叉{})", "Top button 1 (this maps to the {}\"A\"{} on an Xbox controller and the {}cross{} on a PS controller)":"顶部按钮 1( 这映射到 Xbox 控制器上的 {}\"A\"{} 和 PS 控制器上的 {} 十字 {})", @@ -55,10 +63,17 @@ "Web browsers will only detect gamepads when a button is pressed or an axis is moved, so they may not be available at the immediate start of the game. This applies to the {}GX.games{} and {}HTML {}target platforms.":"Web浏览器仅在按下按钮或移动轴时检测游戏手柄,因此在游戏开始时可能无法使用。这适用于{}GX.games{}和{}HTML{}目标平台。", "When working with the gamepad functions, input can come from {}axes{}, {}buttons{} or {}hats{}, which {}GameMaker{} will assign to the following built-in constants (note that \"hats\" are generally only detected on non-standard controllers):":"使用游戏手柄函数时,输入可以来自{}axes{}、{}buttons{}或{}hats{},{}GameMaker{}会将其分配给以下内置常量(注意 “十字键” 通常只能在非标准控制器上检测到):", "{}Android {}(and {}Amazon Fire{}) export supports NYKO controllers and generic Bluetooth controllers, but only when they are enabled, meaning that you will have to tick the iCade/Bluetooth option in the {}General{} section of the Android Game Options. They require API level 12 for them to work fully and it should be noted that {}GameMaker{} will register as connected any Bluetooth devices that your device is paired with, whether or not it\u0027s actually connected. Therefore this should be taken into account when assigning and checking \"slots\". Note that the remapping of controller constants is also permitted.":"{}Android{}(和{}Amazon Fire{})导出支持Nyko控制器和通用蓝牙控制器,但仅当启用它们时,这意味着您必须勾选Android游戏选项的{}常规{}部分中的iCade/Bluetooth选项。它们需要API级别12才能完全工作,需要注意的是,{}GameMaker{}会将与您的设备配对的任何蓝牙设备注册为已连接,无论其是否实际连接。因此,在分配和检查“插槽”时应考虑到这一点。请注意,也允许重新映射控制器常量。", + "{}Gamepad Input{}":"{} 游戏手柄输入 {}", "{}HTML5 {}games using gamepads are supported by most major browsers, except {}Safari{}. Remapping of controller constants is {}not{} permitted.":"使用游戏手柄的{}HTML5{}游戏被大多数主要浏览器支持,但{}Safari{}除外。不允许{}重新映射控制器常量。", + "{}Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4){}":"{} 下部或辅助桨,位于左手下方 (例如 Xbox Elite 桨 P4){}", + "{}Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2){}":"{} 下部或辅助桨,位于右手下方 (例如 Xbox Elite 桨 P2){}", "{}NOTE{} The gamepad\u0027s {}orientation{} is a {}Quaternion{}, which is why it has four values (X, Y, Z and W).{} {} * These constants are only supported on PS4 and PS5, and when used on other platforms the input functions will return {}0{}, even when using a DualSense gamepad. ":"{}注意{}游戏手柄的{}方向{}是一个{}四元数{},这就是为什么它有四个值(X,y,Z和w)。{}{}*这些常量仅在PS4和PS5上受支持,在其他平台上使用时,输入函数将返回{}0{},即使使用DualSense游戏手柄也是如此。", "{}Ubuntu {}does also support Gamepad input, but you may need to install additional libraries from the Ubuntu repository. You can do this easily by opening a command line terminal and typing the following (this will install GUI support for the joystick/gamepad as well as the joystick/gamepad API itself - remapping of controller constants is {}not{} permitted): {}sudo apt-get install jstest-gtk{} sudo apt-get install joystick.{} ":"{}Ubuntu{}也支持 Gamepad 输入,但你可能需要从 Ubuntu 仓库中安装其他库。你可以通过打开命令行终端并键入以下内容来轻松做到这一点(这将安装对操纵杆/游戏手柄以及操纵杆/游戏手柄 API 本身的 GUI 支持——{}不允许{}重新映射控制器常量): {}sudo apt-get install jstest-gtk{} sudo apt-get install joystick.{}", + "{}Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3){}":"{} 左手下方的上部或主拨片 (例如 Xbox Elite 拨片 P3){}", + "{}Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1){}":"{} 右手下方的上部或主拨片 (例如 Xbox Elite 拨片 P1){}", "{}Windows {}is fully supported with up to a maximum of 12 connected devices permitted at once (numbered from 0 to 11, with 0 - 3 being XInput devices and 4 - 11 being DirectInput). Remapping of controller constants is also permitted.":"{}Windows{}完全支持,一次最多允许12个连接的设备 (编号从0到11,其中0- 3是XInput设备,4- 11是DirectInput设备)。还允许重新映射控制器常数。", "{}macOS {}is supported with up to a maximum of 4 connected devices permitted at once, and these devices can ONLY be of the type Playstation3 or Xbox 360. Please note that the \"Build for Mac AppStore\" option in Mac Game Options needs to be OFF for pad support to work. Remapping of controller constants is also permitted.":"{}macOS{}最多允许同时连接 4 台设备,而这些设备只能是 Playstation3 或 Xbox 360 类型。请注意,Mac Game Options 中的 “为 Mac AppStore 构建” 选项需要关闭,才能使用键盘支持。还允许重新映射控制器常量。", - "{}{}{}GameMaker{} has a number of dedicated functions that can be used to detect both analog and digital controls from multiple connected gamepads. These functions work similar to the {}Device Inputs{}, in that you can detect up to four different XInput game pads that are connected (and up to 8 DirectInput gamepads) and deal with the input from each one using the same functions. Note that when a gamepad is plugged in to your device (or it is removed) then an asynchronous {}System Event{} is triggered where you can deal with the situation using the appropriate functions.":"{}{}{}GameMaker{}具有许多专用函数,可用于检测来自多个连接的游戏手柄的模拟和数字控件。这些函数的工作原理类似于{}设备输入{},因为您可以检测到多达四个不同的XInput游戏垫连接 (最多8个DirectInput游戏手柄),并使用相同的函数处理每个输入。请注意,将游戏手柄插入设备 (或将其删除) 后,将触发异步{}系统事件{},您可以在其中使用适当的函数处理情况。" + "{}{}{}GameMaker{} has a number of dedicated functions that can be used to detect both analog and digital controls from multiple connected gamepads. These functions work similar to the {}Device Inputs{}, in that you can detect up to four different XInput game pads that are connected (and up to 8 DirectInput gamepads) and deal with the input from each one using the same functions. Note that when a gamepad is plugged in to your device (or it is removed) then an asynchronous {}System Event{} is triggered where you can deal with the situation using the appropriate functions.":"{}{}{}GameMaker{}具有许多专用函数,可用于检测来自多个连接的游戏手柄的模拟和数字控件。这些函数的工作原理类似于{}设备输入{},因为您可以检测到多达四个不同的XInput游戏垫连接 (最多8个DirectInput游戏手柄),并使用相同的函数处理每个输入。请注意,将游戏手柄插入设备 (或将其删除) 后,将触发异步{}系统事件{},您可以在其中使用适当的函数处理情况。", + "{}{}{}GameMaker{} has a number of dedicated functions that can be used to detect both analog and digital controls from multiple connected gamepads. These functions work similar to the {}Device Inputs{}, in that you can detect up to four different XInput gamepads that are connected (and up to 8 DirectInput gamepads) and deal with the input from each one using the same functions. Note that when a gamepad is plugged in to your device (or it is removed) then an asynchronous {}System{} event is triggered where you can deal with the situation using the appropriate functions.":"{}{}{}GameMaker{} 具有许多专用功能,可用于检测多个连接的游戏手柄的模拟和数字控制。这些函数的工作方式与 {} 设备输入 {} 类似,因为您可以检测最多四个已连接的不同 XInput 游戏手柄 (以及最多 8 个 DirectInput 游戏手柄),并使用相同的函数处理来自每个游戏手柄的输入。请注意,当游戏手柄插入您的设备 (或拔出) 时,会触发异步 {} 系统 {} 事件,您可以使用适当的函数来处理这种情况。", + "{}{}{}macOS is supported with up to a maximum of 4 connected devices permitted at once. Be aware that when submitting to the macOS App Store the choice of gamepads allowed by Apple is quite limited, but in testing on your own machine or if you\u0027re not submitting to the App Store, then a large number of modern pads are allowed (and you can use GameMaker\u0027s gamepad-mapping functions to make even more pads work for your game){}. The \"Build for Mac App Store\" option in Mac Game Options needs to be OFF for pad support to work.":"{}{}{} 支持 macOS,最多允许同时连接 4 台设备。请注意,当提交到 macOS App Store 时,Apple 允许的游戏手柄选择非常有限,但在您自己的计算机上进行测试或者如果您不提交到 App Store,则允许使用大量现代游戏手柄 (并且您可以使用 GameMaker 的游戏手柄映射功能让更多手柄适用于您的游戏 ){}。 Mac 游戏选项中的 \"Build for Mac App Store\" 选项需要关闭才能支持游戏手柄。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/GamePad_Input/gamepad_enumerate.json b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/GamePad_Input/gamepad_enumerate.json new file mode 100644 index 000000000..e6dffa2d5 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/GamePad_Input/gamepad_enumerate.json @@ -0,0 +1,6 @@ +{ + "It allows the game {}to detect when a controller connects or disconnects to the device in real time.{}":"它允许游戏 {} 实时检测控制器何时连接或断开与设备的连接。{}", + "The above code triggers device enumeration.":"上面的代码触发设备枚举。", + "This function forces the device enumeration that would take place in reaction to a bluetooth device change on Android, updating the list of connected devices.":"此函数强制进行设备枚举,以响应 Android 上的蓝牙设备更改,从而更新已连接设备的列表。", + "{}{}NOTE{}{} This function only works on Android.":"{}{} 注意{}{} 此函数仅适用于 Android。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/Virtual_Keys_And_Keyboards.json b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/Virtual_Keys_And_Keyboards.json index 4439cc4ef..929e1a9a2 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/Virtual_Keys_And_Keyboards.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/Virtual_Keys_And_Keyboards.json @@ -9,11 +9,15 @@ "Pop up the OS {}virtual keyboard{} and get input from that":"弹出 OS{}虚拟键盘{}然后从中获取输入", "The available virtual key functions are:":"可用的虚拟按键函数有:", "The available virtual keyboard functions are:":"可用的虚拟键盘函数包括:", + "Virtual Keyboard":"虚拟键盘", + "Virtual Keys":"虚拟按键", "Virtual Keys And Virtual Keyboards":"虚拟按键和虚拟键盘", "What you use will depend very much on the game and what you need, but in general you would use virtual keys when you want to have onscreen buttons for player control or for menus, while you\u0027d use the virtual keyboard when you need player input, like getting a name or setting a value.":"你使用什么在很大程度上取决于游戏和你需要什么,但总的来说,当你想让屏幕上的按钮用于玩家控制或菜单时,你会使用虚拟键盘,而当你需要玩家输入时,比如获取名字或设置值,你会使用虚拟键盘。", "{}{}NOTE{} {}These functions are only valid for the {}Android{} (including {}AndroidTV{}), and {}iOS {}(including {}tvOS{}) target platforms.":"{}{}注意{}{}这些函数仅对{}Android{}(包括{}AndroidTV{})和{}iOS{}(包括{}tvOS{})目标平台有效。", "{}{}NOTE{} {}These functions are only valid for the {}Xbox (GDK){}, {}Android{} (including {}AndroidTV{}), and {}iOS {}(including {}tvOS{}) target platforms.":"{}{} 注意{}{} 这些函数仅适用于 {}Xbox(GDK){}、{}Android{}( 包括 {}AndroidTV{}) 和 {}iOS{}( 包括 {}tvOS{}) 目标平台。", + "{}{}NOTE{} {}These functions are only valid for the {}Xbox (GDK){}, {}Android{} (including {}AndroidTV{}), and {}iOS {}(including {}tvOS{}) target platforms. On {}Windows{}, they can be used to enable or disable the use of IMEs.":"{}{} 注意{}{} 这些函数仅适用于 {}Xbox(GDK){}、{}Android{}( 包括 {}AndroidTV{}) 和 {}iOS{}( 包括 {}tvOS{}) 目标平台。在 {}Windows{} 上,它们可用于启用或禁用 IME。", "{}{}NOTE{} {}These functions will not work on the Windows, Ubuntu (Linux), nor the MacOS, target platforms using a touch screen, although they will receive mouse clicks as \"touches\".":"{}{}注意{}{}这些函数在 Windows、Ubuntu (Linux) 或 macOS 上不起作用,它们使用触摸屏的目标平台尽管会以 “触摸” 的形式收到鼠标点击。", "{}{}NOTE{}{} These functions are supported in the HTML5 and GX.games targets.":"{}{}注意{}{}HTML5和GX.games目标支持这些函数。", + "{}{}NOTE{}{} These functions are supported on the HTML5 and GX.games targets.":"{}{} 注意{}{}HTML5 和 GX.games 目标支持这些函数。", "{}{}When developing games for touchscreen devices, it\u0027s often important to get keyboard input from the user. When using {}GameMaker{} this can be done in one of two ways:":"{}{}在为触摸屏设备开发游戏时,从用户那里获取键盘输入通常很重要。使用{}GameMaker{}时,可以通过以下两种方式之一完成:" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_hide.json b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_hide.json index e3f5fcbb0..d639b0d2c 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_hide.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_hide.json @@ -2,6 +2,9 @@ "\"{}event_type{}\" - this will be \"{}virtual keyboard status{}\" when triggered by virtual keyboard functions.":"\"{}event_type{}\"-当由虚拟键盘函数触发时,这将是 \"{}虚拟键盘状态{}\"。", "\"{}keyboard_status{}\" - the current status of the keyboard, returned as one of the following strings: {} {}\"hiding\"{} {}\"hidden\"{} {}\"showing\"{} {}\"visible\"{} {} ":"\"{}keyboard_status{}\" - 键盘的当前状态,作为以下字符串之一返回: {} {}\"hiding\"{} {}\"hidden\"{} {}\"showing\"{} {}\"visible\"{} {} ", "\"{}screen_height{}\" - the height of the virtual keyboard (in pixels). This will be 0 if the keyboard is invisible.":"\"{}screen_height{}\"-虚拟键盘的高度(以像素为单位)。如果键盘不可见,则该值将为 0。", + "For virtual keyboard use, calling this function will generate a {}System Asynchronous Event{}, in which the {}async_load{} DS map will be populated with the following key/value pairs:":"对于虚拟键盘的使用,调用此函数将生成一个 {} 系统异步事件 {},其中 {}async_load{} DS 映射将填充以下键 / 值对:", + "On Windows, this function disables the use of IMEs, which can then be re-enabled by calling {}{}keyboard_virtual_show{}{}.":"在 Windows 上,此函数会禁用 IME,然后可以通过调用 {}{}keyboard_virtual_show{}{} 重新启用 IME。", "The above code will hide the OS virtual keyboard if the given variable is not set to {}false{}.":"如果给定的变量没有设置为{}false{},上面的代码将隐藏操作系统虚拟键盘。", + "This function can be used to hide the virtual keyboard on the device running the game.":"此功能可用于隐藏运行游戏的设备上的虚拟键盘。", "This function can be used to hide the virtual keyboard on the device running the game. Calling this function will generate a {}System Asynchronous Event{}, in which the {}async_load{} DS map will be populated with the following key/value pairs:":"此函数可用于隐藏运行游戏的设备上的虚拟键盘。调用此函数将生成{}系统异步事件{},其中{}async_load{} DS 映射将填充以下键/值对:" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_show.json b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_show.json index 5c7481783..1aa200296 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_show.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_show.json @@ -14,7 +14,9 @@ "Determines how/if the words typed via the virtual keyboard will be autocapitalized {}(see tables at the top){}.":"确定如何/是否将通过虚拟键盘键入的单词自动大写{}(请参阅顶部的表格){}。", "Determines the keyset available on the virtual keyboard {}(see tables at the top){}.":"确定虚拟键盘上的可用键集{}(请参阅顶部的表){}。", "Determines what is shown on the return/action key of the virtual keyboard ({}see tables at the top){}.":"确定虚拟键盘的返回/操作键上显示的内容({}参见顶部的表格){}。", + "For virtual keyboard use, you need to provide one of the following constants for each of the first three arguments:":"对于虚拟键盘的使用,您需要为前三个参数中的每一个提供以下常量之一:", "It is important to note too that the user will get different keyboards with different capabilities depending on the platform OS, with the following caveats for use per target:":"还需要注意的是,根据平台操作系统的不同,用户将获得具有不同函数的不同键盘,每个目标的使用注意事项如下:", + "On Windows, this function is used to enable the use of IMEs after they have been disabled with {}{}keyboard_virtual_hide{}{}. In that case, none of the arguments are used and you can pass {}undefined{} to all of them.":"在 Windows 上,此函数用于在使用 {}{}keyboard_virtual_hide{}{} 禁用 IME 后启用 IME。在这种情况下,不会使用任何参数,您可以将 {}undefined{} 传递给所有参数。", "Sentences will be auto-capitalized.":"句子将自动大写。", "Set to {}true{}/{}false{} to enable/disable predictive text input.":"设置为{}true{}/{}false{}以启用/禁用预想英文输入法。", "Sets the return key title to \"Continue\".":"将返回键标题设置为 “Continue”。", @@ -31,6 +33,7 @@ "The default keyboard type for the current system.":"当前系统的默认键盘类型。", "The default return key title for the current system.":"当前系统的默认返回键标题。", "The last argument is to enable/disable predictive text, and this would be set to {}true{} to permit it, and {}false{} otherwise, but note that just because it is permitted doesn\u0027t mean that it will be used as that will depend on the preferences of the user on the device. When in predictive text mode, the virtual keyboard will not generate normal {}GameMaker{} keypress events. Instead, it will only update the {}last{} character pressed and keyboard string variables. This is due to the inability to detect whether a change in the internal text field used for detecting key presses came from an actual virtual keyboard key, or a text suggestion. In these cases you would want to read the {}keyboard_string{} input as opposed to reading any kind of raw key input.":"最后一个参数是启用/禁用预想英文输入法,这将被设置为{}true{}以允许它,否则设置为{}false{},但请注意,仅仅因为它被允许并不意味着它将被使用,因为这将取决于用户在设备上的偏好。在预想英文输入法模式下,虚拟键盘不会生成正常的{}GameMaker{}按键事件。相反,它将只更新{}最后一个{}按下的字符和键盘字符串变量。这是由于无法检测用于检测按键的内部文本字段中的变化是来自实际的虚拟键盘键还是来自文本建议。在这些情况下,您可能希望读取{}keyboard_string{}输入,而不是读取任何类型的原始按键输入。", + "This function can be used to show the virtual keyboard on the device running the game. See {}Virtual Keyboard{} for information on platform support.":"此功能可用于在运行游戏的设备上显示虚拟键盘。有关平台支持的信息,请参阅 {} 虚拟键盘 {}。", "This function can be used to show the virtual keyboard on the device running the game. When you call this function you need to provide one of the following constants for each of the first three arguments:":"此函数可用于在运行游戏的设备上显示虚拟键盘。调用此函数时,需要为前三个参数中的每个参数提供以下常量之一:", "Virtual Keyboard Autocapitalization Type Constant":"虚拟键盘自动大写类型常量", "Virtual Keyboard Return Type Constant":"虚拟键盘返回类型常量", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_status.json b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_status.json index 9140f160e..b44fe33ae 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_status.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Game_Input/Virtual_Keys_And_Keyboards/keyboard_virtual_status.json @@ -1,4 +1,5 @@ { + "On Windows, this returns whether the runner has disabled IMEs or not (through the functions {}{}keyboard_virtual_hide{}{} and {}{}keyboard_virtual_show{}{}).":"在 Windows 上,该函数返回跑步者是否禁用了 IME(通过函数 {}{}keyboard_virtual_hide{}{} 和 {}{}keyboard_virtual_show{}{})。", "The above code will show the OS virtual keyboard if the current status is {}false{}.":"如果当前状态为{}false{},上面的代码将显示操作系统虚拟键盘。", "This function can be used to get the status of the virtual keyboard on the device running the game. The function will return {}true{} if the OS virtual keyboard is visible/being shown or {}false{} if it is hidden/hiding.":"此函数可用于获取运行游戏的设备上的虚拟键盘的状态。如果操作系统虚拟键盘可见/正在显示,该函数将返回{}true{};如果操作系统虚拟键盘隐藏/正在隐藏,则返回{}false{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/General_Game_Control/cursor_sprite.json b/language/zh/www/GameMaker_Language/GML_Reference/General_Game_Control/cursor_sprite.json index 11d8375e8..25e767c7d 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/General_Game_Control/cursor_sprite.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/General_Game_Control/cursor_sprite.json @@ -1,5 +1,9 @@ { "It is also worth noting that this variable does {}not{} replace the game window cursor, and that it will still be drawn as normal. To avoid this you can use the function {}{}window_set_cursor(){}{} and set it to the constant {}cr_none{} which will make the standard cursor invisible.":"另外值得注意的是,此变量{}不会{}替换游戏窗口光标,并且仍将按正常方式绘制。要避免这种情况,可以使用函数{}{}window_set_cursor(){}{}并将其设置为常量{}cr_none{},这将使标准光标不可见。", + "Setting this variable will instruct {}GameMaker{} to use the designated sprite as a cursor (basically setting it to the current mouse x/y position every step).":"设置此变量将指示 {}GameMaker{} 使用指定的精灵作为光标 (基本上每一步将其设置为当前鼠标 x/y 位置)。", "Setting this variable will instruct {}GameMaker{} to use the designated sprite as a cursor (basically setting it to the current mouse x/y position every step). The default value is -1 which is no sprite for the cursor, but you can assign any sprite index from the game assets or that has been imported from an external resource. Please note that there is no way to control the animation speed or image_index, so if the sprite has sub-images, these will be cycled at the same speed as the room speed. To remove the cursor sprite, you can set this variable to -1 again.":"设置此变量将指示{}GameMaker{}使用指定的精灵作为光标(基本上每一步都将其设置为当前的鼠标x/y位置)。默认值为-1,它不是光标的精灵,但是您可以从游戏资源中分配任何sprite索引或已经从外部资源中导入的精灵索引。请注意,无法控制动画速度或image_index,因此,如果sprite具有子图像,这些图像将以与房间速度相同的速度循环。要删除光标精灵,可以再次将此变量设置为-1。", - "The above code will set the sprite indexed in the variable \"spr_CustomCursor\" to be the cursor sprite for the game.":"上述代码将变量\"spr_CustomCuror\"中索引的精灵设置为游戏的光标sprite。" + "The above code sets the sprite indexed in the variable {}spr_custom_cursor{} to be the cursor sprite for the game.":"上面的代码将变量 {}spr_custom_cursor{} 中索引的精灵设置为游戏的光标精灵。", + "The above code will set the sprite indexed in the variable \"spr_CustomCursor\" to be the cursor sprite for the game.":"上述代码将变量\"spr_CustomCuror\"中索引的精灵设置为游戏的光标sprite。", + "The default value is -1 which is no sprite for the cursor, but you can assign any sprite index from the game assets or that has been imported from an external resource. Please note that there is no way to control the animation speed or image index, so if the sprite has sub-images, these will be cycled at the same speed as the game speed. To remove the cursor sprite, you can set this variable to -1 again.":"默认值为 -1,即光标没有精灵,但您可以分配游戏资源或从外部资源导入的任何精灵索引。请注意,无法控制动画速度或图像索引,因此如果精灵有子图像,这些子图像将以与游戏速度相同的速度循环。要删除光标精灵,您可以再次将此变量设置为 -1。", + "{}{}NOTE{}{} This variable does {}not{} replace the game window cursor, and that it will still be drawn as normal. To avoid this you can use the function {}{}window_set_cursor{}{} and set it to the constant {}cr_none{} which will make the standard cursor invisible.":"{}{} 注意{}{} 此变量 {} 不会 {} 替换游戏窗口光标,并且仍会正常绘制。为了避免这种情况,您可以使用函数 {}{}window_set_cursor{}{} 并将其设置为常量 {}cr_none{},这将使标准光标不可见。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/General_Game_Control/game_restart.json b/language/zh/www/GameMaker_Language/GML_Reference/General_Game_Control/game_restart.json index 5f432c235..bce0c186d 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/General_Game_Control/game_restart.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/General_Game_Control/game_restart.json @@ -7,5 +7,6 @@ "The game speed will remain at whatever you set it in your game code (if you changed it this change will be perpetuated).":"game_speed将保持您在游戏代码中设置的任何值(如果您对其进行了更改,则此更改将永久生效)。", "This would restart the game when the player presses the \"R\" key.":"这将在玩家按下\"R\"键时重新启动游戏。", "With this function you can restart the game. This is essentially the same as running the game for the first time and so the {}Game Start Event{} will be triggered, {}as well as{} the {}Game End Event{}.":"使用此函数,您可以重新启动游戏。这与首次运行游戏基本相同,因此将触发{}游戏开始事件{}、{}以及{}游戏结束事件{}。", - "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,将无法在同一事件中创建新实例。" + "{}NOTE{} You will not be able to create new instances in the same event after this function has been called.":"{}注意{}调用此函数后,将无法在同一事件中创建新实例。", + "{}NOTE{} You will not be able to {}create new instances{} of objects in the same event after this function is called. There is one exception: if the object you\u0027re creating an instance of is already {}marked persistent{}, or its {}{}persistent{}{} variable is set to {}true{} in the {}variable struct{} passed into the {}instance_create_*(){} function, it will be created.{} {} In the latter case (making the new instance persistent through the variable struct), the {}Variable Definitions{} for that instance will not be executed. ":"{} 注意{} 调用此函数后,您将无法在同一事件中 {} 创建对象的新实例 {}。 \n\n有一个例外:如果您要创建其实例的对象已 {} 标记为持久化 {}, \n\n或者在传递到 {14}instance_create_*(){15} 函数的 {12} 变量结构 {13} 中将其 {}{}persistent{}{} 变量设置为 {}true{}, \n\n它将被创建。{}{}\n\n在后一种情况下 (通过变量结构使新实例持久化),该实例的 {} 变量定义 {} 将不会被执行。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/Collisions.json b/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/Collisions.json index 029819073..4aba2f118 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/Collisions.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/Collisions.json @@ -1,5 +1,6 @@ { "\"{}Disable Source Sprite Export{}\" needs to be unchecked in your Tile Set\u0027s {}editor{} for tile collisions to work.":"需要在图块集的 {} 编辑器 {} 中取消选中 \"{}禁用源精灵导出{}\",图块碰撞才能发挥作用。", + "\"{}Disable Source Sprite Export{}\" needs to be {}unchecked{} in your Tile Set\u0027s {}editor{} for tile collisions to work, since the sprite is needed for collision checking.":"需要在图块集的 {} 编辑器 {} 中 {} 取消选中 {}\"{}禁用源精灵导出{}\",图块碰撞才能正常工作,因为碰撞检查需要精灵。", "A function like {}{}instance_place{}{} or {}{}collision_circle{}{} (and other equivalents) may return 0 if a collision was found with a Tile Map having the ID 0. This means you should not use the return value as a boolean condition. Instead, check whether the return value is not {}noone{}, meaning a collision was found.":"如果发现与 ID 为 0 的图块地图发生碰撞,类似 {}{}instance_place{}{} 或 {}{}collision_circle{}{}( 以及其他等效函数) 的函数可能会返回 0。这意味着您不应使用作为布尔条件的返回值。相反,请检查返回值是否不是 {}noone{},这意味着发现了冲突。", "Advanced Collision Checking":"高级碰撞检查", "All of the above functions are related to collision checking {}instances{}, and as such rely on the collision mask that is defined for the instance. However, there are many moments when you require to check for \"collisions\" with a point or an area, especially when your instance does not have a sprite assigned, or when you are working with the mouse etc... Therefore {}GameMaker{} also provides the following functions to help you in these situations:":"以上所有函数都与碰撞检查{}实例{}相关,因此依赖于为该实例定义的碰撞遮罩。但是,有许多时刻需要检查与点或区域的\"碰撞\",尤其是当您的实例没有指定精灵时,或者当您正在使用鼠标等时...因此{}GameMaker{}还提供以下函数来帮助您解决这些问题:", @@ -11,7 +12,9 @@ "Collisions With Objects":"与物体碰撞", "Collisions With Tile Maps":"与平铺地图的碰撞", "Collisions against Tile Maps are checked using the collision mask of the sprite used for the Tile Set, which can be modified in {}The Sprite Editor{}.":"使用用于图块集的精灵的碰撞遮罩来检查图块地图的碰撞,可以在 {} 精灵编辑器 {} 中修改该碰撞遮罩。", + "Collisions against Tile Maps are checked using the collision mask of the sprite used for the Tile Set, which can be modified in {}The Sprite Editor{}. This means that Tile Maps that do not have a Tile Set asset attached (or the Tile Set does not have a sprite) will not work with collision functions (it will always return {}false{}).":"使用用于图块集的精灵的碰撞遮罩来检查图块地图的碰撞,可以在 {} 精灵编辑器 {} 中修改该碰撞遮罩。这意味着未附加图块集资源 (或图块集没有精灵) 的图块地图将无法使用碰撞函数 (它将始终返回 {}false{})。", "For example, if you\u0027re a rectangle trying to collide with a bounding box covering the area from {}(0.0, 0.0){} to {}(16.0, 16.0){}, the edge of your mask has to touch the area between  {}(0.5, 0.5){} and {}(15.5, 15.5){} for a collision to be counted.":"例如,如果您是一个尝试与覆盖从 {}(0.0, 0.0){} 到 {}(16.0, 16.0){} 区域的边界框碰撞的矩形,则遮罩的边缘必须接触该区域介于 {}(0.5, 0.5){} 和 {}(15.5, 15.5){} 之间,以便对碰撞进行计数。", + "For example, if you\u0027re trying to collide with a bounding box covering the area from {}(0.0, 0.0){} to {}(16.0, 16.0){}, the edge of your mask has to touch the area between  {}(0.5, 0.5){} and {}(15.5, 15.5){} for a collision to be counted.":"例如, \n如果您尝试与覆盖从 {}(0.0, 0.0){} 到 {}(16.0, 16.0){} 区域的边界框发生碰撞, \n遮罩的边缘必须接触到 {}(0.5, 0.5){} 和 {}(15.5, 15.5){} 之间的区域才能算作碰撞。", "For two instances to be in collision, their bounding boxes have to overlap. At a pixel level, an overlap is counted when the centre of that pixel is covered.":"为了使两个实例发生碰撞,它们的边界框必须重叠。在像素级别,当该像素的中心被覆盖时,就会计算重叠。", "How To Check Collisions":"如何检查碰撞", "In addition to objects, you can also pass a {}{}Tile Map Element ID{}{} to a collision function. This will check for collisions with that Tile Map.":"除了对象之外,您还可以将 {}{}Tile Map Element ID{}{} 传递给碰撞函数。这将检查与该图块地图的碰撞。", @@ -25,8 +28,10 @@ "The following functions deal with the various ways in which you can have an instance check for collisions with another instance:":"以下函数处理各种方法,通过这些方法可以使实例检查是否与另一个实例发生碰撞:", "The following functions exist that deal with advanced collisions.":"存在以下处理高级碰撞的函数。", "The following routines can be used for this (as well as other functions detailed in the sections relating to {}Moving Around{} and {}Instances{}). These collision functions all work slightly differently but they maintain three common arguments which we will explain here:":"以下例程可用于此(以及与{}移动{}和{}实例{}相关的章节中详细说明的其他函数)。这些碰撞函数的工作方式略有不同,但它们保留了三个常见参数,我们将在此处进行说明:", + "The functions {}{}collision_point{}{} and {}{}collision_line{}{} are exceptions, where they don\u0027t have to cover the pixel centre but can be checked anywhere inside the pixel. In the above example, a point check at {}(15.99, 15.99){} would return {}true{}, but {}(16.0, 16.0){} would not.":"函数 {}{}collision_point{}{} 和 {}{}collision_line{}{} 是例外,它们不必覆盖像素中心,但可以在像素内的任何位置进行检查。在上面的示例中,{}(15.99, 15.99){} 处的点检查将返回 {}true{},但 {}(16.0, 16.0){} 则不会。", "The simplest way to check for collisions against objects is to use {}{}place_meeting{}{}.":"检查对象碰撞的最简单方法是使用 {}{}place_meeting{}{}。", "The {}{}place_meeting{}{} function only returns {}true{} or {}false{}. If you need to access the instance that was found in collision, use {}{}instance_place{}{}, which returns an instance handle.":"{}{}place_meeting{}{} 函数仅返回 {}true{} 或 {}false{}。如果您需要访问在碰撞中找到的实例,请使用 {}{}instance_place{}{},它会返回实例句柄。", + "These bounding boxes use an inclusive system, i.e. they include the bottom-most and right-most edges. This means that the bounding box for a 16x16 collision mask is generated from {}(0.0, 0.0){} to {}(16.0, 16.0){} (relative to the instance).":"这些边界框使用包含系统,即它们包括最底部和最右侧的边缘。这意味着 16x16 碰撞掩码的边界框是从 {}(0.0, 0.0){} 到 {}(16.0, 16.0){}( 相对于实例) 生成的。", "These bounding boxes use an inclusive system, i.e. they include the bottom-most and right-most edges. This means that the bounding box for a 16x16 collision mask is generated from {}(0.0, 0.0){} to {}(16.0, 16.0){} (relative).":"这些边界框使用包含系统,即它们包括最底部和最右侧的边缘。这意味着 16x16 碰撞掩码的边界框是从 {}(0.0, 0.0){} 到 {}(16.0, 16.0){}( 相对) 生成的。", "This checks for collisions against instances of {}obj_rock{} only. If there is no rock at {}x + 4{}, it changes the X position to move the instance there.":"这仅检查与 {}obj_rock{} 实例的碰撞。如果 {}x + 4{} 处没有岩石,它会更改 X 位置以将实例移动到那里。", "This checks for collisions against instances of {}obj_rock{} and {}obj_bush{} in the same function call.":"这会检查同一函数调用中 {}obj_rock{} 和 {}obj_bush{} 实例的冲突。", @@ -42,5 +47,7 @@ "{}obj{}: This is where we specify the object that the function has to check for a collision with. It can be an instance id, an object type, or the special GM keyword {}all{}. It is also worth noting that if the object type chosen is the designated {}parent{} of other objects, then all {}children{} of that object will be included in this check too.{}{}":"{}obj{}:这是指定函数必须检查是否与其碰撞的对象的位置。它可以是实例ID、对象类型或特殊的Gm关键字{}all{}。另请注意,如果选择的对象类型是其他对象的指定{}父对象{},则该对象的所有{}子对象{}也将包括在此检查中。{}{}", "{}prec{}: This can be either {}true{} or {}false{} and relates to the precision of the collision checking. If set to {}true{}, then precise collisions are to be calculated (but only if the object being checked for has \"precise\" marked for its collision detection in its mask properties) which is a slightly more complex task for the CPU and so should be used with caution. If {}false{} then collisions will be calculated based on the bounding box of the object to be checked for.{}{}":"{}prec{}:这可以是{}true{}或{}false{},并且与碰撞检查的精度有关。如果设置为{}true{},则要计算精确的碰撞(但前提是要检查的对象在其遮罩属性中具有为其碰撞检测标记的\"精度\"),这对于Cpu来说是一个稍微复杂的任务,因此应谨慎使用。如果{}为假{},则将根据要检查的对象的边界框计算碰撞。{}{}", "{}{}NOTE{}{} Collision functions used to use integer values in previous versions of GameMaker, however they now use floating point values meaning that collision functions will no longer round non-integer arguments. For more information, please read {}Collision Compatibility Mode{}.":"{}{}注意{}{}碰撞函数在GameMaker的以前版本中用于使用整数值,但现在它们使用浮点值,这意味着碰撞函数将不再舍入非整数参数。有关详细信息,请阅读{}碰撞兼容模式{}。", + "{}{}NOTE{}{} Since the bounding box is inclusive (as explained above), it will always extend 1 pixel beyond its bottom-right corner compared to the sprite\u0027s bounding box. For example, a 16x16 square sprite\u0027s {}right edge offset{} will be {}15.0{} (the 16th pixel when starting from 0), however an instance using this sprite will give you a {}{}bbox_right{}{} of 16 (+ its X position).":"{}{} 注意{}{} 由于边界框是包容性的 (如上所述),因此与精灵的边界框相比,它始终会超出其右下角 1 个像素。例如,16x16 方形精灵的 {} 右边缘偏移 {} 将为 {}15.0{}( 从 0 开始时的第 16 个像素),但是使用此精灵的实例将为您提供一个 {}{}bbox_right{}{}16(+ 其 X 位置)。", + "{}{}NOTE{}{} You can get these values using the {}{}bbox_left{}{}, {}{}bbox_top{}{}, {}{}bbox_right{}{} and {}{}bbox_bottom{}{} variables.":"{}{} 注意{}{} 您可以使用 {}{}bbox_left{}{}、{}{}bbox_top{}{}、{}{}bbox_right{}{} 和 {}{} bbox_bottom{}{} 变量获取这些值 。", "{}{}TIP{}{} It is recommended to use the parenting method for multiple collision checks, as you can use the same parent in multiple function calls, without having to keep track of an array.":"{}{} 提示{}{} 建议使用父级方法进行多次冲突检查,因为您可以在多个函数调用中使用相同的父级,而无需跟踪数组。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/place_empty.json b/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/place_empty.json index 0d29ba004..ab6c3214f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/place_empty.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/place_empty.json @@ -5,6 +5,8 @@ "Note that the given x/y coordinates will be floored to the nearest integer before the check is performed.":"请注意,在执行检查之前,给定的x/y坐标将泛洪到最近的整数。", "Passing an array allows you to check for collisions against multiple objects and/or Tile Maps in one call.":"传递数组允许您在一次调用中检查多个对象和 / 或图块地图的碰撞。", "The above code will check for a collision with any other instance of the object \"obj_Enemy\", as if the calling instance were to be placed at the same position as the mouse. If there is no collision detected, then the instance has its x/y coordinates set to those of the mouse.":"上述代码将检查是否与对象\"obj_Enemy\"的任何其他实例发生碰撞,就好像将调用实例放置在与鼠标相同的位置一样。如果未检测到碰撞,则将实例的x/y坐标设置为鼠标的坐标。", + "The collision checking will be either precise or based on the bounding box of the instance, depending on what kind of collision mask has been selected, but for precise collisions to work correctly, all instances in the check should have precise collision masks.":"碰撞检查要么是精确的,要么基于实例的边界框,具体取决于选择的碰撞遮罩类型,但为了使精确碰撞正常工作,检查中的所有实例都应该具有精确的碰撞遮罩。", + "The function is testing if there are no collisions should the calling instance be placed at a specific position, and you can supply an optional argument to refine the check to only check if a position is free of collisions with instances of the given type. Note that if no optional object ID is supplied, the check will be done against {}all{} instances within the room.":"该函数正在测试如果将调用实例放置在特定位置,是否不存在冲突,并且您可以提供可选参数来细化检查,以仅检查位置是否与给定类型的实例不发生冲突。请注意,如果未提供可选对象 ID,则会针对房间内的 {} 所有 {} 实例进行检查。", "The function is testing if there are no collisions should the calling instance be placed at a specific position, and you can supply an optional argument to refine the check to only check if a position is free of collisions with instances of the given type. Note that if no optional object ID is supplied, the check will be done against {}all{} instances within the room. The collision checking will be either precise or based on the bounding box of the instance, depending on what kind of collision mask has been selected, but for precise collisions to work correctly, all instances in the check should have precise collision masks.":"如果将调用实例放置在特定位置,则此函数将测试是否不存在碰撞,并且您可以提供一个可选参数来细化检查,以便仅检查某个位置是否与给定类型的实例没有碰撞。请注意,如果未提供可选的对象Id,将对房间内的{}all{}实例进行检查。碰撞检查要么精确,要么基于实例的边界框,具体取决于选择了哪种碰撞遮罩,但要使精确碰撞正常工作,检查中的所有实例都应具有精确碰撞遮罩。", "The special keywords {}all{} and {}other{}":"特殊关键字 {}all{} 和 {}other{}", "The x position to check.":"要检查的x位置。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/place_meeting.json b/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/place_meeting.json index e4df04ac1..ce12374a0 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/place_meeting.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/place_meeting.json @@ -15,6 +15,7 @@ "This will work for precise collisions, but only if both the instance and the object being checked for have precise collision masks selected. Otherwise, only bounding box collisions are applied.":"这适用于精确碰撞,但前提是要检查的实例和对象都选择了精确碰撞蒙版。否则,仅应用边界框碰撞。", "With this function you can check a position for a collision with another instance or all instances of an object using the collision mask of the instance that runs the code for the check. When you use this you are effectively asking {}GameMaker{} to move the instance to the new position, check for a collision, move back and tell you if a collision was found or not.":"通过此函数,您可以使用运行检查代码的实例的碰撞掩码来检查与另一个实例或对象的所有实例发生碰撞的位置。当您使用此功能时,您实际上是在要求 {}GameMaker{} 将实例移动到新位置,检查是否存在碰撞,然后向后移动并告诉您是否发现碰撞。", "With this function you can check a position for a collision with another instance or all instances of an object using the collision mask of the instance that runs the code for the check. When you use this you are effectively asking {}GameMaker{} to move the instance to the new position, check for a collision, move back and tell you if a collision was found or not. This will work for precise collisions, but only if both the instance and the object being checked for have precise collision masks selected otherwise only bounding box collisions are applied. This function also accepts the special keywords {}all{} and {}other{}. Please note that should you need to get the unique instance {}id{} of the object being collided with, you should use {}{}instance_place(){}{}.":"使用此函数,可以使用运行检查代码的实例的碰撞遮罩检查某个位置是否与另一个实例或对象的所有实例发生碰撞。使用此命令时,实际上是要求{}GameMaker{}将实例移动到新位置,检查是否存在碰撞,然后返回并告诉您是否发现碰撞。这将适用于精确碰撞,但前提是要检查的实例和对象都选择了精确碰撞遮罩,否则仅应用边界框碰撞。此函数还接受特殊关键字{}all{}和{}other{}。请注意,如果需要获取碰撞对象的唯一实例{}id{},则应使用{}{}instance_place(){}{}。", + "With this function you can check a position for a collision with another instance, or all instances of an object, using the collision mask of the instance that runs the code. When you use this you are effectively asking {}GameMaker{} to move the instance to the new position, check for a collision, move back and tell you if a collision was found or not.":"通过此函数,您可以使用运行代码的实例的碰撞掩码来检查与另一个实例或对象的所有实例发生碰撞的位置。当您使用此功能时,您实际上是在要求 {}GameMaker{} 将实例移动到新位置,检查是否存在碰撞,然后向后移动并告诉您是否发现碰撞。", "{}An object, instance, tile map ID, keywords all/other, or array containing these items{}":"{} 对象、实例、图块地图 ID、所有 / 其他关键字或包含这些项目的数组 {}", "{}Note that the given x/y coordinates will be floored to the nearest integer before the check is performed.":"{}请注意,在执行检查之前,给定的x/y坐标将泛洪到最近的整数。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Movement/move_contact_all.json b/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Movement/move_contact_all.json index 414db0a02..be51b50e0 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Movement/move_contact_all.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Movement_And_Collisions/Movement/move_contact_all.json @@ -1,5 +1,6 @@ { "The above code will check beneath the instance for a collision, and if there is none, then it will move it down until there is or until 1000pixels have been covered.":"上述代码将在实例下检查是否存在碰撞,如果没有碰撞,则会将其向下移动,直到存在或直到覆盖了1000个像素。", + "The direction to move in.":"前进的方向。", "The maximum distance the object can travel (-1 or 0 a default value of 1000 pixels).":"对象可以移动的最大距离(默认值为1000像素-1或0)。", "This function will move the instance running the code a set number of pixels in the specified direction until it meets {}any{} other instance with a valid mask. You can use -1 or 0 for the maxdist being a default 1000px, ie: {}GameMaker{} will move the instance continually up 1000 pixels until it is out of collision.":"此函数将在指定方向上将运行代码的实例移动一定数量的像素,直到它遇到具有有效遮罩的{}任何其他实例。您可以使用-1或0表示最大值为默认值1000 px,即:{}GameMaker{}将继续向上移动实例1000像素,直到它脱离碰撞。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_contains_ext.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_contains_ext.json index 93e1a1d71..3dcc8e139 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_contains_ext.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_contains_ext.json @@ -9,7 +9,10 @@ "The {}values{} array may contain duplicates. When {}matchAll{} is enabled, this allows you to check exactly how many occurrences of a value exist in the original array.":"{}values{}数组可能包含重复项。启用{}matchAll{}后,您可以准确检查原始数组中某个值出现的次数。", "This function checks if the given array (or a part of it) contains any or all of the given values.":"此函数用于检查给定数组(或其中的一部分)是否包含任何或所有给定值。", "{}{}OPTIONAL{}{} The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: {}Offset And Length{}":"{}{}可选{}{} 要遍历的元素数。负值将向后遍历数组(即以索引的降序,例如 2、1、0 而不是 2、3、4)。请参阅: {}偏移量和长度{}", + "{}{}OPTIONAL{}{} The number of elements to traverse. The default is {}array_length() - 1{}. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: {}Offset And Length{}{} {}":"{}{} 可选{}{} 要遍历的元素数量。默认值为 {}array_length() - 1{}。负值将向后遍历数组 (即按索引降序排列,例如 2、1、0 而不是 2、3、4)。请参阅:{} 偏移和长度 {}{}{}", + "{}{}OPTIONAL{}{} The offset, or starting index, in the array. Defaults to 0. Setting a negative value will count from the end of the array. The starting index will then be {}array_length(array) + offset{}. See: {}Offset And Length{}{} {}":"{}{} 可选{}{} 数组中的偏移量或起始索引。默认为 0。设置负值将从数组末尾开始计数。起始索引将为 {}array_length(array) + offset{}。请参阅:{} 偏移和长度 {}{}{}", "{}{}OPTIONAL{}{} The offset, or starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be {}array_length(array) + offset{}. See: {}Offset And Length{}":"{}{}可选{}{} 数组中的偏移量或起始索引。设置负值将从数组的末尾开始计数。然后,起始索引将是 {}array_length(array)+offset{}。请参阅:{}偏移量和长度{}", "{}{}OPTIONAL{}{} Whether all values should be present in the array ({}true{}) or any of the values will do ({}false{}).":"{}{}可选{}{} 是否所有值都应该出现在数组中({}true{}),或者任何值都可以({}false{})。", + "{}{}OPTIONAL{}{} Whether all values should be present in the array ({}true{}) or any of the values will do ({}false{}). The default is {}false{}.":"{}{} 可选{}{} 是所有值都应出现在数组中 ({}true{}),还是任何值都应出现在数组中 ({}false{})。默认值为 {}false{}。", "{}{}TIP{}{} To check if an array not just {}contains{} a value but rather contains a value {}that satisfies a certain condition{}, use {}{}array_any{}{}.":"{}{}提示{}{} 要检查数组是否不仅{}包含{}值,而且还{}包含满足特定条件的值{},请使用 {}{}array_any{}{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_create_ext.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_create_ext.json index 0d64b0ccc..b20d6ef37 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_create_ext.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_create_ext.json @@ -2,6 +2,7 @@ "It then uses {}{}array_create_ext{}{} with the {}_f{} function which creates an array filled with the integer numbers from 1 to 100.":"然后,它将 {}{}array_create_ext{}{} 与函数 {}_f{} 配合使用,该函数将创建一个填充了从 1 到 100 的整数的数组。", "The above code first creates a temporary function {}_f{} that takes in an index as an argument, and returns that index with 1 added to it.":"上面的代码首先创建一个临时函数 {}_f{},该函数接受一个索引作为参数,并返回该索引并将其加 1。", "The above code first creates a temporary function {}f{} that takes in an index as the first and only argument and returns that index with 1 added to it. It then uses {}{}array_create_ext{}{} with this function which creates an array filled with the integer numbers from 1 to 100.":"上面的代码首先创建了一个临时函数 {} f{},该函数将索引作为第一个也是唯一的参数,返回该index,并加了1。然后,它使用 {}{}array_create_ext{}{} 此函数创建一个数组,该数组填充了从1到100的整数。", + "The callback function supplied in the second argument should take 1 argument, which is the index of the current array element. It can return any type of value, which is stored in the array at that index.":"第二个参数中提供的回调函数应采用 1 个参数,即当前数组元素的索引。它可以返回任何类型的值,该值存储在数组中的该索引处。", "The current array index":"当前数组索引", "The function has to take 1 argument, which is the index, and return a value of type {}{}Any{}{} for that index, which is the value that is placed in the array at that index.":"函数必须采用1个参数,即索引,并为该索引返回一个类型为 {}{} Any {}{} 的值,该值是放置在该索引处的数组中的值。", "The function used to initialize each entry.":"用于初始化每个条目的函数。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_first.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_first.json index 9e5e66cc4..f8c3c7308 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_first.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_first.json @@ -3,5 +3,7 @@ "The above code gets the first enemy instance added to the array {}enemies{} and stores it in a temporary variable {}first_added_enemy{}. It then lets the instance display a debug message with the id of the instance.":"上面的代码获取添加到数组{}enemies{}的第一个enemy实例,并将其存储在临时变量{}first_added_enemy{}中。然后,它让实例显示带有实例ID的调试消息。", "The array to get the first value from":"从以下位置获取第一个值的数组", "This function returns the element at the start of the array, i.e. the first element at index 0.":"此函数返回数组开始处的元素,即索引0处的第一个元素。", - "{}{}Any{}{} (Any valid data type that an array can hold)":"{}{} Any {}{} (数组可以容纳的任何有效数据类型)" + "{}{}Any{}{} (Any valid data type that an array can hold)":"{}{} Any {}{} (数组可以容纳的任何有效数据类型)", + "{}{}Any{}{} (Any valid data type that an array can hold) or {}{}undefined{}{} {}if the array is empty{}":"{}{} 任何{}{}( 数组可以保存的任何有效数据类型) 或 {}{} 未定义 {}{}{} 如果数组为空 {}", + "{}{}NOTE{}{} Use {}{}array_shift{}{} to also remove the first element from the array.":"{}{} 注意{}{} 还可以使用 {}{}array_shift{}{} 删除数组中的第一个元素。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_last.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_last.json index d30e6ac01..7cab7ec77 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_last.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_last.json @@ -6,5 +6,6 @@ "This function does not modify the array. To remove the last element of the array while reading it, use {}array_pop{}.":"此函数不修改数组。要在读取数组时删除该数组的最后一个元素,请使用 {}array_pop{}。", "This function returns the element at the top of the array, i.e. the last element at index {}{}array_length{}(array)-1{}.":"此函数返回数组顶部的元素,即在index {}{} array_length{}(array)-1{} 处的最后一个元素。", "This function returns the last element in the given array, i.e. the last element at index {}{}array_length{}(array)-1{}.":"此函数返回给定数组中的最后一个元素,即位于索引 {}{}array_length{}(array)-1{} 的最后一个元素。", - "{}{}Any{}{} (Any valid data type that an array can hold)":"{}{} Any {}{} (数组可以容纳的任何有效数据类型)" + "{}{}Any{}{} (Any valid data type that an array can hold)":"{}{} Any {}{} (数组可以容纳的任何有效数据类型)", + "{}{}Any{}{} (Any valid data type that an array can hold) or {}{}undefined{}{} {}if the array is empty{}":"{}{} 任何{}{}( 数组可以保存的任何有效数据类型) 或 {}{} 未定义 {}{}{} 如果数组为空 {}" } \ No newline at end of file diff --git a/patch/template.htm b/patch/template.htm index 3879b0a83..2e81d05b9 100644 --- a/patch/template.htm +++ b/patch/template.htm @@ -105,9 +105,9 @@ if (noTranslationState()) return false; //这么做只是为了方便移植修改 - const css1 = "div.footer a,h4,caption"; - const css2 = "p,h1,h2,h3,td,li,a,div.dropspotnote,figcaption"; - const css3 = "th,.warning,.important,.optional"; + const css1="div.footer a,h4,caption,blockquote" + const css2="p,h1,h2,h3,td,li,a,div.dropspotnote,figcaption,.expandtext" + const css3="th,.warning,.important,.optional" $(css1).each(function () { setTranslator($(this), json_global);