Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Feb 21, 2025
2 parents 9369194 + 94ae533 commit 9f74afd
Show file tree
Hide file tree
Showing 88 changed files with 354 additions and 130 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Expand All @@ -14,9 +14,13 @@
</head>
<body><!--<div class="body-scroll" style="top: 150px;">--><h1> 액션 블록 코드 구성하기</h1><p> 객체에 동작을 추가하려면 <strong>Action Toolbox</strong> 에서 사용할 수 있는 다양한 라이브러리의 <strong>Actions</strong> 를 사용하여 코드를 구성할 수 있습니다. 시작하려면 <a href="../../Introduction/The_Start_Page.htm">새 GML Visual 프로젝트</a> 를 만든 다음 새 <a href="../../The_Asset_Editors/Objects.htm">개체</a> 를 만들어야 합니다(필요한 경우 개체에 <a href="../../The_Asset_Editors/Sprites.htm">스프라이트</a> 를 할당할 수도 있음). 새 개체에서 이벤트 추가를 시작할 수 있고 <a href="../../The_Asset_Editors/Object_Properties/Object_Events.htm"><span class="notranslate">events</span></a> 에서 GML Visual 코드 작업을 추가할 수 있습니다.</p><p><img alt="GML Visual Create Event" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Create_Event.png"/> 새 이벤트를 추가하면 주어진 이벤트에 대한 탭이 있는 &quot;코드&quot; 창이 열리고(위 이미지 참조) 이제 오른쪽 도구 상자에서 원하는 작업을 작업 블록 창으로 드래그할 수 있습니다. 코드 창의. 이제 모든 작업을 추가할 수 있다는 것은 사실이지만 모든 작업이 작동하거나 프로젝트가 함께 컴파일된다는 의미는 아닙니다. 일부 작업은 작동하려면 최소한 하나의 <a class="glossterm" data-glossterm="변하기 쉬운" href="#">변수</a> 가 필요하지만 <a href="../Drag_And_Drop_Reference/Drawing/Drawing_Actions.htm">그리기</a> 작업과 같은 다른 작업은 특정 이벤트에서 사용되는 경우에만 작동합니다. 어떤 것을 사용해야 하는지 어떻게 압니까? 글쎄, 일반적으로, 그것은 단순히 논리를 사용하는 문제입니다... 액션에 변수가 필요하고 아직 변수를 정의하지 않았다면 변수를 생성하기 위한 액션을 추가할 때까지 사용해서는 안 됩니다.</p><p> 도구 상자에서 작업을 기본 작업 블록 작업 공간으로 끌면 작업을 설정하기 위해 채우고 변경할 수 있는 사용 가능한 <a class="glossterm" data-glossterm="논쟁" href="#">인수</a> (매개변수) <span class="glossextra"></span> 표시되도록 확장됩니다. 아래 이미지에서 도구 상자 <a href="../Drag_And_Drop_Reference/Common/Common_Actions_Library.htm">공통 라이브러리</a><a href="../Drag_And_Drop_Reference/Common/Assign_Variable.htm">변수 할당</a> 작업을 작업 블록 작업 공간으로 드래그했습니다.</p><p><img alt="GML Visual Assign Variable" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Add_Var.png"/> 새로운 액션이 코드 창의 왼쪽에도 축약형으로 표시되는 것을 볼 수 있습니다. 작업 개요라고 하는 이 작업 목록을 클릭하면 편집을 위해 해당 작업으로 빠르게 이동할 수 있습니다. 필요한 경우 이벤트에 작업을 계속 추가할 수 있습니다. 각 새 작업은 이전 작업에 &quot;연결&quot;되어 구성 중인 GML Visual 코드의 흐름을 보여줍니다. 추가 작업을 삭제할 수 있는 영역은 초기 작업 아래에 강조 표시되며, 사용 중인 작업에 따라 체인에서 추가할 수 있는 위치를 표시하기 위해 다른 영역이 강조 표시됩니다.</p><p><img alt="GML Visual Set Direction Variable" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Set_Dir.png"/> 작업 공간에 작업을 추가하면 위의 작업에 &quot;연결&quot;되어 한 작업이 다른 작업으로 이어지는 GML Visual 코드의 흐름을 볼 수 있으며 개요 창에서 해당 작업을 실행 순서대로 축약형으로 표시합니다.:</p><p><img alt="GML Visual chain of actions" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Scope_Other.png"/> 일부 작업은 코드를 기본 흐름에서 떨어진 별도의 체인에 배치합니다. 예를 들어 <a href="../Drag_And_Drop_Reference/Common/If_Variable.htm">If Variable</a> 은 기본 체인을 계속 진행하기 전에 올바른 조건이 충족되는 경우 발생해야 하는 작업의 <em>하위 체인</em> 을 생성합니다.</p><p><img alt="GML Visual side chain of actions" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_If_Variable.png"/> 이와 같이 사이드 체인 블록을 가질 수 있는 작업을 사용할 때 작업에는 추가 작업을 삭제하기 위해 강조 표시된 <em></em> 영역이 있습니다.</p><ul class="colour"><li> 평소처럼 행동 아래에 하나</li><li> 첫 번째 작업의 조건이 true를 반환할 때 실행할 별도의 작업 블록을 만들려는 것을 나타내는 작업 오른쪽에 하나</li></ul><p><img alt="GML Visual Side Chain Of Actions" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_If_Drop.png"/> 간단히 클릭하여 체인 내에서 작업의 위치를 변경할 수 있습니다.<img alt="LMB Icon" class="icon" height="24" src="../../assets/Images/Icons/Icon_LMB.png" width="21"/> 필요한 새 위치로 드래그하고 클릭하면<img alt="LMB Icon" class="icon" height="24" src="../../assets/Images/Icons/Icon_LMB.png" width="21"/> 잠시 누른 상태에서 마우스를 움직이면 작업 블록 체인 내에서 해당 위치를 유지하면서 작업 공간 내에서 작업을 이동할 수 있습니다.</p><p> GML Visual 작업에 <strong>주석</strong> 을 추가하는 것도 가능하므로 여러 블록 옆에 메모를 남겨 두 블록이 하는 일을 설명할 수 있습니다(팀에서 작업할 때 특히 유용함).</p><p><img alt="GML Visual Add Comment" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Add_Comment.gif"/> 이 기능에 대한 자세한 내용은 <a href="Right_Mouse_Button_Menu_Options.htm">오른쪽 마우스 버튼 메뉴</a> 페이지에서 확인할 수 있습니다.</p><p> 이것이 GML Visual 코드 편집기를 사용하는 기본 사항이지만 아래 섹션에 더 중요한 세부 정보가 설명되어 있습니다.</p><p></p><p> <a class="dropspot" data-rhwidget="DropSpot" data-target="drop-down1" href="#">대상 변수</a></p><div class="droptext" data-targetname="drop-down1"><p class="dropspot"> 많은 작업이 &quot;임시&quot;로 플래그 지정될 수 있는 &quot;대상&quot; 변수를 제공한다는 점에 유의하는 것이 중요합니다. 예를 들면 다음과 같습니다.</p><p class="dropspot"><img alt="Example Of Target" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Audio_Get_Audio_Volume.png"/> 이것이 의미하는 바는 작업에 의해 반환된 값을 보유할 대상인 변수를 제공할 수 있다는 것입니다. 위의 예제 작업에서 작업은 선택한 오디오 리소스의 볼륨을 반환하므로 나중에 참조할 수 있도록 이 값을 보유할 대상 변수를 제공합니다.</p><p class="dropspot"> 이제 이 대상 변수는 <a href="../Drag_And_Drop_Reference/Common/Assign_Variable.htm">Assign Variable</a> ( <strong>Instance Variable</strong> 생성) 또는 <a href="../Drag_And_Drop_Reference/Common/Declare_Temporary_Variable.htm">Declare Temporary Variable</a> ( <strong>Local Temporary Variable</strong> 생성)을 사용하여 이전에 선언되어 있어야 합니다. &quot;Temp&quot; 옵션을 선택하면 간단히 추가할 수 있습니다. 변수 이름과 작업은 해당 변수를 만들고 반환 값을 유지하도록 설정합니다(임시 로컬 변수 만들기). 이후에 사용된 모든 작업은 이제 임시 변수의 값에 액세스할 수 <strong>있지만 동일한 Event 또는 Script 내에서만 가능합니다</strong>. 임시 변수는 생성된 범위 내에서만 사용할 수 있습니다. 변수 및 변수 범위에 대한 자세한 내용은 <a href="../../GameMaker_Language/GML_Overview/Variables_And_Variable_Scope.htm">여기</a> 를 참조하십시오.</p><p class="dropspot"></p></div><p> <a class="dropspot" data-rhwidget="DropSpot" data-target="drop-down2" href="#">작업 범위</a></p><div class="droptext" data-targetname="drop-down2"><p class="dropspot"> 변수에 범위가 있을 뿐만 아니라(위의 <strong>대상 변수</strong> 섹션 참조) 작업에도 범위가 다를 수 있습니다. 사실, 거의 모든 작업은 다음과 같이 작업 자체에서 열린 드롭다운 창에서 설정하여 작업할 다른 범위를 지정할 수 있습니다.</p><p class="dropspot"><img alt="GML Visual Applies To" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Applies_To.png"/> 특별 조치 <a href="../Drag_And_Drop_Reference/Common/Apply_To...htm">적용 대상을</a> 사용하여 모든 추가 조치의 범위를 설정할 수도 있습니다. GML Visual 작업의 이 기능에 대한 자세한 내용은 다음을 참조하십시오.</p><ul class="dropspotlist"><li class="dropspot"> <a href="Applying_Actions_To_Other_Instances.htm">다른 인스턴스에 작업 적용</a></li></ul><p class="dropspot"></p></div><p> <a class="dropspot" data-rhwidget="DropSpot" data-target="drop-down3" href="#">자동 완성</a></p><div class="droptext" data-targetname="drop-down3"><p class="dropspot"> GML Visual으로 작업할 때 작업의 다른 입력 필드에 변수와 표현식을 추가해야 합니다. 그러나 이렇게 하면 다음과 같은 <strong>자동 완성</strong> 창이 자주 나타납니다.</p><p class="dropspot"><img alt="Auto Complete" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Action_AutoComplete.png"/> 이 팝업 창에는 모든 내장 GML(GameMaker Language) 변수, 상수 및 함수는 물론 입력한 것의 첫 글자가 포함된 리소스가 나열됩니다. 직접 입력하지 않고도 작업에 필요한 리소스나 변수를 빠르게 찾는 데 사용할 수 있습니다. 예를 들어 모든 방에 &quot;<span class="inline">rm_</span> &quot; 그런 다음 입력하고 잠시 기다리면 모든 자산이 &quot;로 시작하는 자동 완성 창이 표시됩니다.<span class="inline">rm_</span> &quot;. 자동 완성 창에 표시되는 모든 내장 변수는 대부분의 GML 함수와 마찬가지로 작업에서 변수 또는 표현식이 예상되는 모든 곳에서 사용할 수 있습니다.</p><p class="dropspot"></p></div><p> <a class="dropspot" data-rhwidget="DropSpot" data-target="drop-down4" href="#">액션 확장</a></p><div class="droptext" data-targetname="drop-down4"><p class="dropspot"> 때때로 작업을 사용할 때 작은 더하기 아이콘이 표시됩니다.<img alt="Expand Arguments Icon" src="../../assets/Images/Icons/Icon_Expand_Arguments.png"/> 옆으로. 즉, 추가 작업을 수행하거나 추가 인수를 수행하도록 작업을 확장할 수 있습니다. 예를 들어, <a href="../Drag_And_Drop_Reference/Common/Declare_Temporary_Variable.htm">Declare Temporary Variables</a> 작업을 보면 다음과 같은 아이콘이 있음을 알 수 있습니다.</p><p class="dropspot"><img alt="Temp Variable Expansion" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Declare_Temp_Var.png"/> 아이콘을 클릭하면 작업이 <em>확장</em> 되고 더 많은 변수를 선언할 수 있으므로 동시에 여러 변수를 더 쉽고 빠르게 정의할 수 있습니다.</p><p class="dropspot"><img alt="Temp Variable Expansion Example" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Expansion_Example.png"/> 아이콘은 또한 반환할 다양한 값을 추가할 수 있는 <a href="../Drag_And_Drop_Reference/Random/Choose.htm">선택</a> 작업과 같이 <strong>선택적</strong> 인수가 필요한 작업에 사용할 수 있습니다. </p><p class="dropspot"><img alt="Choose Expansion Example" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Mathematics_Choose.png"/></p></div><p></p><p></p><p></p><div class="footer"><div class="buttons"><div class="clear"><div style="float:left"> 뒤로: <a href="../../Content.htm">인덱스</a></div><div style="float:right"> Next: <a href="Applying_Actions_To_Other_Instances.htm">다른 인스턴스에 작업 적용</a></div></div></div><h5> <span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2021 판권 소유</span></h5>
</div>
<!-- KEYWORDS
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2025 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
GML Visual Construction
--><!-- TAGS
-->
<!-- TAGS
drag_and_drop_construction
--></body>
-->
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
Expand All @@ -20,5 +19,5 @@
<!-- TAGS
action_set_view_var
-->

