From 36cef3e1697a4f591e56dd4be9d7674883bf8bef Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Thu, 17 Jul 2025 17:55:45 +0900 Subject: [PATCH] =?UTF-8?q?DDD-56=20=EC=9D=B8=ED=84=B0=EB=9E=99=EC=85=98?= =?UTF-8?q?=20=EC=9D=B8=ED=84=B0=ED=8E=98=EC=9D=B4=EC=8A=A4=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_DDD/_Scripts/GameEvent/GameEvents.cs | 18 +++++++++++------- .../_DDD/_Scripts/GameEvent/IInteractable.cs | 19 +++++++++++++++++++ .../_Scripts/GameEvent/IInteractable.cs.meta | 3 +++ .../RestaurantCharacter.cs | 2 +- 4 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 Assets/_DDD/_Scripts/GameEvent/IInteractable.cs create mode 100644 Assets/_DDD/_Scripts/GameEvent/IInteractable.cs.meta diff --git a/Assets/_DDD/_Scripts/GameEvent/GameEvents.cs b/Assets/_DDD/_Scripts/GameEvent/GameEvents.cs index dfe7870c7..9f26685c4 100644 --- a/Assets/_DDD/_Scripts/GameEvent/GameEvents.cs +++ b/Assets/_DDD/_Scripts/GameEvent/GameEvents.cs @@ -1,19 +1,23 @@ +using UnityEngine; + namespace DDD { public static class GameEvents { - // public static GameGlobalEvent GameGlobalEvent = new GameGlobalEvent(); + public static InteractionEvent Interaction = new InteractionEvent(); } public static class RestaurantEvents { - + // Some events... } public static class VoyageEvents { - + // Some events... } - // public class GameGlobalEvent : IEvent - // { - // } -} \ No newline at end of file + public class InteractionEvent : IEvent + { + public GameObject Causer; + public GameObject Target; + } +} diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs new file mode 100644 index 000000000..996cc1b1c --- /dev/null +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace DDD +{ + public enum InteractionType + { + Default + } + public interface IInteractable + { + bool CanInteract(); + void OnInteracted(IInteractor interactor); + } + public interface IInteractor + { + void TryInteract(InteractionType interactionType); + } +} diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs.meta b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs.meta new file mode 100644 index 000000000..aa2a410ad --- /dev/null +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c48ae2ea4843400db1de4d513313073b +timeCreated: 1752741040 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacter.cs index 137576147..6132a124e 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacter.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacter.cs @@ -1,9 +1,9 @@ +using NUnit.Framework; using UnityEngine; namespace DDD { public class RestaurantCharacter : MonoBehaviour, IGameCharacter { - } } \ No newline at end of file