From 46950aa8770926a50350407347914504e291d908 Mon Sep 17 00:00:00 2001 From: AlexanderT Date: Mon, 22 Sep 2025 13:56:42 +0200 Subject: [PATCH] Surfacing sequence 80% done --- Assets/Playables.meta | 8 + Assets/Playables/SurfacingTimeline.playable | 1248 +++++++++++++++++ .../Playables/SurfacingTimeline.playable.meta | 8 + .../Scenes/MiniGames/DivingForPictures.unity | 189 ++- .../DivingForPictures/DivingGameManager.cs | 65 +- .../DivingForPictures/TrenchTileSpawner.cs | 50 +- 6 files changed, 1533 insertions(+), 35 deletions(-) create mode 100644 Assets/Playables.meta create mode 100644 Assets/Playables/SurfacingTimeline.playable create mode 100644 Assets/Playables/SurfacingTimeline.playable.meta diff --git a/Assets/Playables.meta b/Assets/Playables.meta new file mode 100644 index 00000000..f6a6ecf6 --- /dev/null +++ b/Assets/Playables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c0088270c13b3a4e8ce04a3f672887d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Playables/SurfacingTimeline.playable b/Assets/Playables/SurfacingTimeline.playable new file mode 100644 index 00000000..1138b302 --- /dev/null +++ b/Assets/Playables/SurfacingTimeline.playable @@ -0,0 +1,1248 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-4039891455399305819 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d21dcc2386d650c4597f3633c75a1f98, type: 3} + m_Name: Animation Track (2) + m_EditorClassIdentifier: + m_Version: 3 + m_AnimClip: {fileID: 0} + m_Locked: 0 + m_Muted: 0 + m_CustomPlayableFullTypename: + m_Curves: {fileID: 0} + m_Parent: {fileID: 11400000} + m_Children: [] + m_Clips: [] + m_Markers: + m_Objects: [] + m_InfiniteClipPreExtrapolation: 1 + m_InfiniteClipPostExtrapolation: 1 + m_InfiniteClipOffsetPosition: {x: 0, y: 0, z: 0} + m_InfiniteClipOffsetEulerAngles: {x: 0, y: 0, z: 0} + m_InfiniteClipTimeOffset: 0 + m_InfiniteClipRemoveOffset: 0 + m_InfiniteClipApplyFootIK: 1 + mInfiniteClipLoop: 0 + m_MatchTargetFields: 63 + m_Position: {x: 0, y: 0, z: 0} + m_EulerAngles: {x: 0, y: 0, z: 0} + m_AvatarMask: {fileID: 0} + m_ApplyAvatarMask: 1 + m_TrackOffset: 0 + m_InfiniteClip: {fileID: -1120528782975220419} + m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1} + m_Rotation: {x: 0, y: 0, z: 0, w: 1} + m_ApplyOffsets: 0 +--- !u!74 &-3085705704792956194 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Recorded (1) + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0.95 + value: {x: 0, y: 0.60010004, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.0833334 + value: {x: 0, y: 0.16010022, z: 0} + inSlope: {x: 0, y: -3.2999988, z: 0} + outSlope: {x: 0, y: -3.2999988, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4833333 + value: {x: 0, y: -3.8999, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.7 + value: {x: 0, y: -3.3298998, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: 0, y: -4.5899, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.3166666 + value: {x: 0, y: -3.7998998, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5833333 + value: {x: 0, y: -4.6099, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.8166666 + value: {x: 0, y: -4.0298996, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: d39dbaae819c4a128a11ca60fbbc98c9, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: 9072050a53fc4b539f4f4716bab53c07, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: 8222f0e3aeeb4fc4975aaead6cf7afbe, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: c9c18dbd013d42ae8c221e6205e4d49c, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: d8ea29cc80524de8affe17b930cd75c1, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 60 + script: {fileID: 0} + flags: 0 + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3305885265 + script: {fileID: 11500000, guid: d39dbaae819c4a128a11ca60fbbc98c9, type: 3} + typeID: 114 + customType: 24 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3305885265 + script: {fileID: 11500000, guid: 9072050a53fc4b539f4f4716bab53c07, type: 3} + typeID: 114 + customType: 24 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3305885265 + script: {fileID: 11500000, guid: 8222f0e3aeeb4fc4975aaead6cf7afbe, type: 3} + typeID: 114 + customType: 24 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3305885265 + script: {fileID: 11500000, guid: c9c18dbd013d42ae8c221e6205e4d49c, type: 3} + typeID: 114 + customType: 24 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3305885265 + script: {fileID: 11500000, guid: d8ea29cc80524de8affe17b930cd75c1, type: 3} + typeID: 114 + customType: 24 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3305885265 + script: {fileID: 0} + typeID: 60 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.8166666 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0833334 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.7 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.3166666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.8166666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0.95 + value: 0.60010004 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0833334 + value: 0.16010022 + inSlope: -3.2999988 + outSlope: -3.2999988 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4833333 + value: -3.8999 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.7 + value: -3.3298998 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.5899 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.3166666 + value: -3.7998998 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5833333 + value: -4.6099 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.8166666 + value: -4.0298996 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0833334 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.7 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.3166666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.8166666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: d39dbaae819c4a128a11ca60fbbc98c9, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: 9072050a53fc4b539f4f4716bab53c07, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: 8222f0e3aeeb4fc4975aaead6cf7afbe, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: c9c18dbd013d42ae8c221e6205e4d49c, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: d8ea29cc80524de8affe17b930cd75c1, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.95 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 60 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] +--- !u!74 &-1120528782975220419 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Recorded (2) + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 1 + value: 6.75 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.8166666 + value: 3 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Lens.OrthographicSize + path: + classID: 114 + script: {fileID: 11500000, guid: f9dfa5b682dcd46bda6128250e975f58, type: 3} + flags: 0 + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 2514370844 + script: {fileID: 11500000, guid: f9dfa5b682dcd46bda6128250e975f58, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.8166666 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 1 + value: 6.75 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.8166666 + value: 3 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Lens.OrthographicSize + path: + classID: 114 + script: {fileID: 11500000, guid: f9dfa5b682dcd46bda6128250e975f58, type: 3} + flags: 0 + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bfda56da833e2384a9677cd3c976a436, type: 3} + m_Name: SurfacingTimeline + m_EditorClassIdentifier: + m_Version: 0 + m_Tracks: + - {fileID: 7536617106820686252} + - {fileID: 1284158391674687369} + - {fileID: -4039891455399305819} + m_FixedDuration: 0 + m_EditorSettings: + m_Framerate: 60 + m_ScenePreview: 1 + m_DurationMode: 0 + m_MarkerTrack: {fileID: 0} +--- !u!114 &1284158391674687369 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d21dcc2386d650c4597f3633c75a1f98, type: 3} + m_Name: Animation Track (1) + m_EditorClassIdentifier: + m_Version: 3 + m_AnimClip: {fileID: 0} + m_Locked: 0 + m_Muted: 0 + m_CustomPlayableFullTypename: + m_Curves: {fileID: 0} + m_Parent: {fileID: 11400000} + m_Children: [] + m_Clips: [] + m_Markers: + m_Objects: [] + m_InfiniteClipPreExtrapolation: 1 + m_InfiniteClipPostExtrapolation: 1 + m_InfiniteClipOffsetPosition: {x: 0, y: 1.24, z: 0} + m_InfiniteClipOffsetEulerAngles: {x: -0, y: 0, z: 0} + m_InfiniteClipTimeOffset: 0 + m_InfiniteClipRemoveOffset: 0 + m_InfiniteClipApplyFootIK: 1 + mInfiniteClipLoop: 0 + m_MatchTargetFields: 63 + m_Position: {x: 0, y: 0, z: 0} + m_EulerAngles: {x: 0, y: 0, z: 0} + m_AvatarMask: {fileID: 0} + m_ApplyAvatarMask: 1 + m_TrackOffset: 0 + m_InfiniteClip: {fileID: 3844679312356863604} + m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1} + m_Rotation: {x: 0, y: 0, z: 0, w: 1} + m_ApplyOffsets: 0 +--- !u!74 &3844679312356863604 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Recorded + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.8333334 + value: {x: 0, y: -9.16, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1.8333334 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.8333334 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.8333334 + value: -9.16 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.8333334 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] +--- !u!114 &7536617106820686252 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d21dcc2386d650c4597f3633c75a1f98, type: 3} + m_Name: Animation Track + m_EditorClassIdentifier: + m_Version: 3 + m_AnimClip: {fileID: 0} + m_Locked: 0 + m_Muted: 0 + m_CustomPlayableFullTypename: + m_Curves: {fileID: 0} + m_Parent: {fileID: 11400000} + m_Children: [] + m_Clips: [] + m_Markers: + m_Objects: [] + m_InfiniteClipPreExtrapolation: 1 + m_InfiniteClipPostExtrapolation: 1 + m_InfiniteClipOffsetPosition: {x: 0, y: 2.9799, z: 0} + m_InfiniteClipOffsetEulerAngles: {x: -0, y: 0, z: 0} + m_InfiniteClipTimeOffset: 0 + m_InfiniteClipRemoveOffset: 0 + m_InfiniteClipApplyFootIK: 1 + mInfiniteClipLoop: 0 + m_MatchTargetFields: 63 + m_Position: {x: 0, y: 0, z: 0} + m_EulerAngles: {x: 0, y: 0, z: 0} + m_AvatarMask: {fileID: 0} + m_ApplyAvatarMask: 1 + m_TrackOffset: 0 + m_InfiniteClip: {fileID: -3085705704792956194} + m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1} + m_Rotation: {x: 0, y: 0, z: 0, w: 1} + m_ApplyOffsets: 0 diff --git a/Assets/Playables/SurfacingTimeline.playable.meta b/Assets/Playables/SurfacingTimeline.playable.meta new file mode 100644 index 00000000..7f454016 --- /dev/null +++ b/Assets/Playables/SurfacingTimeline.playable.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5ecd3cfdb172df5439e4522c15c48f75 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/MiniGames/DivingForPictures.unity b/Assets/Scenes/MiniGames/DivingForPictures.unity index ad5edc52..8ea86f34 100644 --- a/Assets/Scenes/MiniGames/DivingForPictures.unity +++ b/Assets/Scenes/MiniGames/DivingForPictures.unity @@ -340,15 +340,15 @@ LineRenderer: m_SortingOrder: 0 m_Positions: - {x: 0, y: 4.1716814, z: 0} - - {x: -0.0011514801, y: 3.9187107, z: 0} - - {x: -0.00230296, y: 3.6922278, z: 0} - - {x: -0.0034544398, y: 3.4922323, z: 0} - - {x: -0.00460592, y: 3.3187256, z: 0} - - {x: -0.0057574, y: 3.1717062, z: 0} - - {x: -0.0069088796, y: 3.0511749, z: 0} - - {x: -0.008060359, y: 2.9571314, z: 0} - - {x: -0.00921184, y: 2.8895762, z: 0} - - {x: -0.010363319, y: 2.8485086, z: 0} + - {x: -0.0011514801, y: 3.9551861, z: 0} + - {x: -0.00230296, y: 3.757073, z: 0} + - {x: -0.0034544398, y: 3.577342, z: 0} + - {x: -0.00460592, y: 3.4159937, z: 0} + - {x: -0.0057574, y: 3.273027, z: 0} + - {x: -0.0069088796, y: 3.1484427, z: 0} + - {x: -0.008060359, y: 3.042241, z: 0} + - {x: -0.00921184, y: 2.9544215, z: 0} + - {x: -0.010363319, y: 2.884984, z: 0} - {x: -0.0115148, y: 2.833929, z: 0} m_Parameters: serializedVersion: 3 @@ -450,6 +450,7 @@ GameObject: m_Component: - component: {fileID: 224729333} - component: {fileID: 224729332} + - component: {fileID: 224729334} m_Layer: 0 m_Name: CinemachineCamera m_TagString: Untagged @@ -515,6 +516,28 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &224729334 +Animator: + serializedVersion: 7 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 224729330} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 0} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_AnimatePhysics: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 --- !u!1 &323864663 GameObject: m_ObjectHideFlags: 0 @@ -627,6 +650,10 @@ MonoBehaviour: - {fileID: 1435210811} - {fileID: 1062017697} - {fileID: 173052728} + speedTransitionDuration: 2 + surfacingSpeedFactor: 3 + surfacingSpawnDelay: 3 + surfacingTimeline: {fileID: 2064311130} --- !u!4 &424805726 Transform: m_ObjectHideFlags: 0 @@ -652,6 +679,7 @@ GameObject: m_Component: - component: {fileID: 461301697} - component: {fileID: 461301696} + - component: {fileID: 461301698} m_Layer: 0 m_Name: DivingBackground_0 m_TagString: Untagged @@ -723,12 +751,34 @@ Transform: m_GameObject: {fileID: 461301695} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1.12, z: 0} + m_LocalPosition: {x: 0, y: 1.24, z: 0} m_LocalScale: {x: 0.81438, y: 0.81438, z: 0.81438} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &461301698 +Animator: + serializedVersion: 7 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 461301695} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 0} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_AnimatePhysics: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 --- !u!1 &730962732 GameObject: m_ObjectHideFlags: 0 @@ -832,6 +882,7 @@ GameObject: - component: {fileID: 747976402} - component: {fileID: 747976403} - component: {fileID: 747976404} + - component: {fileID: 747976405} m_Layer: 0 m_Name: BottleMarine m_TagString: Player @@ -1062,6 +1113,28 @@ MonoBehaviour: blinkRate: 0.15 damageColorAlpha: 0.7 targetSpriteRenderer: {fileID: 730962734} +--- !u!95 &747976405 +Animator: + serializedVersion: 7 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 747976396} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 0} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_AnimatePhysics: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 --- !u!1 &824396214 GameObject: m_ObjectHideFlags: 0 @@ -1190,6 +1263,7 @@ MonoBehaviour: useObjectPooling: 1 initialPoolSize: 10 maxPoolSize: 30 + surfacingSpeedFactor: 0.5 --- !u!4 &1003335105 Transform: m_ObjectHideFlags: 0 @@ -1308,15 +1382,15 @@ LineRenderer: m_SortingOrder: 0 m_Positions: - {x: 0, y: 4.1716814, z: 0} - - {x: 0.036271624, y: 3.927396, z: 0} - - {x: 0.07254324, y: 3.7076683, z: 0} - - {x: 0.10881486, y: 3.5124984, z: 0} - - {x: 0.14508648, y: 3.3418865, z: 0} - - {x: 0.1813581, y: 3.195832, z: 0} - - {x: 0.21762972, y: 3.0743358, z: 0} - - {x: 0.25390133, y: 2.9773972, z: 0} - - {x: 0.29017296, y: 2.905017, z: 0} - - {x: 0.32644457, y: 2.857194, z: 0} + - {x: 0.036271624, y: 3.9653695, z: 0} + - {x: 0.07254324, y: 3.7751768, z: 0} + - {x: 0.10881486, y: 3.6011028, z: 0} + - {x: 0.14508648, y: 3.443149, z: 0} + - {x: 0.1813581, y: 3.3013139, z: 0} + - {x: 0.21762972, y: 3.1755984, z: 0} + - {x: 0.25390133, y: 3.066002, z: 0} + - {x: 0.29017296, y: 2.9725251, z: 0} + - {x: 0.32644457, y: 2.8951674, z: 0} - {x: 0.3627162, y: 2.833929, z: 0} m_Parameters: serializedVersion: 3 @@ -1848,15 +1922,15 @@ LineRenderer: m_SortingOrder: 0 m_Positions: - {x: 0, y: 4.1716814, z: 0} - - {x: -0.03339292, y: 3.9260902, z: 0} - - {x: -0.066785835, y: 3.705347, z: 0} - - {x: -0.10017875, y: 3.5094519, z: 0} - - {x: -0.13357168, y: 3.3384047, z: 0} - - {x: -0.16696459, y: 3.1922054, z: 0} - - {x: -0.20035751, y: 3.0708542, z: 0} - - {x: -0.2337504, y: 2.9743507, z: 0} - - {x: -0.26714337, y: 2.9026957, z: 0} - - {x: -0.30053627, y: 2.8558884, z: 0} + - {x: -0.03339292, y: 3.9638388, z: 0} + - {x: -0.066785835, y: 3.7724557, z: 0} + - {x: -0.10017875, y: 3.5975313, z: 0} + - {x: -0.13357168, y: 3.4390674, z: 0} + - {x: -0.16696459, y: 3.2970622, z: 0} + - {x: -0.20035751, y: 3.1715167, z: 0} + - {x: -0.2337504, y: 3.0624304, z: 0} + - {x: -0.26714337, y: 2.969804, z: 0} + - {x: -0.30053627, y: 2.8936367, z: 0} - {x: -0.33392918, y: 2.833929, z: 0} m_Parameters: serializedVersion: 3 @@ -2015,6 +2089,9 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] velocityCalculationInterval: 0.5 + onLastTileLeft: + m_PersistentCalls: + m_Calls: [] --- !u!1 &1834056336 GameObject: m_ObjectHideFlags: 0 @@ -2164,6 +2241,61 @@ Transform: m_Children: [] m_Father: {fileID: 2106431002} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2064311128 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2064311129} + - component: {fileID: 2064311130} + m_Layer: 0 + m_Name: SurfacingTimeline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2064311129 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2064311128} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!320 &2064311130 +PlayableDirector: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2064311128} + m_Enabled: 1 + serializedVersion: 3 + m_PlayableAsset: {fileID: 11400000, guid: 5ecd3cfdb172df5439e4522c15c48f75, type: 2} + m_InitialState: 0 + m_WrapMode: 0 + m_DirectorUpdateMode: 1 + m_InitialTime: 0 + m_SceneBindings: + - key: {fileID: 7536617106820686252, guid: 5ecd3cfdb172df5439e4522c15c48f75, type: 2} + value: {fileID: 747976405} + - key: {fileID: 1284158391674687369, guid: 5ecd3cfdb172df5439e4522c15c48f75, type: 2} + value: {fileID: 461301698} + - key: {fileID: -4039891455399305819, guid: 5ecd3cfdb172df5439e4522c15c48f75, type: 2} + value: {fileID: 224729334} + m_ExposedReferences: + m_References: [] --- !u!1 &2106431001 GameObject: m_ObjectHideFlags: 0 @@ -2256,3 +2388,4 @@ SceneRoots: - {fileID: 824396217} - {fileID: 323864665} - {fileID: 461301697} + - {fileID: 2064311129} diff --git a/Assets/Scripts/Minigames/DivingForPictures/DivingGameManager.cs b/Assets/Scripts/Minigames/DivingForPictures/DivingGameManager.cs index f352a5f0..1f989e44 100644 --- a/Assets/Scripts/Minigames/DivingForPictures/DivingGameManager.cs +++ b/Assets/Scripts/Minigames/DivingForPictures/DivingGameManager.cs @@ -1,7 +1,9 @@ using UnityEngine; using System.Collections.Generic; using System; +using System.Collections; using UnityEngine.Events; +using UnityEngine.Playables; namespace Minigames.DivingForPictures { @@ -35,6 +37,16 @@ namespace Minigames.DivingForPictures [Tooltip("Ropes that will break one by one as player takes damage")] [SerializeField] private RopeBreaker[] playerRopes; + [Header("Surfacing Settings")] + [Tooltip("Duration in seconds for speed transition when surfacing")] + [SerializeField] private float speedTransitionDuration = 2.0f; + [Tooltip("Factor to multiply speed by when surfacing (usually 1.0 for same speed)")] + [SerializeField] private float surfacingSpeedFactor = 3.0f; + [Tooltip("How long to continue spawning tiles after surfacing begins (seconds)")] + [SerializeField] private float surfacingSpawnDelay = 5.0f; + [Tooltip("Reference to the PlayableDirector that will play the surfacing timeline")] + [SerializeField] private PlayableDirector surfacingTimeline; + // Private state variables private int playerScore = 0; private float currentSpawnProbability; @@ -43,15 +55,10 @@ namespace Minigames.DivingForPictures private List activeMonsters = new List(); // Velocity management - [Header("Surfacing Settings")] - [Tooltip("Duration in seconds for speed transition when surfacing")] - [SerializeField] private float speedTransitionDuration = 2.0f; - [Tooltip("Factor to multiply speed by when surfacing (usually 1.0 for same speed)")] - [SerializeField] private float surfacingSpeedFactor = 3.0f; - // Velocity state tracking private float _currentVelocityFactor = 1.0f; // 1.0 = normal descent speed, -1.0 * surfacingSpeedFactor = full surfacing speed private Coroutine _velocityTransitionCoroutine; + private Coroutine _surfacingSequenceCoroutine; // Public properties public int PlayerScore => playerScore; @@ -360,6 +367,10 @@ namespace Minigames.DivingForPictures OnVelocityFactorChanged -= tileSpawner.OnVelocityFactorChanged; OnVelocityFactorChanged += tileSpawner.OnVelocityFactorChanged; + // Subscribe to the last tile event + tileSpawner.onLastTileLeft.RemoveListener(OnLastTileLeft); + tileSpawner.onLastTileLeft.AddListener(OnLastTileLeft); + // Tell spawner to reverse spawn/despawn logic tileSpawner.StartSurfacing(); @@ -389,8 +400,50 @@ namespace Minigames.DivingForPictures obstacleSpawner.OnVelocityFactorChanged(_currentVelocityFactor); } + // Start the surfacing sequence coroutine + if (_surfacingSequenceCoroutine != null) + { + StopCoroutine(_surfacingSequenceCoroutine); + } + _surfacingSequenceCoroutine = StartCoroutine(SurfacingSequence()); + Debug.Log($"[DivingGameManager] Started surfacing with target velocity factor: {targetVelocityFactor}"); } + + /// + /// Coroutine to handle the surfacing sequence timing + /// + private IEnumerator SurfacingSequence() + { + // Wait for the configured delay + yield return new WaitForSeconds(surfacingSpawnDelay); + + // Find tile spawner and tell it to stop spawning + TrenchTileSpawner tileSpawner = FindFirstObjectByType(); + if (tileSpawner != null) + { + // Tell it to stop spawning new tiles + tileSpawner.StopSpawning(); + Debug.Log("[DivingGameManager] Stopped spawning new tiles after delay"); + } + } + + /// + /// Called when the last tile leaves the screen + /// + private void OnLastTileLeft() + { + // Play the timeline + if (surfacingTimeline != null) + { + surfacingTimeline.Play(); + Debug.Log("[DivingGameManager] Last tile left the screen, playing timeline"); + } + else + { + Debug.LogWarning("[DivingGameManager] No surfacing timeline assigned!"); + } + } // Call this when the game ends public void EndGame() diff --git a/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs b/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs index f3d3cba9..064944dc 100644 --- a/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs +++ b/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs @@ -61,6 +61,10 @@ namespace Minigames.DivingForPictures // Direction state private bool _isSurfacing = false; + private bool _stopSpawning = false; + + // Event triggered when the last tile leaves the screen after stopping spawning + public UnityEvent onLastTileLeft = new UnityEvent(); // Velocity management private float _baseMoveSpeed; @@ -311,6 +315,14 @@ namespace Minigames.DivingForPictures Debug.Log("[TrenchTileSpawner] Started surfacing - reversed array order"); } + /// + /// Stops spawning new tiles + /// + public void StopSpawning() + { + _stopSpawning = true; + } + /// /// Handles the movement of all active tiles based on the current velocity /// @@ -388,7 +400,15 @@ namespace Minigames.DivingForPictures /// private void HandleTileSpawning() { - if (_activeTiles.Count == 0) return; + if (_activeTiles.Count == 0) + { + // If we have no active tiles and spawning is stopped, trigger the event + if (_stopSpawning) + { + onLastTileLeft.Invoke(); + } + return; + } GameObject bottomTile = _activeTiles[^1]; if (bottomTile == null) @@ -397,8 +417,36 @@ namespace Minigames.DivingForPictures return; } + // Get the tile height once to use in all calculations float tileHeight = GetTileHeight(bottomTile); + // If we're in stop spawning mode, don't spawn new tiles + if (_stopSpawning) + { + // Check if this is the last tile, and if it's about to leave the screen + if (_activeTiles.Count == 1) + { + bool isLastTileLeaving; + + if (_isSurfacing) + { + // When surfacing, check if the bottom of the tile is above the top of the screen + isLastTileLeaving = bottomTile.transform.position.y - tileHeight / 2 > _screenTop + tileSpawnBuffer; + } + else + { + // When descending, check if the top of the tile is below the bottom of the screen + isLastTileLeaving = bottomTile.transform.position.y + tileHeight / 2 < _screenBottom - tileSpawnBuffer; + } + + if (isLastTileLeaving) + { + onLastTileLeft.Invoke(); + } + } + return; + } + bool shouldSpawn; float newY;