</body></html>
</body>
</html>
15 changes: 8 additions & 7 deletions Manual/contents/GameMaker_Language/GML_Overview/Accessors.htm
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,21 @@
ds[? &quot;Company&quot;] = &quot;MacSeweeny Games&quot;;<br />
ds[? &quot;Game&quot;] = &quot;Catch The Haggis&quot;;</p><p class="dropspot"> 맵에 추가하려는 것과 동일한 키 값이 이미 포함되어 있는 경우 새 값으로 중복 키가 생성되지 않고 이전 값이 대체됩니다.</p><p class="dropspot"> 맵 구조를 만들고 데이터로 채우면 특정 맵 키에서 값을 가져오려면 다음과 같이 됩니다.</p><p class="code">value = ds[? &quot;Name&quot;];</p><p class="dropspot"> 위의 내용은 &quot;Name&quot; 키에서 값을 가져와 변수에 저장하지만 주어진 키가 DS 맵에 없으면 반환되는 값은 다음과 같습니다. <span class="inline">undefined</span>. 기능 사용 여부를 확인할 수 있습니다.<a href="../GML_Reference/Variable_Functions/is_undefined.htm"><span class="inline">is_undefined()</span></a>.</p><p class="dropspot"></p></div><p> <a class="dropspot" data-rhwidget="DropSpot" data-target="drop-down14" href="#">DS 그리드 [# ]</a></p><div class="droptext" data-targetname="drop-down14"><p class="dropspot"> <a href="../GML_Reference/Data_Structures/DS_Grids/DS_Grids.htm">DS 그리드</a> 의 구문은 다음과 같습니다.</p><p class="code">grid_index[# xpos, ypos]</p><p class="dropspot"> 로 그리드를 생성한 후<span class="inline">ds_grid_create()</span> 함수를 사용하는 경우 변수에 저장한 그리드 인덱스를 사용하여 참조하며 &quot;xpos&quot; 및 &quot;ypos&quot;는 값을 가져오거나 설정하기 위한 그리드 내의 위치입니다. 예를 들어 다음 코드는 그리드를 만들고 0으로 지운 다음 몇 가지 항목을 추가합니다.</p><p class="code">ds = ds_grid_create();<br />
ds_grid_clear(ds, 0);<br />
var gw = ds_grid_width(ds) - 1;<br />
var gh = ds_grid_height(ds) - 1;<br />
var _gw = ds_grid_width(ds) - 1;<br />
var _gh = ds_grid_height(ds) - 1;<br />
repeat(10)<br />
{<br />
    var xx = irandom(gw);<br />
    var yy = irandom(gh);<br />
    if (ds[# xx, yy] == 0)<br />
    var _xx = irandom(_gw);<br />
    var _yy = irandom(_gh);<br />
    if (ds[# _xx, _yy] == 0)<br />
    {<br />
        ds[# xx, yy] = 1;<br />
        ds[# _xx, _yy] = 1;<br />
    }<br />
}</p><p class="dropspot"> 그리드 구조를 만들고 데이터로 채우면 특정 그리드 위치에서 값을 얻으려면 다음과 같이 됩니다.</p><p class="code">value = ds[# mouse_x div 16, mouse_y div 16];</p><p class="dropspot"> 위는 마우스 위치를 기반으로 주어진 ds_grid에서 값을 가져옵니다(정확한 위치를 얻기 위해 방의 &quot;셀&quot; 너비로 나눕니다). 그리드 경계 외부에 있는 위치를 제공하면 값 <span class="inline">undefined</span> 함수 사용을 확인할 수 있는 반환됩니다.<a href="../GML_Reference/Variable_Functions/is_undefined.htm"><span class="inline">is_undefined()</span></a>.</p><p class="dropspot"></p></div><p> <a class="dropspot" data-rhwidget="DropSpot" data-target="drop-down15" href="#">배열 [@ ]</a></p><div class="droptext" data-targetname="drop-down15"><p class="dropspot"> 이 접근자는 <a href="../../Settings/Game_Options.htm">쓰기 시 복사 옵션이 활성화된</a> 경우에만 사용됩니다.</p><p class="dropspot"> 배열에는 데이터 구조에 대해 위에 나열된 것과 유사한 방식으로 작동하는 자체 접근자가 있습니다. 그러나 배열 접근자는 흥미로운 속성을 가지고 있으며 복사할 필요 없이 <a href="Script_Functions.htm">스크립트 함수</a> 또는 <a href="Method_Variables.htm"><span class="notranslate">method</span></a> 에서 배열을 수정할 수 있도록 합니다. 배열을 함수에 전달할 때 <strong>참조로 전달됩니다</strong>. 즉, 배열 자체가 스크립트에 제공되는 것이 아니라 단순히 데이터를 가져오기 위해 참조되는 것입니다. 일반적으로 배열을 변경해야 하는 경우 스크립트에 <em>복사</em> 한 다음 원본 배열이 업데이트되도록 복사한 배열을 다시 전달(반환)해야 합니다. 이것은 비용이 많이 드는 처리 오버헤드를 가질 수 있으므로 복사할 필요 없이 원래 배열 <em>을 직접</em> 변경하므로 접근자를 대신 사용할 수 있습니다. 아래 예에서 이것이 어떻게 작동하는지 확인할 수 있습니다.</p><p class="dropspot"> 다음을 사용하는 배열 구문 <span class="inline">@</span> 접근자는 다음과 같습니다.</p><p class="code">array[@ i]</p><p class="dropspot"> 인스턴스에서 배열을 만든 후 참조로 스크립트에 전달하고 접근자를 사용할 수 있습니다.<span class="inline">@</span> 직접 변경합니다. 예를 들어 배열을 만들고 다음과 같이 함수를 호출합니다.</p><p class="code">array[99] = 0;<br />
array_populate(array);</p><p class="dropspot"> 함수 자체에는 다음과 같은 내용이 있습니다.</p><p class="code">function array_populate(_array)<br />
{<br />
    var a = _array; var i = 0; repeat(25)<br />
    var a = _array; var i = 0;<br />
    repeat(25)<br />
    {<br />
        i = irandom(99);<br />
        while (a[i] != 0)<br />
Expand Down
Loading

0 comments on commit 9f74afd

Please sign in to comment.