From 7de6e2b3981739f98fd4091f21c6a23179b27d3f Mon Sep 17 00:00:00 2001 From: rainylinjing-reboot Date: Thu, 25 Jun 2026 17:37:27 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=95=EB=A6=AC=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/01_Scenes/Cave_Test_2.unity | 4 +- .../01_Scenes/Cave_Test_2/LightingData.asset | 3 + .../Cave_Test_2/LightingData.asset.meta | 8 ++ .../Cave_Test_2/ReflectionProbe-0.exr | 3 + .../Cave_Test_2/ReflectionProbe-0.exr.meta | 130 ++++++++++++++++++ Assets/02_Scripts/Cave/RaftStartManager.cs | 60 ++++++-- Assets/02_Scripts/Cave/RhinoObstacle.cs | 37 +++-- .../DialogGraph/Cave/Fairy_CaveEnd.wdg | 18 +-- .../DialogGraph/Cave/Fairy_CaveStart.wdg | 4 +- .../Fonts/Pretendard-Black SDF.asset | 4 +- ProjectSettings/ProjectSettings.asset | 4 +- 11 files changed, 236 insertions(+), 39 deletions(-) create mode 100644 Assets/01_Scenes/Cave_Test_2/LightingData.asset create mode 100644 Assets/01_Scenes/Cave_Test_2/LightingData.asset.meta create mode 100644 Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr create mode 100644 Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr.meta diff --git a/Assets/01_Scenes/Cave_Test_2.unity b/Assets/01_Scenes/Cave_Test_2.unity index f66b280b..c85282d1 100644 --- a/Assets/01_Scenes/Cave_Test_2.unity +++ b/Assets/01_Scenes/Cave_Test_2.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c0f1af38d7578c9219f8ae64174728e566c1ccd4455a5cd836f8f1b9f557081 -size 1077527 +oid sha256:b69db926aa7e4b8405257b3c71f939c5b153ccae8a4455bdc0f55cc8f1e0e285 +size 1095465 diff --git a/Assets/01_Scenes/Cave_Test_2/LightingData.asset b/Assets/01_Scenes/Cave_Test_2/LightingData.asset new file mode 100644 index 00000000..f88dcf52 --- /dev/null +++ b/Assets/01_Scenes/Cave_Test_2/LightingData.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77e72e16419b284faf6fc6eea6a144e956f4a1bd9e3c02c3b9ca48087c585a11 +size 17729 diff --git a/Assets/01_Scenes/Cave_Test_2/LightingData.asset.meta b/Assets/01_Scenes/Cave_Test_2/LightingData.asset.meta new file mode 100644 index 00000000..9b1862c4 --- /dev/null +++ b/Assets/01_Scenes/Cave_Test_2/LightingData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 17248e2bc05120241a44ab242798f420 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 112000000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr b/Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr new file mode 100644 index 00000000..7b17999c --- /dev/null +++ b/Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:851923ee0f3a6b2e79a84d2fab33df0cbb1b83b4f8566da70b84f264eb1d614b +size 226484 diff --git a/Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr.meta b/Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr.meta new file mode 100644 index 00000000..a121247d --- /dev/null +++ b/Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 5db04a33a65f26046bff20864f807211 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 1 + seamlessCubemap: 1 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 100 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/02_Scripts/Cave/RaftStartManager.cs b/Assets/02_Scripts/Cave/RaftStartManager.cs index 18091d65..4db4f065 100644 --- a/Assets/02_Scripts/Cave/RaftStartManager.cs +++ b/Assets/02_Scripts/Cave/RaftStartManager.cs @@ -41,6 +41,7 @@ private enum StartState private StartState state = StartState.Ready; private Coroutine startRoutine; + private bool areRhinosRunning; private void Start() { @@ -49,15 +50,19 @@ private void Start() private void Update() { - if (state != StartState.WaitingForKeyGrab) - return; - - if (!waitForKeyGrab) - return; - - if (steeringKey != null && steeringKey.IsGrabbed) + if (state == StartState.WaitingForKeyGrab) { - BeginRaftRide(); + if (waitForKeyGrab && steeringKey != null && steeringKey.IsGrabbed) + { + BeginRaftRide(); + } + + return; + } + + if (state == StartState.Starting || state == StartState.Riding) + { + SyncRhinosWithSteeringKey(); } } @@ -78,7 +83,7 @@ private void SetupStartState() raftHealth.ResetHealth(); } - StopAllRhinos(); + SetRhinosRunning(false, true); if (fairyObject != null) { @@ -135,7 +140,7 @@ private IEnumerator StartRaftSmoothly() raftController.SetSpeedMultiplier(0f); raftController.ResumeRaft(); - StartAllRhinos(); + SyncRhinosWithSteeringKey(true); if (showDebugLog) { @@ -160,6 +165,7 @@ private IEnumerator StartRaftSmoothly() raftController.SetSpeedMultiplier(1f); state = StartState.Riding; + SyncRhinosWithSteeringKey(true); if (showDebugLog) { @@ -179,7 +185,7 @@ public void OnRaftArrived() raftController.SetSpeedMultiplier(0f); } - StopAllRhinos(); + SetRhinosRunning(false, true); if (showDebugLog) { @@ -200,7 +206,7 @@ public void OnRaftFailed() raftController.SetSpeedMultiplier(0f); } - StopAllRhinos(); + SetRhinosRunning(false, true); if (showDebugLog) { @@ -208,6 +214,36 @@ public void OnRaftFailed() } } + private void SyncRhinosWithSteeringKey(bool force = false) + { + SetRhinosRunning(ShouldRhinosRunForCurrentInput(), force); + } + + private bool ShouldRhinosRunForCurrentInput() + { + if (!waitForKeyGrab) + return true; + + return steeringKey != null && steeringKey.IsGrabbed; + } + + private void SetRhinosRunning(bool shouldRun, bool force = false) + { + if (!force && areRhinosRunning == shouldRun) + return; + + if (shouldRun) + { + StartAllRhinos(); + } + else + { + StopAllRhinos(); + } + + areRhinosRunning = shouldRun; + } + private void StartAllRhinos() { if (rhinos == null) diff --git a/Assets/02_Scripts/Cave/RhinoObstacle.cs b/Assets/02_Scripts/Cave/RhinoObstacle.cs index b6a3e417..f23fe42a 100644 --- a/Assets/02_Scripts/Cave/RhinoObstacle.cs +++ b/Assets/02_Scripts/Cave/RhinoObstacle.cs @@ -33,6 +33,8 @@ public class RhinoObstacle : MonoBehaviour [SerializeField] private bool startAutomatically = true; [SerializeField] private bool loop = true; [SerializeField] private bool showDebugLog = true; + [SerializeField] private bool showLifecycleDebugLog = false; + [SerializeField] private bool showRoutineDebugLog = false; private Coroutine routine; private bool isRunning; @@ -82,19 +84,25 @@ private void ResolveReferences() public void StartRhino() { + if (isRunning && routine != null) + return; + if (routine != null) { StopCoroutine(routine); + routine = null; } isRunning = true; routine = StartCoroutine(RhinoRoutine()); - Log("시작"); + Log("Start"); } public void StopRhino() { + bool wasActive = isRunning || routine != null || isSurfaced; + isRunning = false; if (routine != null) @@ -107,7 +115,10 @@ public void StopRhino() ForceIdleAnimation(); MoveImmediatelyToUnderwater(); - Log("정지"); + if (wasActive) + { + Log("Stop"); + } } private IEnumerator RhinoRoutine() @@ -120,7 +131,7 @@ private IEnumerator RhinoRoutine() ForceIdleAnimation(); float hiddenWait = Random.Range(minHiddenTime, maxHiddenTime); - Log($"물속 대기 {hiddenWait:0.0}초"); + LogRoutine($"물속 대기 {hiddenWait:0.0}초"); yield return new WaitForSeconds(hiddenWait); @@ -128,7 +139,7 @@ private IEnumerator RhinoRoutine() break; // 2. 수면 위로 떠오름 - Log("떠오름 시작"); + LogRoutine("떠오름 시작"); yield return MoveToSurface(); if (!isRunning) @@ -139,7 +150,7 @@ private IEnumerator RhinoRoutine() SetDamageActive(true); ForceIdleAnimation(); - Log("수면 위 도착 / 데미지 콜라이더 ON"); + LogRoutine("수면 위 도착 / 데미지 콜라이더 ON"); yield return new WaitForSeconds(surfaceIdleTime); @@ -147,13 +158,13 @@ private IEnumerator RhinoRoutine() break; // 4. 공격 실행 - Log("공격 시작"); + LogRoutine("공격 시작"); PlayHitAnimation(); yield return new WaitForSeconds(attackStayTime); // 5. 공격 종료 후 Idle 복귀 - Log("공격 종료 / Idle 복귀"); + LogRoutine("공격 종료 / Idle 복귀"); ForceIdleAnimation(); if (!isRunning) @@ -163,7 +174,7 @@ private IEnumerator RhinoRoutine() isSurfaced = false; SetDamageActive(false); - Log("잠수 시작 / 데미지 콜라이더 OFF"); + LogRoutine("잠수 시작 / 데미지 콜라이더 OFF"); yield return MoveToUnderwater(); if (!loop) @@ -228,7 +239,7 @@ private IEnumerator MoveToUnderwater() SetDamageActive(false); ForceIdleAnimation(); - Log("잠수 완료"); + LogRoutine("잠수 완료"); } private void PlayHitAnimation() @@ -298,7 +309,13 @@ private float Smooth01(float t) private void Log(string message) { - if (showDebugLog) + if (showDebugLog && showLifecycleDebugLog) + Debug.Log($"[RhinoObstacle] {name} / {message}"); + } + + private void LogRoutine(string message) + { + if (showDebugLog && showRoutineDebugLog) Debug.Log($"[RhinoObstacle] {name} / {message}"); } diff --git a/Assets/07_Data/Communication/DialogGraph/Cave/Fairy_CaveEnd.wdg b/Assets/07_Data/Communication/DialogGraph/Cave/Fairy_CaveEnd.wdg index 78c4111c..f6f4a62a 100644 --- a/Assets/07_Data/Communication/DialogGraph/Cave/Fairy_CaveEnd.wdg +++ b/Assets/07_Data/Communication/DialogGraph/Cave/Fairy_CaveEnd.wdg @@ -51,8 +51,8 @@ MonoBehaviour: serializedVersion: 2 x: 222 y: 76 - width: 1519 - height: 809 + width: 1531 + height: 840 m_GraphElementMetaData: - m_Guid: m_Value0: 14845512388065122572 @@ -387,7 +387,7 @@ MonoBehaviour: serializedVersion: 2 Hash: 445bb420bcd194d5ee0506886951aec8 m_Version: 2 - m_Position: {x: 1402.0514, y: 500.70782} + m_Position: {x: 1413.954, y: 532.4479} m_Title: DialogLineNode m_Tooltip: m_NodePreviewModel: @@ -544,11 +544,11 @@ MonoBehaviour: - rid: 8414246349295583493 type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} data: - m_Value: '{SpaceSceneCode1}' + m_Value: 1 - rid: 8414246349295583494 type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} data: - m_Value: '{SpaceSceneCode2}' + m_Value: 2 - rid: 8414246349295583495 type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} data: @@ -584,7 +584,7 @@ MonoBehaviour: - rid: 8414246349295583503 type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} data: - m_Value: 0 + m_Value: 1 - rid: 8414246349295583504 type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} data: @@ -592,7 +592,7 @@ MonoBehaviour: - rid: 8414246349295583505 type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} data: - m_Value: OpenDoor + m_Value: OpenDoor2 - rid: 8414246349295583506 type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} data: @@ -628,7 +628,7 @@ MonoBehaviour: - rid: 8414246349295583514 type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} data: - m_Value: 0 + m_Value: 1 - rid: 8414246349295583515 type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} data: @@ -636,7 +636,7 @@ MonoBehaviour: - rid: 8414246349295583516 type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} data: - m_Value: OpenDoor + m_Value: OpenDoor1 - rid: 8414246349295583517 type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} data: diff --git a/Assets/07_Data/Communication/DialogGraph/Cave/Fairy_CaveStart.wdg b/Assets/07_Data/Communication/DialogGraph/Cave/Fairy_CaveStart.wdg index 95e27e54..0f6b2cb9 100644 --- a/Assets/07_Data/Communication/DialogGraph/Cave/Fairy_CaveStart.wdg +++ b/Assets/07_Data/Communication/DialogGraph/Cave/Fairy_CaveStart.wdg @@ -50,7 +50,7 @@ MonoBehaviour: x: 222 y: 76 width: 1337 - height: 340 + height: 385 m_GraphElementMetaData: - m_Guid: m_Value0: 14845512388065122572 @@ -499,7 +499,7 @@ MonoBehaviour: - rid: 8414246349295583394 type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} data: - m_Value: 0 + m_Value: 1 - rid: 8414246349295583395 type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} data: diff --git a/Assets/My project/Fonts/Pretendard-Black SDF.asset b/Assets/My project/Fonts/Pretendard-Black SDF.asset index afbcf0ab..617368a4 100644 --- a/Assets/My project/Fonts/Pretendard-Black SDF.asset +++ b/Assets/My project/Fonts/Pretendard-Black SDF.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a81a06b57f04031dc553ed2a18857edbf18e5f2ef32f65f713e538f6cebf5da5 -size 7807136 +oid sha256:683f3abcb887175600cc47702f9e566c4c614b8ef41438a4c516a23b997d26c6 +size 41413216 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 03363233..6dc78805 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:87718b14f88a5f893b5f109c236d208b8984fa7985c0699ec63dccd6d60386fe -size 28113 +oid sha256:1de27f9e5533c480e264af621d2e189e40fc60ac50408f8dcb37dad696b7ccaf +size 28126