From 9955654315a4d6d03c31526542c3e12b73e44799 Mon Sep 17 00:00:00 2001 From: LiarOnce Date: Sat, 8 Jul 2023 21:51:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=87=BD=E6=95=B0=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- language/zh/global.json | 19 +++++ .../window_get_showborder.json | 6 ++ .../window_set_showborder.json | 7 ++ .../Drawing/Particles/Particles.json | 12 ++- .../Drawing/Particles/particle_get_info.json | 85 +++++++++++++++++++ .../Variable_Functions/array_shift.json | 12 +++ .../Variable_Functions/struct_foreach.json | 14 +++ .../struct_get_from_hash.json | 7 ++ .../struct_set_from_hash.json | 8 ++ .../Variable_Functions/variable_clone.json | 8 ++ .../Variable_Functions/variable_get_hash.json | 6 ++ 11 files changed, 182 insertions(+), 2 deletions(-) create mode 100644 language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_get_showborder.json create mode 100644 language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_set_showborder.json create mode 100644 language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/particle_get_info.json create mode 100644 language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_shift.json create mode 100644 language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_foreach.json create mode 100644 language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_get_from_hash.json create mode 100644 language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_set_from_hash.json create mode 100644 language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/variable_clone.json create mode 100644 language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/variable_get_hash.json diff --git a/language/zh/global.json b/language/zh/global.json index 26e3b956f..8692e37f5 100644 --- a/language/zh/global.json +++ b/language/zh/global.json @@ -126,6 +126,7 @@ "Code Snippets":"代码片段", "Collision Compatibility Mode":"碰撞兼容模式", "Collisions":"碰撞", + "Color & Alpha":"颜色 & 透明度", "Colour":"颜色", "Colour And Alpha":"颜色和 Alpha", "Command Line Parameters":"命令行参数", @@ -176,6 +177,7 @@ "Description":"描述", "Device Input":"设备输入", "Dialog":"对话框", + "Direction":"方向", "Domain Name System - This system associates domain names (e.g. gamemaker.io) to other info, such as IP addresses. DNS records are returned from a DNS lookup.":"域名系统——该系统将域名(如gamemaker.io)与其他信息(如IP地址)相关联。DNS记录从DNS查找返回。", "Double Tap Event":"双击事件", "Downsampling is the process of reducing samples in audio and, more generally, in signals. For audio it means that samples are thrown away and less samples remain, leading to a loss of information. The sample frequency of the audio is lowered as well as the quality of the audio. This change distorts the audio.":"降采样是在音频和信号中减少样本的过程。对于音频来说,这意味着样本被丢弃,剩下的样本更少,导致信息丢失。音频的采样频率和音频的质量都降低了。这个改变会使音频失真。", @@ -199,20 +201,25 @@ "Example":"示例", "Example 1:":"示例1:", "Example 1: Basic Movement":"例1:基本运动", + "Example 1: Basic Use":"示例1:基本使用", "Example 1: Check if any of the given values is present in an array":"示例1:检查数组中是否存在任何给定值", + "Example 1: Particle Type Info":"示例1:粒子类型信息", "Example 1: Playing a basic sound (similar to audio_play_sound)":"示例 1:播放基本声音 (类似于 audio_play_sound)", "Example 1: Replace an object ID with another object ID":"示例 1:用另一个对象 ID 替换对象 ID", "Example 1: Showing the output ":"示例1:显示输出", "Example 2:":"示例2:", "Example 2: Check if all values are present in an array":"示例2:检查数组中是否存在所有值", + "Example 2: Listing Emitter Names":"示例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: Queue using array_shift and array_push":"示例2:使用 array_shift 和 array_push 的队列", "Example 2: Replace the first instance of an object ID with an instance ID":"示例 2:将对象 ID 的第一个实例替换为实例 ID", "Example 2: Reserved Strings":"示例2:保留字符串", "Example 2: Showing Instances Collided With":"例2:显示与之碰撞的实例", "Example 2: array of arrays":"示例2:数组的数组", "Example 2: Finding the top-left corner position of a tile":"示例2:查找拼贴的左上角位置", "Example 3: Playing a sound at a given position in 3D audio space (similar to audio_play_sound_at)":"示例 3:在 3D 音频空间中的给定位置播放声音 (类似于 audio_play_sound_at)", + "Example 3: Rotate an Array":"示例3:旋转数组", "Example:":"例子:", "Expressions And Operators":"表达式和运算符", "Extended Blend Mode":"扩展混合模式", @@ -273,6 +280,7 @@ "GameMaker website":"GameMaker 网站", "Gamepad Input":"游戏手柄输入", "Garbage Collection":"垃圾回收", + "General":"通用", "General Game Control":"通用游戏控制", "General Layer Functions":"常规图层函数", "General Preferences":"常规首选项", @@ -283,6 +291,7 @@ "Global Pinch In /Pinch Out Event":"全局捏入/捏出事件", "Global Variables":"全局变量", "Go To":"转到", + "Gravity":"重力", "Guide To Primitives And Vertex Building":"图元和顶点构建指南", "Guide To Using Blendmodes":"混合模式使用指南", "Guide To Using Buffers":"缓冲区使用指南", @@ -342,6 +351,7 @@ "Level":"等级", "Licencing & Logging In":"许可及登录", "Licencing & Versions":"授权 & 版本", + "Life":"生命周期", "Lighting":"光照", "Linear interpolation involves estimating a new value by connecting two adjacent known values with a straight line. You can then get the interpolated value by checking any point along the line. In graphics, linear interpolation refers to a basic method of smoothing pixel edges.":"线性插值是通过用一条直线连接两个相邻的已知值来估计一个新值。然后你可以通过检查直线上的任意一点来得到插值值。在图形学中,线性插值是指平滑像素边缘的一种基本方法。", "Listener Mask":"监听掩码", @@ -388,6 +398,7 @@ "Operating System":"操作系统", "Operation":"类型", "Option":"选项", + "Orientation":"定位", "Other Events":"其他事件", "Our Knowledge Base":"我们的知识库", "Our Social Links":"我们的联系方式", @@ -396,8 +407,12 @@ "Parameters":"参数", "Parent Objects":"父对象", "Particle Draw Order":"粒子绘制顺序", + "Particle Emitter Inf{}o{} Struct":"粒子发射器信息{}{}结构", + "Particle Emitter Mode Constant":"粒子发射器模式常量", "Particle Emitters":"粒子发射器", + "Particle System Info Struct":"粒子系统信息结构", "Particle Systems":"粒子系统", + "Particle Type Info Struct":"粒子类型信息结构", "Particle Types":"粒子类型", "Particles":"粒子", "Path Manipulation":"路径操控", @@ -472,6 +487,7 @@ "Script Functions And Variables":"脚本函数和变量", "Script Functions vs. Methods":"脚本函数与方法", "Scripts":"脚本", + "Secondary Particles":"二次粒子", "Sequence Direction Constant":"序列方向常量", "Sequence Events, Moments and Broadcast Messages":"事件、时刻和广播消息的序列", "Sequence Layers":"序列图层", @@ -482,11 +498,13 @@ "Shader Uniforms":"着色器 Uniforms 常量", "Shaders":"着色器", "Shaders.htm":"着色器", + "Shape / Sprite":"形状/精灵", "Short for \u0027Graphical User Interface\u0027, which is a user interface that includes graphical elements, such as windows, icons and buttons. In GameMaker you have a specific set of object events (Draw GUI Events) that can draw to this layer specifically designed for things like score, lives, inventories, etc...":"“图形用户界面”(Graphical User Interface)的缩写,它是一个包含图形元素(例如窗口,图标和按钮)的用户界面。在GameMaker中,您有一组特定的对象事件(绘制GUI事件),可以将其吸引到专门为得分,生命,存货等事物设计的这一层。", "Short for \u0027Rich Site Summary\u0027, and is a standardized system for the distribution of content from an online publisher to Internet users.":"是“丰富网站摘要\u0027Rich Site Summary\u0027”的缩写,是一个用于将内容从在线出版商分发给互联网用户的标准化系统。", "Short for \u0027Universal Resource Locator\u0027, and is basically the address of something on the internet.":"“通用资源定位器”的缩写,基本上是互联网上某物的地址。统一资源定位符 (Uniform Resource Locator, URL)", "Similar to human languages, programming languages have their own set of rules on how statements can be conveyed, and this set of rules is known as the syntax. While a number of programming languages share many features, functions, and capabilities, they generally differ in syntax. Without the proper use of syntax, one cannot write an executable program, and wrong syntax will lead to errors when compiling.":"与人类语言类似,编程语言在如何传达语句方面也有自己的一套规则,这套规则称为语法。尽管许多编程语言共享许多功能,特性和功能,但是它们通常在语法上有所不同。如果没有正确使用语法,则无法编写可执行程序,并且错误的语法将导致编译时出错。", "Sine":"正弦波", + "Size":"大小", "Skeletal Animation":"骨骼动画", "Skins":"皮肤", "Slots":"插槽", @@ -500,6 +518,7 @@ "Source Examples":"示例代码", "Source code is the fundamental component of a computer program that is required for the program to run.":"源代码是计算机程序运行所必需的基本组件。", "Specifier Examples{}*{}":"说明符示例{}*{}", + "Speed":"速度", "Spline Editor":"样条线编辑器", "Sprite Editor Preferences":"精灵编辑器首选项", "Sprite Information":"精灵信息", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_get_showborder.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_get_showborder.json new file mode 100644 index 000000000..3150bac43 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_get_showborder.json @@ -0,0 +1,6 @@ +{ + "It corresponds to the {}Borderless Window{} option in the Windows {}Graphics{} options; it gets the value of that checkbox {}in-game{}.":"它对应于 Windows {2}图形{3}选项中的{}无边框和窗口{}选项,它会在{}游戏中{}获取该复选框的值。", + "The above code gets whether the window border is shown and stores the result in a temporary variable {}_border_shown{}.":"上面的代码获取是否显示窗口边框并将结果存储在临时变量 {}_border_shown{} 中。", + "This function gets whether the game is shown in a borderless window or not.":"此函数用于获取游戏是否显示在无边框窗口中。", + "{}{}NOTE{}{} This function only works on Windows.":"{}{}注意{}{} 此函数仅适用于Windows。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_set_showborder.json b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_set_showborder.json new file mode 100644 index 000000000..9ad9f78d2 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_set_showborder.json @@ -0,0 +1,7 @@ +{ + "It corresponds to the {}Borderless Window{} option in the Windows {}Graphics{} options; it changes the value of that checkbox {}in-game{}.":"它对应于 Windows {2}图形{3}选项中的{}无边框和窗口{}选项,它会在{}游戏中{}更改该复选框的值。", + "The above line of code toggles the window border. ":"上面的代码行用于切换窗口边框。", + "This function sets whether the game is shown in a borderless window or not.":"此功能用于设置游戏是否显示在无边框窗口中。", + "Whether to show the window border":"是否显示窗口边框", + "{}{}NOTE{}{} This function only works on Windows.":"{}{}注意{}{} 此函数仅适用于Windows。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particles.json b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particles.json index b1be13f90..4c1022b4e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particles.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/Particles.json @@ -3,7 +3,9 @@ "An easy way to create particles in your game is to use the built-in effects mechanism. These effects are created using an internal particle system which is basically a very fast method for drawing graphical effects only and as such you do not have to worry about all the details (like memory management) when using these functions. You simply specify the type of effect, the position where it must be created, the size you want it to be and finally, its colour then let {}GameMaker{} do all the work.":"在游戏中创建粒子的一种简单方法是 使用内置效果机制。 这些效果是使用内部粒子系统创建的,基本上这是一种非常快速的方法,仅用于绘制图形效果,因此在使用这些函数时,您不必担心所有细节(如内存管理)。 您只需指定效果类型、必须创建的位置、想要的大小以及颜色,然后让 {}GameMaker{} 完成所有工作。", "Effects":"效果", "Even though there is no technical limit to the amount of systems, emitters and particles you can create in one game, you should try and limit everything to the minimum number possible to keep memory use as low as possible.":"即使在一个游戏中可以创建的系统、发射器和粒子的数量没有技术限制,也应该尽量将所有内容限制在可能的最小数量,以尽可能地降低内存使用。", + "Even though these effects are limited in scope and customisation, they can still be used to create some simple, great effects with very little effort. For example by creating a small puff of grey smoke below a moving missile in each step, a pretty convincing smoke trail is created, so even when you are an expert in particles it pays to remember that these effects exist as they can still save you some time.":"即使这些效果在范围和自定义上都有限制,但它们仍然可以用来创造一些简单、伟大的效果,而且只需要很少的努力。例如,通过在每个步骤中在移动的导弹下方创建一小段灰色烟雾,可以创建一条非常令人信服的烟雾轨迹,因此即使您是粒子专家,也需要记住这些效果的存在,因为它们仍然可以为您节省一些时间。", "Even though these effects are limited in scope and customisation, they can still be used to create some simple, great effects with very little effort. For example by creating a small puff of grey smoke below a moving missile in each step, a pretty convincing smoke trail is created, so even when you are an expert in particles it pays to remember that these effects exists as they can still save you some time.":"即使这些效果在范围和自定义上都有限制,但它们仍然可以用来创造一些简单、伟大的效果,而且只需要很少的努力。例如,通过在每个步骤中在移动的导弹下方创建一小段灰色烟雾,可以创建一条非常令人信服的烟雾轨迹,因此即使您是粒子专家,也需要记住这些效果的存在,因为它们仍然可以为您节省一些时间。", + "For complex things in {}GameMaker{} you would normally have an {}object{} and create {}instances{} of that object around the room. However, for graphics effects, this can be expensive as every instance comes with a \"cost\" in processing due to the variables it contains and the code it has in the different events. You can reduce this cost by turning to {}tilemap layers{} and {}asset layers{} for drawing your graphics needs but those are generally static and cannot be changed or moved around much. However, there is one other option for drawing fast yet versatile graphics effects in your games, and that is to use {}particles{}.":"对于 {}GameMaker{} 中的复杂内容,通常会在房间周围有{}个对象{}并创建该对象的{}个实例{}。然而,对于图形效果,这可能是昂贵的,因为由于它包含的变量和它在不同事件中具有的代码,每个实例在处理时都伴随着\"成本\"。您可以通过转向{}图块图层{}和{}资源层{}来降低此成本,以绘制您的图形需求,但这些图形需求通常是静态的,不能进行大量更改或移动。但是,在游戏中绘制快速而多函数的图形效果还有一个选项,那就是使用{}粒子{}。", "For complex things in {}GameMaker{} you would normally have an {}object{} and create {}instances{} of that object around the room. However, for graphics effects, this can be expensive as every instance comes with a \"cost\" in processing due to the variables it contains and the codes it has in the different events. You can reduce this cost by turning to {}tilemap layers{} and {}asset layers{} for drawing your graphics needs but those are generally static and cannot be changed or moved around much. However, there is one other option for drawing fast yet versatile graphics effects in your games, and that is to use {}particles{}.":"对于{}GameMaker{}中的复杂内容,通常会在房间周围有{}个对象{}并创建该对象的{}个实例{}。然而,对于图形效果,这可能是昂贵的,因为由于它包含的变量和它在不同事件中具有的代码,每个实例在处理时都伴随着\"成本\"。您可以通过转向{}图块图层{}和{}资源层{}来降低此成本,以绘制您的图形需求,但这些图形需求通常是静态的,不能进行大量更改或移动。但是,在游戏中绘制快速而多函数的图形效果还有一个选项,那就是使用{}粒子{}。", "Guide To Using Particles":"粒子使用指南", "However, the true potential of particles is in designing and creating your own effects using the powerful functions that the GameMaker Language supplies to you. You can find out more from each of the following sections:":"但是,粒子的真正潜力在于使用 GameMaker 语言提供给您的强大函数来设计和创建自己的效果。您可以从以下每个部分了解更多信息:", @@ -17,15 +19,21 @@ "The basic setup for a particle system follows three steps, with the third step being optional depending on how you wish to create your particle effects within the room:":"粒子系统的基本设置包括三个步骤,第三个步骤是可选的,具体取决于您希望如何在房间中创建粒子效果:", "The easiest way of creating particles in your game with {}GameMaker{} is to use the built-in effects mechanism. These effects are created using an internal particle system which is basically a very fast method for drawing graphical effects only and as such you do not have to worry about all the details (like memory management) when using these functions. You simply specify the type of effect, the position where it must be created, the size you want it to be and finally, its colour then let {}GameMaker{} do all the work.":"使用{}GameMaker{}在游戏中创建粒子的最简单方法是使用内置的效果机制。这些效果是使用内部粒子系统创建的,该系统基本上是一种非常快速的仅绘制图形效果的方法,因此在使用这些函数时,您不必担心所有细节(如内存管理)。您只需指定效果的类型、必须创建效果的位置、所需的大小以及最终的颜色,然后让{}GameMaker{}完成所有工作。", "The following functions exists for creating the built in particle effects:":"以下函数用于创建内置粒子效果:", + "The following functions exists for creating the built-in particle effects:":"以下函数用于创建内置粒子效果:", "Things To Note":"注意事项", "With HTML5 there is no additive blending, and unless you have WebGL enabled, you cannot have colour blending either.":"HTML5不支持添加混合,除非启用了WebGL,否则也不能进行颜色混合。", "You can either use {}The Particle System Editor{} to visually design particles, or create them at runtime using the particle functions.":"可以使用 {} 粒子系统编辑器 {} 直观地设计粒子,也可以在运行时使用粒子函数创建粒子。", "{}Create a particle system{}: The particle system is like a container that we will use to hold our different particle types ready for use. We use code to define a series of visual aspects and behaviours for our particles, and then we place them in the \"container\" so that we can take them out and use them whenever and wherever we need later.":"{}创建粒子系统{}:粒子系统就像一个容器,我们将使用该容器来容纳不同的粒子类型,以备使用。我们使用代码为我们的粒子定义一系列视觉方面和行为,然后将它们放在\"容器\"中,这样我们就可以随时随地将它们拿出来使用。", - "{}Create emitters{}: Emitters are an option that can be used to burst or stream particles from within very clearly defined limits. They are optional because you can create particles from any instance using the {}{}part_particles_create(){}{} and {}{}part_particles_create_colour(){}{} functions but they are not always adequate for every situation.":"{}创建发射器 {}:发射器是一个选项,可用于从非常明确定义的限制内爆发或流化粒子。它们是可选的,因为您可以使用 {}{}part_particles_create(){}{} 和 {}{}part_particles_create_colour(){}{} 函数从任何实例创建粒子,但它们并不总是适用于每种情况。", + "{}Create emitters{}: Emitters are an option that can be used to burst or stream particles from within very clearly defined limits. They are optional because you can create particles from any instance using the {}{}part_particles_create(){}{} and {}{}part_particles_create_colour(){}{} functions but they are not always adequate for every situation.":"{}创建发射器{}:发射器是一个选项,可用于从非常明确定义的限制内爆发或流化粒子。它们是可选的,因为您可以使用 {}{}part_particles_create(){}{} 和 {}{}part_particles_create_colour(){}{} 函数从任何实例创建粒子,但它们并不总是适用于每种情况。", + "{}Create emitters{}: Emitters are an option that can be used to burst or stream particles from within very clearly defined limits. They are optional because you can create particles from any instance using the {}{}part_particles_create{}{} and {}{}part_particles_create_colour{}{} {}{} {}{}functions but they are not always adequate for every situation. ":"{}创建发射器{}:发射器是一个选项,可用于从非常明确定义的限制内爆发或流化粒子。它们是可选的,因为您可以使用 {}{}part_particles_create{}{} 和 {}{}part_particles_create_colour{}{} {}{}{}{}函数从任何实例创建粒子,但它们并不总是适用于每种情况。", "{}Create particle types{}: Particle types are the graphic effect itself. You can have many different types, each with their own range of colours, alphas, sizes and movements, but its important to note that you {}do not have control over individual particles{}. You define a series of parameters and the particle will be created to have a random spread of behaviours chosen from them.":"{}创建粒子类型{}:粒子类型是图形效果本身。您可以拥有许多不同的类型,每个类型都有自己的颜色范围、Alphase、大小和移动,但请注意,您{}无法控制单个粒子{},这一点很重要。您定义了一系列参数,并且将创建粒子,以便从中选择随机扩散的行为。", + "{}GameMaker{} also has a function to retrieve information on {}{}Particle System Asset{}{}{}s{} created with {}The Particle System Editor{}:":"{}GameMaker{} 还具有检索有关{}{}粒子系统资源{}{}{}{}使用{}粒子系统编辑器{}创建的信息的功能:", "{}Particle Emitters{}":"{}粒子发射器{}", "{}Particle Systems{}":"{}粒子系统{}", "{}Particle Types{}":"{}粒子类型{}", "{}Particles {}are graphic resources that have certain properties which are defined within a {}particle system{}. These properties cannot be manipulated directly for individual particles, but are changed through the code that is used to define the individual particle and the system that it belongs to. They are very useful for creating beautiful and flashy effects (or subtle and discreet ones!) like explosions, decals, rain, snow, star fields and debris in a game without the CPU overhead that using instances has.":"{}粒子{}是具有在{}粒子系统{}中定义的某些特性的图形资源。这些特性不能直接针对单个粒子进行操作,而是通过用于定义单个粒子及其所属系统的代码进行更改。它们非常有用于在没有使用实例的Cpu开销的游戏中创建美丽和华丽的效果(或者微妙和谨慎的效果!),如爆炸、贴花、雨、雪、星空和碎片。", - "{}There is also a section that gives you a basic guide on how to design and create particles for your games on the following page:{}":"{}还有一个部分为您提供了有关如何在以下页面上为游戏设计和创建粒子的基本指南:{}" + "{}Particles{}":"{}粒子{}", + "{}There is also a section that gives you a basic guide on how to design and create particles for your games (using {}GML Code{} or {}GML Visual{}) on the following page:{}":"{}还有一个部分为您提供了有关如何在以下页面上为游戏设计和创建粒子(使用 {}GML 代码{}或 {}GML 可视化{})的基本指南:{}", + "{}There is also a section that gives you a basic guide on how to design and create particles for your games on the following page:{}":"{}还有一个部分为您提供了有关如何在以下页面上为游戏设计和创建粒子的基本指南:{}", + "{}{}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 代码{}提供的大量功能,也可以使用{}粒子系统编辑器{}创建{}{}粒子系统资源{}{}。" } \ 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 new file mode 100644 index 000000000..f2dcc47b7 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Drawing/Particles/particle_get_info.json @@ -0,0 +1,85 @@ +{ + "A value randomly added or subtracted from the particle angle each frame.":"每个帧的粒子角度随机相加或相减的值。", + "A value randomly added or subtracted from the particle direction each frame.":"每一帧的粒子方向随机相加或相减的值。", + "A value randomly added or subtracted from the particle speed each frame.":"每一帧的粒子速度随机增加或减去的值。", + "An array of emitter info structs, ordered the same as in {}The Particle System Editor{}.":"发射器信息结构数组,顺序与{}粒子系统编辑器{}中的相同。", + "Boolean":"布尔值", + "Colour":"颜色", + "Finally there is also a constant for the particle emitter mode: ":"最后,粒子发射器模式还有一个常量:", + "If {}true{} then a random subimage is used instead of {}frame{}.":"如果为 {}true{},则使用随机子图像而不是 {}frame{}。", + "If {}true{} then the animation is stretched over the particle\u0027s lifetime.":"如果为 {}true{},则动画将在粒子的整个生命周期内拉伸。", + "If {}true{} then the particle angle is relative to its direction.":"如果为 {}true{},则粒子角度相对于其方向。", + "If {}true{} then the sprite is animated, starting from the {}frame{} subimage.":"如果为 {}true{},则从 {}frame{} 子图像开始设置精灵动画。", + "If {}true{} then the particle is drawn with additive blending (i.e. using the {}{}Blend Mode Constant{}{} {}bm_add{}).":"如果为 {}true{},则使用加法混合来绘制粒子(即使用{}{}混合模式常量 {}{}{}bm_add{})。", + "In a simplified way, the contents of the struct returned by this function look something like the following:":"简而言之,该函数返回的结构内容如下所示:", + "Particle Emitter Distribution Constant":"粒子发射器分布常量", + "Particle Emitter Mode Constant":"粒子发射器模式常量", + "Particle Emitter Shape Constant":"粒子发射器形状常量", + "Particle Shape Constant":"粒子形状常数", + "Particle System Asset":"粒子系统资源", + "Particle System Info Struct":"粒子系统信息结构", + "Particle Type ID":"粒子类型 ID", + "Particle Type Info Struct":"粒子类型信息结构", + "Real":"实数", + "String":"字符串", + "The X coordinate of the left side of the emitter\u0027s region.":"发射器区域左侧的 X 坐标。", + "The X coordinate of the right side of the emitter\u0027s region.":"发射器区域右侧的 X 坐标。", + "The X origin of the particle system.":"粒子系统的 X 原点。", + "The X scale of the particle image (sprite or shape).":"粒子图像的 X 比例 (精灵或形状)。", + "The Y coordinate of the bottom of the emitter\u0027s region.":"发射器区域底部的 Y 坐标。", + "The Y coordinate of the top of the emitter\u0027s region.":"发射器区域顶部的 Y 坐标。", + "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 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.":"粒子在其寿命的一半时的透明度。", + "The amount of gravity applied to the particle each frame (in pixels per frame).":"每帧应用于粒子的重力量(以每帧像素为单位)。", + "The color of the particle at the end of its lifespan.":"粒子在其寿命结束时的颜色。", + "The color of the particle when created.":"创建粒子时的颜色。", + "The color of the particle when halfway through its lifespan.":"粒子在其寿命的一半时的颜色。", + "The distribution style of the particles. One of the {}ps_distr_*{} constants.":"粒子的分布样式。{}ps_distr_*{}常量之一。", + "The gravity direction.":"重力方向", + "The index of the particle type. This can be used e.g. with the function {}{}part_particles_create{}{}.":"粒子类型的索引。这可以与函数 {}{}part_particles_create{}{} 一起使用。", + "The index of the sprite that the particle type uses or {}-1{}.":"粒子类型使用的精灵的索引或 {}-1{}。", + "The maximum direction (in degrees) for a particle when it\u0027s created (this starting direction is determined randomly for each particle and ranges from {}dir_min{} to {}dir_max{}).":"创建粒子时粒子的最大方向(以度为单位)(此起始方向是为每个粒子随机确定的,范围从 {}dir_min{} 到 {}dir_max{})。", + "The maximum life of particles of this type (in number of frames).":"此类型粒子的最大寿命(以帧数为单位)。", + "The maximum size a particle of this type can have when it is created (the size is determined randomly for each particle and can vary from {}size_min{} to {}size_max{}).":"此类型的粒子在创建时可以具有的最大大小 (大小由每个粒子随机确定,大小可以从 {}size_min{} 到 {}size_max{})。", + "The maximum speed (in pixels per frame) of the particle when it\u0027s created (this starting speed is determined randomly for each particle and ranges from {}speed_min{} to {}speed_max{}).":"创建粒子时的最大速度 (以每帧像素为单位)(此起始速度是为每个粒子随机确定的,范围从 {}speed_min{} 到 {}speed_max{})。", + "The maximum starting angle (in degrees) of the particle sprite when created (this starting angle is determined randomly for each particle and ranges from {}ang_min{} to {}ang_max{}).":"创建粒子精灵时的最大起始角度(以度为单位)(此起始角度是为每个粒子随机确定的,范围从 {}ang_min{} 到 {}ang_max{})。", + "The minimum direction (in degrees) for a particle when it\u0027s created (this starting direction is determined randomly for each particle and ranges from {}dir_min{} to {}dir_max{}).":"创建粒子时粒子的最小方向(以度为单位)(此起始方向是为每个粒子随机确定的,范围从 {}dir_min{} 到 {}dir_max{})。", + "The minimum life of particles of this type (in number of frames).":"此类型粒子的最小寿命(以帧数为单位)。", + "The minimum size a particle of this type can have when it is created (the size is determined randomly for each particle and can vary from {}size_min{} to {}size_max{}).":"创建此类型的粒子时可以具有的最小大小 (每个粒子的大小是随机确定的,大小可以从 {}size_min{} 到 {}size_max{})。", + "The minimum speed (in pixels per frame) of the particle when it\u0027s created (this starting speed is determined randomly for each particle and ranges from {}speed_min{} to {}speed_max{}).":"创建粒子时的最小速度 (以每帧像素为单位)(此起始速度是为每个粒子随机确定的,范围从 {}speed_min{} 到 {}speed_max{})。", + "The minimum starting angle (in degrees) of the particle sprite when created (this starting angle is determined randomly for each particle and ranges from {}ang_min{} to {}ang_max{}).":"创建粒子精灵时的最小起始角度(以度为单位)(此起始角度是为每个粒子随机确定的,范围从 {}ang_min{} 到 {}ang_max{})。", + "The mode in which to emit particles. Either {}ps_mode_stream{} or {}ps_mode_burst{}.":"发射粒子的模式。可以是 {}ps_mode_stream{} 或 {}ps_mode_burst{}。", + "The name of the emitter.":"发射器的名称。", + "The name of the particle system asset.":"粒子系统资源的名称。", + "The number of particles spawned each step.":"每一步产生的粒子数。", + "The number of particles spawned on death.":"死亡时产生的粒子数量。", + "The number of particles to create every frame if {}mode{} is {}ps_mode_stream{} or to create only once if mode is {}ps_mode_burst{}.":"如果模式为 {}ps_mode_stream{},则每帧要创建的粒子数,如果模式为 {}ps_mode_burst{},则仅创建一次。", + "The particle emitter emits a single {}burst{} of the given number of particles (see {}{}part_emitter_burst{}{})":"粒子发射器发射给定数量的粒子的单个{}粒子{}(参见 {}{}part_emitter_burst{}{})", + "The particle emitter {}streams{} the given number of particles continuously (see {}{}part_emitter_stream{}{})":"粒子发射器{}流{}连续传输给定数量的粒子(参见 {}{}part_emitter_stream{}{})", + "The particle shape. One of the {}pt_shape_*{} constants. Used only if sprite is {}-1{}.":"粒子形状。{}pt_shape_*{} 常量之一。仅当子画面为 {}-1{} 时使用。", + "The particle system asset to get the info from.":"要从中获取信息的粒子系统资源。", + "The particle type info struct containing information this emitter\u0027s particle type.":"粒子类型信息结构,包含此发射器的粒子类型信息。", + "The returned struct is a {}{}Particle System Info Struct{}{}, which contains an {}Array{} of {}{}Particle Emitter Info Struct{}{}s. Each of these emitter structs stores info on the particle type that the emitter uses in its {}parttype{} variable, which contains a {}{}Particle Type Info Struct{}{}.":"返回的结构是一个{}{}粒子系统信息结构{}{},其中包含一个由{}{}粒子发射器信息结构{}{}组成的{}数组{}。这些发射器结构中的每个结构都存储有关发射器在其{}parttype{}变量中使用的粒子类型的信息,该变量包含一个{}{}粒子类型信息结构{}{}。", + "The shape of the emitter\u0027s region. One of the {}ps_shape_*{} constants.":"发射器区域的形状。{}ps_shape_*{}常量之一。", + "The sprite subimage in case a sprite is used.":"如果使用了精灵,则为精灵子图像。", + "The tables below list all variables that are available in each of these three structs.":"下表列出了这三个结构中每个结构中可用的所有变量。", + "The type of particle spawned each step or {}-1{}.":"每一步产生的粒子类型或 {}-1{}。", + "The type of particle spawned on death or {}-1{}.":"死亡或 {}-1{} 时产生的粒子类型。", + "The value to increase/decrease the particle angle by each frame.":"每一帧增加/减少粒子角度的值。", + "The value to increase/decrease the particle direction by each frame.":"按每一帧增加/减少粒子方向的值。", + "The value to increase/decrease the particle speed by each frame.":"按每一帧增加/降低粒子速度的值。", + "This function returns a {}struct{} with information about a {}{}Particle System Asset{}{} created using {}The Particle System Editor{}.":"此函数返回{}结构{},其中包含有关使用{6}粒子系统编辑器{7}创建的{}{}粒子系统资源{}{}的信息。", + "Value randomly added or subtracted from the particle size each frame.":"每一帧的粒子大小随机增加或减去的值。", + "Value to increase/decrease the particle size by each frame.":"值可按每一帧增加/减小粒子大小。", + "Whether old particles should be drawn behind new ones ({}true{}) or not ({}false{}).":"旧粒子是否应该画在新粒子后面 ({}true{}) 还是不应该 ({}false{})。", + "{}Particle Emitter Info{}{}Particle Emitter Info{}":"{}粒子发射器信息{}{}粒子发射器信息{}", + "{}Particle System Info{}{}Particle System Info{}":"{}粒子系统信息{}{}粒子系统信息{}", + "{}Particle Type Info{}{}Particle Type Info{}":"{}粒子类型信息{}{}粒子类型信息{}", + "{}{}Array{}{} of {}{}Particle Emitter Info Struct{}{}":"{}{}数组{}{}的{}{}粒子发射器信息结构{}{}", + "{}{}Sprite Asset{}{}":"{}{}精灵资源{}{}" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_shift.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_shift.json new file mode 100644 index 000000000..548e4a301 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/array_shift.json @@ -0,0 +1,12 @@ +{ + "Because of this, all other elements are {}{}shifted{} to the left one place{}, i.e. the value at index 0 is removed, the value at index 1 moves to index 0, the value at index 2 moves to index 1, etc. The number of elements is reduced by 1, as there is no value to replace the last element with.":"因此,所有其他元素都{}{}左移{}了一位{},即索引 0 处的值被移除,索引 1 处的值移至索引 0,索引 2 处的值移至索引 1,依此类推。元素的数量减少 1,因为没有值可用来替换最后一个元素。", + "In the above example the array {}_array{} is \"rotated\" 10 times. \"Rotating\" an array means that elements are removed on one end and added back on the other end. The length of the array remains the same. Every iteration, the letters move left; the array is rotated {}left{}. A debug message is shown after each iteration to show the contents of the array at that point.":"在上面的例子中,数组 {}_array{} 被\"旋转\"了 10 次。\"旋转\"数组意味着元素的一端被移除,另一端被重新添加。数组的长度保持不变。每一次迭代,字母向左移动数组向左旋转{}。每次迭代后都会显示一条调试消息,以显示该点的数组内容。", + "The above code calls {}{}array_shift{}{} on the array {}_array{} twice. After that, a debug message shows the contents of the array. As the first call to the function removes the value {}\"A\"{} and the second shift removes the value {}\"B\"{}, the array will only contain {}\"C\"{} at this point.":"上面的代码在数组 {4}_array{5} 上两次调用 {}{}array_shift{}{} 。之后,一条调试消息显示数组的内容。由于对该函数的第一次调用删除了值 {}\"A\"{},第二次移位删除了值 {}\"B\"{},此时数组将只包含 {}\"C\"{}。", + "The above code creates a temporary array {}_queue{} that acts like a queue using {}{}array_shift{}{} and {}{}array_push{}{}. The characters in a second array {}_incoming{} are added to the queue array one by one, using a {}repeat{} loop. Whenever the length of the queue is greater than 4 (stored in the constant {}MAX_QUEUE_LENGTH{}), the first element is removed using {}{}array_shift{}{}.":"上面的代码创建了一个临时数组{}_queue{},它的作用类似于使用 {}{}array_shift{}{} 和 {}{}array_push{}{} 的队列。第二个数组 {}_incoming{} 中的字符使用 {}repeat{} 循环逐个添加到队列数组中。每当队列长度大于4(存储在常量 {}MAX_QUEUE_LENGTH{} 中)时,使用 {}{}array_shift{}{} 删除第一个元素。", + "The array to {}shift{}, i.e. to return and remove the first element from":"转到的数组{}移位{},即返回并从中移除第一个元素", + "The function works identically to {}{}array_pop{}{}, but removes and returns the {}first{} element instead of the {}last{} one.":"该函数的工作原理与 {}{}array_pop{}{} 相同,但会删除并返回{}第一个{}元素,而不是{}最后一个{}元素。", + "This function removes the first element from the given array and returns it.":"此函数从给定数组中删除第一个元素并返回它。", + "Using the functions {}{}array_pop{}{} and {}{}array_insert{}{} arrays can be rotated {}right{} instead.":"使用函数 {}{}array_pop{}{} 和 {}{}array_insert{}{} 数组可以改为向{}右{}旋转。", + "{}{}Any{}{} (the type of the removed first array element)":"{}{}Any{}{} (移除的第一个数组元素的类型)", + "{}{}NOTE{}{} Use {}{}array_first{}{} to get the first element without removing it from the array.":"{}{}注意{}{} 使用 {}{}array_first{}{} 以获得第一个元素而不将其从数组中移除。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_foreach.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_foreach.json new file mode 100644 index 000000000..0b9cb8a71 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_foreach.json @@ -0,0 +1,14 @@ +{ + "Struct":"结构", + "The above code first creates a temporary variable {}_inventory{} that contains a mapping of an inventory item to the number of that item held in the inventory. {}{}struct_foreach{}{} is then called to display all the amounts using a debug message.":"上面的代码首先创建一个临时变量{}_inventory{} ,该变量包含库存项目到库存. {}{}struct_foreach{}{} 中保存的该项目编号的映射,然后调用该变量以使用调试消息显示所有金额。", + "The callback function to pass into this function should take the following arguments: ":"要传递到此函数的回调函数应采用以下参数: ", + "The function to execute on each member of the struct":"要在结构的每个成员上执行的函数", + "The name of the struct member":"结构成员的名称", + "The struct to use":"要使用的结构", + "The value assigned to the struct member":"分配给结构成员的值", + "This callback function should not return a value. It simply executes the function on all elements in the given range.":"此回调函数不应返回值。它只是对给定范围内的所有元素执行该函数。", + "This function calls the provided callback function on each member of the struct.":"此函数对结构的每个成员调用提供的回调函数。", + "{}Callback Function{}{}Callback Function{}":"{}回调函数{}{}回调函数{}", + "{}{}Function{}{} or {}{}Method{}{}":"{}{}函数{}{}或{}{}方法{}{}", + "{}{}NOTE{}{} The member name and value are available in the callback function, but cannot be modified through it.":"{}{}注意{}{} 成员名称和值在回调函数中可用,但不能通过回调函数修改。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_get_from_hash.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_get_from_hash.json new file mode 100644 index 000000000..446c4e2e7 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_get_from_hash.json @@ -0,0 +1,7 @@ +{ + "Accessing a variable through a hash allows for faster access when using a string, compared to using the {}struct[? \"string\"]{} syntax.":"与使用 {}struct[? \"string\"]{} 相比,通过散列访问变量可以在使用字符串时更快地访问。", + "The above code creates a temporary struct {}_the_struct{} with three member variables: {}a{}, {}b{} and {}c{}. It then gets the hash of a variable {}a{}. This hash is then used in {}{}struct_get_from_hash{}{} to retrieve the value of the struct member with the corresponding name. The returned value is assigned to another temporary variable {}_value{}.":"上面的代码创建了一个具有三个成员变量的临时结构{}_the_struct{}:{}a{}、{}b{}和{}c{}。然后,它获得变量 {}a{} 的散列。然后在 {}{}struct_get_from_hash{}{} 中使用此散列来检索具有相应名称的结构成员的值。返回值被赋给另一个临时变量 {}_value{}。", + "The hash of the variable to get (as returned by {}{}variable_get_hash{}{})":"要获取的变量的哈希(由 {}{}variable_get_hash{}{} 返回)", + "The struct reference to use":"要使用的结构引用", + "This function gets the value of a struct member using the hash returned by {}{}variable_get_hash{}{}.":"此函数使用 {}{}variable_get_hash{}{} 返回的散列获取结构成员的值。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_set_from_hash.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_set_from_hash.json new file mode 100644 index 000000000..25139c34e --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/struct_set_from_hash.json @@ -0,0 +1,8 @@ +{ + "Accessing a variable through a hash allows for faster access when using a string, compared to using the {}struct[? \"string\"]{} syntax.":"与使用 {}struct[? \"string\"]{} 相比,通过散列访问变量可以在使用字符串时更快地访问。", + "The above code first creates a struct {}point{} with an {}x{} and {}y{} variable in it. Next, the hash for the variable name \"x\" is then retrieved using {}{}variable_get_hash{}{}. After that, a repeat loop is executed a total of 1000 times. Every iteration of the repeat loop assigns a new random value to the point\u0027s x coordinate. This is done using {}{}struct_set_from_hash{}{} to optimise this operation.":"上面的代码首先创建一个结构 {}point{} ,其中包含一个 {}x{} 和 {}y{} 变量。接下来,使用 {}{}variable_get_hash{}{} 检索变量名 \"x\" 的散列。在此之后,重复循环总共执行 1000 次。重复循环的每一次迭代都会为点的 x 坐标分配一个新的随机值。这是在此操作中完成的。 使用 {}{}struct_set_from_hash{}{} 可以进一步优化", + "The hash of the variable to set (as returned by {}{}variable_get_hash{}{})":"要设置的变量的哈希(由 {}{}variable_get_hash{}{} 返回)", + "The struct reference to set":"要设置的结构引用", + "The value to assign to the struct variable":"要分配给结构变量的值", + "This function sets the value of the struct member referred to by the given hash, returned by an earlier call to {}{}variable_get_hash{}{}.":"此函数用于设置给定散列引用的结构成员的值,该值由先前调用 {}{}variable_get_hash{}{} 返回。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/variable_clone.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/variable_clone.json new file mode 100644 index 000000000..d347a2084 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/variable_clone.json @@ -0,0 +1,8 @@ +{ + "It clones nested structs and arrays up to a given depth (128 by default), which you can override by providing the optional {}depth{} parameter.":"它克隆嵌套的结构和数组,直到给定深度(默认情况下为 128),您可以通过提供可选的 {}depth{} 参数来覆盖该深度。", + "The above code first defines a temporary struct variable {}_the_original{}. A clone is then created from this variable using {}{}variable_clone{}{}. The new variable is stored in another variable {}_the_clone{}.":"上面的代码首先定义了一个临时结构变量 {}_the_original{}。然后使用 {}{}variable_clone{}{} 从此变量创建克隆。新变量存储在另一个变量 {}_the_clone{} 中。", + "The value to clone":"要克隆的值", + "This function clones the value you pass it and returns the new clone.":"此函数克隆您传递给它的值,并返回新的克隆。", + "{}{}NOTE{}{} The built-in {}Data Structures{} and {}Instances{} are {}not{} cloned; for this type of variable the actual value (data structure ID or instance ID, respectively) is written.":"{}{}注意{}{} 内置的{}数据结构{}和{}实例{}是{}未{}克隆的,对于此类型的变量写入实际值(分别为数据结构 ID 或实例 ID)。", + "{}{}OPTIONAL{}{} The maximum depth level to clone the variable, in case this is e.g. a nested struct. The default is 128, the maximum possible value.":"{}{}可选{}{} 克隆变量的最大深度级别,如果这是嵌套结构的话。默认值为 128,这是可能的最大值。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/variable_get_hash.json b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/variable_get_hash.json new file mode 100644 index 000000000..12189274f --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Variable_Functions/variable_get_hash.json @@ -0,0 +1,6 @@ +{ + "Accessing a variable through a hash allows for faster access when using a string, compared to using the {}struct[? \"string\"]{} syntax.":"与使用 {}struct[? \"string\"]{} 相比,通过散列访问变量可以在使用字符串时更快地访问。", + "The above code creates a temporary struct {}_the_struct{} with three member variables: {}a{}, {}b{} and {}c{}. It then gets the hash of a variable {}a{}. This hash is then used in {}{}struct_get_from_hash{}{} to retrieve the value of the struct member with the corresponding name. The returned value is assigned to another temporary variable {}_value{}.":"上面的代码创建了一个具有三个成员变量的临时结构 {}_the_struct{}:{}a{}、{}b{} 和 {}c{}。然后,它获得变量 {}a{} 的散列。然后在 {}{}struct_get_from_hash{}{} 中使用此散列来检索具有相应名称的结构成员的值。返回值被赋给另一个临时变量 {}_value{}。", + "The name of the variable to get the hash from":"从中获取哈希的变量的名称", + "This function returns a hash for the given variable name. This hash can be used with the {}{}struct_get_from_hash{}{} and {}{}struct_set_from_hash{}{} functions.":"此函数返回给定变量名的哈希。此哈希可与 {}{}struct_get_from_hash{}{} 和 {}{}struct_set_from_hash{}{} 函数一起使用。" +} \ No newline at end of file