[task] | extract_knowledge [title] | MaskComponent [category] | Components [rephrased] | # MaskComponent ## 개념 설명 `MaskComponent`는 UI Entity의 자식(Entity)들 중 특정 영역만 보이게 하도록 클리핑(Cropping)을 수행하는 컴포넌트입니다. 이 컴포넌트를 가진 엔티티는 마스크 영역을 정의하며, 그 영역 밖의 자식 UI 요소는 렌더링되지 않습니다. **제한 사항:** * 회전(Rotation)을 지원하지 않습니다. * 엔티티가 회전된 상태에서는 정상적으로 동작하지 않을 수 있습니다. ## API 사용법 ### Properties | 속성 | 타입 | 설명 | [original] | 마스크를 사용해 자식 UI Entity의 특정 영역만 보이게 할 수 있습니다. 회전 기능은 지원하지 않으며, 엔티티가 회전한 경우 정상적으로 동작하지 않을 수 있습니다. # Properties - **RectOffset Padding** 마스크의 상하좌우의 여유 공간을 설정합니다. - **MaskShape Shape** 마스크의 모양을 지정합니다. - **Vector2Int Softness** 마스크의 가장자리 영역부터 자연스럽게 번지게 할 영역을 정합니다. ##### inherited from Component: [chunk_id] | Components:355:0
[task] | knowledge_list [title] | ChatBalloonComponent [category] | Components [rephrased] | 제시된 문서 원문에 포함된 정보만을 바탕으로 핵심 사실을 추출하여 정리한 목록입니다. * `ChatBalloonComponent`는 `self.Entity.ChatBalloonComponent` 경로를 통해 엔티티에서 직접 접근할 수 있는 컴포넌트입니다. * `ChatBalloonComponent`는 `Message` 속성을 가지며, 이 속성에 문자열을 할당하면 해당 텍스트가 말풍선으로 출력됩니다. * `ChatBalloonComponent`는 `ShowDuration` 속성을 가지며, 이는 말풍선이 표시되는 지속 시간 [original] | 다음은 일정 간격마다 대사를 말하는 NPC를 만드는 예제입니다. ChatBalloon이 출력되는 간격에 맞추어 대사를 교체해 줍니다. ```lua Method: [server only] void OnBeginPlay () { local chatBalloon = self.Entity.ChatBalloonComponent local npcTalks = {} table.insert(npcTalks, "NPC Talk 1") table.insert(npcTalks, "NPC Talk 2") table.insert(npcTa [chunk_id] | Components:356:1
[task] | distill [title] | ChatBalloonComponent [category] | Components [rephrased] | # ChatBalloonComponent 말풍선 표시 및 관련 기능 설정을 담당하는 컴포넌트입니다. ## Properties **[MakerOnly]** - **boolean AllowAutomaticTranslation**: `Message`의 자동 번역 여부. - **boolean EnableProfanityFilter**: `Message`에 금칙어 필터링 적용 여부. **[Sync]** - **boolean ArrowChatEnabled**: 말풍선 꼬리 이미지 제공 여부. - **boolean AutoShowEnab [original] | 말풍선을 표시해주고 관련 기능을 설정할 수 있는 기능을 제공합니다. # Properties - **boolean AllowAutomaticTranslation [MakerOnly]** Message 프로퍼티 값의 자동 번역 여부를 설정합니다. - **boolean ArrowChatEnabled [Sync]** 말풍선 꼬리 이미지를 제공 여부를 설정합니다. - **boolean AutoShowEnabled [Sync]** 말풍선이 자동으로 나타나게 할지 여부를 설정합니다. 값이 true일 경우 ShowDuration 동 [chunk_id] | Components:356:0
[task] | distill [title] | InventoryComponent [category] | Components [rephrased] | # InventoryComponent 소유 아이템을 관리하는 컴포넌트입니다. `IsInitialized`가 `true`가 되거나 `InventoryItemInitEvent` 발생 후에만 관련 기능이 정상 작동합니다. ## Properties - **boolean IsInitialized** `[ReadOnly] [HideFromInspector]`: 초기화 완료 여부. - **boolean Enable** `[Sync]`: 컴포넌트 활성화 여부 (inherited). - **boolean EnableInHierarchy** ` [original] | 소유한 아이템들을 관리하는 컴포넌트입니다. # Properties - **boolean IsInitialized [ReadOnly] [HideFromInspector]** 인벤토리의 초기화가 완료 여부를 확인합니다. 초기화된 이후 InventoryComponent 관련 기능이 정상 작동하게 됩니다. ##### inherited from Component: - **boolean Enable [Sync]** 컴포넌트 활성화 여부를 확인합니다. - **boolean EnableInHierarchy [ReadOnly] [Hi [chunk_id] | Components:357:0
[task] | diverse_qa [title] | JoystickComponent [category] | Components [rephrased] | 질문: JoystickComponent는 어떤 기능을 제공하는 컴포넌트입니까? 답변: JoystickComponent는 모바일 환경에서 플레이어의 이동을 제어할 수 있는 가상의 조작키 기능을 지원해주는 Component입니다. 질문: 조작키가 움직일 수 있는 축 타입을 설정하는 Property 이름은 무엇입니까? 답변: AxisType Axis 질문: 조작키가 아래로 이동했을 때 입력되는 키를 설정하는 Property는 무엇입니까? 답변: KeyboardKey DownArrow 질문: 조작키가 왼쪽으로 이동했을 때 입력되는 키 [original] | 모바일 환경에서 플레이어의 이동을 제어할 수 있는 가상의 조작키 기능을 지원해주는 Component입니다. # Properties - **AxisType Axis** 조작키가 움직일 수 있는 축 타입을 설정합니다. - **KeyboardKey DownArrow** 조작키가 아래로 이동했을 때 입력되는 키입니다. - **boolean DynamicStick** 플레이 시 조작키의 위치가 유저가 터치한 곳으로 이동합니다. - **KeyboardKey LeftArrow** 조작키가 왼쪽으로 이동했을 때 입력되는 키입니다 [chunk_id] | Components:354:0
[task] | wikipedia [title] | ChatBalloonComponent [category] | Components [rephrased] | # ChatBalloonComponent `ChatBalloonComponent`는 엔티티에 말풍선(챗발룬)을 표시하기 위해 사용되는 컴포넌트입니다. 이 컴포넌트를 통해 엔티티가 특정 메시지를 출력하고, 그 표시 및 숨김 지속 시간을 제어할 수 있습니다. ## 주요 속성 및 동작 컴포넌트는 말풍선의 내용과 표시 시간을 제어하는 속성을 제공합니다. * **Message**: 말풍선에 표시될 문자열 메시지를 설정합니다. * **ShowDuration**: 말풍선이 화면에 표시되는 지속 시간을 초 단위로 설정합니다. * [original] | 다음은 일정 간격마다 대사를 말하는 NPC를 만드는 예제입니다. ChatBalloon이 출력되는 간격에 맞추어 대사를 교체해 줍니다. ```lua Method: [server only] void OnBeginPlay () { local chatBalloon = self.Entity.ChatBalloonComponent local npcTalks = {} table.insert(npcTalks, "NPC Talk 1") table.insert(npcTalks, "NPC Talk 2") table.insert(npcTa [chunk_id] | Components:356:1
[task] | extract_knowledge [title] | AvatarRendererComponent [category] | Components [rephrased] | # AvatarRendererComponent `AvatarRendererComponent`는 아바타 형태의 엔티티를 렌더링하는 컴포넌트입니다. 이 절에서는 아바타 렌더링 관련 속성, 메서드, 이벤트의 정의와 사용법을 설명합니다. ## 1. 개념 설명 아바타 렌더링은 엔티티의 시각적 표현을 담당하며, 주로 다음과 같은 요소를 제어합니다: * **레이어링 (Layering):** `SortingLayer`와 `OrderInLayer`를 통해 겹치는 아바타들의 앞뒤 표시 순서를 결정합니다. * **머티리얼 (Material [original] | 아바타 형태의 엔티티를 렌더링합니다. # Properties - **boolean IgnoreMapLayerCheck [Sync]** SortingLayer에 Map Layer 이름을 지정했을 때 자동 치환을 수행하지 않습니다. - **string MaterialId [Sync]** 렌더러에 적용할 머티리얼의 Id를 지정합니다. - **int32 OrderInLayer** 같은 Layer 내의 우선순위를 결정합니다. 수가 클수록 앞에 보입니다. - **float PlayRate [Sync]** 아바타 애니메이션의 [chunk_id] | Components:350:0
[task] | wikipedia [title] | TouchReceiveComponent [category] | Components [rephrased] | # TouchReceiveComponent `TouchReceiveComponent`는 플레이어가 엔티티를 터치하여 그 위치를 조작할 수 있도록 지원하는 컴포넌트입니다. 이 컴포넌트가 엔티티에 추가되어야 터치 입력에 반응하여 엔티티의 세계 좌표(World Position)가 터치 지점으로 이동합니다. ## 속성 (Properties) 이 컴포넌트는 두 가지 속성을 가지며, 모두 동기화(Sync)되지 않습니다. * **Index**: `table<integer>` 타입으로, 현재 터치 상태를 유지하고 있는 터치 ID(Tou [original] | 플레이어가 엔티티를 터치하고 이동시키는 예제입니다. `TouchReceiveComponent`가 엔티티에 추가되어야 합니다. ```lua Property: [None] table<integer> Index [None] any Handler = nil Method: [client] void Move (any screenholdEvent) { local touchId = screenholdEvent.TouchId local touchPoint = screenholdEvent.TouchPoint local string f [chunk_id] | Components:353:1
[task] | extract_knowledge [title] | CameraComponent [category] | Components [rephrased] | # CameraComponent `CameraComponent`는 Entity를 추적하여 카메라의 위치와 동작을 제어하는 컴포넌트입니다. 이 컴포넌트는 카메라의 추적 로직(DeadZone, SoftZone 등), 화면 제한 영역, 줌 비율, 그리고 카메라 흔들림 효과를 제공합니다. 두 개 이상의 카메라 간의 화면 전환이 필요한 경우 `CameraService`를 사용해야 합니다. ## 1. 개념 설명 `CameraComponent`는 카메라가 대상 Entity를 어떻게 바라볼지 정의하는 파라미터들을 포함합니다. 주요 동작 원리 [original] | Entity를 바라보는 카메라 기능을 제공합니다. 카메라 간 화면 전환은 CameraService를 이용하세요. # Properties - **Vector2 CameraOffset** 카메라의 위치를 설정합니다. 월드 좌표 기준입니다. - **boolean ConfineCameraArea** 카메라가 비추는 범위를 맵의 발판 영역으로만 제한합니다. - **Vector2 Damping** 카메라가 대상을 추적하는 동안 대상이 SoftZone에 들어갈 때 카메라가 반응하는 속도를 조정합니다. 값이 작을수록 더욱 더 빠르게 [chunk_id] | Components:351:0
[task] | diverse_qa [title] | ChatBalloonComponent [category] | Components [rephrased] | 질문: 위 코드의 주된 목적은 무엇인가요? 답변: 일정 간격마다 NPC가 무작위로 선택된 대사를 말풍선(ChatBalloon)으로 출력하도록 만드는 것입니다. 질문: `OnBeginPlay` 메서드가 실행되는 공간은 어디인가요? 답변: 서버 전용 공간(`[server only]`)에서 실행됩니다. 질문: 코드에서 NPC의 대사가 저장된 테이블 이름은 무엇인가요? 답변: `npcTalks` 입니다. 질문: `setMessage` 함수 내에서 대사를 선택할 때 어떤 유틸리티를 사용하나요? 답변: `_UtilLogic:RandomI [original] | 다음은 일정 간격마다 대사를 말하는 NPC를 만드는 예제입니다. ChatBalloon이 출력되는 간격에 맞추어 대사를 교체해 줍니다. ```lua Method: [server only] void OnBeginPlay () { local chatBalloon = self.Entity.ChatBalloonComponent local npcTalks = {} table.insert(npcTalks, "NPC Talk 1") table.insert(npcTalks, "NPC Talk 2") table.insert(npcTa [chunk_id] | Components:356:1
[task] | knowledge_list [title] | InventoryComponent [category] | Components [rephrased] | 1. `InventoryComponent`는 인벤토리에 아이템이 추가, 제거되거나 변경 사항이 생기면 해당하는 이벤트를 발생시킵니다. 2. `_ItemService:CreateItem` 함수를 호출하여 인벤토리에 아이템이 추가될 때 `InventoryItemAddedEvent` 이벤트가 발생합니다. 3. `_ItemService:RemoveItem` 함수를 호출하여 인벤토리에서 아이템이 제거될 때 `InventoryItemRemovedEvent` 이벤트가 발생합니다. 4. `InventoryItemAddedEvent`와 `Inven [original] | 인벤토리에 아이템이 추가, 제거되거나 변경 사항이 생기면 `InventoryComponent`는 해당하는 이벤트를 발생시킵니다. `ItemService`의 예제 코드를 예시로 각 이벤트의 호출 시점을 살펴보면 다음과 같습니다. ```lua Event Handler: [self] HandleTriggerEnterEvent (TriggerEnterEvent event) { -- Parameters local TriggerBodyEntity = event.TriggerBodyEntity ------------------------ [chunk_id] | Components:357:1
[task] | distill [title] | InventoryComponent [category] | Components [rephrased] | # InventoryComponent 인벤토리는 세션 종료 후에도 유지되며, 게임 입장 시 `InventoryItemInitEvent`를 통해 초기 아이템 목록을 조회합니다. ## 이벤트 핸들러 ### HandleInventoryItemInitEvent 게임 입장 시 발생하며 현재 인벤토리의 아이템 목록을 제공합니다. ```lua Event Handler: [self] HandleInventoryItemInitEvent (InventoryItemInitEvent event) { local Entity = event.E [original] | ```lua Event Handler: [self] HandleInventoryItemModifiedEvent (InventoryItemModifiedEvent event) { -- Parameters local Entity = event.Entity local Items = event.Items -------------------------------------------------------- if self:IsServer() then return end log ("[Give Item]") } ``` [chunk_id] | Components:357:2
[task] | wikipedia [title] | InventoryComponent [category] | Components [rephrased] | # InventoryComponent **InventoryComponent**는 엔티티가 소유한 아이템들을 관리하기 위한 컴포넌트입니다. 이 컴포넌트는 인벤토리의 상태와 아이템 목록을 조회하는 메서드를 제공하며, 아이템의 추가·초기화·수정·제거 시점에 특정 이벤트를 발생시킵니다. ## 속성(Properties) InventoryComponent는 자체 속성인 `IsInitialized`를 가지며, Component 베이스 클래스에서 상속된 속성들도 함께 제공합니다. `IsInitialized`는 읽기 전용(`ReadOnly` [original] | 소유한 아이템들을 관리하는 컴포넌트입니다. # Properties - **boolean IsInitialized [ReadOnly] [HideFromInspector]** 인벤토리의 초기화가 완료 여부를 확인합니다. 초기화된 이후 InventoryComponent 관련 기능이 정상 작동하게 됩니다. ##### inherited from Component: - **boolean Enable [Sync]** 컴포넌트 활성화 여부를 확인합니다. - **boolean EnableInHierarchy [ReadOnly] [Hi [chunk_id] | Components:357:0
[task] | diverse_qa [title] | InventoryComponent [category] | Components [rephrased] | 질문: InventoryComponent의 주요 역할은 무엇인가요? 답변: InventoryComponent는 소유한 아이템들을 관리하는 컴포넌트입니다. 질문: InventoryComponent에서 인벤토리의 초기화 완료 여부를 확인하기 위해 사용하는 프로퍼티는 무엇인가요? 답변: boolean 타입의 IsInitialized 프로퍼티를 사용합니다. 질문: IsInitialized 프로퍼티의 접근 권한은 어떻게 설정되어 있나요? 답변: ReadOnly(읽기 전용)와 HideFromInspector(인스펙터에서 숨김) 속성이 적용 [original] | 소유한 아이템들을 관리하는 컴포넌트입니다. # Properties - **boolean IsInitialized [ReadOnly] [HideFromInspector]** 인벤토리의 초기화가 완료 여부를 확인합니다. 초기화된 이후 InventoryComponent 관련 기능이 정상 작동하게 됩니다. ##### inherited from Component: - **boolean Enable [Sync]** 컴포넌트 활성화 여부를 확인합니다. - **boolean EnableInHierarchy [ReadOnly] [Hi [chunk_id] | Components:357:0
[task] | knowledge_list [title] | InventoryComponent [category] | Components [rephrased] | ```lua -- 문서: [Components] InventoryComponent -- 아래는 문서에 명시된 정보만을 바탕으로 한 핵심 사실 목록입니다. ``` 1. `InventoryComponent`는 엔티티가 소유한 아이템들을 관리하는 역할을 하는 컴포넌트입니다. 2. `IsInitialized` 속성은 `[ReadOnly]` 및 `[HideFromInspector]` 플래그를 가진 `boolean` 타입이며, 인벤토리 초기화 완료 여부를 확인하는 데 사용되고 이 상태가 true가 된 이후에야 `InventoryCompone [original] | 소유한 아이템들을 관리하는 컴포넌트입니다. # Properties - **boolean IsInitialized [ReadOnly] [HideFromInspector]** 인벤토리의 초기화가 완료 여부를 확인합니다. 초기화된 이후 InventoryComponent 관련 기능이 정상 작동하게 됩니다. ##### inherited from Component: - **boolean Enable [Sync]** 컴포넌트 활성화 여부를 확인합니다. - **boolean EnableInHierarchy [ReadOnly] [Hi [chunk_id] | Components:357:0
[task] | distill [title] | InventoryComponent [category] | Components [rephrased] | # InventoryComponent 인벤토리에 아이템이 추가·제거·변경되면 해당 이벤트를 발생시킵니다. ## 이벤트 발생 시점 | 이벤트 | 발생 조건 | | :--- | :--- | | `InventoryItemAddedEvent` | `_ItemService:CreateItem` 호출로 아이템 추가 시 | | `InventoryItemRemovedEvent` | `_ItemService:RemoveItem` 호출로 아이템 제거 시 | | `InventoryItemModifiedEvent` | `ItemCount` 변경, [original] | 인벤토리에 아이템이 추가, 제거되거나 변경 사항이 생기면 `InventoryComponent`는 해당하는 이벤트를 발생시킵니다. `ItemService`의 예제 코드를 예시로 각 이벤트의 호출 시점을 살펴보면 다음과 같습니다. ```lua Event Handler: [self] HandleTriggerEnterEvent (TriggerEnterEvent event) { -- Parameters local TriggerBodyEntity = event.TriggerBodyEntity ------------------------ [chunk_id] | Components:357:1
[task] | wikipedia [title] | ChatBalloonComponent [category] | Components [rephrased] | `ChatBalloonComponent`는 맵에서 말풍선을 표시하고 관련된 시각적·기능적 설정을 관리하기 위해 사용되는 컴포넌트입니다. 이 컴포넌트는 텍스트 내용, 색상, 크기, 위치, 표시 시간, 자동 표시 동작, 채팅 연동, 번역 및 금칙어 필터링 등 다양한 옵션을 제공합니다. ### 프로퍼티(Properties) `ChatBalloonComponent`는 다음과 같은 고유 프로퍼티를 가지며, 각 프로퍼티는 `[Sync]`(클라이언트-서버 동기화), `[MakerOnly]`(메이커 전용), `[ReadOnly]`(읽기 전용) [original] | 말풍선을 표시해주고 관련 기능을 설정할 수 있는 기능을 제공합니다. # Properties - **boolean AllowAutomaticTranslation [MakerOnly]** Message 프로퍼티 값의 자동 번역 여부를 설정합니다. - **boolean ArrowChatEnabled [Sync]** 말풍선 꼬리 이미지를 제공 여부를 설정합니다. - **boolean AutoShowEnabled [Sync]** 말풍선이 자동으로 나타나게 할지 여부를 설정합니다. 값이 true일 경우 ShowDuration 동 [chunk_id] | Components:356:0
[task] | extract_knowledge [title] | ChatBalloonComponent [category] | Components [rephrased] | # ChatBalloonComponent 활용: 반복 대사 출력 ## 개념 설명 `ChatBalloonComponent`는 엔티티에 말풍선을 표시하는 컴포넌트입니다. 이 컴포넌트에는 `Message`(표시할 텍스트), `ShowDuration`(표시 지속 시간), `HideDuration`(숨김 지속 시간) 속성이 존재합니다. 일정 간격으로 NPC가 대사를 바꾸는 로직을 구현할 때, `ShowDuration`과 `HideDuration`의 합을 기준으로 타이머를 설정하면 말풍선의 출력 주기와 대사 교체가 일치합니다. ## API [original] | 다음은 일정 간격마다 대사를 말하는 NPC를 만드는 예제입니다. ChatBalloon이 출력되는 간격에 맞추어 대사를 교체해 줍니다. ```lua Method: [server only] void OnBeginPlay () { local chatBalloon = self.Entity.ChatBalloonComponent local npcTalks = {} table.insert(npcTalks, "NPC Talk 1") table.insert(npcTalks, "NPC Talk 2") table.insert(npcTa [chunk_id] | Components:356:1
[task] | knowledge_list [title] | InventoryComponent [category] | Components [rephrased] | 제시된 원문과 mLua 규칙에 기반하여 `InventoryComponent`의 핵심 사실을 추출한 목록입니다. 1. `InventoryComponent`는 `[self]` 스코프의 이벤트 핸들러 `HandleInventoryItemModifiedEvent`를 제공하며, 매개변수로 `InventoryItemModifiedEvent` 타입의 `event` 객체를 받습니다. 2. `InventoryItemModifiedEvent` 객체의 `event.Entity` 프로퍼티는 수정된 아이템을 가진 `Entity`를 반환하며, `event [original] | ```lua Event Handler: [self] HandleInventoryItemModifiedEvent (InventoryItemModifiedEvent event) { -- Parameters local Entity = event.Entity local Items = event.Items -------------------------------------------------------- if self:IsServer() then return end log ("[Give Item]") } ``` [chunk_id] | Components:357:2
[task] | wikipedia [title] | InventoryComponent [category] | Components [rephrased] | # InventoryComponent `InventoryComponent`는 캐릭터의 인벤토리를 관리하는 컴포넌트입니다. 가장 중요한 특징은 인벤토리 데이터가 서버에 저장되어 게임에서 나가거나 재접속해도 그 내용이 유지된다는 점입니다. 따라서 클라이언트는 게임에 최초 입장할 때 현재 인벤토리 상태를 조회하여 UI 등을 초기화해야 합니다. ## 동작 방식 인벤토리 데이터는 게임 입장 시점에 클라이언트로 동기화됩니다. 이 시점에 발생하는 `InventoryItemInitEvent` 이벤트를 처리하여 아이템 목록을 가져올 수 있습니 [original] | ```lua Event Handler: [self] HandleInventoryItemModifiedEvent (InventoryItemModifiedEvent event) { -- Parameters local Entity = event.Entity local Items = event.Items -------------------------------------------------------- if self:IsServer() then return end log ("[Give Item]") } ``` [chunk_id] | Components:357:2
[task] | knowledge_list [title] | ChatBalloonComponent [category] | Components [rephrased] | ChatBalloonComponent 문서에 명시된 핵심 사실 목록입니다. 1. `AllowAutomaticTranslation`은 `[MakerOnly]` 속성이며 타입이 `boolean`인 프로퍼티로, `Message` 프로퍼티 값의 자동 번역 여부를 설정합니다. 2. `ArrowChatEnabled`은 `[Sync]` 속성이며 타입이 `boolean`인 프로퍼티로, 말풍선 꼬리 이미지를 제공 여부를 설정합니다. 3. `AutoShowEnabled`은 `[Sync]` 속성이며 타입이 `boolean`인 프로퍼티로, 값이 `tr [original] | 말풍선을 표시해주고 관련 기능을 설정할 수 있는 기능을 제공합니다. # Properties - **boolean AllowAutomaticTranslation [MakerOnly]** Message 프로퍼티 값의 자동 번역 여부를 설정합니다. - **boolean ArrowChatEnabled [Sync]** 말풍선 꼬리 이미지를 제공 여부를 설정합니다. - **boolean AutoShowEnabled [Sync]** 말풍선이 자동으로 나타나게 할지 여부를 설정합니다. 값이 true일 경우 ShowDuration 동 [chunk_id] | Components:356:0
[task] | wikipedia [title] | InventoryComponent [category] | Components [rephrased] | # InventoryComponent `InventoryComponent`는 엔티티의 인벤토리 상태가 변경될 때 특정 이벤트를 발생시키는 컴포넌트입니다. 구체적으로 인벤토리에 아이템이 추가되거나 제거되며, 아이템의 속성이 수정될 때 해당 이벤트가 트리거됩니다. ## 이벤트 발생 시나리오 인벤토리 상태 변경에 따른 이벤트 발생 시점을 이해하기 위해, `ItemService`를 이용한 아이템 생성 및 제거 로직과 이를 감지하는 이벤트 핸들러의 관계를 살펴볼 수 있습니다. ### 1. 아이템 추가 및 제거 시 이벤트 `_Item [original] | 인벤토리에 아이템이 추가, 제거되거나 변경 사항이 생기면 `InventoryComponent`는 해당하는 이벤트를 발생시킵니다. `ItemService`의 예제 코드를 예시로 각 이벤트의 호출 시점을 살펴보면 다음과 같습니다. ```lua Event Handler: [self] HandleTriggerEnterEvent (TriggerEnterEvent event) { -- Parameters local TriggerBodyEntity = event.TriggerBodyEntity ------------------------ [chunk_id] | Components:357:1
[task] | diverse_qa [title] | InventoryComponent [category] | Components [rephrased] | 질문: `InventoryComponent`에서 인벤토리 아이템이 수정되었을 때 발생하는 이벤트 핸들러의 이름은 무엇인가요? 답변: `HandleInventoryItemModifiedEvent`입니다. 질문: `HandleInventoryItemModifiedEvent` 핸들러가 실행될 때, 서버 환경에서 함수는 어떻게 동작하나요? 답변: `self:IsServer()`가 참인 경우 즉시 `return`하여 나머지 로직을 실행하지 않습니다. 질문: 인벤토리는 게임을 나가도 유지되나요? 답변: 네, 인벤토리는 게임을 나가도 계속 [original] | ```lua Event Handler: [self] HandleInventoryItemModifiedEvent (InventoryItemModifiedEvent event) { -- Parameters local Entity = event.Entity local Items = event.Items -------------------------------------------------------- if self:IsServer() then return end log ("[Give Item]") } ``` [chunk_id] | Components:357:2
[task] | extract_knowledge [title] | ChatBalloonComponent [category] | Components [rephrased] | # ChatBalloonComponent `ChatBalloonComponent`는 엔티티 위에 말풍선을 표시하고, 그 외형(크기, 색상, 위치) 및 동작(자동 표시, 채팅 연동, 번역)을 제어하기 위한 컴포넌트입니다. ## 1. 개념 설명 말풍선 컴포넌트는 기본적으로 `Message` 속성에 지정된 문자열을 화면에 렌더링합니다. 이 컴포넌트는 다음과 같은 세 가지 주요 동작 모드를 지원합니다. 1. **정적 표시:** `Message`에 값이 존재하는 한 말풍선이 계속 표시됩니다. 2. **자동 반복 표시:** `Aut [original] | 말풍선을 표시해주고 관련 기능을 설정할 수 있는 기능을 제공합니다. # Properties - **boolean AllowAutomaticTranslation [MakerOnly]** Message 프로퍼티 값의 자동 번역 여부를 설정합니다. - **boolean ArrowChatEnabled [Sync]** 말풍선 꼬리 이미지를 제공 여부를 설정합니다. - **boolean AutoShowEnabled [Sync]** 말풍선이 자동으로 나타나게 할지 여부를 설정합니다. 값이 true일 경우 ShowDuration 동 [chunk_id] | Components:356:0
[task] | extract_knowledge [title] | InventoryComponent [category] | Components [rephrased] | # InventoryComponent `InventoryComponent`는 엔티티가 소유한 아이템 목록을 관리하기 위한 컴포넌트입니다. 이 컴포넌트를 통해 아이템의 추가, 수정, 제거 상태를 추적하고, 현재 보유하고 있는 아이템 데이터를 조회할 수 있습니다. ## 1. 개념 설명 `InventoryComponent`는 초기화 과정이 존재합니다. 컴포넌트가 활성화되더라도 초기화가 완료되기 전에는 아이템 관련 기능(`GetItemList` 등)을 정상적으로 사용할 수 없습니다. 초기화 완료 여부는 `IsInitialized` 프 [original] | 소유한 아이템들을 관리하는 컴포넌트입니다. # Properties - **boolean IsInitialized [ReadOnly] [HideFromInspector]** 인벤토리의 초기화가 완료 여부를 확인합니다. 초기화된 이후 InventoryComponent 관련 기능이 정상 작동하게 됩니다. ##### inherited from Component: - **boolean Enable [Sync]** 컴포넌트 활성화 여부를 확인합니다. - **boolean EnableInHierarchy [ReadOnly] [Hi [chunk_id] | Components:357:0
[task] | extract_knowledge [title] | TouchReceiveComponent [category] | Components [rephrased] | # TouchReceiveComponent: 엔티티 터치 및 이동 처리 `TouchReceiveComponent`는 클라이언트에서 플레이어가 엔티티를 터치하고 그 위치를 따라 이동시키는 동작을 처리하기 위해 사용됩니다. 이 컴포넌트는 터치 이벤트(`TouchEvent`, `TouchHoldEvent`, `TouchReleaseEvent`)를 수신하여, 터치된 화면 좌표를 월드 좌표로 변환한 뒤 해당 엔티티의 `WorldPosition`을 갱신합니다. ## 개념 설명 이 컴포넌트는 멀티터치 환경을 고려하여 설계되었습니다. 1. [original] | 플레이어가 엔티티를 터치하고 이동시키는 예제입니다. `TouchReceiveComponent`가 엔티티에 추가되어야 합니다. ```lua Property: [None] table<integer> Index [None] any Handler = nil Method: [client] void Move (any screenholdEvent) { local touchId = screenholdEvent.TouchId local touchPoint = screenholdEvent.TouchPoint local string f [chunk_id] | Components:353:1
[task] | distill [title] | MapComponent [category] | Components [rephrased] | # MapComponent 맵을 관리하고 고유 속성을 변경하는 컴포넌트입니다. ## Properties - **float AirAccelerationXFactor**: `RigidbodyComponent` 엔티티의 공중 X축 가속도를 보정합니다. 값 증가 시 공중 이동 속도 증가. - **float AirDecelerationXFactor**: 공중 상태에서 입력이 없을 때 `RigidbodyComponent` 엔티티의 X축 감속률을 보정합니다. - **float FallSpeedMaxXFactor**: `RigidbodyCo [original] | 맵을 관리하고, 맵의 고유 속성들을 변경할 수 있습니다. # Properties - **float AirAccelerationXFactor** 맵 내에 RigidbodyComponent를 가진 엔티티의 공중에서의 속도를 보정합니다. 값이 증가할수록 공중에서의 속도가 빨라집니다. - **float AirDecelerationXFactor** 맵 내에 RigidbodyComponent를 가진 엔티티가 공중에 있을 때, 입력이 없으면 X축 이동 속도가 얼마나 빠르게 멈추는지를 보정합니다. - **float FallSpeedMa [chunk_id] | Components:358:0
[task] | distill [title] | YoutubePlayerCommonComponent [category] | Components [rephrased] | # YoutubePlayerCommonComponent YouTube 영상 재생 기능을 제공하며, `YoutubePlayerWorldComponent`와 `YoutubePlayerGUIComponent`의 부모 컴포넌트입니다. ## Properties | 이름 | 타입 | 속성 | 설명 | | :--- | :--- | :--- | :--- | | `Loop` | `boolean` | | 반복 재생 여부 | | `PlayOnAwake` | `boolean` | | 월드 시작 시 재생 여부 | | `PlaySpeed` | `flo [original] | Youtube 영상을 재생하는 기능을 제공합니다. YoutubePlayerWorldComponent와 YoutubePlayerGUIComponent의 부모 컴포넌트입니다. # Properties - **boolean Loop** 영상의 반복 재생 여부를 설정합니다. - **boolean PlayOnAwake** 월드 시작 시 영상 재생 여부를 설정합니다. - **float PlaySpeed [Sync]** 영상의 재생 속도를 설정합니다. 0.5부터 3 사이의 값을 사용할 수 있습니다. - **boolean Shuffl [chunk_id] | Components:359:0
[task] | diverse_qa [title] | InventoryComponent [category] | Components [rephrased] | 질문: `InventoryComponent`는 어떤 상황에서 이벤트를 발생시킵니까? 답변: 인벤토리에 아이템이 추가, 제거되거나 변경 사항이 생기면 `InventoryComponent`는 해당하는 이벤트를 발생시킵니다. 질문: `_ItemService:CreateItem` 함수 호출 시 발생되는 이벤트의 이름은 무엇입니까? 답변: `InventoryItemAddedEvent` 이벤트가 발생합니다. 질문: `_ItemService:RemoveItem` 함수 호출 시 발생되는 이벤트의 이름은 무엇입니까? 답변: `InventoryI [original] | 인벤토리에 아이템이 추가, 제거되거나 변경 사항이 생기면 `InventoryComponent`는 해당하는 이벤트를 발생시킵니다. `ItemService`의 예제 코드를 예시로 각 이벤트의 호출 시점을 살펴보면 다음과 같습니다. ```lua Event Handler: [self] HandleTriggerEnterEvent (TriggerEnterEvent event) { -- Parameters local TriggerBodyEntity = event.TriggerBodyEntity ------------------------ [chunk_id] | Components:357:1
[task] | extract_knowledge [title] | InventoryComponent [category] | Components [rephrased] | # InventoryComponent: 인벤토리 상태 관리 ## 1. 개념 설명 `InventoryComponent`는 엔티티의 아이템 보유 상태를 관리하는 컴포넌트입니다. 가장 중요한 특징은 **인벤토리 데이터가 게임 세션 종료 후에도 서버 측에서 영구적으로 유지된다**는 점입니다. 따라서 클라이언트는 로컬 캐시에 의존하기보다, 서버로부터 동기화된 데이터를 이벤트로 수신하여 UI를 업데이트하는 방식으로 동작해야 합니다. ## 2. API 사용법 인벤토리 상태를 파악하기 위해 두 가지 주요 이벤트 핸들러를 정의합니다. ### [original] | ```lua Event Handler: [self] HandleInventoryItemModifiedEvent (InventoryItemModifiedEvent event) { -- Parameters local Entity = event.Entity local Items = event.Items -------------------------------------------------------- if self:IsServer() then return end log ("[Give Item]") } ``` [chunk_id] | Components:357:2