Skip to content

Commit

Permalink
Deploying to main from @ GamemakerChina/GameMaker-maunl-zh@c97a97e 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
LiarOnce committed Jul 25, 2024
1 parent f69a097 commit 2e168c6
Show file tree
Hide file tree
Showing 40 changed files with 40 additions and 40 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript" language="JavaScript">function reDo(){innerWidth==origWidth&&innerHeight==origHeight||location.reload()}4==parseInt(navigator.appVersion)&&"Netscape"==navigator.appName&&(origWidth=innerWidth,origHeight=innerHeight,onresize=reDo),onerror=null</script><style type="text/css">p.WebHelpNavBar{text-align:right}</style><script type="text/javascript">gCommonRootRelPath=gRootRelPath="../../../..",gTopicId="8.2.2.9.1.0_1"</script><script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script><script type="text/javascript" src="../../../../template/scripts/common.min.js"></script><script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script><script type="text/javascript" src="../../../../template/scripts/topicwidgets.min.js"></script><script type="text/javascript" src="../../../../whxdata/projectsettings.js"></script><link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css"><link rel="stylesheet" type="text/css" href="../../../../template/Charcoal_Grey/topicheader.css"><meta name="topic-status" content="Draft"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>ds_grid_create</title><meta name="generator" content="Adobe RoboHelp 2022"><link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css"><script src="../../../../assets/scripts/main_script.js" type="module"></script><meta name="rh-authors" content="Mark Alexander"><meta name="topic-comment" content="Reference page for ds_grid_create"><meta name="rh-index-keywords" content="ds_grid_create"><meta name="search-keywords" content="ds_grid_create"><meta name="is_pure" content="true"><meta name="brsnext" value="GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_destroy.htm"><meta name="brsprev" value="GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/DS_Grids.htm"></head><body><div class="topic-header rh-hide" id="rh-topic-header"><div class="logo"></div><div class="nav"><div class="title" title="ds_grid_create"><span>ds_grid_create</span></div><div class="gotohome" title="Click here to see this page in full context"><a href="#" onclick="rh._.goToFullLayout()">Click here to see this page in full context</a></div></div></div><div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div><h1><span data-field="title" data-format="default">ds_grid_create</span></h1><p>This function creates a new DS grid data structure of the specified cell width and height. The function returns&nbsp;<span data-keyref="Type_ID_DS_Grid"><a target="_blank" href="ds_grid_create.htm">DS Grid</a></span>&nbsp;<span data-keyref="Type_Handle"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Handle</a></span> which must be used in all further functions that deal with this DS grid.</p><p>&nbsp;</p><h4>语法:</h4><p class="code"><span data-field="title" data-format="default">ds_grid_create</span>(w, h);</p><table><tbody><tr><th>参数</th><th>类型</th><th>描述</th></tr><tr><td>w</td><td><span data-keyref="Type_Real"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Real</a></span></td><td>要创建的网格的宽度。</td></tr><tr><td>h</td><td><span data-keyref="Type_Real"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Real</a></span></td><td>要创建的轴网的高度。</td></tr></tbody></table><p>&nbsp;</p><h4>返回:</h4><p class="code"><span data-keyref="Type_ID_DS_Grid"><a target="_blank" href="ds_grid_create.htm">DS Grid</a></span></p><p>&nbsp;</p><h4>例子:</h4><p class="code">mygrid = <span data-field="title" data-format="default">ds_grid_create</span>(10, 10);</p><p>这将创建一个高10个单元格和宽10个单元格的栅格。</p><p>&nbsp;</p><p>&nbsp;</p><div class="footer"><div class="buttons"><div class="clear"><div style="float:left">Back:&nbsp;<a href="DS_Grids.htm">网格 Grid</a></div><div style="float:right">Next:&nbsp;<a href="ds_grid_destroy.htm">ds_grid_destroy</a></div></div></div><h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5></div></body></html>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript" language="JavaScript">function reDo(){innerWidth==origWidth&&innerHeight==origHeight||location.reload()}4==parseInt(navigator.appVersion)&&"Netscape"==navigator.appName&&(origWidth=innerWidth,origHeight=innerHeight,onresize=reDo),onerror=null</script><style type="text/css">p.WebHelpNavBar{text-align:right}</style><script type="text/javascript">gCommonRootRelPath=gRootRelPath="../../../..",gTopicId="8.2.2.9.1.0_1"</script><script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script><script type="text/javascript" src="../../../../template/scripts/common.min.js"></script><script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script><script type="text/javascript" src="../../../../template/scripts/topicwidgets.min.js"></script><script type="text/javascript" src="../../../../whxdata/projectsettings.js"></script><link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css"><link rel="stylesheet" type="text/css" href="../../../../template/Charcoal_Grey/topicheader.css"><meta name="topic-status" content="Draft"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>ds_grid_create</title><meta name="generator" content="Adobe RoboHelp 2022"><link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css"><script src="../../../../assets/scripts/main_script.js" type="module"></script><meta name="rh-authors" content="Mark Alexander"><meta name="topic-comment" content="Reference page for ds_grid_create"><meta name="rh-index-keywords" content="ds_grid_create"><meta name="search-keywords" content="ds_grid_create"><meta name="is_pure" content="true"><meta name="brsnext" value="GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_destroy.htm"><meta name="brsprev" value="GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/DS_Grids.htm"></head><body><div class="topic-header rh-hide" id="rh-topic-header"><div class="logo"></div><div class="nav"><div class="title" title="ds_grid_create"><span>ds_grid_create</span></div><div class="gotohome" title="Click here to see this page in full context"><a href="#" onclick="rh._.goToFullLayout()">Click here to see this page in full context</a></div></div></div><div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div><h1><span data-field="title" data-format="default">ds_grid_create</span></h1><p>此函数创建指定单元格宽度和高度的新 DS 网格数据结构。该函数返回 <span data-keyref="Type_ID_DS_Grid"><a target="_blank" href="ds_grid_create.htm">DS Grid</a></span> <span data-keyref="Type_Handle"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Handle</a></span>,必须在处理此 DS 网格的所有其他函数中使用它。</p><p>&nbsp;</p><h4>语法:</h4><p class="code"><span data-field="title" data-format="default">ds_grid_create</span>(w, h);</p><table><tbody><tr><th>参数</th><th>类型</th><th>描述</th></tr><tr><td>w</td><td><span data-keyref="Type_Real"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Real</a></span></td><td>要创建的网格的宽度。</td></tr><tr><td>h</td><td><span data-keyref="Type_Real"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Real</a></span></td><td>要创建的轴网的高度。</td></tr></tbody></table><p>&nbsp;</p><h4>返回:</h4><p class="code"><span data-keyref="Type_ID_DS_Grid"><a target="_blank" href="ds_grid_create.htm">DS Grid</a></span></p><p>&nbsp;</p><h4>例子:</h4><p class="code">mygrid = <span data-field="title" data-format="default">ds_grid_create</span>(10, 10);</p><p>这将创建一个高10个单元格和宽10个单元格的栅格。</p><p>&nbsp;</p><p>&nbsp;</p><div class="footer"><div class="buttons"><div class="clear"><div style="float:left">Back:&nbsp;<a href="DS_Grids.htm">网格 Grid</a></div><div style="float:right">Next:&nbsp;<a href="ds_grid_destroy.htm">ds_grid_destroy</a></div></div></div><h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5></div></body></html>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript" language="JavaScript">function reDo(){innerWidth==origWidth&&innerHeight==origHeight||location.reload()}4==parseInt(navigator.appVersion)&&"Netscape"==navigator.appName&&(origWidth=innerWidth,origHeight=innerHeight,onresize=reDo),onerror=null</script><style type="text/css">p.WebHelpNavBar{text-align:right}</style><script type="text/javascript">gCommonRootRelPath=gRootRelPath="../../../..",gTopicId="8.2.2.9.1.0_2"</script><script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script><script type="text/javascript" src="../../../../template/scripts/common.min.js"></script><script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script><script type="text/javascript" src="../../../../template/scripts/topicwidgets.min.js"></script><script type="text/javascript" src="../../../../whxdata/projectsettings.js"></script><link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css"><link rel="stylesheet" type="text/css" href="../../../../template/Charcoal_Grey/topicheader.css"><meta name="topic-status" content="Draft"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>ds_grid_destroy</title><meta name="generator" content="Adobe RoboHelp 2022"><link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css"><script src="../../../../assets/scripts/main_script.js" type="module"></script><meta name="rh-authors" content="Mark Alexander"><meta name="topic-comment" content="Reference page for ds_grid_destroy"><meta name="rh-index-keywords" content="ds_grid_destroy"><meta name="search-keywords" content="ds_grid_destroy"><meta name="brsnext" value="GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_width.htm"><meta name="brsprev" value="GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_create.htm"></head><body><div class="topic-header rh-hide" id="rh-topic-header"><div class="logo"></div><div class="nav"><div class="title" title="ds_grid_destroy"><span>ds_grid_destroy</span></div><div class="gotohome" title="Click here to see this page in full context"><a href="#" onclick="rh._.goToFullLayout()">Click here to see this page in full context</a></div></div></div><div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div><h1><span data-field="title" data-format="default">ds_grid_destroy</span></h1><p>This function will remove the given grid data structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS grid to prevent memory leaks that can slow down and crash your game.</p><div data-conref="../../../../assets/snippets/Note_DS_Destroy_Always_Set_To_Minus_One.hts"><p class="note"><span data-conref="../../../../assets/snippets/Tag_note.hts"><span class="note">NOTE</span></span>&nbsp;You should always set the variable that held the data structure&nbsp;reference to -1 after calling this function, since the reference will no longer be valid.</p></div><p>&nbsp;</p><h4>语法:</h4><p class="code"><span data-field="title" data-format="default">ds_grid_destroy</span>(index);</p><table><tbody><tr><th>参数</th><th>类型</th><th>描述</th></tr><tr><td>index</td><td><span data-keyref="Type_ID_DS_Grid"><a target="_blank" href="ds_grid_create.htm">DS Grid</a></span></td><td>要销毁的网格的索引。</td></tr></tbody></table><p>&nbsp;</p><h4>返回:</h4><p class="code"><span data-keyref="Type_Void">N/A</span></p><p>&nbsp;</p><h4>例子:</h4><p class="code">if (lives == 0)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;<span data-field="title" data-format="default">ds_grid_destroy</span>(Wall_Grid);<br>&nbsp;&nbsp;&nbsp;&nbsp;Wall_Grid = -1;<br>&nbsp;&nbsp;&nbsp;&nbsp;room_goto(rm_Menu);<br>}</p><p>The above code will check the value of the built in global variable&nbsp;<span class="inline2"><a href="../../../GML_Overview/Variables/Builtin_Global_Variables/lives.htm">lives</a></span> and if it is 0, it destroys the DS grid referenced in the variable <span class="inline2">Wall_Grid</span>&nbsp;and then changes rooms.</p><p>&nbsp;</p><p>&nbsp;</p><div class="footer"><div class="buttons"><div class="clear"><div style="float:left">Back: <a href="DS_Grids.htm">网格 Grid</a></div><div style="float:right">Next:&nbsp;<a href="ds_grid_width.htm">ds_grid_width</a></div></div></div><h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5></div></body></html>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript" language="JavaScript">function reDo(){innerWidth==origWidth&&innerHeight==origHeight||location.reload()}4==parseInt(navigator.appVersion)&&"Netscape"==navigator.appName&&(origWidth=innerWidth,origHeight=innerHeight,onresize=reDo),onerror=null</script><style type="text/css">p.WebHelpNavBar{text-align:right}</style><script type="text/javascript">gCommonRootRelPath=gRootRelPath="../../../..",gTopicId="8.2.2.9.1.0_2"</script><script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script><script type="text/javascript" src="../../../../template/scripts/common.min.js"></script><script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script><script type="text/javascript" src="../../../../template/scripts/topicwidgets.min.js"></script><script type="text/javascript" src="../../../../whxdata/projectsettings.js"></script><link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css"><link rel="stylesheet" type="text/css" href="../../../../template/Charcoal_Grey/topicheader.css"><meta name="topic-status" content="Draft"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>ds_grid_destroy</title><meta name="generator" content="Adobe RoboHelp 2022"><link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css"><script src="../../../../assets/scripts/main_script.js" type="module"></script><meta name="rh-authors" content="Mark Alexander"><meta name="topic-comment" content="Reference page for ds_grid_destroy"><meta name="rh-index-keywords" content="ds_grid_destroy"><meta name="search-keywords" content="ds_grid_destroy"><meta name="brsnext" value="GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_width.htm"><meta name="brsprev" value="GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_create.htm"></head><body><div class="topic-header rh-hide" id="rh-topic-header"><div class="logo"></div><div class="nav"><div class="title" title="ds_grid_destroy"><span>ds_grid_destroy</span></div><div class="gotohome" title="Click here to see this page in full context"><a href="#" onclick="rh._.goToFullLayout()">Click here to see this page in full context</a></div></div></div><div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div><h1><span data-field="title" data-format="default">ds_grid_destroy</span></h1><p>此函数将从内存中删除给定的网格数据结构,释放其正在使用的资源并删除其包含的所有值。当您使用完 DS grid 后,应始终使用此功能,以防止内存泄漏导致游戏速度减慢和崩溃。</p><div data-conref="../../../../assets/snippets/Note_DS_Destroy_Always_Set_To_Minus_One.hts"><p class="note"><span data-conref="../../../../assets/snippets/Tag_note.hts"><span class="note">注意</span></span> 调用此函数后,您应始终将保存数据结构引用的变量设置为 -1,因为该引用将不再有效。</p></div><p>&nbsp;</p><h4>语法:</h4><p class="code"><span data-field="title" data-format="default">ds_grid_destroy</span>(index);</p><table><tbody><tr><th>参数</th><th>类型</th><th>描述</th></tr><tr><td>index</td><td><span data-keyref="Type_ID_DS_Grid"><a target="_blank" href="ds_grid_create.htm">DS Grid</a></span></td><td>要销毁的网格的索引。</td></tr></tbody></table><p>&nbsp;</p><h4>返回:</h4><p class="code"><span data-keyref="Type_Void">N/A</span></p><p>&nbsp;</p><h4>例子:</h4><p class="code">if (lives == 0)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;<span data-field="title" data-format="default">ds_grid_destroy</span>(Wall_Grid);<br>&nbsp;&nbsp;&nbsp;&nbsp;Wall_Grid = -1;<br>&nbsp;&nbsp;&nbsp;&nbsp;room_goto(rm_Menu);<br>}</p><p>上面的代码将检查内置全局变量 <span class="inline2"><a href="../../../GML_Overview/Variables/Builtin_Global_Variables/lives.htm">lives</a></span> 的值,如果为 0,则会销毁变量 <span class="inline2">Wall_Grid</span> 中引用的 DS 网格,然后更改房间。</p><p>&nbsp;</p><p>&nbsp;</p><div class="footer"><div class="buttons"><div class="clear"><div style="float:left">Back: <a href="DS_Grids.htm">网格 Grid</a></div><div style="float:right">Next:&nbsp;<a href="ds_grid_width.htm">ds_grid_width</a></div></div></div><h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5></div></body></html>
Loading

0 comments on commit 2e168c6

Please sign in to comment.