정리 중
This commit is contained in:
Binary file not shown.
BIN
Assets/01_Scenes/Cave_Test_2/LightingData.asset
LFS
Normal file
BIN
Assets/01_Scenes/Cave_Test_2/LightingData.asset
LFS
Normal file
Binary file not shown.
8
Assets/01_Scenes/Cave_Test_2/LightingData.asset.meta
Normal file
8
Assets/01_Scenes/Cave_Test_2/LightingData.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17248e2bc05120241a44ab242798f420
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 112000000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr
LFS
Normal file
BIN
Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr
LFS
Normal file
Binary file not shown.
130
Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr.meta
Normal file
130
Assets/01_Scenes/Cave_Test_2/ReflectionProbe-0.exr.meta
Normal file
@@ -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:
|
||||
@@ -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)
|
||||
|
||||
@@ -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}");
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user