diff --git a/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab b/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab index 846a0e7e4..136bcb435 100644 --- a/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab +++ b/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab @@ -106,6 +106,7 @@ MonoBehaviour: _interactionType: 2 _holdTime: 1.3 _interactionMessageKey: Test + _interactionAvailableFlows: 1 --- !u!114 &3538352761187622062 MonoBehaviour: m_ObjectHideFlags: 0 @@ -318,3 +319,31 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f0feb22ab60a4d1885271637838f43b9, type: 3} m_Name: m_EditorClassIdentifier: + _availableStyle: + Color: {r: 1, g: 1, b: 1, a: 1} + Width: 1 + Opacity: 1 + _focusedStyle: + Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + Width: 1 + Opacity: 1 + _unavailableStyle: + Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + Width: 0.5 + Opacity: 1 + _objectiveStyle: + Color: {r: 0, g: 1, b: 1, a: 1} + Width: 1 + Opacity: 1 + _breathingSpeed: 2 + _breathingRange: 0.3 + _enableBreathingEffect: 1 + _alphaCutOff: 0.5 + _combineMeshes: 1 + _constantWidth: 1 + _outlineQuality: 2 + _outlineIndependent: 1 + _outlineBlurPasses: 1 + _outlineSharpness: 8 + _currentOutlineType: 0 + _currentOpacityMultiplier: 1 diff --git a/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab b/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab index 205f4080d..608272b88 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab +++ b/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab @@ -102,6 +102,7 @@ MonoBehaviour: _interactionType: 1 _holdTime: 1 _interactionMessageKey: Test + _interactionAvailableFlows: 1 --- !u!114 &4545680930728379745 MonoBehaviour: m_ObjectHideFlags: 0 @@ -314,3 +315,31 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f0feb22ab60a4d1885271637838f43b9, type: 3} m_Name: m_EditorClassIdentifier: + _availableStyle: + Color: {r: 1, g: 1, b: 1, a: 1} + Width: 1 + Opacity: 1 + _focusedStyle: + Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + Width: 1 + Opacity: 1 + _unavailableStyle: + Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + Width: 0.5 + Opacity: 1 + _objectiveStyle: + Color: {r: 0, g: 1, b: 1, a: 1} + Width: 1 + Opacity: 1 + _breathingSpeed: 2 + _breathingRange: 0.3 + _enableBreathingEffect: 1 + _alphaCutOff: 0.5 + _combineMeshes: 1 + _constantWidth: 1 + _outlineQuality: 2 + _outlineIndependent: 1 + _outlineBlurPasses: 1 + _outlineSharpness: 8 + _currentOutlineType: 0 + _currentOpacityMultiplier: 1 diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs index eee983bff..7eb3d9b2a 100644 --- a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs @@ -16,6 +16,7 @@ public enum InteractionType : uint public interface IInteractable { bool CanInteract(); + bool IsInteractionHidden(); bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null); InteractionType GetInteractionType(); GameObject GetInteractableGameObject(); diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs index 28a990068..66a46d856 100644 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs @@ -5,12 +5,14 @@ namespace DDD { - public enum GameFlowState + [Flags] + public enum GameFlowState : uint { - None = 0, - ReadyForRestaurant = 1, - RunRestaurant = 2, - SettlementRestaurant = 3, + None = 0u, + ReadyForRestaurant = 1u, + RunRestaurant = 1u << 1, + SettlementRestaurant = 1u << 2, + All = 0xFFFFFFFFu } public class GameFlowManager : Singleton, IManager diff --git a/Assets/_DDD/_Scripts/GameFramework/PlayerManager.cs.meta b/Assets/_DDD/_Scripts/GameFramework/PlayerManager.cs.meta new file mode 100644 index 000000000..5b6eb9959 --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFramework/PlayerManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b2288040b8e34064906af9ae303801f0 +timeCreated: 1755143075 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs index 6455a7fb5..c03fa8971 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs @@ -83,6 +83,7 @@ protected IInteractable GetNearestInteractable() if (col.TryGetComponent(out var interactable) == false) continue; var type = interactable.GetInteractionType(); + if (interactable.IsInteractionHidden()) continue; if (CanSolveInteractionType(type) == false) continue; float distance = Vector3.Distance(transform.position, col.transform.position); diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/InteractableHighlight.cs b/Assets/_DDD/_Scripts/RestaurantEvent/InteractableHighlight.cs index 8c77ccd52..e8c14bba6 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/InteractableHighlight.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/InteractableHighlight.cs @@ -158,6 +158,11 @@ private InteractionOutlineType GetCurrentOutlineType() if (_interactionComponent is not IInteractable interactable) return InteractionOutlineType.None; + if (_interactionComponent.IsInteractionHidden()) + { + return InteractionOutlineType.None; + } + try { // 상호작용 불가능한 경우 diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index 0adfe0412..4fa0507b1 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -8,9 +8,18 @@ public class RestaurantInteractionComponent : MonoBehaviour, IInteractable [SerializeField] private float _holdTime = 1f; [SerializeField] private string _interactionMessageKey = ""; + [SerializeField] protected GameFlowState _interactionAvailableFlows; + public bool CanInteract() { - return true; + return !IsInteractionHidden(); + } + + public bool IsInteractionHidden() + { + var currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState; + var flowDisabled = (currentGameFlowState & _interactionAvailableFlows) == 0; + return flowDisabled; } public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null)