From a13cac6edea031adcf5f1e5247edbc393b67af44 Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Sun, 23 Jul 2023 17:48:49 +0800 Subject: [PATCH] add live camera support --- Assets/Resources/Prefabs/Live.prefab | 704 +++++++++ Assets/Resources/Prefabs/Live.prefab.meta | 7 + Assets/Scenes/LiveScene.unity | 1352 ++++++++++++++++- Assets/Scenes/Version2.unity | 153 +- Assets/Scripts/LiveToolBox/LiveViewerUI.cs | 30 + Assets/Scripts/UmaContainer.cs | 2 + Assets/Scripts/UmaViewerBuilder.cs | 24 +- .../LiveTimeline/LiveTimelineWorkSheet.cs | 4 +- ...reLiveTimelineMonitorCameraPositionData.cs | 16 + ...TimelineMonitorCameraPositionData.cs.meta} | 0 .../LiveTimelineMonitorCameraPositionData.cs | 16 - .../DereScript/Cutt/LiveTimelineControl.cs | 2 +- ...imelineKeyMonitorCameraPositionDataList.cs | 9 + ...eKeyMonitorCameraPositionDataList.cs.meta} | 0 ...imelineKeyMonitorCameraPositionDataList.cs | 9 - .../umamusume/Gallop/Live/CameraLookAt.cs | 68 + .../umamusume/Gallop/Live/CharacterObject.cs | 136 -- .../umamusume/Gallop/Live/Cutt/BezierUtil.cs | 86 ++ .../BezierUtil.cs.meta} | 2 +- .../Gallop/Live/Cutt/Enumeration.meta | 8 + .../Cutt/Enumeration/LiveTimelineEasing.cs | 461 ++++++ .../Enumeration/LiveTimelineEasing.cs.meta | 11 + .../Live/Cutt/ILiveTimelineKeyDataList.cs | 40 + .../Gallop/Live/Cutt/LiveTimeLine.meta | 8 + .../LiveTimelineCamLookAtLocator.cs | 12 + .../LiveTimelineCamLookAtLocator.cs.meta | 11 + .../LiveTimeLine/LiveTimelineCamPosLocator.cs | 12 + .../LiveTimelineCamPosLocator.cs.meta | 11 + .../Live/Cutt/LiveTimelineCharaLocator.cs | 97 ++ .../Cutt/LiveTimelineCharaLocator.cs.meta | 11 + .../Gallop/Live/Cutt/LiveTimelineControl.cs | 1147 +++++++++++++- .../LiveTimelineCharaPartsData.cs | 2 +- .../LiveTimelineFacialToonData.cs | 2 +- .../LiveTimelineFormationOffsetData.cs | 2 +- .../LiveTimelineKeyCameraLookAtDataList.cs | 86 ++ .../LiveTimelineMonitorCameraPositionData.cs | 1 - .../Gallop/Live/Cutt/LiveTimelineWorkSheet.cs | 1252 ++++++++++----- .../Gallop/Live/Cutt/UpdateInfo.meta | 8 + .../Cutt/UpdateInfo/CameraPosUpdateInfo.cs | 9 + .../UpdateInfo/CameraPosUpdateInfo.cs.meta | 11 + .../Scripts/umamusume/Gallop/Live/Director.cs | 121 +- UserSettings/EditorUserSettings.asset | 26 +- 42 files changed, 5252 insertions(+), 717 deletions(-) create mode 100644 Assets/Resources/Prefabs/Live.prefab create mode 100644 Assets/Resources/Prefabs/Live.prefab.meta create mode 100644 Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/DereLiveTimelineMonitorCameraPositionData.cs rename Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/{LiveTimelineMonitorCameraPositionData.cs.meta => DereLiveTimelineMonitorCameraPositionData.cs.meta} (100%) delete mode 100644 Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/LiveTimelineMonitorCameraPositionData.cs create mode 100644 Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/DereLiveTimelineKeyMonitorCameraPositionDataList.cs rename Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/{LiveTimelineKeyMonitorCameraPositionDataList.cs.meta => DereLiveTimelineKeyMonitorCameraPositionDataList.cs.meta} (100%) delete mode 100644 Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/LiveTimelineKeyMonitorCameraPositionDataList.cs delete mode 100644 Assets/Scripts/umamusume/Gallop/Live/CharacterObject.cs create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/BezierUtil.cs rename Assets/Scripts/umamusume/Gallop/Live/{CharacterObject.cs.meta => Cutt/BezierUtil.cs.meta} (83%) create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration.meta create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration/LiveTimelineEasing.cs create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration/LiveTimelineEasing.cs.meta create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine.meta create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamLookAtLocator.cs create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamLookAtLocator.cs.meta create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamPosLocator.cs create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamPosLocator.cs.meta create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineCharaLocator.cs create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineCharaLocator.cs.meta create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo.meta create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo/CameraPosUpdateInfo.cs create mode 100644 Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo/CameraPosUpdateInfo.cs.meta diff --git a/Assets/Resources/Prefabs/Live.prefab b/Assets/Resources/Prefabs/Live.prefab new file mode 100644 index 0000000..58cab36 --- /dev/null +++ b/Assets/Resources/Prefabs/Live.prefab @@ -0,0 +1,704 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &560394265441653711 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 135734499917009797} + - component: {fileID: 5474993350441888106} + m_Layer: 0 + m_Name: Director + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &135734499917009797 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 560394265441653711} + 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_Children: + - {fileID: 4355861405739611011} + - {fileID: 3542667354398119871} + - {fileID: 8555819741671670628} + - {fileID: 2450869250720268632} + m_Father: {fileID: 797687952063153044} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5474993350441888106 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 560394265441653711} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dd41a591fd88f8f4a95b36ecbf27a8d1, type: 3} + m_Name: + m_EditorClassIdentifier: + _state: 0 + _liveTimelineControl: {fileID: 0} + _liveCurrentTime: 0 + _isLiveSetup: 0 + _isEnableBloom: 0 + _stageController: {fileID: 0} + MonitorTextureArray: [] + _globalLightTransform: {fileID: 0} + _cameraNodes: + - {fileID: 4816052047297315680} + - {fileID: 4140460281425956302} + - {fileID: 6851394962599434009} + - {fileID: 2097627094367379998} + _cameraLookAt: {fileID: 5717323349341152300} + _cameraAnimator: {fileID: 61655928960819990} + TitleController: {fileID: 0} + _outlineFovMin: 0 + _outlineFovMinOffLength: 0 + _outlineFovLessOffLength: 0 + _outlineFovMax: 0 + _outlineFovMaxOffLength: 0 + _outlineFovGreaterOffLength: 0 + live: + MusicId: 0 + SongName: + MemberCount: 0 + DefaultDress: 0 + BackGroundId: + Icon: {fileID: 0} + charaObjs: [] + CharaContainerScript: [] + charaAnims: [] + seqData: [] + _isLiveScene: 0 + liveSong: [] + _syncTime: 0 + _soloMode: 0 + characterCount: 0 + allowCount: 0 + liveMode: 0 + UI: {fileID: 0} + totalTime: 0 + sliderControl: {fileID: 0} +--- !u!1 &1865328019154612007 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5754197227737199605} + m_Layer: 0 + m_Name: Cam_Rotate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5754197227737199605 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1865328019154612007} + 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_Children: [] + m_Father: {fileID: 7024783118647993524} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2097627094367379998 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2450869250720268632} + - component: {fileID: 6330558547629765058} + - component: {fileID: 4255285708983627416} + m_Layer: 0 + m_Name: CameraTimeline3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &2450869250720268632 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2097627094367379998} + 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_Children: [] + m_Father: {fileID: 135734499917009797} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &6330558547629765058 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2097627094367379998} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 1 + far clip plane: 100 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -2 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!114 &4255285708983627416 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2097627094367379998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e4a2660e6623c754d831671b41d6e562, type: 3} + m_Name: + m_EditorClassIdentifier: + positionFrequency: 0.2 + rotationFrequency: 0.2 + positionAmount: 0.1 + rotationAmount: 3 + positionComponents: {x: 1, y: 1, z: 1} + rotationComponents: {x: 1, y: 1, z: 0} +--- !u!1 &3003233695131412903 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2239630421985906151} + m_Layer: 0 + m_Name: Cam_Attach + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2239630421985906151 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3003233695131412903} + 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_Children: [] + m_Father: {fileID: 7024783118647993524} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3527295687291788179 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3249552798121487040} + m_Layer: 0 + m_Name: Cam_Translate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3249552798121487040 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3527295687291788179} + 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_Children: [] + m_Father: {fileID: 7024783118647993524} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4140460281425956302 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3542667354398119871} + - component: {fileID: 8597940521609398784} + - component: {fileID: 798685759687451556} + m_Layer: 0 + m_Name: CameraTimeline1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &3542667354398119871 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4140460281425956302} + 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_Children: [] + m_Father: {fileID: 135734499917009797} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &8597940521609398784 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4140460281425956302} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 1 + far clip plane: 100 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -2 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!114 &798685759687451556 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4140460281425956302} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e4a2660e6623c754d831671b41d6e562, type: 3} + m_Name: + m_EditorClassIdentifier: + positionFrequency: 0.2 + rotationFrequency: 0.2 + positionAmount: 0.1 + rotationAmount: 3 + positionComponents: {x: 1, y: 1, z: 1} + rotationComponents: {x: 1, y: 1, z: 0} +--- !u!1 &4785394279812813554 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7024783118647993524} + - component: {fileID: 61655928960819990} + m_Layer: 0 + m_Name: md_camera001 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7024783118647993524 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4785394279812813554} + 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_Children: + - {fileID: 2239630421985906151} + - {fileID: 6726172776633408313} + - {fileID: 5754197227737199605} + - {fileID: 3249552798121487040} + m_Father: {fileID: 4355861405739611011} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &61655928960819990 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4785394279812813554} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 0} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!1 &4816052047297315680 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 377769306748577889} + - component: {fileID: 2702537835415320580} + m_Layer: 0 + m_Name: MotionCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &377769306748577889 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4816052047297315680} + 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_Children: [] + m_Father: {fileID: 4355861405739611011} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &2702537835415320580 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4816052047297315680} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 3 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 1 + far clip plane: 100 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -2 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!1 &6380076730332281044 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4355861405739611011} + - component: {fileID: 5717323349341152300} + m_Layer: 0 + m_Name: CameraLookAt + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4355861405739611011 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6380076730332281044} + 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_Children: + - {fileID: 377769306748577889} + - {fileID: 7024783118647993524} + m_Father: {fileID: 135734499917009797} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5717323349341152300 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6380076730332281044} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e70b835619985f0479bfea8430423159, type: 3} + m_Name: + m_EditorClassIdentifier: + _targetCamera: {fileID: 2702537835415320580} + _attachObject: {fileID: 3003233695131412903} + _translateObject: {fileID: 3527295687291788179} + _rotateObject: {fileID: 1865328019154612007} + _fovObject: {fileID: 8521037135658469086} + _multiplyValue: 100 + _fieldOfViewLimit: 1 + _cameraMotionObject: {fileID: 4785394279812813554} + _cameraAnimator: {fileID: 61655928960819990} +--- !u!1 &6851394962599434009 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8555819741671670628} + - component: {fileID: 514624559944582317} + - component: {fileID: 6126872266139889760} + m_Layer: 0 + m_Name: CameraTimeline2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &8555819741671670628 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6851394962599434009} + 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_Children: [] + m_Father: {fileID: 135734499917009797} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &514624559944582317 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6851394962599434009} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 1 + far clip plane: 100 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -2 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!114 &6126872266139889760 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6851394962599434009} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e4a2660e6623c754d831671b41d6e562, type: 3} + m_Name: + m_EditorClassIdentifier: + positionFrequency: 0.2 + rotationFrequency: 0.2 + positionAmount: 0.1 + rotationAmount: 3 + positionComponents: {x: 1, y: 1, z: 1} + rotationComponents: {x: 1, y: 1, z: 0} +--- !u!1 &7905873867216034822 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 797687952063153044} + m_Layer: 0 + m_Name: Live + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &797687952063153044 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7905873867216034822} + 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_Children: + - {fileID: 135734499917009797} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8521037135658469086 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6726172776633408313} + m_Layer: 0 + m_Name: Cam_Fov + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6726172776633408313 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8521037135658469086} + 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_Children: [] + m_Father: {fileID: 7024783118647993524} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Resources/Prefabs/Live.prefab.meta b/Assets/Resources/Prefabs/Live.prefab.meta new file mode 100644 index 0000000..ce8d453 --- /dev/null +++ b/Assets/Resources/Prefabs/Live.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e634748940738834f892d1b95619dec9 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/LiveScene.unity b/Assets/Scenes/LiveScene.unity index cf29510..41735fb 100644 --- a/Assets/Scenes/LiveScene.unity +++ b/Assets/Scenes/LiveScene.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -123,6 +123,203 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &61452364 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 61452365} + - component: {fileID: 61452367} + - component: {fileID: 61452366} + - component: {fileID: 61452368} + m_Layer: 5 + m_Name: Trigger + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &61452365 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 61452364} + 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_Children: + - {fileID: 1107325621} + m_Father: {fileID: 2146838901} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &61452366 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 61452364} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 0 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2017920249} + m_TargetAssemblyTypeName: LiveViewerUI, umamusume + m_MethodName: OnMouse + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + - eventID: 1 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2017920249} + m_TargetAssemblyTypeName: LiveViewerUI, umamusume + m_MethodName: OnMouse + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &61452367 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 61452364} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &61452368 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 61452364} + m_CullTransparentMesh: 0 +--- !u!1 &100974464 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 100974465} + - component: {fileID: 100974467} + - component: {fileID: 100974466} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &100974465 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 100974464} + 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_Children: [] + m_Father: {fileID: 708791003} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &100974466 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 100974464} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &100974467 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 100974464} + m_CullTransparentMesh: 1 --- !u!1 &374273517 GameObject: m_ObjectHideFlags: 0 @@ -158,7 +355,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0.25} m_AnchorMax: {x: 1, y: 0.75} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: -3} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &374273519 MonoBehaviour: @@ -180,7 +377,63 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Sprite: {fileID: 21300000, guid: 84f2297c16eb9fd4ea1e2e99c58cdf19, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!222 &374273520 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 374273517} + m_CullTransparentMesh: 1 +--- !u!1 &679139652 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 679139655} + - component: {fileID: 679139654} + - component: {fileID: 679139653} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!114 &679139653 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 679139652} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.5372549} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 45f2d2f31881fd341b6c973edb5a8e0c, type: 3} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 @@ -190,14 +443,268 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!222 &374273520 +--- !u!222 &679139654 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 374273517} + m_GameObject: {fileID: 679139652} m_CullTransparentMesh: 1 +--- !u!224 &679139655 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 679139652} + 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_Children: + - {fileID: 1281263664} + - {fileID: 2051549436} + m_Father: {fileID: 2146838901} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 30} + m_SizeDelta: {x: 200, y: 200} + m_Pivot: {x: 0, y: 0} +--- !u!1 &708791002 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 708791003} + - component: {fileID: 708791005} + - component: {fileID: 708791004} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &708791003 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 708791002} + 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_Children: + - {fileID: 100974465} + m_Father: {fileID: 2120942182} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -10} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &708791004 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 708791002} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &708791005 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 708791002} + m_CullTransparentMesh: 1 +--- !u!1 &770940031 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 770940035} + - component: {fileID: 770940034} + - component: {fileID: 770940033} + - component: {fileID: 770940032} + m_Layer: 5 + m_Name: Open + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &770940032 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770940031} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 770940033} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 679139652} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + - m_Target: {fileID: 770940031} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 1454500080} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 +--- !u!114 &770940033 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770940031} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b4b9eac9ba8f7c54cb12ef5f2f8b9fc8, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!222 &770940034 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770940031} + m_CullTransparentMesh: 1 +--- !u!224 &770940035 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770940031} + 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_Children: + - {fileID: 1393088461} + m_Father: {fileID: 1988617879} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 35, y: 25} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &912298139 GameObject: m_ObjectHideFlags: 0 @@ -223,20 +730,20 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 912298139} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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_Children: - {fileID: 374273518} - {fileID: 1839609385} - {fileID: 1378933079} - m_Father: {fileID: 2146838901} - m_RootOrder: 0 + m_Father: {fileID: 1107325621} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: -500} - m_SizeDelta: {x: 1000, y: 20} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -400, y: 20} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &912298141 MonoBehaviour: @@ -360,7 +867,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Sprite: {fileID: 21300000, guid: 2ebfc783eafcbfe419140705251d1ad4, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -435,7 +942,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Sprite: {fileID: 21300000, guid: f2e1332f2cadfa9449dfdb2aa4c656b4, type: 3} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 @@ -444,7 +951,7 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 + m_PixelsPerUnitMultiplier: 7 --- !u!222 &1006231796 CanvasRenderer: m_ObjectHideFlags: 0 @@ -453,6 +960,199 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1006231793} m_CullTransparentMesh: 1 +--- !u!1 &1107325620 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1107325621} + m_Layer: 5 + m_Name: Bottom + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1107325621 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1107325620} + 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_Children: + - {fileID: 1988617879} + - {fileID: 912298140} + m_Father: {fileID: 61452365} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 25} + m_Pivot: {x: 0.5, y: 0} +--- !u!1 &1281263663 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1281263664} + - component: {fileID: 1281263667} + - component: {fileID: 1281263666} + - component: {fileID: 1281263665} + m_Layer: 5 + m_Name: Close + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1281263664 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1281263663} + 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_Children: [] + m_Father: {fileID: 679139655} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 25, y: 25} + m_Pivot: {x: 1, y: 1} +--- !u!114 &1281263665 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1281263663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1281263666} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 679139652} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 770940031} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + - m_Target: {fileID: 1454500080} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1281263666 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1281263663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.7294118} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ebdeff1fc4e9ecb498671cfd5fae65e4, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1281263667 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1281263663} + m_CullTransparentMesh: 1 --- !u!1 &1378933078 GameObject: m_ObjectHideFlags: 0 @@ -489,6 +1189,321 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: -20, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1392584726 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1392584727} + - component: {fileID: 1392584729} + - component: {fileID: 1392584728} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1392584727 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392584726} + 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_Children: [] + m_Father: {fileID: 2120942182} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 9, y: -0.5} + m_SizeDelta: {x: -28, y: -3} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1392584728 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392584726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Free Camera +--- !u!222 &1392584729 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392584726} + m_CullTransparentMesh: 1 +--- !u!1 &1393088460 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1393088461} + - component: {fileID: 1393088463} + - component: {fileID: 1393088462} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1393088461 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1393088460} + 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_Children: [] + m_Father: {fileID: 770940035} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1393088462 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1393088460} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.2830189, g: 0.22899327, b: 0.16420436, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 20 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: "\u25B2" +--- !u!222 &1393088463 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1393088460} + m_CullTransparentMesh: 1 +--- !u!1 &1454500080 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1454500081} + - component: {fileID: 1454500084} + - component: {fileID: 1454500083} + - component: {fileID: 1454500082} + m_Layer: 5 + m_Name: Close + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1454500081 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1454500080} + 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_Children: + - {fileID: 1721556090} + m_Father: {fileID: 1988617879} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 35, y: 25} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1454500082 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1454500080} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1454500083} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 679139652} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 1454500080} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 770940031} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 +--- !u!114 &1454500083 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1454500080} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b4b9eac9ba8f7c54cb12ef5f2f8b9fc8, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!222 &1454500084 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1454500080} + m_CullTransparentMesh: 1 --- !u!1 &1529990365 GameObject: m_ObjectHideFlags: 0 @@ -499,7 +1514,6 @@ GameObject: m_Component: - component: {fileID: 1529990370} - component: {fileID: 1529990369} - - component: {fileID: 1529990368} - component: {fileID: 1529990366} - component: {fileID: 1529990367} m_Layer: 0 @@ -508,7 +1522,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1529990366 MonoBehaviour: m_ObjectHideFlags: 0 @@ -586,14 +1600,6 @@ MonoBehaviour: freeLookSensitivity: 3 zoomSensitivity: 10 fastZoomSensitivity: 50 ---- !u!81 &1529990368 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1529990365} - m_Enabled: 1 --- !u!20 &1529990369 Camera: m_ObjectHideFlags: 0 @@ -651,6 +1657,85 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: -180, z: 0} +--- !u!1 &1721556089 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1721556090} + - component: {fileID: 1721556092} + - component: {fileID: 1721556091} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1721556090 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1721556089} + 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_Children: [] + m_Father: {fileID: 1454500081} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1721556091 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1721556089} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.2830189, g: 0.22899327, b: 0.16420436, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 20 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: "\u25BC" +--- !u!222 &1721556092 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1721556089} + m_CullTransparentMesh: 1 --- !u!1 &1839609384 GameObject: m_ObjectHideFlags: 0 @@ -751,8 +1836,45 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2146838901} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1988617878 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1988617879} + m_Layer: 5 + m_Name: Setting_Btns + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1988617879 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1988617878} + 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_Children: + - {fileID: 770940035} + - {fileID: 1454500081} + m_Father: {fileID: 1107325621} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 35, y: 25} + m_Pivot: {x: 0, y: 0.5} --- !u!1 &2017920247 GameObject: m_ObjectHideFlags: 0 @@ -763,6 +1885,7 @@ GameObject: m_Component: - component: {fileID: 2017920248} - component: {fileID: 2017920249} + - component: {fileID: 2017920250} m_Layer: 0 m_Name: LiveUI m_TagString: Untagged @@ -797,6 +1920,176 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: ProgressBar: {fileID: 912298141} + BottonUITransform: {fileID: 1107325621} +--- !u!81 &2017920250 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017920247} + m_Enabled: 1 +--- !u!1 &2051549435 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2051549436} + - component: {fileID: 2051549437} + m_Layer: 5 + m_Name: Setting + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2051549436 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2051549435} + 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_Children: + - {fileID: 2120942182} + m_Father: {fileID: 679139655} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0.000061035156, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2051549437 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2051549435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &2120942181 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2120942182} + - component: {fileID: 2120942183} + m_Layer: 5 + m_Name: FreeCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2120942182 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2120942181} + 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_Children: + - {fileID: 708791003} + - {fileID: 1392584727} + m_Father: {fileID: 2051549436} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -10} + m_SizeDelta: {x: 160, y: 20} + m_Pivot: {x: 0, y: 1} +--- !u!114 &2120942183 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2120942181} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 708791004} + toggleTransition: 1 + graphic: {fileID: 100974466} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1529990365} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_IsOn: 0 --- !u!1 &2146838897 GameObject: m_ObjectHideFlags: 0 @@ -845,12 +2138,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} m_Name: m_EditorClassIdentifier: - m_UiScaleMode: 0 + m_UiScaleMode: 1 m_ReferencePixelsPerUnit: 100 m_ScaleFactor: 1 m_ReferenceResolution: {x: 800, y: 600} m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 + m_MatchWidthOrHeight: 0.5 m_PhysicalUnit: 3 m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 @@ -888,7 +2181,8 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - - {fileID: 912298140} + - {fileID: 679139655} + - {fileID: 61452365} - {fileID: 1975009928} m_Father: {fileID: 0} m_RootOrder: 2 diff --git a/Assets/Scenes/Version2.unity b/Assets/Scenes/Version2.unity index 02d12a5..fb6b6e0 100644 --- a/Assets/Scenes/Version2.unity +++ b/Assets/Scenes/Version2.unity @@ -2932,7 +2932,7 @@ Transform: m_LocalScale: {x: 50, y: 0.2, z: 50} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 8 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &116348344 GameObject: @@ -5185,7 +5185,7 @@ Transform: m_Children: - {fileID: 2136933733} m_Father: {fileID: 0} - m_RootOrder: 9 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &217907839 MonoBehaviour: @@ -27034,7 +27034,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 110, y: 10, z: 0} --- !u!1 &931406425 GameObject: @@ -32557,141 +32557,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1158627932} m_CullTransparentMesh: 1 ---- !u!1 &1162210542 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1162210543} - - component: {fileID: 1162210545} - - component: {fileID: 1162210544} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1162210543 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1162210542} - 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0.00012207031, y: 0} - m_SizeDelta: {x: 0.00024414062, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1162210544 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1162210542} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: Use Criware - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 309c10a796fa90746889302436dac032, type: 2} - m_sharedMaterial: {fileID: 1876532955194943090, guid: 309c10a796fa90746889302436dac032, - type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 20 - m_fontSizeBase: 20 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 0 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &1162210545 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1162210542} - m_CullTransparentMesh: 1 --- !u!1 &1174230681 GameObject: m_ObjectHideFlags: 0 @@ -40626,7 +40491,7 @@ Transform: m_Children: - {fileID: 790387848} m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!95 &1468470379 Animator: @@ -42567,6 +42432,8 @@ MonoBehaviour: type: 2} AnimationCameraAnimator: {fileID: 1468470379} AnimationCamera: {fileID: 790387849} + LiveControllerPrefab: {fileID: 7905873867216034822, guid: e634748940738834f892d1b95619dec9, + type: 3} --- !u!1 &1566898429 GameObject: m_ObjectHideFlags: 0 @@ -43484,7 +43351,7 @@ Transform: - {fileID: 473655707} - {fileID: 141131295} m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1618706695 GameObject: @@ -54847,7 +54714,7 @@ RectTransform: - {fileID: 1210994110} - {fileID: 859153092} m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -56115,7 +55982,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2049278006 GameObject: @@ -66735,5 +66602,5 @@ Transform: - {fileID: 1174230685} - {fileID: 1085021151} m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Scripts/LiveToolBox/LiveViewerUI.cs b/Assets/Scripts/LiveToolBox/LiveViewerUI.cs index 921b4e4..374b757 100644 --- a/Assets/Scripts/LiveToolBox/LiveViewerUI.cs +++ b/Assets/Scripts/LiveToolBox/LiveViewerUI.cs @@ -10,9 +10,39 @@ public class LiveViewerUI : MonoBehaviour public UnityEngine.UI.Slider ProgressBar; + public RectTransform BottonUITransform; + + float targetHeight = 0; + float height; private void Awake() { + height = BottonUITransform.rect.height; + targetHeight = 0; + Invoke(nameof(HideSlider), 1.5f); Instance = this; //TrueProgressBar = (UnityEngine.UIElements.Slider)ProgressBar; } + + public void OnMouse(bool isEnter) + { + if (isEnter) + { + targetHeight = 0; + CancelInvoke(); + } + else + { + Invoke(nameof(HideSlider), 2.5f); + } + } + + private void FixedUpdate() + { + BottonUITransform.anchoredPosition = Vector2.Lerp(BottonUITransform.anchoredPosition, new Vector2(0, targetHeight), Time.fixedDeltaTime * 5); + } + + private void HideSlider() + { + targetHeight = -height; + } } diff --git a/Assets/Scripts/UmaContainer.cs b/Assets/Scripts/UmaContainer.cs index 69c9519..5d8b753 100644 --- a/Assets/Scripts/UmaContainer.cs +++ b/Assets/Scripts/UmaContainer.cs @@ -1,4 +1,5 @@ using Gallop; +using Gallop.Live.Cutt; using RootMotion.Dynamics; using RootMotion.FinalIK; using System; @@ -79,6 +80,7 @@ public class UmaContainer : MonoBehaviour [Header("Live")] public bool IsLive = false; + public LiveTimelineCharaLocator LiveLocator; [Header("Other")] public CharaShaderEffectData ShaderEffectData; diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index 46c2942..3d7d2a1 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -12,6 +12,7 @@ using UmaMusumeAudio; using UnityEngine; using UnityEngine.SceneManagement; using Debug = UnityEngine.Debug; +using Random = UnityEngine.Random; public class UmaViewerBuilder : MonoBehaviour { @@ -46,6 +47,8 @@ public class UmaViewerBuilder : MonoBehaviour public Animator AnimationCameraAnimator; public Camera AnimationCamera; + public GameObject LiveControllerPrefab; + private bool ShadersLoaded = false; private void Awake() @@ -106,6 +109,8 @@ public class UmaViewerBuilder : MonoBehaviour CurrentUMAContainer.transform.parent = Gallop.Live.Director.instance.charaObjs[i]; LoadNormalUma(characters[i].CharaEntry, characters[i].CostumeId); } + + Gallop.Live.Director.instance.CharaContainerScript.Add(CurrentUMAContainer); } } } @@ -652,15 +657,18 @@ public class UmaViewerBuilder : MonoBehaviour public void LoadLive(LiveEntry live, List characters) { - GameObject MainLive = new GameObject("Live"); - GameObject Director = new GameObject("Director"); + GameObject MainLive = Instantiate(LiveControllerPrefab); + Gallop.Live.Director mController = MainLive.GetComponentInChildren(); + mController.live = live; + mController.Initialize(); + List transferObjs = new List() { MainLive, GameObject.Find("ViewerMain"), GameObject.Find("Directional Light"), GameObject.Find("GlobalShaderController"), GameObject.Find("AudioManager") - }; + }; UmaSceneController.LoadScene("LiveScene", delegate () @@ -672,17 +680,11 @@ public class UmaViewerBuilder : MonoBehaviour { if (a.CharaEntry == null || a.CostumeId == "") { - //a.CharaEntry = Main.Characters[Random.Range(0, Main.Characters.Count)]; - //a.CostumeId = "00"; + a.CharaEntry = Main.Characters[Random.Range(0, Main.Characters.Count/2)]; + a.CostumeId = "00"; } });//fill empty - Gallop.Live.Director mController = Director.AddComponent(); - mController.live = live; - Instantiate(mController, MainLive.transform); - - Destroy(Director); - LoadLiveUma(characters); }, diff --git a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/LiveTimelineWorkSheet.cs b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/LiveTimelineWorkSheet.cs index 5ca94d6..20adede 100644 --- a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/LiveTimelineWorkSheet.cs +++ b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/LiveTimelineWorkSheet.cs @@ -133,7 +133,7 @@ namespace Cutt public List lensFlareList = new List(); - public List monitorCameraPosKeys = new List(); + public List monitorCameraPosKeys = new List(); public List monitorLookAtPosKeys = new List(); @@ -336,7 +336,7 @@ namespace Cutt } return key.dataType switch { - LiveTimelineKeyDataType.MonitorCameraPos => monitorCameraPosKeys.FindIndex((LiveTimelineMonitorCameraPositionData x) => x.keys.Contains(key)), + LiveTimelineKeyDataType.MonitorCameraPos => monitorCameraPosKeys.FindIndex((DereLiveTimelineMonitorCameraPositionData x) => x.keys.Contains(key)), LiveTimelineKeyDataType.MonitorCameraLookAt => monitorLookAtPosKeys.FindIndex((LiveTimelineMonitorCameraLookAtData x) => x.keys.Contains(key)), LiveTimelineKeyDataType.MultiCameraPos => multiCameraPositionKeys.FindIndex((LiveTimelineMultiCameraPositionData x) => x.keys.Contains(key)), LiveTimelineKeyDataType.MultiCameraLookAt => multiCameraLookAtKeys.FindIndex((LiveTimelineMultiCameraLookAtData x) => x.keys.Contains(key)), diff --git a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/DereLiveTimelineMonitorCameraPositionData.cs b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/DereLiveTimelineMonitorCameraPositionData.cs new file mode 100644 index 0000000..77f62b9 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/DereLiveTimelineMonitorCameraPositionData.cs @@ -0,0 +1,16 @@ +锘縰sing System; + +namespace Cutt +{ + [Serializable] + public class DereLiveTimelineMonitorCameraPositionData : ILiveTimelineGroupDataWithName + { + private const string default_name = "MonitorCameraPos"; + + public DereLiveTimelineKeyMonitorCameraPositionDataList keys = new DereLiveTimelineKeyMonitorCameraPositionDataList(); + + public DereLiveTimelineMonitorCameraPositionData() : base("MonitorCameraPos") { } + + public override ILiveTimelineKeyDataList GetKeyList() { return keys; } + } +} diff --git a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/LiveTimelineMonitorCameraPositionData.cs.meta b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/DereLiveTimelineMonitorCameraPositionData.cs.meta similarity index 100% rename from Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/LiveTimelineMonitorCameraPositionData.cs.meta rename to Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/DereLiveTimelineMonitorCameraPositionData.cs.meta diff --git a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/LiveTimelineMonitorCameraPositionData.cs b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/LiveTimelineMonitorCameraPositionData.cs deleted file mode 100644 index db125a4..0000000 --- a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimeline/WithName/LiveTimelineMonitorCameraPositionData.cs +++ /dev/null @@ -1,16 +0,0 @@ -锘縰sing System; - -namespace Cutt -{ - [Serializable] - public class LiveTimelineMonitorCameraPositionData : ILiveTimelineGroupDataWithName - { - private const string default_name = "MonitorCameraPos"; - - public LiveTimelineKeyMonitorCameraPositionDataList keys = new LiveTimelineKeyMonitorCameraPositionDataList(); - - public LiveTimelineMonitorCameraPositionData() : base("MonitorCameraPos") { } - - public override ILiveTimelineKeyDataList GetKeyList() { return keys; } - } -} diff --git a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineControl.cs b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineControl.cs index bc569d5..5e80672 100644 --- a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineControl.cs +++ b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineControl.cs @@ -5211,7 +5211,7 @@ namespace Cutt int count = sheet.monitorCameraPosKeys.Count; for (int i = 0; i < count; i++) { - LiveTimelineKeyMonitorCameraPositionDataList keys = sheet.monitorCameraPosKeys[i].keys; + DereLiveTimelineKeyMonitorCameraPositionDataList keys = sheet.monitorCameraPosKeys[i].keys; if (keys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !keys.EnablePlayModeTimeline(_playMode) || _arrMonitorCameraCache.Length <= i) { continue; diff --git a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/DereLiveTimelineKeyMonitorCameraPositionDataList.cs b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/DereLiveTimelineKeyMonitorCameraPositionDataList.cs new file mode 100644 index 0000000..0a48774 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/DereLiveTimelineKeyMonitorCameraPositionDataList.cs @@ -0,0 +1,9 @@ +锘縰sing System; + +namespace Cutt +{ + [Serializable] + public class DereLiveTimelineKeyMonitorCameraPositionDataList : LiveTimelineKeyDataListTemplate + { + } +} \ No newline at end of file diff --git a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/LiveTimelineKeyMonitorCameraPositionDataList.cs.meta b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/DereLiveTimelineKeyMonitorCameraPositionDataList.cs.meta similarity index 100% rename from Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/LiveTimelineKeyMonitorCameraPositionDataList.cs.meta rename to Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/DereLiveTimelineKeyMonitorCameraPositionDataList.cs.meta diff --git a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/LiveTimelineKeyMonitorCameraPositionDataList.cs b/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/LiveTimelineKeyMonitorCameraPositionDataList.cs deleted file mode 100644 index cea0cfc..0000000 --- a/Assets/Scripts/umamusume/Gallop/DereScript/Cutt/LiveTimelineKey/List/LiveTimelineKeyMonitorCameraPositionDataList.cs +++ /dev/null @@ -1,9 +0,0 @@ -锘縰sing System; - -namespace Cutt -{ - [Serializable] - public class LiveTimelineKeyMonitorCameraPositionDataList : LiveTimelineKeyDataListTemplate - { - } -} \ No newline at end of file diff --git a/Assets/Scripts/umamusume/Gallop/Live/CameraLookAt.cs b/Assets/Scripts/umamusume/Gallop/Live/CameraLookAt.cs index bd2f316..09e2510 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/CameraLookAt.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/CameraLookAt.cs @@ -29,5 +29,73 @@ namespace Gallop.Live [SerializeField] // RVA: 0xEBE0 Offset: 0xEBE0 VA: 0x7FF85CCBEBE0 private Animator _cameraAnimator; // 0x70 private Quaternion _currentQuaternion; // 0x78 + + private bool _initializeAnimationLength; + + private float _animationLength; + + + + private void Awake() + { + _targetCamera.transform.parent = _attachObject.transform; + _targetCamera.transform.localPosition = Vector3.zero; + _targetCamera.transform.localRotation = Quaternion.Euler(new Vector3(0f, 180f, 0f)); + _targetCamera.transform.localScale = Vector3.one; + _cameraAnimator = _cameraMotionObject.GetComponent(); + _tmFOVObject = _fovObject.transform; + _tmRotateObject = _rotateObject.transform; + _tmAttachObject = _attachObject.transform; + _tmTranslateObject = _translateObject.transform; + UpdateCamera(); + } + + public void ActivationUpdate() + { + if (!(_targetCamera == null) && !(_cameraAnimator == null) && !(Director.instance == null)) + { + AlterUpdate(); + } + } + + private void Update() + { + if (Director.instance == null || !Director.instance.isTimelineControlled) + { + AlterUpdate(); + } + } + + public void AlterUpdate() + { + if (!(_cameraAnimator.runtimeAnimatorController == null)) + { + if (!_initializeAnimationLength) + { + _animationLength = _cameraAnimator.GetCurrentAnimatorStateInfo(0).length; + _initializeAnimationLength = true; + } + float normalizedTime = Director.instance.CalcFrameJustifiedMusicTime() / _animationLength; + _cameraAnimator.Play(0, -1, normalizedTime); + _cameraAnimator.speed = 0f; + } + } + + private void LateUpdate() + { + UpdateCamera(); + if (_targetCamera.fieldOfView < _fieldOfViewLimit) + { + _targetCamera.fieldOfView = _fieldOfViewLimit; + } + } + + private void UpdateCamera() + { + _targetCamera.fieldOfView = (0f - _tmFOVObject.localPosition.x) * _multiplyValue; + _tmAttachObject.localPosition = _tmTranslateObject.localPosition; + _currentQuaternion = Quaternion.AngleAxis((0f - _tmRotateObject.localPosition.z) * _multiplyValue, Vector3.forward) * Quaternion.AngleAxis((0f - _tmRotateObject.localPosition.y) * _multiplyValue, Vector3.up) * Quaternion.AngleAxis((0f - _tmRotateObject.localPosition.x) * _multiplyValue, Vector3.right); + _tmAttachObject.localRotation = _currentQuaternion; + } } } diff --git a/Assets/Scripts/umamusume/Gallop/Live/CharacterObject.cs b/Assets/Scripts/umamusume/Gallop/Live/CharacterObject.cs deleted file mode 100644 index de50a33..0000000 --- a/Assets/Scripts/umamusume/Gallop/Live/CharacterObject.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using Gallop.Live.Cutt; -using System.Runtime.CompilerServices; - -namespace Gallop.Live -{ - public class CharacterObject : MonoBehaviour, ILiveTimelineCharactorLocator, ILiveTimelineMSQTarget - { - public enum RealtimeShadowType - { - HardShadow = 0, - SoftShadow = 1 - } - - public const int DRESS_COUNT = 2; - public const int DRESS_MAIN_INDEX = 0; - public const int DRESS_SUB_INDEX = 1; - private int _reserveDressModelCount; // 0x18 - private int _activeModelIndex; // 0x1C - private GameObject[] _modelObjectArray; // 0x20 - private Transform[] _modelTransformArray; // 0x28 - //private LiveModelController[] _liveModelControllerArray; // 0x30 - //private GallopSweatController[] _sweatControllerArray; // 0x38 - //private EyeTraceController[] _eyeTraceControllerArray; // 0x40 - //private LiveModelController.EyeTargetPositionSetter[] _eyeTargetSetter; // 0x48 - private const int EffectAttachNum = 26; - private Transform[,] _effectAttachTransformArray; // 0x50 - public int prevFrameWarmUpCyspring; // 0x58 - public int CurrentFrameEyeTrack; // 0x5C - private List _colliderListArray; // 0x60 - private bool _liveMSQControlled; // 0x68 - private float _liveMSQCurrentAnimStartTime; // 0x6C - private bool _bVisible; // 0x70 - private LiveCharaPosition _liveCharaStandingPosition; // 0x74 - private Vector3 _liveCharaInitialPosition; // 0x78 - private const float kLiveCharaHeadPositionOffsetHeight = 0.1f; - private int _liveCharaHeightLevel; // 0x84 - private float _liveCharaHeightValue; // 0x88 - private float _liveCharaHeightRatioBase; // 0x8C - private float _liveCharaHeightRatio; // 0x90 - private Vector3 _liveCharaFormationHeightRateOffset; // 0x94 - private bool _isPositionNodePositionAddParent; // 0xA0 - private LiveTimelineDefine.FacialEyeTrackTargetType _eyeTrackTargetType; // 0xA4 - private GameObject _softShadowCamera; // 0xC0 - private GameObject _softShadowReceiver; // 0xC8 - private Transform _softShadowCameraTrans; // 0xD0 - private Transform _softShadowReceiverTrans; // 0xD8 - private const string SoftShadowObjectName = "Shadow Camera"; - private CharacterObject.RealtimeShadowType _realtimeShadowType; // 0xE0 - private bool _enableRealtimeShadow; // 0xE4 - private bool _isMirror; // 0xE5 - //private CastShadowEffect _dynamicShadow; // 0xE8 - private int _characterDataIndex; // 0xF0 - [SerializeField] // RVA: 0xEBE0 Offset: 0xEBE0 VA: 0x7FF85CCBEBE0 - private float _motionNoiseTime; // 0xF4 - [SerializeField] // RVA: 0xEBE0 Offset: 0xEBE0 VA: 0x7FF85CCBEBE0 - private float _motionNoiseRate; // 0xF8 - private bool _isUpdateMotionNoiseTime; // 0xFC - protected bool _isLod; // 0xFD - protected Transform _parentDefaultTransform; // 0x100 - protected Transform _parentTransform; // 0x108 - protected AnimationState _bodyAnimationState; // 0x110 - private bool _isSetting; // 0x118 - protected bool _isMeshActiveAuto; // 0x119 - private readonly Dictionary _dicProps; // 0x120 - private readonly List _lstPropHashs; // 0x128 - //private FakeShadowController[] _shadowL; // 0x130 - //private FakeShadowController[] _shadowR; // 0x138 - //private FollowSpotLightController[] _followSpotLightControllers; // 0x140 - //private List _spotlight3dControllerList; // 0x148 - private Vector3 _eyeTrackDefaultPos; // 0x150 - - public int ReserveDressModelCount { get; } - public int ActiveModelIndex { get; } - public int LayerIndex { get; set; } - public Color EmissiveColor { get; set; } - public GameObject[] ModelObjectArray { get; } - public GameObject CurrentModelObject { get; } - public Transform[] ModelTransformArray { get; } - public Transform CurrentModelTransform { get; } - //public LiveModelController[] LiveModelControllerArray { get; } - //public LiveModelController CurrentLiveModelController { get; } - public EyeTraceController[] EyeTraceControllerArray { get; } - public Animation liveMSQAnimation { get; } - public bool liveMSQControlled { get; set; } - public AnimationState liveMSQCurrentAnimState { get; set; } - public float liveMSQCurrentAnimStartTime { get; set; } - public float heightRate { get; } - //public LiveIK IKCtrl { get; } - public bool liveCharaVisible { get; set; } - public LiveCharaPosition liveCharaStandingPosition { get; set; } - public Vector3 liveCharaInitialPosition { get; set; } - public Vector3 liveCharaPosition { get; } - public Quaternion liveCharaPositionLocalRotation { get; set; } - public Vector3 liveCharaHeadPosition { get; } - public Vector3 liveCharaWaistPosition { get; } - public Vector3 liveCharaLeftHandWristPosition { get; } - public Vector3 liveCharaLeftHandAttachPosition { get; } - public Vector3 liveCharaRightHandWristPosition { get; } - public Vector3 liveCharaRightHandAttachPosition { get; } - public Vector3 liveCharaChestPosition { get; } - public Vector3 liveCharaFootPosition { get; } - public Vector3 liveCharaConstHeightHeadPosition { get; } - public Vector3 liveCharaConstHeightWaistPosition { get; } - public Vector3 liveCharaConstHeightChestPosition { get; } - public Vector3 liveCharaInitialHeightHeadPosition { get; } - public Vector3 liveCharaInitialHeightWaistPosition { get; } - public Vector3 liveCharaInitialHeightChestPosition { get; } - public Vector3 liveCharaScale { get; } - public Transform liveParentDefaultTransform { get; set; } - public Transform liveParentTransform { get; set; } - public Transform liveRootTransform { get; } - public int liveCharaHeightLevel { get; set; } - public float liveCharaHeightValue { get; } - public float liveCharaHeightRatioBase { get; set; } - public float liveCharaHeightRatio { get; set; } - public Vector3 liveCharaFormationHeightRateOffset { get; set; } - public bool IsPositionNodePositionAddParent { get; set; } - public bool IsCastShadow { get; set; } - public float CySpringRate { get; set; } - public LiveTimelineDefine.FacialEyeTrackTargetType EyeTrackTargetType { get; set; } - public float EyeTrackVerticalRate { get; set; } - public float EyeTrackHorizontalRate { get; set; } - public Vector3 EyeTrackDirectWorldPosition { get; set; } - public CharacterObject.RealtimeShadowType realtimeShadowType { get; set; } - public bool enableRealtimeShadow { get; set; } - public bool IsMirror { get; set; } - public int CharacterDataIndex { get; set; } - public bool IsUpdateMotionNoiseTime { get; set; } - public bool IsSetting { get; } - public static string FollowSpotLightParentName { get; set; } - public FollowSpotLightController[] FollowSpotLightControllers { get; } - } -} diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/BezierUtil.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/BezierUtil.cs new file mode 100644 index 0000000..84e1859 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/BezierUtil.cs @@ -0,0 +1,86 @@ +锘縰sing System; +using UnityEngine; + +namespace Gallop.Live.Cutt +{ + public static class BezierUtil + { + private static Vector3[] subPointsWork = new Vector3[17]; + + public static void Bezier(ref Vector3 startPos, Vector3[] points, ref Vector3 endPos, float t, out Vector3 outPos) + { + points[0] = startPos; + Array.Copy(points, 0, subPointsWork, 1, points.Length); + points[points.Length + 1] = endPos; + outPos = CalcRecurse(points, points.Length, t); + } + + public static void Calc(Vector3[] points, int pointNum, float t, out Vector3 outPos) + { + outPos = CalcRecurse(points, pointNum, t); + } + + private static Vector3 CalcRecurse(Vector3[] points, int pointNum, float t) + { + if (pointNum == 2) + { + return Vector3.LerpUnclamped(points[0], points[1], t); + } + for (int i = 0; i < pointNum - 1; i++) + { + subPointsWork[i] = Vector3.LerpUnclamped(points[i], points[i + 1], t); + } + return CalcRecurse(subPointsWork, pointNum - 1, t); + } + + public static void Calc(ref Vector3 start, ref Vector3 end, ref Vector3 cp, float t, out Vector3 v3) + { + float num = 1f - t; + float num2 = t * t; + float num3 = 2f * t * num; + float num4 = num * num; + v3.x = num2 * end.x + num3 * cp.x + num4 * start.x; + v3.y = num2 * end.y + num3 * cp.y + num4 * start.y; + v3.z = num2 * end.z + num3 * cp.z + num4 * start.z; + } + + public static void Calc(ref Vector3 start, ref Vector3 end, ref Vector3 cp1, ref Vector3 cp2, float t, out Vector3 v3) + { + float num = 1f - t; + float num2 = t * t * t; + float num3 = 3f * t * t * num; + float num4 = 3f * t * num * num; + float num5 = num * num * num; + v3.x = num2 * end.x + num3 * cp2.x + num4 * cp1.x + num5 * start.x; + v3.y = num2 * end.y + num3 * cp2.y + num4 * cp1.y + num5 * start.y; + v3.z = num2 * end.z + num3 * cp2.z + num4 * cp1.z + num5 * start.z; + } + + public static void Calc(ref Vector3 start, ref Vector3 end, ref Vector3 cp1, ref Vector3 cp2, ref Vector3 cp3, float t, out Vector3 v3) + { + float num = 1f - t; + float num2 = t * t * t * t; + float num3 = 4f * t * t * t * num; + float num4 = 4f * t * t * num * num; + float num5 = 4f * t * num * num * num; + float num6 = num * num * num * num; + v3.x = num2 * end.x + num3 * cp3.x + num4 * cp2.x + num5 * cp1.x + num6 * start.x; + v3.y = num2 * end.y + num3 * cp3.y + num4 * cp2.y + num5 * cp1.y + num6 * start.y; + v3.z = num2 * end.z + num3 * cp3.z + num4 * cp2.z + num5 * cp1.z + num6 * start.z; + } + + public static void Calc(ref Vector3 start, ref Vector3 end, ref Vector3 cp1, ref Vector3 cp2, ref Vector3 cp3, ref Vector3 cp4, float t, out Vector3 v3) + { + float num = 1f - t; + float num2 = t * t * t * t * t; + float num3 = 5f * t * t * t * t * num; + float num4 = 5f * t * t * t * num * num; + float num5 = 5f * t * t * num * num * num; + float num6 = 5f * t * num * num * num * num; + float num7 = num * num * num * num * num; + v3.x = num2 * end.x + num3 * cp4.x + num4 * cp3.x + num5 * cp2.x + num6 * cp1.x + num7 * start.x; + v3.y = num2 * end.y + num3 * cp4.y + num4 * cp3.y + num5 * cp2.y + num6 * cp1.y + num7 * start.y; + v3.z = num2 * end.z + num3 * cp4.z + num4 * cp3.z + num5 * cp2.z + num6 * cp1.z + num7 * start.z; + } + } +} diff --git a/Assets/Scripts/umamusume/Gallop/Live/CharacterObject.cs.meta b/Assets/Scripts/umamusume/Gallop/Live/Cutt/BezierUtil.cs.meta similarity index 83% rename from Assets/Scripts/umamusume/Gallop/Live/CharacterObject.cs.meta rename to Assets/Scripts/umamusume/Gallop/Live/Cutt/BezierUtil.cs.meta index f9c403e..89c6db9 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/CharacterObject.cs.meta +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/BezierUtil.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2db4a9726d149bf4c8d4c8cca1d06ff6 +guid: 8cc97b2280eb0104497f8eae006afdff MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration.meta b/Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration.meta new file mode 100644 index 0000000..76b2ce5 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: add356d6cd2707342824231786b93f34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration/LiveTimelineEasing.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration/LiveTimelineEasing.cs new file mode 100644 index 0000000..89903c1 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration/LiveTimelineEasing.cs @@ -0,0 +1,461 @@ +using System; + +namespace Gallop.Live.Cutt +{ + public static class LiveTimelineEasing + { + public enum Type + { + Linear, + ExpoEaseOut, + ExpoEaseIn, + ExpoEaseInOut, + ExpoEaseOutIn, + CircEaseOut, + CircEaseIn, + CircEaseInOut, + CircEaseOutIn, + QuadEaseOut, + QuadEaseIn, + QuadEaseInOut, + QuadEaseOutIn, + SineEaseOut, + SineEaseIn, + SineEaseInOut, + SineEaseOutIn, + CubicEaseOut, + CubicEaseIn, + CubicEaseInOut, + CubicEaseOutIn, + QuartEaseOut, + QuartEaseIn, + QuartEaseInOut, + QuartEaseOutIn, + QuintEaseOut, + QuintEaseIn, + QuintEaseInOut, + QuintEaseOutIn, + ElasticEaseOut, + ElasticEaseIn, + ElasticEaseInOut, + ElasticEaseOutIn, + BounceEaseOut, + BounceEaseIn, + BounceEaseInOut, + BounceEaseOutIn, + BackEaseOut, + BackEaseIn, + BackEaseInOut, + BackEaseOutIn + } + + private delegate double EasingFunctionDelegate(double t, double b, double c, double d); + + private static int _easeTypeMax = -1; + + private static EasingFunctionDelegate[] _functions = new EasingFunctionDelegate[41] + { + Linear, + ExpoEaseOut, + ExpoEaseIn, + ExpoEaseInOut, + ExpoEaseOutIn, + CircEaseOut, + CircEaseIn, + CircEaseInOut, + CircEaseOutIn, + QuadEaseOut, + QuadEaseIn, + QuadEaseInOut, + QuadEaseOutIn, + SineEaseOut, + SineEaseIn, + SineEaseInOut, + SineEaseOutIn, + CubicEaseOut, + CubicEaseIn, + CubicEaseInOut, + CubicEaseOutIn, + QuartEaseOut, + QuartEaseIn, + QuartEaseInOut, + QuartEaseOutIn, + QuintEaseOut, + QuintEaseIn, + QuintEaseInOut, + QuintEaseOutIn, + ElasticEaseOut, + ElasticEaseIn, + ElasticEaseInOut, + ElasticEaseOutIn, + BounceEaseOut, + BounceEaseIn, + BounceEaseInOut, + BounceEaseOutIn, + BackEaseOut, + BackEaseIn, + BackEaseInOut, + BackEaseOutIn + }; + + public static int easeTypeMax + { + get + { + if (_easeTypeMax < 0) + { + foreach (object value in Enum.GetValues(typeof(Type))) + { + if ((int)value > _easeTypeMax) + { + _easeTypeMax = (int)value; + } + } + _easeTypeMax++; + } + return _easeTypeMax; + } + } + + public static float GetValue(Type type, float t, float b, float c, float d) + { + if ((int)type < easeTypeMax) + { + return (float)_functions[(int)type](t, b, c, d); + } + return 0f; + } + + public static double Linear(double t, double b, double c, double d) + { + return c * t / d + b; + } + + public static double ExpoEaseOut(double t, double b, double c, double d) + { + if (t != d) + { + return c * (0.0 - Math.Pow(2.0, -10.0 * t / d) + 1.0) + b; + } + return b + c; + } + + public static double ExpoEaseIn(double t, double b, double c, double d) + { + if (t != 0.0) + { + return c * Math.Pow(2.0, 10.0 * (t / d - 1.0)) + b; + } + return b; + } + + public static double ExpoEaseInOut(double t, double b, double c, double d) + { + if (t == 0.0) + { + return b; + } + if (t == d) + { + return b + c; + } + if ((t /= d / 2.0) < 1.0) + { + return c / 2.0 * Math.Pow(2.0, 10.0 * (t - 1.0)) + b; + } + return c / 2.0 * (0.0 - Math.Pow(2.0, -10.0 * (t -= 1.0)) + 2.0) + b; + } + + public static double ExpoEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return ExpoEaseOut(t * 2.0, b, c / 2.0, d); + } + return ExpoEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + + public static double CircEaseOut(double t, double b, double c, double d) + { + return c * Math.Sqrt(1.0 - (t = t / d - 1.0) * t) + b; + } + + public static double CircEaseIn(double t, double b, double c, double d) + { + return (0.0 - c) * (Math.Sqrt(1.0 - (t /= d) * t) - 1.0) + b; + } + + public static double CircEaseInOut(double t, double b, double c, double d) + { + if ((t /= d / 2.0) < 1.0) + { + return (0.0 - c) / 2.0 * (Math.Sqrt(1.0 - t * t) - 1.0) + b; + } + return c / 2.0 * (Math.Sqrt(1.0 - (t -= 2.0) * t) + 1.0) + b; + } + + public static double CircEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return CircEaseOut(t * 2.0, b, c / 2.0, d); + } + return CircEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + + public static double QuadEaseOut(double t, double b, double c, double d) + { + return (0.0 - c) * (t /= d) * (t - 2.0) + b; + } + + public static double QuadEaseIn(double t, double b, double c, double d) + { + return c * (t /= d) * t + b; + } + + public static double QuadEaseInOut(double t, double b, double c, double d) + { + if ((t /= d / 2.0) < 1.0) + { + return c / 2.0 * t * t + b; + } + return (0.0 - c) / 2.0 * ((t -= 1.0) * (t - 2.0) - 1.0) + b; + } + + public static double QuadEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return QuadEaseOut(t * 2.0, b, c / 2.0, d); + } + return QuadEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + + public static double SineEaseOut(double t, double b, double c, double d) + { + return c * Math.Sin(t / d * (Math.PI / 2.0)) + b; + } + + public static double SineEaseIn(double t, double b, double c, double d) + { + return (0.0 - c) * Math.Cos(t / d * (Math.PI / 2.0)) + c + b; + } + + public static double SineEaseInOut(double t, double b, double c, double d) + { + if ((t /= d / 2.0) < 1.0) + { + return c / 2.0 * Math.Sin(Math.PI * t / 2.0) + b; + } + return (0.0 - c) / 2.0 * (Math.Cos(Math.PI * (t -= 1.0) / 2.0) - 2.0) + b; + } + + public static double SineEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return SineEaseOut(t * 2.0, b, c / 2.0, d); + } + return SineEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + + public static double CubicEaseOut(double t, double b, double c, double d) + { + return c * ((t = t / d - 1.0) * t * t + 1.0) + b; + } + + public static double CubicEaseIn(double t, double b, double c, double d) + { + return c * (t /= d) * t * t + b; + } + + public static double CubicEaseInOut(double t, double b, double c, double d) + { + if ((t /= d / 2.0) < 1.0) + { + return c / 2.0 * t * t * t + b; + } + return c / 2.0 * ((t -= 2.0) * t * t + 2.0) + b; + } + + public static double CubicEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return CubicEaseOut(t * 2.0, b, c / 2.0, d); + } + return CubicEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + + public static double QuartEaseOut(double t, double b, double c, double d) + { + return (0.0 - c) * ((t = t / d - 1.0) * t * t * t - 1.0) + b; + } + + public static double QuartEaseIn(double t, double b, double c, double d) + { + return c * (t /= d) * t * t * t + b; + } + + public static double QuartEaseInOut(double t, double b, double c, double d) + { + if ((t /= d / 2.0) < 1.0) + { + return c / 2.0 * t * t * t * t + b; + } + return (0.0 - c) / 2.0 * ((t -= 2.0) * t * t * t - 2.0) + b; + } + + public static double QuartEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return QuartEaseOut(t * 2.0, b, c / 2.0, d); + } + return QuartEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + + public static double QuintEaseOut(double t, double b, double c, double d) + { + return c * ((t = t / d - 1.0) * t * t * t * t + 1.0) + b; + } + + public static double QuintEaseIn(double t, double b, double c, double d) + { + return c * (t /= d) * t * t * t * t + b; + } + + public static double QuintEaseInOut(double t, double b, double c, double d) + { + if ((t /= d / 2.0) < 1.0) + { + return c / 2.0 * t * t * t * t * t + b; + } + return c / 2.0 * ((t -= 2.0) * t * t * t * t + 2.0) + b; + } + + public static double QuintEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return QuintEaseOut(t * 2.0, b, c / 2.0, d); + } + return QuintEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + + public static double ElasticEaseOut(double t, double b, double c, double d) + { + if ((t /= d) == 1.0) + { + return b + c; + } + double num = d * 0.3; + double num2 = num / 4.0; + return c * Math.Pow(2.0, -10.0 * t) * Math.Sin((t * d - num2) * (Math.PI * 2.0) / num) + c + b; + } + + public static double ElasticEaseIn(double t, double b, double c, double d) + { + if ((t /= d) == 1.0) + { + return b + c; + } + double num = d * 0.3; + double num2 = num / 4.0; + return 0.0 - c * Math.Pow(2.0, 10.0 * (t -= 1.0)) * Math.Sin((t * d - num2) * (Math.PI * 2.0) / num) + b; + } + + public static double ElasticEaseInOut(double t, double b, double c, double d) + { + if ((t /= d / 2.0) == 2.0) + { + return b + c; + } + double num = d * 0.44999999999999996; + double num2 = num / 4.0; + if (t < 1.0) + { + return -0.5 * (c * Math.Pow(2.0, 10.0 * (t -= 1.0)) * Math.Sin((t * d - num2) * (Math.PI * 2.0) / num)) + b; + } + return c * Math.Pow(2.0, -10.0 * (t -= 1.0)) * Math.Sin((t * d - num2) * (Math.PI * 2.0) / num) * 0.5 + c + b; + } + + public static double ElasticEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return ElasticEaseOut(t * 2.0, b, c / 2.0, d); + } + return ElasticEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + + public static double BounceEaseOut(double t, double b, double c, double d) + { + if ((t /= d) < 0.36363636363636365) + { + return c * (7.5625 * t * t) + b; + } + if (t < 0.72727272727272729) + { + return c * (7.5625 * (t -= 0.54545454545454541) * t + 0.75) + b; + } + if (t < 0.90909090909090906) + { + return c * (7.5625 * (t -= 0.81818181818181823) * t + 0.9375) + b; + } + return c * (7.5625 * (t -= 21.0 / 22.0) * t + 63.0 / 64.0) + b; + } + + public static double BounceEaseIn(double t, double b, double c, double d) + { + return c - BounceEaseOut(d - t, 0.0, c, d) + b; + } + + public static double BounceEaseInOut(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return BounceEaseIn(t * 2.0, 0.0, c, d) * 0.5 + b; + } + return BounceEaseOut(t * 2.0 - d, 0.0, c, d) * 0.5 + c * 0.5 + b; + } + + public static double BounceEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return BounceEaseOut(t * 2.0, b, c / 2.0, d); + } + return BounceEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + + public static double BackEaseOut(double t, double b, double c, double d) + { + return c * ((t = t / d - 1.0) * t * (2.70158 * t + 1.70158) + 1.0) + b; + } + + public static double BackEaseIn(double t, double b, double c, double d) + { + return c * (t /= d) * t * (2.70158 * t - 1.70158) + b; + } + + public static double BackEaseInOut(double t, double b, double c, double d) + { + double num = 1.70158; + if ((t /= d / 2.0) < 1.0) + { + return c / 2.0 * (t * t * (((num *= 1.525) + 1.0) * t - num)) + b; + } + return c / 2.0 * ((t -= 2.0) * t * (((num *= 1.525) + 1.0) * t + num) + 2.0) + b; + } + + public static double BackEaseOutIn(double t, double b, double c, double d) + { + if (t < d / 2.0) + { + return BackEaseOut(t * 2.0, b, c / 2.0, d); + } + return BackEaseIn(t * 2.0 - d, b + c / 2.0, c / 2.0, d); + } + } +} diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration/LiveTimelineEasing.cs.meta b/Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration/LiveTimelineEasing.cs.meta new file mode 100644 index 0000000..652b130 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/Enumeration/LiveTimelineEasing.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 18166ee5027bfd6488364a4e0e57bda1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/ILiveTimelineKeyDataList.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/ILiveTimelineKeyDataList.cs index 993ef2c..0267f12 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/ILiveTimelineKeyDataList.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/ILiveTimelineKeyDataList.cs @@ -19,5 +19,45 @@ namespace Gallop.Live.Cutt LiveTimelineKeyIndex FindCurrentKey(float currentTime); LiveTimelineKeyIndex UpdateCurrentKey(float currentTime); + + LiveTimelineKey this[int index] { get; set; } + + LiveTimelineKeyDataListAttr attribute { get; set; } + + TimelineKeyPlayMode playMode { get; set; } + + int depthCounter { get; } + + void Insert(int index, LiveTimelineKey item); + + IEnumerator GetEnumerator(); + + void Add(LiveTimelineKey item); + + void Clear(); + + bool Remove(LiveTimelineKey item); + + void RemoveAt(int index); + + IEnumerable ToEnumerable(); + + LiveTimelineKey At(int index); + + LiveTimelineKey[] ToArray(); + + List ToList(); + + bool HasAttribute(LiveTimelineKeyDataListAttr attr); + + bool EnablePlayModeTimeline(TimelinePlayerMode playerMode); + + FindKeyResult FindKeyCached(int frame, bool ignoreCache); + + FindKeyResult FindCurrentKey(int frame); + + FindKeyResult FindCurrentKeyNeighbor(int frame, int baseIndex); + + List GetRange(int index, int count); } } \ No newline at end of file diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine.meta b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine.meta new file mode 100644 index 0000000..3cef364 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cec5ac8f4ed2b4f45837e9d4d8f3a997 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamLookAtLocator.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamLookAtLocator.cs new file mode 100644 index 0000000..c0cb71a --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamLookAtLocator.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace Gallop.Live.Cutt +{ + public class LiveTimelineCamLookAtLocator : MonoBehaviour + { + private void Awake() + { + Object.Destroy(this); + } + } +} diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamLookAtLocator.cs.meta b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamLookAtLocator.cs.meta new file mode 100644 index 0000000..e71b1cb --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamLookAtLocator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8e37b05c1d0746a41b8d506037fe66cc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamPosLocator.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamPosLocator.cs new file mode 100644 index 0000000..125f799 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamPosLocator.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace Gallop.Live.Cutt +{ + public class LiveTimelineCamPosLocator : MonoBehaviour + { + private void Awake() + { + Object.Destroy(this); + } + } +} diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamPosLocator.cs.meta b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamPosLocator.cs.meta new file mode 100644 index 0000000..9110513 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimeLine/LiveTimelineCamPosLocator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 40af6c8e71c671f4ead4328697430cf6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineCharaLocator.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineCharaLocator.cs new file mode 100644 index 0000000..9ed3918 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineCharaLocator.cs @@ -0,0 +1,97 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace Gallop.Live.Cutt +{ + public class LiveTimelineCharaLocator : ILiveTimelineCharactorLocator + { + public UmaContainer UmaContainer; + + public Dictionary Bones; + + public LiveTimelineCharaLocator(UmaContainer umaContainer) + { + UmaContainer = umaContainer; + Bones = new Dictionary(); + foreach (var bone in umaContainer.GetComponentsInChildren()) + { + if (!Bones.ContainsKey(bone.name)) + { + Bones.Add(bone.name, bone); + } + } + HeadHeght = Bones["Position"].InverseTransformPoint(Bones["Head"].position).y; + WaistHeght = Bones["Position"].InverseTransformPoint(Bones["Waist"].position).y; + ChestHeght = Bones["Position"].InverseTransformPoint(Bones["Chest"].position).y; + } + + float HeadHeght; + float WaistHeght; + float ChestHeght; + + public bool liveCharaVisible { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public LiveCharaPosition liveCharaStandingPosition { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public Vector3 liveCharaInitialPosition { get => _liveCharaInitialPosition; set => _liveCharaInitialPosition = value; } + + private Vector3 _liveCharaInitialPosition = Vector3.zero; + + public Vector3 liveCharaPosition => throw new NotImplementedException(); + + public Quaternion liveCharaPositionLocalRotation { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public Vector3 liveCharaHeadPosition => UmaContainer.HeadBone.transform.position + new Vector3(0, UmaContainer.EyeHeight, 0); + + public Vector3 liveCharaWaistPosition => Bones["Waist"].position; + + public Vector3 liveCharaLeftHandWristPosition => Bones["Wrist_L"].position; + + public Vector3 liveCharaLeftHandAttachPosition => Bones["Hand_Attach_L"].position; + + public Vector3 liveCharaRightHandAttachPosition => Bones["Hand_Attach_R"].position; + + public Vector3 liveCharaRightHandWristPosition => Bones["Wrist_R"].position; + + public Vector3 liveCharaChestPosition => Bones["Chest"].position; + + public Vector3 liveCharaFootPosition => new Vector3(liveCharaChestPosition.x, 0, liveCharaChestPosition.y); + + public Vector3 liveCharaConstHeightHeadPosition => new Vector3(liveCharaInitialPosition.x, HeadHeght, liveCharaInitialPosition.y); + + public Vector3 liveCharaConstHeightWaistPosition => new Vector3(liveCharaInitialPosition.x, WaistHeght, liveCharaInitialPosition.y); + + public Vector3 liveCharaConstHeightChestPosition => new Vector3(liveCharaInitialPosition.x, ChestHeght, liveCharaInitialPosition.y); + + public Vector3 liveCharaInitialHeightHeadPosition => throw new NotImplementedException(); + + public Vector3 liveCharaInitialHeightWaistPosition => throw new NotImplementedException(); + + public Vector3 liveCharaInitialHeightChestPosition => throw new NotImplementedException(); + + public Vector3 liveCharaScale => Bones["Position"].localScale; + + public Transform liveParentDefaultTransform { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public Transform liveParentTransform { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public Transform liveRootTransform => throw new NotImplementedException(); + + public int liveCharaHeightLevel { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public float liveCharaHeightValue => 160 * Bones["Position"].localScale.y; + + public float liveCharaHeightRatioBase { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public float liveCharaHeightRatio { get => 1; set => throw new NotImplementedException(); } + public Vector3 liveCharaFormationHeightRateOffset { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public bool IsPositionNodePositionAddParent { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public bool IsCastShadow { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public float CySpringRate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int LayerIndex { set => throw new NotImplementedException(); } + public Color EmissiveColor { set => throw new NotImplementedException(); } + } +} diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineCharaLocator.cs.meta b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineCharaLocator.cs.meta new file mode 100644 index 0000000..9e4e317 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineCharaLocator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6b4bac6f526569b42a2e3d41ef56f17e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs index 4f9b433..757fe0b 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs @@ -24,6 +24,27 @@ namespace Gallop.Live.Cutt public const float BaseCharaHeightMax = 190; public const float BaseCharaHeightDiff = 60; + public struct FindTimelineConfig + { + public enum KeyType + { + KeyDirect, + CurrentFrame + } + + public KeyType keyType; + + public ILiveTimelineKeyDataList posKeys; + + public ILiveTimelineKeyDataList lookAtKeys; + + public LiveTimelineKey curKey; + + public LiveTimelineKey nextKey; + + public int extraCameraIndex; + } + private LiveTimelineMotionSequence[] _motionSequenceArray; public LiveTimelineKeyCharaMotionSeqDataList[] _keyArray; @@ -32,6 +53,157 @@ namespace Gallop.Live.Cutt public event Action OnUpdateFacial; + public event Action OnUpdateCameraSwitcher; + + private static Func fnGetCameraPosValue = GetCameraPosValue; + + private static Func fnGetCameraLookAtValue = GetCameraLookAtValue; + + private Vector3 _cameraLayerOffset = Vector3.zero; + + private CacheCamera[] _cameraArray = new CacheCamera[3]; + + private LiveTimelineCamera[] _cameraScriptArray = new LiveTimelineCamera[3]; + + private Dictionary _cameraPositionLocatorDict; + + private Dictionary _cameraLookAtLocatorDict; + + private CacheCamera[] _multiCameraCache; + + private MultiCamera[] _multiCamera; + + private MultiCameraManager _multiCameraManager; + + private bool _isMultiCameraEnable; + + private bool _isNowAlterUpdate; + + private int _oldFrame; + + private float _oldLiveTime; + + private float _currentLiveTime; + + private float _deltaTimeRatio; + + private float _deltaTime; + + private float _baseCameraAspectRatio = 1.77777779f; + + public bool _limitFovForWidth = false; + + private int _currentFrame; + + private bool _isExtraCameraLayer; + + public float currentLiveTime + { + get + { + return _currentLiveTime; + } + private set + { + _currentLiveTime = value; + } + } + + public event CameraPosUpdateInfoDelegate OnUpdateCameraPos; + + public CacheCamera[] cameraArray + { + get + { + return _cameraArray; + } + private set + { + _cameraArray = value; + } + } + + private LiveTimelineCamera[] cameraScriptArray => _cameraScriptArray; + + private Dictionary cameraPositionLocatorDict + { + get + { + if (_cameraPositionLocatorDict == null) + { + _cameraPositionLocatorDict = new Dictionary(); + if (cameraPositionLocatorsRoot != null) + { + Transform[] componentsInChildren = cameraPositionLocatorsRoot.GetComponentsInChildren(); + foreach (Transform transform in componentsInChildren) + { + _cameraPositionLocatorDict[transform.name] = transform; + } + } + } + return _cameraPositionLocatorDict; + } + } + + private Dictionary cameraLookAtLocatorDict + { + get + { + if (_cameraLookAtLocatorDict == null) + { + _cameraLookAtLocatorDict = new Dictionary(); + if (cameraLookAtLocatorsRoot != null) + { + Transform[] componentsInChildren = cameraLookAtLocatorsRoot.GetComponentsInChildren(); + foreach (Transform transform in componentsInChildren) + { + _cameraLookAtLocatorDict[transform.name] = transform; + } + } + } + return _cameraLookAtLocatorDict; + } + } + + public ILiveTimelineCharactorLocator[] liveCharactorLocators => _liveCharactorLocators; + + private ILiveTimelineCharactorLocator[] _liveCharactorLocators = new ILiveTimelineCharactorLocator[liveCharaPositionMax]; + + public Vector3 liveStageCenterPos => _liveStageCenterPos; + + private Vector3 _liveStageCenterPos = Vector3.zero; + + private TimelinePlayerMode _playMode = TimelinePlayerMode.Default; + + public static int liveCharaPositionMax + { + get + { + if (_liveCharaPositionMax < 0) + { + _liveCharaPositionMax = Enum.GetValues(typeof(LiveCharaPosition)).Length; + } + return _liveCharaPositionMax; + } + } + + public CacheCamera GetCamera(int index) + { + if (index < 0 || index >= _cameraArray.Length) + { + return null; + } + return _cameraArray[index]; + } + + private static int _liveCharaPositionMax = -1; + + private static bool availableFindKeyCache => true; + + //private static Func fnGetMultiCameraPositionValueFunc = GetMultiCameraPositionValue; + + //private static Func fnGetMultiCameraLookAtValueFunc = GetMultiCameraLookAtValue; + public void CopyValues(T from, T to) { var json = JsonUtility.ToJson(from); @@ -124,10 +296,33 @@ namespace Gallop.Live.Cutt public void AlterUpdate(float liveTime) { + _isNowAlterUpdate = true; + _isMultiCameraEnable = false; + _isNowAlterUpdate = true; + _oldLiveTime = currentLiveTime; + currentLiveTime = liveTime; + _oldFrame = Mathf.RoundToInt(_oldLiveTime * 60f); + _deltaTime = currentLiveTime - _oldLiveTime; + _deltaTimeRatio = _deltaTime / 0.0166666675f; + _currentFrame = Mathf.RoundToInt(currentLiveTime * 60f); AlterUpdate_CharaMotionSequence(liveTime); AlterUpdate_FacialData(liveTime); AlterUpdate_LipSync(liveTime); - //AlterLateUpdate_FormationOffset(liveTime); + _isNowAlterUpdate = false; + } + + public void AlterLateUpdate() + { + LiveTimelineWorkSheet workSheet = data.worksheetList[0]; + _isNowAlterUpdate = true; + Vector3 outLookAt = Vector3.zero; + AlterUpdate_CameraSwitcher(workSheet, _currentFrame); + AlterLateUpdate_FormationOffset(currentLiveTime); + AlterUpdate_CameraPos(workSheet, _currentFrame); + AlterUpdate_CameraLookAt(workSheet, _currentFrame, ref outLookAt); + AlterUpdate_CameraFov(workSheet, _currentFrame); + AlterUpdate_CameraRoll(workSheet, _currentFrame); + _isNowAlterUpdate = false; } public void AlterUpdate_CharaMotionSequence(float liveTime) @@ -254,6 +449,21 @@ namespace Gallop.Live.Cutt } } + public static void FindTimelineKey(out LiveTimelineKey curKey, out LiveTimelineKey nextKey, ILiveTimelineKeyDataList keys, int curFrame) + { + FindKeyResult findKeyResult = keys.FindKeyCached(curFrame, availableFindKeyCache); + curKey = findKeyResult.key; + + if (curKey != null) + { + nextKey = keys.At(findKeyResult.index + 1); + } + else + { + nextKey = null; + } + } + private void AlterLateUpdate_FormationOffset(float liveTime) { @@ -270,15 +480,59 @@ namespace Gallop.Live.Cutt } } + private static float LinearInterpolateKeyframes(LiveTimelineKey from, LiveTimelineKey to, float curFrame) + { + int num = to.frame - from.frame; + return Mathf.Clamp01((curFrame - (float)from.frame) / (float)num); + } + + private static float CurveInterpolateKeyframes(LiveTimelineKey from, LiveTimelineKey to, float curFrame) + { + LiveTimelineKeyWithInterpolate liveTimelineKeyWithInterpolate = from as LiveTimelineKeyWithInterpolate; + LiveTimelineKeyWithInterpolate liveTimelineKeyWithInterpolate2 = to as LiveTimelineKeyWithInterpolate; + if (liveTimelineKeyWithInterpolate == null) + { + return 0f; + } + if (liveTimelineKeyWithInterpolate2 == null) + { + return 0f; + } + int num = to.frame - from.frame; + float time = Mathf.Clamp01((curFrame - (float)from.frame) / (float)num); + return liveTimelineKeyWithInterpolate2.curve.Evaluate(time); + } + + private static float EaseInterpolateKeyframes(LiveTimelineKey from, LiveTimelineKey to, float curFrame) + { + LiveTimelineKeyWithInterpolate liveTimelineKeyWithInterpolate = from as LiveTimelineKeyWithInterpolate; + LiveTimelineKeyWithInterpolate liveTimelineKeyWithInterpolate2 = to as LiveTimelineKeyWithInterpolate; + if (liveTimelineKeyWithInterpolate == null) + { + return 0f; + } + if (liveTimelineKeyWithInterpolate2 == null) + { + return 0f; + } + int num = to.frame - from.frame; + return LiveTimelineEasing.GetValue(liveTimelineKeyWithInterpolate2.easingType, curFrame - (float)from.frame, 0f, 1f, (float)num); + } + public void LateUpdateFormationOffset_Transform(int targetIndex, LiveTimelineKeyIndex curKeyIndex, float time) { LiveTimelineKeyFormationOffsetData curKey = curKeyIndex.key as LiveTimelineKeyFormationOffsetData; LiveTimelineKeyFormationOffsetData nextKey = curKeyIndex.nextKey as LiveTimelineKeyFormationOffsetData; Director.instance.charaObjs[targetIndex].position = curKey.Position; + Director.instance.charaObjs[targetIndex].localScale = (curKey.visible ? Vector3.one : Vector3.zero); } - + public static void FindTimelineKeyCurrent(out LiveTimelineKey curKey, ILiveTimelineKeyDataList keys, int curFrame) + { + LiveTimelineKey nextKey; + FindTimelineKey(out curKey, out nextKey, keys, curFrame); + } public static void FindTimelineKeyCurrent(out LiveTimelineKeyIndex curKey, ILiveTimelineKeyDataList keys, float curTime) { @@ -305,6 +559,895 @@ namespace Gallop.Live.Cutt return curKey; } + + public MultiCameraManager GetMultiCameraManager() + { + return _multiCameraManager; + } + + public Quaternion GetMultiCameraWorldRotation(int index) + { + if (_multiCameraCache == null || _multiCameraCache.Length <= index) + { + return Quaternion.identity; + } + return _multiCameraCache[index].cacheTransform.rotation; + } + + public bool ExistsMultiCamera(int index) + { + if (_multiCameraCache != null && index < _multiCameraCache.Length) + { + return _multiCameraCache[index] != null; + } + return false; + } + + public float GetCharacterHeight(LiveCharaPosition position) + { + return liveCharactorLocators[(int)position].liveCharaHeightValue; + } + + public Vector3 GetPositionWithCharacters(LiveCharaPositionFlag posFlags, LiveCameraCharaParts parts, Vector3 cameraOffset) + { + Vector3 retPos = Vector3.zero; + Vector3 tmpPos = Vector3.zero; + if (posFlags == 0) + { + retPos = liveStageCenterPos; + tmpPos = liveStageCenterPos; + } + else + { + int num = 0; + switch (parts) + { + case LiveCameraCharaParts.Face: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaHeadPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.Waist: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaWaistPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.LeftHandWrist: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaLeftHandWristPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.LeftHandAttach: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaLeftHandAttachPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.RightHandWrist: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaRightHandWristPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.RightHandAttach: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaRightHandAttachPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.Chest: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaChestPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.Foot: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaFootPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.ConstFaceHeight: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaConstHeightHeadPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.ConstWaistHeight: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaConstHeightWaistPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.ConstChestHeight: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaConstHeightChestPosition; + retPos += cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + num++; + } + } + break; + } + case LiveCameraCharaParts.InitFaceHeight: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaHeadPosition; + tmpPos += liveCharactorLocators[i].liveCharaConstHeightHeadPosition; + Vector3 vector3 = cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + retPos += vector3; + tmpPos += vector3; + num++; + } + } + break; + } + case LiveCameraCharaParts.InitChestHeight: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaChestPosition; + tmpPos += liveCharactorLocators[i].liveCharaConstHeightChestPosition; + Vector3 vector2 = cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + retPos += vector2; + tmpPos += vector2; + num++; + } + } + break; + } + case LiveCameraCharaParts.InitWaistHeight: + { + for (int i = 0; i < liveCharaPositionMax; i++) + { + if (posFlags.hasFlag((LiveCharaPosition)i) && liveCharactorLocators[i] != null) + { + retPos += liveCharactorLocators[i].liveCharaWaistPosition; + tmpPos += liveCharactorLocators[i].liveCharaConstHeightWaistPosition; + Vector3 vector = cameraOffset * liveCharactorLocators[i].liveCharaHeightRatio; + retPos += vector; + tmpPos += vector; + num++; + } + } + break; + } + } + bool flag = num > 1; + if (flag) + { + retPos /= (float)num; + } + if ((uint)(parts - 11) <= 2u) + { + if (flag) + { + tmpPos /= (float)num; + } + retPos.y = tmpPos.y; + } + } + return retPos; + } + + public Vector3 GetPositionWithCharacters(LiveCharaPositionFlag posFlags, LiveCameraCharaParts parts) + { + return GetPositionWithCharacters(posFlags, parts, _cameraLayerOffset); + } + + public static float CalculateInterpolationValue(LiveTimelineKey curKey, LiveTimelineKeyWithInterpolate nextKey, int frame) + { + float result = 0f; + switch (nextKey.interpolateType) + { + case LiveCameraInterpolateType.Linear: + result = LinearInterpolateKeyframes(curKey, nextKey, frame); + break; + case LiveCameraInterpolateType.Curve: + result = CurveInterpolateKeyframes(curKey, nextKey, frame); + break; + case LiveCameraInterpolateType.Ease: + result = EaseInterpolateKeyframes(curKey, nextKey, frame); + break; + } + return result; + } + + public void SetTimelineCamera(Camera cam, int index) + { + if (index < _cameraArray.Length) + { + if (_cameraArray[index] == null) + { + _cameraArray[index] = new CacheCamera(cam); + } + else + { + _cameraArray[index].Set(cam); + } + LiveTimelineCamera liveTimelineCamera = cam.gameObject.GetComponent(); + if (liveTimelineCamera == null) + { + liveTimelineCamera = cam.gameObject.AddComponent(); + } + _cameraScriptArray[index] = liveTimelineCamera; + if (liveTimelineCamera != null) + { + liveTimelineCamera.AlterAwake(); + } + } + } + + private void AlterUpdate_CameraSwitcher(LiveTimelineWorkSheet sheet, int currentFrame) + { + if (sheet.cameraSwitcherKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraSwitcherKeys.EnablePlayModeTimeline(_playMode)) + { + return; + } + LiveTimelineKey curKey = null; + FindTimelineKeyCurrent(out curKey, sheet.cameraSwitcherKeys, currentFrame); + if (curKey == null) + { + return; + } + LiveTimelineKeyCameraSwitcherData liveTimelineKeyCameraSwitcherData = curKey as LiveTimelineKeyCameraSwitcherData; + if (this.OnUpdateCameraSwitcher != null) + { + this.OnUpdateCameraSwitcher(liveTimelineKeyCameraSwitcherData.cameraIndex); + } + else + { + if (liveTimelineKeyCameraSwitcherData.cameraIndex >= cameraArray.Length) + { + return; + } + for (int i = 0; i < cameraArray.Length; i++) + { + if (cameraArray[i] == null) + { + continue; + } + if (i == liveTimelineKeyCameraSwitcherData.cameraIndex) + { + if (!cameraArray[i].camera.enabled) + { + cameraArray[i].camera.enabled = true; + cameraScriptArray[i].enabled = true; + } + } + else if (cameraArray[i].camera.enabled) + { + cameraArray[i].camera.enabled = false; + cameraScriptArray[i].enabled = false; + } + } + } + } + + private void AlterUpdate_CameraPos(LiveTimelineWorkSheet sheet, int currentFrame) + { + if (sheet.cameraPosKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraPosKeys.EnablePlayModeTimeline(_playMode)) + { + return; + } + + CacheCamera camera = GetCamera(sheet.targetCameraIndex); + if (camera == null) + { + return; + } + + LiveTimelineKey curKey = null; + LiveTimelineKey nextKey = null; + FindTimelineKey(out curKey, out nextKey, sheet.cameraPosKeys, currentFrame); + if (curKey == null) + { + return; + } + LiveTimelineKeyCameraPositionData liveTimelineKeyCameraPositionData = curKey as LiveTimelineKeyCameraPositionData; + camera.camera.nearClipPlane = liveTimelineKeyCameraPositionData.nearClip; + camera.camera.farClipPlane = liveTimelineKeyCameraPositionData.farClip; + if (CalculateCameraPos(out var pos, sheet, curKey, nextKey, currentFrame)) + { + camera.cacheTransform.position = pos; + int num = liveTimelineKeyCameraPositionData.GetCullingMask(); + if (num == 0) + { + num = LiveTimelineKeyCameraPositionData.GetDefaultCullingMask(); + } + //camera.camera.cullingMask = num; + if (OnUpdateCameraPos != null) + { + CameraPosUpdateInfo updateInfo = default(CameraPosUpdateInfo); + updateInfo.outlineZOffset = liveTimelineKeyCameraPositionData.outlineZOffset; + updateInfo.characterLODMask = (int)liveTimelineKeyCameraPositionData.characterLODMask; + OnUpdateCameraPos(ref updateInfo); + } + } + } + + private static Vector3 GetCameraPosValue(LiveTimelineKeyCameraPositionData keyData, LiveTimelineControl timelineControl, FindTimelineConfig config) + { + return keyData.GetValue(timelineControl); + } + + public bool CalculateCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, int currentFrame) + { + FindTimelineConfig config = default(FindTimelineConfig); + config.curKey = null; + config.nextKey = null; + config.keyType = FindTimelineConfig.KeyType.CurrentFrame; + config.posKeys = sheet.cameraPosKeys; + config.lookAtKeys = null; + config.extraCameraIndex = 0; + CacheCamera camera = GetCamera(sheet.targetCameraIndex); + return CalculateCameraPos(out pos, sheet, currentFrame, camera, ref config, ref fnGetCameraPosValue); + } + + public bool CalculateCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, LiveTimelineKey curKey, LiveTimelineKey nextKey, int currentFrame) + { + FindTimelineConfig config = default(FindTimelineConfig); + config.curKey = curKey; + config.nextKey = nextKey; + config.keyType = FindTimelineConfig.KeyType.KeyDirect; + config.posKeys = sheet.cameraPosKeys; + config.lookAtKeys = null; + CacheCamera camera = GetCamera(sheet.targetCameraIndex); + config.extraCameraIndex = 0; + return CalculateCameraPos(out pos, sheet, currentFrame, camera, ref config, ref fnGetCameraPosValue); + } + + public bool CalculateCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, int currentFrame, CacheCamera targetCamera, ref FindTimelineConfig config, ref Func getFunc) + { + pos = Vector3.zero; + LiveTimelineKey curKey = null; + LiveTimelineKey nextKey = null; + if (config.posKeys == null) + { + return false; + } + if (config.keyType == FindTimelineConfig.KeyType.CurrentFrame) + { + FindTimelineKey(out curKey, out nextKey, config.posKeys, currentFrame); + } + else + { + curKey = config.curKey; + nextKey = config.nextKey; + } + if (curKey == null) + { + return false; + } + LiveTimelineKeyCameraPositionData liveTimelineKeyCameraPositionData = curKey as LiveTimelineKeyCameraPositionData; + LiveTimelineKeyCameraPositionData liveTimelineKeyCameraPositionData2 = nextKey as LiveTimelineKeyCameraPositionData; + if (liveTimelineKeyCameraPositionData2 != null && liveTimelineKeyCameraPositionData2.interpolateType != 0) + { + float t = CalculateInterpolationValue(liveTimelineKeyCameraPositionData, liveTimelineKeyCameraPositionData2, currentFrame); + int bezierPointCount = liveTimelineKeyCameraPositionData2.GetBezierPointCount(); + if (bezierPointCount == 0) + { + pos = LerpWithoutClamp(getFunc(liveTimelineKeyCameraPositionData, this, config), getFunc(liveTimelineKeyCameraPositionData2, this, config), t); + } + else if (liveTimelineKeyCameraPositionData2.necessaryToUseNewBezierCalcMethod) + { + BezierCalcWork.cameraPos.Set(getFunc(liveTimelineKeyCameraPositionData, this, config), getFunc(liveTimelineKeyCameraPositionData2, this, config), bezierPointCount); + BezierCalcWork.cameraPos.UpdatePoints(liveTimelineKeyCameraPositionData2, this); + BezierCalcWork.cameraPos.Calc(bezierPointCount, t, out pos); + } + else + { + Vector3 end = getFunc(liveTimelineKeyCameraPositionData2, this, config); + Vector3 cp = liveTimelineKeyCameraPositionData2.GetBezierPoint(0, this); + Vector3 cp2 = liveTimelineKeyCameraPositionData2.GetBezierPoint(1, this); + Vector3 cp3 = liveTimelineKeyCameraPositionData2.GetBezierPoint(2, this); + switch (liveTimelineKeyCameraPositionData2.GetBezierPointCount()) + { + default: + pos = LerpWithoutClamp(getFunc(liveTimelineKeyCameraPositionData, this, config), getFunc(liveTimelineKeyCameraPositionData2, this, config), t); + break; + case 1: + { + Vector3 start3 = getFunc(liveTimelineKeyCameraPositionData, this, config); + BezierUtil.Calc(ref start3, ref end, ref cp, t, out pos); + break; + } + case 2: + { + Vector3 start2 = getFunc(liveTimelineKeyCameraPositionData, this, config); + BezierUtil.Calc(ref start2, ref end, ref cp, ref cp2, t, out pos); + break; + } + case 3: + { + Vector3 start = getFunc(liveTimelineKeyCameraPositionData, this, config); + BezierUtil.Calc(ref start, ref end, ref cp, ref cp2, ref cp3, t, out pos); + break; + } + } + } + } + else + { + pos = getFunc(liveTimelineKeyCameraPositionData, this, config); + } + if (_isNowAlterUpdate && liveTimelineKeyCameraPositionData.attribute.hasFlag(LiveTimelineKeyAttribute.CameraDelayEnable) && (_oldFrame >= liveTimelineKeyCameraPositionData.frame || currentFrame < liveTimelineKeyCameraPositionData.frame || liveTimelineKeyCameraPositionData.attribute.hasFlag(LiveTimelineKeyAttribute.CameraDelayInherit))) + { + if (targetCamera == null) + { + return false; + } + float t2 = liveTimelineKeyCameraPositionData.traceSpeed * _deltaTimeRatio; + pos = Vector3.Slerp(targetCamera.cacheTransform.position, pos, t2); + } + return true; + } + + private void AlterUpdate_CameraLookAt(LiveTimelineWorkSheet sheet, int currentFrame, ref Vector3 outLookAt) + { + if (!sheet.cameraLookAtKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) && sheet.cameraLookAtKeys.EnablePlayModeTimeline(_playMode)) + { + CacheCamera camera = GetCamera(sheet.targetCameraIndex); + if (camera != null && CalculateCameraLookAt(out var lookAtPos, sheet, currentFrame)) + { + camera.cacheTransform.LookAt(lookAtPos, Vector3.up); + outLookAt = lookAtPos; + } + } + } + + private static Vector3 GetCameraLookAtValue(LiveTimelineKeyCameraLookAtData keyData, LiveTimelineControl timelineControl, Vector3 camPos, FindTimelineConfig config) + { + return keyData.GetValue(timelineControl, camPos); + } + + public bool CalculateCameraLookAt(out Vector3 lookAtPos, LiveTimelineWorkSheet sheet, int currentFrame) + { + CacheCamera camera = GetCamera(sheet.targetCameraIndex); + FindTimelineConfig config = default(FindTimelineConfig); + config.curKey = null; + config.nextKey = null; + config.keyType = FindTimelineConfig.KeyType.CurrentFrame; + config.posKeys = sheet.cameraPosKeys; + config.lookAtKeys = sheet.cameraLookAtKeys; + config.extraCameraIndex = 0; + return CalculateCameraLookAt(out lookAtPos, sheet, currentFrame, camera, ref config, ref fnGetCameraLookAtValue, ref fnGetCameraPosValue); + } + + private bool CalculateCameraLookAt(out Vector3 lookAtPos, LiveTimelineWorkSheet sheet, int currentFrame, CacheCamera targetCamera, ref FindTimelineConfig config, ref Func getLookAtValueFunc, ref Func getPosValueFunc) + { + lookAtPos = Vector3.zero; + CacheCamera camera = GetCamera(sheet.targetCameraIndex); + if (camera == null || config.lookAtKeys == null || config.posKeys == null) + { + return false; + } + LiveTimelineKey curKey = null; + LiveTimelineKey nextKey = null; + FindTimelineKey(out curKey, out nextKey, config.lookAtKeys, currentFrame); + if (curKey == null) + { + return false; + } + Vector3 position = camera.cacheTransform.position; + LiveTimelineKeyCameraLookAtData liveTimelineKeyCameraLookAtData = curKey as LiveTimelineKeyCameraLookAtData; + LiveTimelineKeyCameraLookAtData liveTimelineKeyCameraLookAtData2 = nextKey as LiveTimelineKeyCameraLookAtData; + if (liveTimelineKeyCameraLookAtData2 != null && liveTimelineKeyCameraLookAtData2.interpolateType != 0) + { + float t = CalculateInterpolationValue(liveTimelineKeyCameraLookAtData, liveTimelineKeyCameraLookAtData2, currentFrame); + int bezierPointCount = liveTimelineKeyCameraLookAtData2.GetBezierPointCount(); + if (bezierPointCount == 0) + { + lookAtPos = LerpWithoutClamp(getLookAtValueFunc(liveTimelineKeyCameraLookAtData, this, position, config), getLookAtValueFunc(liveTimelineKeyCameraLookAtData2, this, position, config), t); + } + else if (liveTimelineKeyCameraLookAtData2.necessaryToUseNewBezierCalcMethod) + { + Vector3 zero = Vector3.zero; + BezierCalcWork.cameraLookAt.Set(getLookAtValueFunc(liveTimelineKeyCameraLookAtData, this, position, config), getLookAtValueFunc(liveTimelineKeyCameraLookAtData2, this, zero, config), bezierPointCount); + BezierCalcWork.cameraLookAt.UpdatePoints(liveTimelineKeyCameraLookAtData2, this, zero); + BezierCalcWork.cameraLookAt.Calc(bezierPointCount, t, out lookAtPos); + } + else + { + Vector3 zero2 = Vector3.zero; + Vector3 end = getLookAtValueFunc(liveTimelineKeyCameraLookAtData2, this, zero2, config); + Vector3 cp = liveTimelineKeyCameraLookAtData2.GetBezierPoint(0, this, zero2); + Vector3 cp2 = liveTimelineKeyCameraLookAtData2.GetBezierPoint(1, this, zero2); + Vector3 cp3 = liveTimelineKeyCameraLookAtData2.GetBezierPoint(2, this, zero2); + switch (liveTimelineKeyCameraLookAtData2.GetBezierPointCount()) + { + default: + lookAtPos = LerpWithoutClamp(getLookAtValueFunc(liveTimelineKeyCameraLookAtData, this, position, config), getLookAtValueFunc(liveTimelineKeyCameraLookAtData2, this, position, config), t); + break; + case 1: + { + Vector3 start3 = getLookAtValueFunc(liveTimelineKeyCameraLookAtData, this, position, config); + BezierUtil.Calc(ref start3, ref end, ref cp, t, out lookAtPos); + break; + } + case 2: + { + Vector3 start2 = getLookAtValueFunc(liveTimelineKeyCameraLookAtData, this, position, config); + BezierUtil.Calc(ref start2, ref end, ref cp, ref cp2, t, out lookAtPos); + break; + } + case 3: + { + Vector3 start = getLookAtValueFunc(liveTimelineKeyCameraLookAtData, this, position, config); + BezierUtil.Calc(ref start, ref end, ref cp, ref cp2, ref cp3, t, out lookAtPos); + break; + } + } + } + } + else + { + lookAtPos = getLookAtValueFunc(liveTimelineKeyCameraLookAtData, this, position, config); + } + if (_isNowAlterUpdate && liveTimelineKeyCameraLookAtData.attribute.hasFlag(LiveTimelineKeyAttribute.CameraDelayEnable) && (_oldFrame >= liveTimelineKeyCameraLookAtData.frame || currentFrame < liveTimelineKeyCameraLookAtData.frame || liveTimelineKeyCameraLookAtData.attribute.hasFlag(LiveTimelineKeyAttribute.CameraDelayInherit))) + { + Vector3 b = lookAtPos - camera.cacheTransform.position; + float magnitude = b.magnitude; + if (magnitude >= float.Epsilon) + { + b /= magnitude; + float t2 = liveTimelineKeyCameraLookAtData.traceSpeed * _deltaTimeRatio; + lookAtPos = position + Vector3.Slerp(camera.cacheTransform.forward, b, t2) * magnitude; + } + } + return true; + } + + private void AlterUpdate_CameraFov(LiveTimelineWorkSheet sheet, int currentFrame) + { + if (sheet.cameraFovKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraFovKeys.EnablePlayModeTimeline(_playMode)) + { + return; + } + CacheCamera camera = GetCamera(sheet.targetCameraIndex); + if (camera == null) + { + return; + } + LiveTimelineKey curKey = null; + LiveTimelineKey nextKey = null; + FindTimelineKey(out curKey, out nextKey, sheet.cameraFovKeys, currentFrame); + if (curKey == null) + { + return; + } + LiveTimelineKeyCameraFovData liveTimelineKeyCameraFovData = curKey as LiveTimelineKeyCameraFovData; + LiveTimelineKeyCameraFovData liveTimelineKeyCameraFovData2 = nextKey as LiveTimelineKeyCameraFovData; + float num = 80f; + if (liveTimelineKeyCameraFovData2 != null && liveTimelineKeyCameraFovData2.interpolateType != 0) + { + float t = CalculateInterpolationValue(liveTimelineKeyCameraFovData, liveTimelineKeyCameraFovData2, currentFrame); + num = LerpWithoutClamp(liveTimelineKeyCameraFovData.fov, liveTimelineKeyCameraFovData2.fov, t); + } + else if (liveTimelineKeyCameraFovData.fovType == LiveCameraFovType.Direct) + { + num = liveTimelineKeyCameraFovData.fov; + } + if (_limitFovForWidth) + { + float num2 = (float)camera.camera.pixelWidth / (float)camera.camera.pixelHeight; + if (num2 > _baseCameraAspectRatio) + { + float num3 = num2 / _baseCameraAspectRatio; + num /= num3; + } + } + camera.camera.fieldOfView = num; + } + + private void AlterUpdate_CameraRoll(LiveTimelineWorkSheet sheet, int currentFrame) + { + if (sheet.cameraRollKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraRollKeys.EnablePlayModeTimeline(_playMode)) + { + return; + } + CacheCamera camera = GetCamera(sheet.targetCameraIndex); + if (camera == null) + { + return; + } + LiveTimelineKey curKey = null; + LiveTimelineKey nextKey = null; + FindTimelineKey(out curKey, out nextKey, sheet.cameraRollKeys, currentFrame); + if (curKey != null) + { + LiveTimelineKeyCameraRollData liveTimelineKeyCameraRollData = curKey as LiveTimelineKeyCameraRollData; + LiveTimelineKeyCameraRollData liveTimelineKeyCameraRollData2 = nextKey as LiveTimelineKeyCameraRollData; + float num = 80f; + if (liveTimelineKeyCameraRollData2 != null && liveTimelineKeyCameraRollData2.interpolateType != 0) + { + float t = CalculateInterpolationValue(liveTimelineKeyCameraRollData, liveTimelineKeyCameraRollData2, currentFrame); + num = LerpWithoutClamp(liveTimelineKeyCameraRollData.degree, liveTimelineKeyCameraRollData2.degree, t); + } + else + { + num = liveTimelineKeyCameraRollData.degree; + } + camera.cacheTransform.Rotate(0f, 0f, num); + } + } + + //public void SetMultiCamera(MultiCameraManager manager, MultiCamera[] multiCamera) + //{ + // _multiCamera = multiCamera; + // _multiCameraManager = manager; + // if (multiCamera != null) + // { + // _multiCameraCache = new CacheCamera[multiCamera.Length]; + // for (int i = 0; i < multiCamera.Length; i++) + // { + // _multiCameraCache[i] = new CacheCamera(multiCamera[i].GetCamera()); + // } + // } + //} + + //private static Vector3 GetMultiCameraPositionValue(LiveTimelineKeyCameraPositionData keyData, LiveTimelineControl timelineControl, FindTimelineConfig config) + //{ + // return (keyData as LiveTimelineKeyMultiCameraPositionData).GetValue(timelineControl, config.extraCameraIndex); + //} + + //public bool CalculateMultiCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, LiveTimelineKey curKey, LiveTimelineKey nextKey, int currentFrame, int timelineIndex) + //{ + // if (sheet.multiCameraPositionKeys.Count <= timelineIndex) + // { + // pos = Vector3.zero; + // return false; + // } + // FindTimelineConfig config = default(FindTimelineConfig); + // config.curKey = curKey; + // config.nextKey = nextKey; + // config.keyType = FindTimelineConfig.KeyType.KeyDirect; + // config.posKeys = sheet.multiCameraPositionKeys[timelineIndex].keys; + // config.lookAtKeys = null; + // config.extraCameraIndex = timelineIndex; + // return CalculateCameraPos(out pos, sheet, currentFrame, _multiCameraCache[timelineIndex], ref config, ref fnGetMultiCameraPositionValueFunc); + //} + + //private void AlterUpdate_MultiCameraPosition(LiveTimelineWorkSheet sheet, int currentFrame) + //{ + // int count = sheet.multiCameraPositionKeys.Count; + // for (int i = 0; i < count; i++) + // { + // LiveTimelineKeyMultiCameraPositionDataList keys = sheet.multiCameraPositionKeys[i].keys; + // if (keys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !keys.EnablePlayModeTimeline(_playMode) || i >= _multiCameraCache.Length) + // { + // continue; + // } + // LiveTimelineKey curKey = null; + // LiveTimelineKey nextKey = null; + // FindTimelineKey(out curKey, out nextKey, keys, currentFrame); + // if (!CalculateMultiCameraPos(out var pos, sheet, curKey, nextKey, currentFrame, i)) + // { + // continue; + // } + // CacheCamera cacheCamera = _multiCameraCache[i]; + // Camera camera = cacheCamera.camera; + // if (curKey == null) + // { + // continue; + // } + // LiveTimelineKeyMultiCameraPositionData liveTimelineKeyMultiCameraPositionData = curKey as LiveTimelineKeyMultiCameraPositionData; + // LiveTimelineKeyMultiCameraPositionData liveTimelineKeyMultiCameraPositionData2 = nextKey as LiveTimelineKeyMultiCameraPositionData; + // camera.enabled = liveTimelineKeyMultiCameraPositionData.enableMultiCamera; + // if (liveTimelineKeyMultiCameraPositionData.enableMultiCamera) + // { + // _isMultiCameraEnable = true; + // camera.cullingMask = 0x10000000 | liveTimelineKeyMultiCameraPositionData.GetCullingMask(); + // float fieldOfView; + // Vector3 maskPosition; + // Quaternion maskRotation; + // Vector3 maskScale; + // if (liveTimelineKeyMultiCameraPositionData2 != null && liveTimelineKeyMultiCameraPositionData2.interpolateType != 0) + // { + // float t = CalculateInterpolationValue(liveTimelineKeyMultiCameraPositionData, liveTimelineKeyMultiCameraPositionData2, currentFrame); + // fieldOfView = LerpWithoutClamp(liveTimelineKeyMultiCameraPositionData.fov, liveTimelineKeyMultiCameraPositionData2.fov, t); + // maskPosition = LerpWithoutClamp(liveTimelineKeyMultiCameraPositionData.maskPosition, liveTimelineKeyMultiCameraPositionData2.maskPosition, t); + // maskRotation = Quaternion.Lerp(liveTimelineKeyMultiCameraPositionData.maskRotation, liveTimelineKeyMultiCameraPositionData2.maskRotation, t); + // maskScale = LerpWithoutClamp(liveTimelineKeyMultiCameraPositionData.maskScale, liveTimelineKeyMultiCameraPositionData2.maskScale, t); + // } + // else + // { + // fieldOfView = liveTimelineKeyMultiCameraPositionData.fov; + // maskPosition = liveTimelineKeyMultiCameraPositionData.maskPosition; + // maskRotation = liveTimelineKeyMultiCameraPositionData.maskRotation; + // maskScale = liveTimelineKeyMultiCameraPositionData.maskScale; + // } + // camera.nearClipPlane = liveTimelineKeyMultiCameraPositionData.nearClip; + // camera.farClipPlane = liveTimelineKeyMultiCameraPositionData.farClip; + // camera.fieldOfView = fieldOfView; + // cacheCamera.cacheTransform.localPosition = pos; + // if (_multiCamera[i].maskIndex != liveTimelineKeyMultiCameraPositionData.maskIndex) + // { + // _multiCameraManager.AttachMask(i, liveTimelineKeyMultiCameraPositionData.maskIndex); + // } + // if (_multiCamera[i].maskIndex >= 0) + // { + // _multiCamera[i].maskPosition = maskPosition; + // _multiCamera[i].maskRotation = maskRotation; + // _multiCamera[i].maskScale = maskScale; + // } + // } + // } + //} + + //private static Vector3 GetMultiCameraLookAtValue(LiveTimelineKeyCameraLookAtData keyData, LiveTimelineControl timelineControl, Vector3 camPos, FindTimelineConfig config) + //{ + // return (keyData as LiveTimelineKeyMultiCameraLookAtData).GetValue(timelineControl, camPos, config.extraCameraIndex); + //} + + //public bool CalculateMultiCameraLookAt(out Vector3 pos, LiveTimelineWorkSheet sheet, LiveTimelineKey curKey, LiveTimelineKey nextKey, int currentFrame, int timelineIndex = 0) + //{ + // if (sheet.multiCameraPositionKeys.Count <= timelineIndex || sheet.multiCameraLookAtKeys.Count <= timelineIndex) + // { + // pos = Vector3.zero; + // return false; + // } + // FindTimelineConfig config = default(FindTimelineConfig); + // config.curKey = curKey; + // config.nextKey = nextKey; + // config.keyType = FindTimelineConfig.KeyType.KeyDirect; + // config.posKeys = sheet.multiCameraPositionKeys[timelineIndex].keys; + // config.lookAtKeys = sheet.multiCameraLookAtKeys[timelineIndex].keys; + // config.extraCameraIndex = timelineIndex; + // return CalculateCameraLookAt(out pos, sheet, currentFrame, _multiCameraCache[timelineIndex], ref config, ref fnGetMultiCameraLookAtValueFunc, ref fnGetMultiCameraPositionValueFunc); + //} + + + //private void AlterUpdate_MultiCameraLookAt(LiveTimelineWorkSheet sheet, int currentFrame) + //{ + // int count = sheet.multiCameraLookAtKeys.Count; + // for (int i = 0; i < count; i++) + // { + // LiveTimelineKeyMultiCameraLookAtDataList keys = sheet.multiCameraLookAtKeys[i].keys; + // if (i >= _multiCameraCache.Length) + // { + // break; + // } + // if (keys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !keys.EnablePlayModeTimeline(_playMode)) + // { + // continue; + // } + // FindTimelineKey(out var curKey, out var nextKey, keys, currentFrame); + // if (curKey != null && CalculateMultiCameraLookAt(out var pos, sheet, curKey, nextKey, currentFrame, i)) + // { + // LiveTimelineKeyMultiCameraLookAtData liveTimelineKeyMultiCameraLookAtData = curKey as LiveTimelineKeyMultiCameraLookAtData; + // LiveTimelineKeyMultiCameraLookAtData liveTimelineKeyMultiCameraLookAtData2 = nextKey as LiveTimelineKeyMultiCameraLookAtData; + // float zAngle; + // if (liveTimelineKeyMultiCameraLookAtData2 != null && liveTimelineKeyMultiCameraLookAtData2.interpolateType != 0) + // { + // float t = CalculateInterpolationValue(liveTimelineKeyMultiCameraLookAtData, liveTimelineKeyMultiCameraLookAtData2, currentFrame); + // zAngle = LerpWithoutClamp(liveTimelineKeyMultiCameraLookAtData.roll, liveTimelineKeyMultiCameraLookAtData2.roll, t); + // } + // else + // { + // zAngle = liveTimelineKeyMultiCameraLookAtData.roll; + // } + // Transform cacheTransform = _multiCameraCache[i].cacheTransform; + // cacheTransform.LookAt(pos); + // cacheTransform.Rotate(0f, 0f, zAngle); + // } + // } + //} + + //private void AlterUpdate_MultiCamera(LiveTimelineWorkSheet sheet, int currentFrame) + //{ + // if (_multiCameraCache != null && !(_multiCameraManager == null) && _multiCameraManager.isInitialize) + // { + // AlterUpdate_MultiCameraPosition(sheet, currentFrame); + // AlterUpdate_MultiCameraLookAt(sheet, currentFrame); + // } + //} + + private static float LerpWithoutClamp(float a, float b, float t) + { + return a + (b - a) * t; + } + + private static Vector2 LerpWithoutClamp(Vector2 a, Vector2 b, float t) + { + return new Vector2(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t); + } + + private static Vector3 LerpWithoutClamp(Vector3 a, Vector3 b, float t) + { + return new Vector3(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t); + } + + private static Vector4 LerpWithoutClamp(Vector4 a, Vector4 b, float t) + { + return new Vector4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t); + } + + private static Color LerpWithoutClamp(Color a, Color b, float t) + { + return new Color(a.r + (b.r - a.r) * t, a.g + (b.g - a.g) * t, a.b + (b.b - a.b) * t, a.a + (b.a - a.a) * t); + } } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineCharaPartsData.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineCharaPartsData.cs index b35c791..446abb6 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineCharaPartsData.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineCharaPartsData.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using Gallop.Cutt.Util; -using Cutt; +using Gallop.Live.Cutt; namespace Gallop.Live.Cutt { diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialToonData.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialToonData.cs index d7d5488..f22bca0 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialToonData.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialToonData.cs @@ -1,4 +1,4 @@ -using Cutt; +using Gallop.Live.Cutt; using System.Collections; using System.Collections.Generic; using UnityEngine; diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFormationOffsetData.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFormationOffsetData.cs index 96601e1..9347415 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFormationOffsetData.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFormationOffsetData.cs @@ -1,4 +1,4 @@ -using Cutt; +using Gallop.Live.Cutt; using System.Collections; using System.Collections.Generic; using UnityEngine; diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineKeyCameraLookAtDataList.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineKeyCameraLookAtDataList.cs index 7ca57de..c28546b 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineKeyCameraLookAtDataList.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineKeyCameraLookAtDataList.cs @@ -20,6 +20,92 @@ namespace Gallop.Live.Cutt public Vector3 charaPos; public Vector3[] bezierPoints; public float traceSpeed; + + public Vector3 rotation = Vector3.forward; + + public float eyeLength = 10f; + + public Vector3 offset = Vector3.zero; + + public bool newBezierCalcMethod; + + public bool necessaryToUseNewBezierCalcMethod + { + get + { + if (!newBezierCalcMethod) + { + return GetBezierPointCount() > 3; + } + return true; + } + } + + public bool HasBezier() + { + if (bezierPoints != null) + { + return bezierPoints.Length != 0; + } + return false; + } + + public int GetBezierPointCount() + { + if (!HasBezier()) + { + return 0; + } + return bezierPoints.Length; + } + public Vector3 GetBezierPoint(int index, LiveTimelineControl timelineControl, Vector3 camPos) + { + if (HasBezier() && index < bezierPoints.Length) + { + return GetValue(timelineControl, camPos) + bezierPoints[index]; + } + return GetValue(timelineControl, camPos) + Vector3.zero; + } + + public void GetBezierPoints(LiveTimelineControl timelineControl, Vector3 camPos, Vector3[] outPoints, int startIndex) + { + if (HasBezier()) + { + int num = Mathf.Min(outPoints.Length, bezierPoints.Length); + Vector3 value = GetValue(timelineControl, camPos); + for (int i = 0; i < num; i++) + { + outPoints[startIndex + i] = value + bezierPoints[i]; + } + } + } + + public virtual Vector3 GetValue(LiveTimelineControl timelineControl, Vector3 camPos) + { + return GetValue(timelineControl, lookAtType, camPos, containOffset: true); + } + + protected virtual Vector3 GetValue(LiveTimelineControl timelineControl, LiveCameraLookAtType type, Vector3 camPos, bool containOffset) + { + Vector3 vector = Vector3.zero; + switch (type) + { + case LiveCameraLookAtType.Character: + vector += timelineControl.GetPositionWithCharacters(lookAtCharaPos, lookAtCharaParts); + break; + case LiveCameraLookAtType.Direct: + { + Vector3 vector2 = Quaternion.Euler(rotation) * Vector3.forward * eyeLength; + vector = camPos + vector2; + break; + } + } + if (!containOffset) + { + return vector; + } + return vector + offset; + } } [System.Serializable] diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineMonitorCameraPositionData.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineMonitorCameraPositionData.cs index 7101a2f..c673531 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineMonitorCameraPositionData.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineMonitorCameraPositionData.cs @@ -10,7 +10,6 @@ namespace Gallop.Live.Cutt public bool enable; public float fov; public float roll; - public LiveCameraCullingLayer cullingMask; } [System.Serializable] diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineWorkSheet.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineWorkSheet.cs index 6633596..0baafb4 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineWorkSheet.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineWorkSheet.cs @@ -1,4 +1,5 @@ -using Cutt; +using Gallop.Live.Cutt; +using System; using System.Collections.Generic; using System.Windows.Forms; using UnityEngine; @@ -6,132 +7,177 @@ using UnityEngine; namespace Gallop.Live.Cutt { public enum LiveTimelineKeyAttribute - { - Disable = 1, - CameraDelayEnable = 2, - CameraDelayInherit = 4, - KeyCommonBitMask = 32768 - } - - public enum LiveTimelineKeyDataListAttr - { - Disable = 1 - } - - public enum TimelineKeyPlayMode - { - Always = 0, - LightOnly = 1, - DefaultOver = 2 - } - - public enum LiveCameraInterpolateType - { - None = 0, - Linear = 1, - Curve = 2, - Ease = 3 - } - - public enum LiveCameraPositionType - { - Direct = 0, - Character = 1 - } - - public enum LiveCharaPositionFlag - { - Place01 = 1, - Place02 = 2, - Place03 = 4, - Place04 = 8, - Place05 = 16, - Place06 = 32, - Place07 = 64, - Place08 = 128, - Place09 = 256, - Place10 = 512, - Place11 = 1024, - Place12 = 2048, - Place13 = 4096, - Place14 = 8192, - Place15 = 16384, - Place16 = 32768, - Place17 = 65536, - Place18 = 131072, - Center = 1, - Left = 2, - Right = 4, - Side = 6, - Back = 262136, - Other = 262142, - All = 262143 - } - - public enum LiveCameraCharaParts - { - Face = 0, - Waist = 1, - LeftHandWrist = 2, - RightHandAttach = 3, - Chest = 4, - Foot = 5, - InitFaceHeight = 6, - InitWaistHeight = 7, - InitChestHeight = 8, - RightHandWrist = 9, - LeftHandAttach = 10, - ConstFaceHeight = 11, - ConstChestHeight = 12, - ConstWaistHeight = 13, - ConstFootHeight = 14, - Position = 15, - PositionWithoutOffset = 16, - InitialHeightFace = 17, - InitialHeightChest = 18, - InitialHeightWaist = 19, - Max = 20 - } - - public enum LiveCameraCullingLayer - { - None = 0, - TransparentFX = 1, - Background3d_NotReflect = 2, - Background3d = 4, - Character3d = 8, - Character3d_0 = 16, - Character3d_1 = 32, - Character3d_NotReflect = 64, - NotLayerDefault = 128, - NotLayer3d = 256, - Effect = 512 - } - - public enum LiveCameraBgColorType - { - Direct = 0, - CharacterImageColorMain = 1, - CharacterImageColorSub = 2, - CharacterUIColorMain = 3, - CharacterUIColorSub = 4 - } - - [System.Serializable] - public class LiveTimelineKeyDataListTemplate : ILiveTimelineKeyDataList where T : LiveTimelineKey { - [SerializeField] - private LiveTimelineKeyDataListAttr _attribute; - [SerializeField] - private TimelineKeyPlayMode _playMode; - public List thisList; + Disable = 1, + CameraDelayEnable = 2, + CameraDelayInherit = 4, + KeyCommonBitMask = 32768 + } + + public enum LiveTimelineKeyDataListAttr + { + Disable = 1 + } + + public enum TimelineKeyPlayMode + { + Always = 0, + LightOnly = 1, + DefaultOver = 2 + } + + public enum LiveCameraInterpolateType + { + None = 0, + Linear = 1, + Curve = 2, + Ease = 3 + } + + public enum LiveCameraPositionType + { + Direct = 0, + Character = 1 + } + + [Flags] + public enum LiveCharaPositionFlag + { + Place01 = 1, + Place02 = 2, + Place03 = 4, + Place04 = 8, + Place05 = 16, + Place06 = 32, + Place07 = 64, + Place08 = 128, + Place09 = 256, + Place10 = 512, + Place11 = 1024, + Place12 = 2048, + Place13 = 4096, + Place14 = 8192, + Place15 = 16384, + Place16 = 32768, + Place17 = 65536, + Place18 = 131072, + Center = 1, + Left = 2, + Right = 4, + Side = 6, + Back = 262136, + Other = 262142, + All = 262143 + } + + public enum LiveCameraLookAtCharaParts + { + Face, + Waist, + LeftHandWrist, + RightHandAttach, + Chest, + Foot, + ConstHeightFace, + ConstHeightWaist, + ConstHeightChest, + RightHandWrist, + LeftHandAttach, + AxisLockedFace, + AxisLockedChest, + AxisLockedWaist + } + + public enum LiveCameraCharaParts + { + Face = 0, + Waist = 1, + LeftHandWrist = 2, + RightHandAttach = 3, + Chest = 4, + Foot = 5, + InitFaceHeight = 6, + InitWaistHeight = 7, + InitChestHeight = 8, + RightHandWrist = 9, + LeftHandAttach = 10, + ConstFaceHeight = 11, + ConstChestHeight = 12, + ConstWaistHeight = 13, + ConstFootHeight = 14, + Position = 15, + PositionWithoutOffset = 16, + InitialHeightFace = 17, + InitialHeightChest = 18, + InitialHeightWaist = 19, + Max = 20 + } + + public enum LiveCameraCullingLayer + { + None = 0, + TransparentFX = 1, + Background3d_NotReflect = 2, + Background3d = 4, + Character3d = 8, + Character3d_0 = 16, + Character3d_1 = 32, + Character3d_NotReflect = 64, + NotLayerDefault = 128, + NotLayer3d = 256, + Effect = 512 + } + + public enum LiveCameraBgColorType + { + Direct = 0, + CharacterImageColorMain = 1, + CharacterImageColorSub = 2, + CharacterUIColorMain = 3, + CharacterUIColorSub = 4 + } + + [System.Serializable] + public class LiveTimelineKeyDataListTemplate : ILiveTimelineKeyDataList where T : LiveTimelineKey + { + [SerializeField] + private LiveTimelineKeyDataListAttr _attribute; + + [SerializeField] + private TimelineKeyPlayMode _playMode; - public LiveTimelineKeyIndex thisTimeKeyIndex = new LiveTimelineKeyIndex(); - public int Count => thisList.Count; public LiveTimelineKeyIndex TimeKeyIndex => thisTimeKeyIndex; + public List thisList = new List(); + + private int _lastFindIndex = -1; + + + public LiveTimelineKeyDataListAttr attribute + { + get + { + return _attribute; + } + set + { + _attribute = value; + } + } + + public TimelineKeyPlayMode playMode + { + get + { + return _playMode; + } + set + { + _playMode = value; + } + } public LiveTimelineKey this[int index] { @@ -145,40 +191,44 @@ namespace Gallop.Live.Cutt } } + public int Count => thisList.Count; + + public int depthCounter => 0; + public LiveTimelineKeyIndex FindCurrentKey(float currentTime) - { + { for (int i = thisList.Count - 1; i >= 0; i--) { if (currentTime >= (double)thisList[i].frame / 60) { thisTimeKeyIndex.index = i; thisTimeKeyIndex.key = thisList[i]; - if(i+1 != thisList.Count) - { + if (i + 1 != thisList.Count) + { thisTimeKeyIndex.nextKey = thisList[i + 1]; - } - else - { + } + else + { thisTimeKeyIndex.nextKey = null; } - if(i-1 >= 0) - { + if (i - 1 >= 0) + { thisTimeKeyIndex.prevKey = thisList[i - 1]; - } - else - { - thisTimeKeyIndex.prevKey = null; } - return thisTimeKeyIndex; + else + { + thisTimeKeyIndex.prevKey = null; + } + return thisTimeKeyIndex; } } - return null; + return null; } - public LiveTimelineKeyIndex UpdateCurrentKey(float currentTime) - { + public LiveTimelineKeyIndex UpdateCurrentKey(float currentTime) + { if (thisTimeKeyIndex.nextKey != null) - { + { if (currentTime >= (double)thisTimeKeyIndex.nextKey.frame / 60) { thisTimeKeyIndex.index++; @@ -191,249 +241,712 @@ namespace Gallop.Live.Cutt { thisTimeKeyIndex.nextKey = null; } - if(thisTimeKeyIndex.index - 1 >= 0) - { + if (thisTimeKeyIndex.index - 1 >= 0) + { thisTimeKeyIndex.prevKey = thisList[thisTimeKeyIndex.index - 1]; - } - else - { + } + else + { thisTimeKeyIndex.prevKey = null; } } } - - return thisTimeKeyIndex; + return thisTimeKeyIndex; } + + public bool HasAttribute(LiveTimelineKeyDataListAttr attr) + { + return (attribute & attr) == attr; + } + + public bool EnablePlayModeTimeline(TimelinePlayerMode playerMode) + { + return _playMode switch + { + TimelineKeyPlayMode.Always => true, + TimelineKeyPlayMode.LightOnly => playerMode == TimelinePlayerMode.Light, + TimelineKeyPlayMode.DefaultOver => playerMode != TimelinePlayerMode.Light, + _ => true, + }; + } + + public void Insert(int index, LiveTimelineKey item) + { + thisList.Insert(index, item as T); + } + + public void Add(LiveTimelineKey item) + { + thisList.Add(item as T); + } + + public void Clear() + { + thisList.Clear(); + } + + public bool Remove(LiveTimelineKey item) + { + return thisList.Remove(item as T); + } + + public void RemoveAt(int index) + { + thisList.RemoveAt(index); + } + public IEnumerator GetEnumerator() + { + return ToEnumerable().GetEnumerator(); + } + + public List GetRange(int index, int count) + { + return thisList.GetRange(index, count).ConvertAll((Converter)((T x) => x)); + } + + public IEnumerable ToEnumerable() + { + for (int i = 0; i < Count; i++) + { + yield return this[i]; + } + } + + public LiveTimelineKey At(int index) + { + return (index >= 0 && index < thisList.Count) ? thisList[index] : null; + } + + public LiveTimelineKey[] ToArray() + { + return thisList.ToArray(); + } + + public List ToList() + { + return thisList.ConvertAll((Converter)((T x) => x)); + } + + public bool Contains(LiveTimelineKey key) + { + return FindIndex(key) >= 0; + } + + public int FindIndex(LiveTimelineKey key) + { + BinSearch(out var ret, out var _, key.frame, 0, Count - 1, Count); + return ret.index; + } + + public FindKeyResult FindKeyCached(int frame, bool forceRefind) + { + FindKeyCached(frame, forceRefind, out var current, out var _); + return current; + } + + public void FindKeyCached(int frame, bool forceRefind, out FindKeyResult current, out FindKeyResult next) + { + if (forceRefind || _lastFindIndex < 0) + { + FindKey(out current, out next, frame); + } + else + { + FindCurrentKeyNeighbor(frame, _lastFindIndex, out current, out next); + } + _lastFindIndex = current.index; + } + + public FindKeyResult FindCurrentKey(int frame) + { + FindKey(out var ret, out var _, frame); + return ret; + } + + public void FindKey(out FindKeyResult ret, out FindKeyResult next, int frame) + { + int count = thisList.Count; + if (count == 0) + { + ret.index = -1; + ret.key = null; + next.index = -1; + next.key = null; + } + else + { + BinSearch(out ret, out next, frame, 0, count - 1, count); + } + } + + private void BinSearch(out FindKeyResult ret, out FindKeyResult next, int frame, int indexS, int indexE, int listSize) + { + int num = (indexE - indexS >> 1) + indexS; + T val = thisList[num]; + if (num + 1 < listSize) + { + T val2 = thisList[num + 1]; + if (val.frame <= frame && frame < val2.frame) + { + ret.key = val; + ret.index = num; + next.key = val2; + next.index = num + 1; + return; + } + if (frame < val.frame) + { + indexE = num; + if (indexE > indexS) + { + BinSearch(out ret, out next, frame, indexS, indexE, listSize); + return; + } + } + else + { + indexS = num + 1; + if (indexS <= indexE) + { + BinSearch(out ret, out next, frame, indexS, indexE, listSize); + return; + } + } + } + else if (val.frame <= frame) + { + ret.key = val; + ret.index = num; + next.key = null; + next.index = -1; + return; + } + ret.key = null; + ret.index = -1; + next.key = null; + next.index = -1; + } + + public void FindKeyLinear(out LiveTimelineKey curKey, out LiveTimelineKey nextKey, int curFrame) + { + curKey = null; + nextKey = null; + int count = thisList.Count; + for (int i = 0; i < count; i++) + { + if (thisList[i].frame > curFrame) + { + nextKey = thisList[i]; + break; + } + curKey = thisList[i]; + } + } + + public FindKeyResult FindCurrentKeyNeighbor(int frame, int baseIndex) + { + FindCurrentKeyNeighbor(frame, baseIndex, out var ret, out var _); + return ret; + } + + public void FindCurrentKeyNeighbor(int frame, int baseIndex, out FindKeyResult ret, out FindKeyResult next) + { + ret.key = null; + ret.index = -1; + next.key = null; + next.index = -1; + LiveTimelineKey liveTimelineKey = null; + LiveTimelineKey liveTimelineKey2 = null; + int count = thisList.Count; + int num = 0; + bool flag = false; + while (!flag) + { + flag = true; + int num2 = baseIndex + num; + int num3 = num2 + 1; + if (num2 < count) + { + liveTimelineKey = thisList[num2]; + liveTimelineKey2 = null; + if (num3 < count) + { + liveTimelineKey2 = thisList[num3]; + } + if (liveTimelineKey.frame <= frame) + { + if (liveTimelineKey2 == null) + { + ret.key = liveTimelineKey; + ret.index = num2; + break; + } + if (frame < liveTimelineKey2.frame) + { + ret.key = liveTimelineKey; + ret.index = num2; + next.key = liveTimelineKey2; + next.index = num3; + break; + } + } + flag = false; + } + if (num > 0) + { + num2 = baseIndex - num; + num3 = num2 + 1; + if (num2 >= 0) + { + liveTimelineKey = thisList[num2]; + liveTimelineKey2 = null; + if (num3 < count) + { + liveTimelineKey2 = thisList[num3]; + } + if (liveTimelineKey.frame <= frame) + { + if (liveTimelineKey2 == null) + { + ret.key = liveTimelineKey; + ret.index = num2; + break; + } + if (frame < liveTimelineKey2.frame) + { + ret.key = liveTimelineKey; + ret.index = num2; + next.key = liveTimelineKey2; + next.index = num3; + break; + } + } + flag = false; + } + } + num++; + } + } + + } [System.Serializable] public class LiveTimelineKeyIndex { - public int index = -1; + public int index = -1; public LiveTimelineKey prevKey = null; public LiveTimelineKey key = null; - public LiveTimelineKey nextKey = null; + public LiveTimelineKey nextKey = null; } [System.Serializable] - public abstract class LiveTimelineKey - { - public int frame; - public int attribute; - } - - [System.Serializable] - public class LiveTimelineKeyTimescaleData : LiveTimelineKey - { - public float Timescale; - } - - [System.Serializable] - public class LiveTimelineKeyTimescaleDataList : LiveTimelineKeyDataListTemplate - { - - } - - [System.Serializable] - public static class LiveTimelineEasing - { - public enum Type - { - Linear = 0, - ExpoEaseOut = 1, - ExpoEaseIn = 2, - ExpoEaseInOut = 3, - ExpoEaseOutIn = 4, - CircEaseOut = 5, - CircEaseIn = 6, - CircEaseInOut = 7, - CircEaseOutIn = 8, - QuadEaseOut = 9, - QuadEaseIn = 10, - QuadEaseInOut = 11, - QuadEaseOutIn = 12, - SineEaseOut = 13, - SineEaseIn = 14, - SineEaseInOut = 15, - SineEaseOutIn = 16, - CubicEaseOut = 17, - CubicEaseIn = 18, - CubicEaseInOut = 19, - CubicEaseOutIn = 20, - QuartEaseOut = 21, - QuartEaseIn = 22, - QuartEaseInOut = 23, - QuartEaseOutIn = 24, - QuintEaseOut = 25, - QuintEaseIn = 26, - QuintEaseInOut = 27, - QuintEaseOutIn = 28, - ElasticEaseOut = 29, - ElasticEaseIn = 30, - ElasticEaseInOut = 31, - ElasticEaseOutIn = 32, - BounceEaseOut = 33, - BounceEaseIn = 34, - BounceEaseInOut = 35, - BounceEaseOutIn = 36, - BackEaseOut = 37, - BackEaseIn = 38, - BackEaseInOut = 39, - BackEaseOutIn = 40 - } - } - - [System.Serializable] - public abstract class LiveTimelineKeyWithInterpolate : LiveTimelineKey - { - public LiveCameraInterpolateType interpolateType; - public AnimationCurve curve; - public LiveTimelineEasing.Type easingType; - } - - - //正在处理这里 - [System.Serializable] - public class LiveTimelineKeyCameraPositionData : LiveTimelineKeyWithInterpolate - { - public LiveCameraPositionType setType; - public Vector3 position; - public Vector3 charaPos; - public Vector3[] bezierPoints; - public LiveCharaPositionFlag charaRelativeBase; - public LiveCameraCharaParts charaRelativeParts; - public float traceSpeed; - public float nearClip; - public float farClip; - public LiveCameraCullingLayer cullingLayer; - public LiveCameraBgColorType BgColorType; - public Color BgColor; - public int BgColorTargetCharacterIndex; - } - - [System.Serializable] - public class LiveTimelineKeyCameraPositionDataList : LiveTimelineKeyDataListTemplate - { - - } - - - public class LiveTimelineWorkSheet : ScriptableObject + public abstract class LiveTimelineKey { - public string version; - public int targetCameraIndex; - public bool enableAtRuntime; - public bool enableAtEdit; - public float TotalTimeLength; - public bool Lyrics; - public LiveTimelineDefine.SheetIndex SheetType; + public int frame; + public LiveTimelineKeyAttribute attribute; + } + + + [System.Serializable] + public class LiveTimelineKeyTimescaleData : LiveTimelineKey + { + public float Timescale; + } + + [System.Serializable] + public class LiveTimelineKeyTimescaleDataList : LiveTimelineKeyDataListTemplate + { + + } + + + [System.Serializable] + public abstract class LiveTimelineKeyWithInterpolate : LiveTimelineKey + { + public LiveCameraInterpolateType interpolateType; + public AnimationCurve curve; + public LiveTimelineEasing.Type easingType; + } + + + //正在处理这里 + [System.Serializable] + public class LiveTimelineKeyCameraPositionData : LiveTimelineKeyWithInterpolate + { + public LiveCameraPositionType setType; + public Vector3 position; + public Vector3 charaPos; + public Vector3[] bezierPoints; + public LiveCharaPositionFlag charaRelativeBase; + public LiveCameraCharaParts charaRelativeParts; + public float traceSpeed; + public float nearClip; + public float farClip; + public LiveCameraCullingLayer cullingLayer; + public LiveCameraBgColorType BgColorType; + public Color BgColor; + public int BgColorTargetCharacterIndex; + + public Vector3 offset = Vector3.zero; + + public Vector3 posDirect = Vector3.zero; + + public bool newBezierCalcMethod; + + public CullingLayer cullingMask = defCameraCullingLayer; + + public float outlineZOffset = 1f; + + public CharacterLOD characterLODMask = (CharacterLOD)((uint)outlineLODMask + (uint)shaderLODMask); + + protected const CullingLayer defCameraCullingLayer = (CullingLayer)0x7FE; + + protected const CharacterLOD outlineLODMask = (CharacterLOD)0x3FF; + + protected const CharacterLOD shaderLODMask = (CharacterLOD)0x1FF8000; + + public int GetCullingMask() + { + return GetCullingMask(cullingMask); + } + + protected static int GetCullingMask(CullingLayer layer) + { + int num = 257; + if ((layer & CullingLayer.TransparentFX) != 0) + { + num |= 2; + } + if ((layer & CullingLayer.Background3D_NotReflect) != 0) + { + num |= 0x80000; + } + if ((layer & CullingLayer.Background3d) != 0) + { + num |= 0x100000; + } + if ((layer & CullingLayer.Character3d) != 0) + { + num |= 0x200000; + } + if ((layer & CullingLayer.Character3d_0) != 0) + { + num |= 0x400000; + } + if ((layer & CullingLayer.Character3d_1) != 0) + { + num |= 0x800000; + } + if ((layer & CullingLayer.Character3d_2) != 0) + { + num |= 0x1000000; + } + if ((layer & CullingLayer.Character3d_3) != 0) + { + num |= 0x2000000; + } + if ((layer & CullingLayer.Character3d_4) != 0) + { + num |= 0x4000000; + } + if ((layer & CullingLayer.Character3D_NotReflect) != 0) + { + num |= 0x8000000; + } + if ((layer & CullingLayer.Background3D_Other) != 0) + { + num |= 0x40000; + } + return num; + + /* + uint bittest = (uint)layer; + + uint result = (uint)LayerMask.GetMask("Default"); + + if ((bittest & (uint)CullingLayer.TransparentFX) > 0) + result |= (uint)LayerMask.GetMask("TransparentFX"); + if ((bittest & (uint)CullingLayer.Background3D_NotReflect) > 0) + result |= (uint)LayerMask.GetMask("background_NotReflect"); + if ((bittest & (uint)CullingLayer.Background3d) > 0) + result |= (uint)LayerMask.GetMask("background"); + if ((bittest & (uint)CullingLayer.Character3d) > 0) + result |= (uint)LayerMask.GetMask("charas"); + if ((bittest & (uint)CullingLayer.Character3d_0) > 0) + result |= (uint)LayerMask.GetMask("chara1"); + if ((bittest & (uint)CullingLayer.Character3d_1) > 0) + result |= (uint)LayerMask.GetMask("chara2"); + if ((bittest & (uint)CullingLayer.Character3d_2) > 0) + result |= (uint)LayerMask.GetMask("chara3"); + if ((bittest & (uint)CullingLayer.Character3d_3) > 0) + result |= (uint)LayerMask.GetMask("chara4"); + if ((bittest & (uint)CullingLayer.Character3d_4) > 0) + result |= (uint)LayerMask.GetMask("chara5"); + if ((bittest & (uint)CullingLayer.Character3D_NotReflect) > 0) + result |= (uint)LayerMask.GetMask("otherChara"); + if ((bittest & (uint)CullingLayer.Background3D_Other) > 0) + result |= (uint)LayerMask.GetMask("background_Other"); + return (int)result; + */ + } + + public static int GetDefaultCullingMask() + { + return GetCullingMask(defCameraCullingLayer); + } + + public virtual Vector3 GetValue(LiveTimelineControl timelineControl) + { + return GetValue(timelineControl, setType, containOffset: true); + } + + protected virtual Vector3 GetValue(LiveTimelineControl timelineControl, LiveCameraPositionType type, bool containOffset) + { + Vector3 vector = position; + switch (type) + { + case LiveCameraPositionType.Direct: + vector += posDirect; + break; + case LiveCameraPositionType.Character: + vector += timelineControl.GetPositionWithCharacters(charaRelativeBase, charaRelativeParts); + break; + } + if (!containOffset) + { + return vector; + } + return vector + offset; + } + + public int GetBezierPointCount() + { + if (!HasBezier()) + { + return 0; + } + return bezierPoints.Length; + } + + public bool HasBezier() + { + if (bezierPoints != null) + { + return bezierPoints.Length != 0; + } + return false; + } + + public bool necessaryToUseNewBezierCalcMethod + { + get + { + if (!newBezierCalcMethod) + { + return GetBezierPointCount() > 3; + } + return true; + } + } + + public Vector3 GetBezierPoint(int index, LiveTimelineControl timelineControl) + { + if (HasBezier() && index < bezierPoints.Length) + { + return GetValue(timelineControl) + bezierPoints[index]; + } + return GetValue(timelineControl) + Vector3.zero; + } + + public void GetBezierPoints(LiveTimelineControl timelineControl, Vector3[] outPoints, int startIndex) + { + if (HasBezier()) + { + for (int i = 0; i < bezierPoints.Length; i++) + { + outPoints[startIndex + i] = GetValue(timelineControl) + bezierPoints[i]; + } + } + } + } + + public enum CullingLayer + { + TransparentFX = 1, + Background3D_NotReflect = 2, + Background3d = 4, + Character3d = 8, + Character3d_0 = 0x10, + Character3d_1 = 0x20, + Character3d_2 = 0x40, + Character3d_3 = 0x80, + Character3d_4 = 0x100, + Character3D_NotReflect = 0x200, + Background3D_Other = 0x400 + } + + public enum CharacterLOD + { + Outline_0 = 1, + Outline_1 = 2, + Outline_2 = 4, + Outline_3 = 8, + Outline_4 = 0x10, + Outline_5 = 0x20, + Outline_6 = 0x40, + Outline_7 = 0x80, + Outline_8 = 0x100, + Outline_9 = 0x200, + Shader_0 = 0x8000, + Shader_1 = 0x10000, + Shader_2 = 0x20000, + Shader_3 = 0x40000, + Shader_4 = 0x80000, + Shader_5 = 0x100000, + Shader_6 = 0x200000, + Shader_7 = 0x400000, + Shader_8 = 0x800000, + Shader_9 = 0x1000000 + } + + public enum TimelinePlayerMode + { + Light, + Default + } + + public delegate void CameraPosUpdateInfoDelegate(ref CameraPosUpdateInfo updateInfo); + + [System.Serializable] + public class LiveTimelineKeyCameraPositionDataList : LiveTimelineKeyDataListTemplate + { + + } + + public struct FindKeyResult + { + public LiveTimelineKey key; + + public int index; + } + + public class LiveTimelineWorkSheet : ScriptableObject + { + public string version; + public int targetCameraIndex; + public bool enableAtRuntime; + public bool enableAtEdit; + public float TotalTimeLength; + public bool Lyrics; + public LiveTimelineDefine.SheetIndex SheetType; [SerializeField] public LiveTimelineKeyTimescaleDataList timescaleKeys; [SerializeField] public LiveTimelineKeyCameraPositionDataList cameraPosKeys; - //[SerializeField]用于该类在别的脚本里定义的时候 - [SerializeField] public LiveTimelineKeyCameraLookAtDataList cameraLookAtKeys; - [SerializeField] public LiveTimelineKeyCameraFovDataList cameraFovKeys; - [SerializeField] public LiveTimelineKeyCameraRollDataList cameraRollKeys; - [SerializeField] public LiveTimelineKeyCameraMotionDataList cameraMotionKeys; - [SerializeField] public LiveTimelineKeyHandShakeCameraDataList handShakeCameraKeys; - [SerializeField] public LiveTimelineKeyEventDataList eventKeys; + //[SerializeField]用于该类在别的脚本里定义的时候 + [SerializeField] public LiveTimelineKeyCameraLookAtDataList cameraLookAtKeys; + [SerializeField] public LiveTimelineKeyCameraFovDataList cameraFovKeys; + [SerializeField] public LiveTimelineKeyCameraRollDataList cameraRollKeys; + [SerializeField] public LiveTimelineKeyCameraMotionDataList cameraMotionKeys; + [SerializeField] public LiveTimelineKeyHandShakeCameraDataList handShakeCameraKeys; + [SerializeField] public LiveTimelineKeyEventDataList eventKeys; - [SerializeField] public List charaMotSeqList; - [SerializeField] public List bgColor1List; - [SerializeField] public List bgColor2List; - [SerializeField] public List monitorControlList; - [SerializeField] public List animationList; - [SerializeField] public List textureAnimationList; - [SerializeField] public List transformList; - [SerializeField] public List rendererList; - [SerializeField] public List objectList; - [SerializeField] public List waveObjectList; - [SerializeField] public List audienceList; - [SerializeField] public List propsList; - [SerializeField] public List propsAttachList; + [SerializeField] public List charaMotSeqList; + [SerializeField] public List bgColor1List; + [SerializeField] public List bgColor2List; + [SerializeField] public List monitorControlList; + [SerializeField] public List animationList; + [SerializeField] public List textureAnimationList; + [SerializeField] public List transformList; + [SerializeField] public List rendererList; + [SerializeField] public List objectList; + [SerializeField] public List waveObjectList; + [SerializeField] public List audienceList; + [SerializeField] public List propsList; + [SerializeField] public List propsAttachList; - [SerializeField] public LiveTimelineKeyCameraSwitcherDataList cameraSwitcherKeys; - [SerializeField] public LiveTimelineKeyLipSyncDataList ripSyncKeys; - [SerializeField] public LiveTimelineKeyLipSyncDataList ripSync2Keys; - [SerializeField] public LiveTimelineKeyPostEffectDOFDataList postEffectDOFKeys; - [SerializeField] public LiveTimelineKeyPostEffectBloomDiffusionDataList postEffectBloomDiffusionKeys; - [SerializeField] public LiveTimelineKeyRadialBlurDataList radialBlurKeys; - [SerializeField] public LiveTimelineKeyPostFilmDataList postFilmKeys; - [SerializeField] public LiveTimelineKeyPostFilmDataList postFilm2Keys; - [SerializeField] public LiveTimelineKeyPostFilmDataList postFilm3Keys; - [SerializeField] public LiveTimelineKeyFluctuationDataList FluctuationKeys; - [SerializeField] public LiveTimelineKeyVortexDataList VortexKeys; - [SerializeField] public LiveTimelineKeyFadeDataList fadeKeys; - [SerializeField] public LiveTimelineKeyCameraLayerDataList cameraLayerKeys; + [SerializeField] public LiveTimelineKeyCameraSwitcherDataList cameraSwitcherKeys; + [SerializeField] public LiveTimelineKeyLipSyncDataList ripSyncKeys; + [SerializeField] public LiveTimelineKeyLipSyncDataList ripSync2Keys; + [SerializeField] public LiveTimelineKeyPostEffectDOFDataList postEffectDOFKeys; + [SerializeField] public LiveTimelineKeyPostEffectBloomDiffusionDataList postEffectBloomDiffusionKeys; + [SerializeField] public LiveTimelineKeyRadialBlurDataList radialBlurKeys; + [SerializeField] public LiveTimelineKeyPostFilmDataList postFilmKeys; + [SerializeField] public LiveTimelineKeyPostFilmDataList postFilm2Keys; + [SerializeField] public LiveTimelineKeyPostFilmDataList postFilm3Keys; + [SerializeField] public LiveTimelineKeyFluctuationDataList FluctuationKeys; + [SerializeField] public LiveTimelineKeyVortexDataList VortexKeys; + [SerializeField] public LiveTimelineKeyFadeDataList fadeKeys; + [SerializeField] public LiveTimelineKeyCameraLayerDataList cameraLayerKeys; - [SerializeField] public List projecterList; + [SerializeField] public List projecterList; - [SerializeField] public LiveTimelineFacialData facial1Set; - [SerializeField] public LiveTimelineKeyFacialEyeTrackDataList other4EyeTrackKeys; - [SerializeField] public LiveTimelineKeyToneCurveDataList ToneCurveKeys; - [SerializeField] public LiveTimelineKeyExposureDataList ExposureKeys; - [SerializeField] public LiveTimelineFacialData[] other4FacialArray; - [SerializeField] public LiveTimelineKeyFacialNoiseDataList facialNoiseKeys; - [SerializeField] public LiveTimelineKeyCharaMotionNoiseDataList charaMotionNoiseKeys; - [SerializeField] public LiveTimelineFormationOffsetData formationOffsetSet; + [SerializeField] public LiveTimelineFacialData facial1Set; + [SerializeField] public LiveTimelineKeyFacialEyeTrackDataList other4EyeTrackKeys; + [SerializeField] public LiveTimelineKeyToneCurveDataList ToneCurveKeys; + [SerializeField] public LiveTimelineKeyExposureDataList ExposureKeys; + [SerializeField] public LiveTimelineFacialData[] other4FacialArray; + [SerializeField] public LiveTimelineKeyFacialNoiseDataList facialNoiseKeys; + [SerializeField] public LiveTimelineKeyCharaMotionNoiseDataList charaMotionNoiseKeys; + [SerializeField] public LiveTimelineFormationOffsetData formationOffsetSet; - [SerializeField] public List volumeLightKeys; - [SerializeField] public List hdrBloomKeys; - [SerializeField] public List particleList; - [SerializeField] public List particleGroupList; - [SerializeField] public List WashLightList; - [SerializeField] public List laserList; - [SerializeField] public List blinkLightList; - [SerializeField] public List uvScrollLightList; + [SerializeField] public List volumeLightKeys; + [SerializeField] public List hdrBloomKeys; + [SerializeField] public List particleList; + [SerializeField] public List particleGroupList; + [SerializeField] public List WashLightList; + [SerializeField] public List laserList; + [SerializeField] public List blinkLightList; + [SerializeField] public List uvScrollLightList; - [SerializeField] public LiveTimelineFacialToonData facialToonSet; + [SerializeField] public LiveTimelineFacialToonData facialToonSet; - [SerializeField] public List globalLightDataLists; - [SerializeField] public List globalFogDataLists; - [SerializeField] public List colorCorrectionDataLists; - [SerializeField] public List lightShaftsKeysLine; - [SerializeField] public List monitorCameraPosKeys; - [SerializeField] public List monitorCameraLookAtKeys; - [SerializeField] public List multiCameraPosKeys; - [SerializeField] public List multiCameraLookAtKeys; - [SerializeField] public List lensFlareList; - [SerializeField] public List environmentDataLists; - [SerializeField] public List sweatLocatorList; - [SerializeField] public List effectList; + [SerializeField] public List globalLightDataLists; + [SerializeField] public List globalFogDataLists; + [SerializeField] public List colorCorrectionDataLists; + [SerializeField] public List lightShaftsKeysLine; + [SerializeField] public List monitorCameraPosKeys; + [SerializeField] public List monitorCameraLookAtKeys; + [SerializeField] public List multiCameraPosKeys; + [SerializeField] public List multiCameraLookAtKeys; + [SerializeField] public List lensFlareList; + [SerializeField] public List environmentDataLists; + [SerializeField] public List sweatLocatorList; + [SerializeField] public List effectList; - [SerializeField] public LiveTimelineKeyTiltShiftDataList tiltShiftKeys; + [SerializeField] public LiveTimelineKeyTiltShiftDataList tiltShiftKeys; [SerializeField] public LiveTimelineKeyFlashPlayerDataList flashPlayerKeys; [SerializeField] public LiveTimelineKeyTitleDataList titleKeys; - [SerializeField] public List spotlight3dList; + [SerializeField] public List spotlight3dList; [SerializeField] public List CharaNodeDataList; [SerializeField] public List nodeScaleList; - [SerializeField] public LiveTimelineKeyCharaFootLightDataList charaFootLightKeys; + [SerializeField] public LiveTimelineKeyCharaFootLightDataList charaFootLightKeys; - [SerializeField] public List chromaticAberrationList; - [SerializeField] public List lightProjectionList; - [SerializeField] public List billboardList; - [SerializeField] public List postFilm1MultiCameraKeys; - [SerializeField] public List postEffectBloomDiffusionMultiCameraKeys; - [SerializeField] public List multiCameraColorCorrectionDataLists; - [SerializeField] public List multiCameraTiltShiftDataLists; - [SerializeField] public List multiCameraRadialBlurDataLists; - [SerializeField] public List postEffectDOFMultiCameraKeys; - [SerializeField] public List AdditionalLightList; + [SerializeField] public List chromaticAberrationList; + [SerializeField] public List lightProjectionList; + [SerializeField] public List billboardList; + [SerializeField] public List postFilm1MultiCameraKeys; + [SerializeField] public List postEffectBloomDiffusionMultiCameraKeys; + [SerializeField] public List multiCameraColorCorrectionDataLists; + [SerializeField] public List multiCameraTiltShiftDataLists; + [SerializeField] public List multiCameraRadialBlurDataLists; + [SerializeField] public List postEffectDOFMultiCameraKeys; + [SerializeField] public List AdditionalLightList; - [SerializeField] public LiveTimelineKeyMultiLightShadowDataList MultiLightShadowKeys; + [SerializeField] public LiveTimelineKeyMultiLightShadowDataList MultiLightShadowKeys; - [SerializeField] public List MobControlKeys; - [SerializeField] public List CyalumeControlKeys; + [SerializeField] public List MobControlKeys; + [SerializeField] public List CyalumeControlKeys; - [SerializeField] public LiveTimelineCharaWindData charaWind; - [SerializeField] public LiveTimelineCharaPartsData CharaPartsKeys; + [SerializeField] public LiveTimelineCharaWindData charaWind; + [SerializeField] public LiveTimelineCharaPartsData CharaPartsKeys; - [SerializeField] public List CharaCollisionDataList; - [SerializeField] public List EyeCameraPosList; - [SerializeField] public List EyeCameraLookAtList; + [SerializeField] public List CharaCollisionDataList; + [SerializeField] public List EyeCameraPosList; + [SerializeField] public List EyeCameraLookAtList; @@ -460,5 +973,62 @@ namespace Gallop.Live.Cutt } */ } + + public static class LiveCharaPositionFlag_Helper + { + public static LiveCharaPositionFlag Default5 => LiveCharaPositionFlag.Center | LiveCharaPositionFlag.Place02 | LiveCharaPositionFlag.Place03 | LiveCharaPositionFlag.Place04 | LiveCharaPositionFlag.Place05; + + public static LiveCharaPositionFlag Everyone => LiveCharaPositionFlag.All; + + public static bool hasFlag(this LiveCharaPositionFlag This, LiveCharaPosition pos) + { + return This.hasFlag((LiveCharaPositionFlag)(1 << (int)pos)); + } + + public static bool hasFlag(this LiveCharaPositionFlag This, int bit) + { + return This.hasFlag((LiveCharaPositionFlag)bit); + } + + public static bool hasFlag(this LiveCharaPositionFlag This, LiveCharaPositionFlag bit) + { + return (This & bit) != 0; + } + + public static bool hasFlag(this LiveTimelineKeyAttribute This, LiveTimelineKeyAttribute bit) + { + return (This & bit) != 0; + } + } + + public class BezierCalcWork + { + public static BezierCalcWork cameraPos = new BezierCalcWork(); + + public static BezierCalcWork cameraLookAt = new BezierCalcWork(); + + private Vector3[] _points = new Vector3[17]; + + public void Set(Vector3 startPos, Vector3 endPos, int bezierNum) + { + _points[0] = startPos; + _points[1 + bezierNum] = endPos; + } + + public void UpdatePoints(LiveTimelineKeyCameraPositionData posKey, LiveTimelineControl timelineControl) + { + posKey.GetBezierPoints(timelineControl, _points, 1); + } + + public void UpdatePoints(LiveTimelineKeyCameraLookAtData lookAtKey, LiveTimelineControl timelineControl, Vector3 camPos) + { + lookAtKey.GetBezierPoints(timelineControl, camPos, _points, 1); + } + + public void Calc(int bezierNum, float t, out Vector3 pos) + { + BezierUtil.Calc(_points, bezierNum + 2, t, out pos); + } + } } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo.meta b/Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo.meta new file mode 100644 index 0000000..6746f9f --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 68b636722278d2346926822cb2c60910 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo/CameraPosUpdateInfo.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo/CameraPosUpdateInfo.cs new file mode 100644 index 0000000..646fd34 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo/CameraPosUpdateInfo.cs @@ -0,0 +1,9 @@ +锘縩amespace Gallop.Live.Cutt +{ + public struct CameraPosUpdateInfo + { + public float outlineZOffset; + + public int characterLODMask; + } +} \ No newline at end of file diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo/CameraPosUpdateInfo.cs.meta b/Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo/CameraPosUpdateInfo.cs.meta new file mode 100644 index 0000000..5ed8fc8 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/UpdateInfo/CameraPosUpdateInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5f756ac2cf9111b409997b33ef3f4e3d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/umamusume/Gallop/Live/Director.cs b/Assets/Scripts/umamusume/Gallop/Live/Director.cs index 7259308..b53306f 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Director.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Director.cs @@ -176,6 +176,7 @@ namespace Gallop.Live [SerializeField] private GameObject[] _cameraNodes; private Camera[] _cameraObjects; + private Transform[] _cameraTransforms; private CameraEventCallback[] _cameraEventCallbackArray; private GameObject _transparentCameraObject; private Camera _transparentCamera; @@ -194,7 +195,7 @@ namespace Gallop.Live private HandShakeCamera _handShakeCamera; private int _activeCameraIndex; private readonly int kMotionCameraIndex; - private readonly int[] kTimelineCameraIndices; + private readonly int[] kTimelineCameraIndices = new int[3] { 1, 2, 3 }; //private GallopFrameBuffer _frameBuffer; //private LowResolutionCameraFrameBuffer[] _lowResolutionCameraArray; private Camera _mainCameraObject; @@ -317,6 +318,8 @@ namespace Gallop.Live public List charaObjs; + public List CharaContainerScript = new List(); + public List charaAnims; public List seqData; @@ -344,7 +347,32 @@ namespace Gallop.Live public SliderControl sliderControl; - private void Awake() + public bool isTimelineControlled + { + get + { + if (_liveTimelineControl != null) + { + return _liveTimelineControl.data != null; + } + return false; + } + } + + public float CalcFrameJustifiedMusicTime() + { + if (isTimelineControlled) + { + return (float)Mathf.RoundToInt(musicScoreTime * 60f) / 60f; + } + return musicScoreTime; + } + + public float musicScoreTime => Mathf.Clamp(smoothMusicScoreTime, 0f, 99999f); + + private float smoothMusicScoreTime => _liveCurrentTime;//temp to liveCurrentTime + + public void Initialize() { if (live != null) { @@ -381,7 +409,6 @@ namespace Gallop.Live } } - public void InitializeUI() { UI = GameObject.Find("LiveUI").GetComponent(); @@ -418,9 +445,9 @@ namespace Gallop.Live var nextKey = keyData_.nextKey as LiveTimelineKeyLipSyncData; for (int k = 0; k < charaObjs.Count; k++) { - var container = charaObjs[k].GetComponentInChildren(); - if(container != null) + if(k < CharaContainerScript.Count) { + var container = CharaContainerScript[k]; container.FaceDrivenKeyTarget.AlterUpdateAutoLip(prevKey, curKey, liveTime_, ((int)curKey.character >> k) % 2); } } @@ -429,10 +456,83 @@ namespace Gallop.Live { if( position < charaObjs.Count) { - var container = charaObjs[position].GetComponentInChildren(); + var container = CharaContainerScript[position]; container.FaceDrivenKeyTarget.AlterUpdateFacialNew(ref updateInfo_, liveTime_); } }; + SetupCharacterLocator(); + InitializeCamera(); + UpdateMainCamera(); + for (int i = 0; i < kTimelineCameraIndices.Length; i++) + { + int num = kTimelineCameraIndices[i]; + if (num < _cameraObjects.Length) + { + _liveTimelineControl.SetTimelineCamera(_cameraObjects[num], i); + } + } + + _liveTimelineControl.OnUpdateCameraSwitcher += delegate (int cameraIndex_) + { + if (cameraIndex_ < 0) + { + _activeCameraIndex = 0; + } + else if (cameraIndex_ < kTimelineCameraIndices.Length) + { + _activeCameraIndex = kTimelineCameraIndices[cameraIndex_]; + } + }; + } + + public void InitializeCamera() + { + if (_cameraObjects == null) + { + _cameraObjects = new Camera[_cameraNodes.Length + 1]; + _cameraTransforms = new Transform[_cameraNodes.Length + 1]; + for (int i = 0; i < _cameraNodes.Length; i++) + { + GameObject gameObject = _cameraNodes[i]; + Camera camera = gameObject.GetComponent(); + if (camera == null) + { + camera = gameObject.GetComponentInChildren(); + } + //camera.cullingMask = num; + _cameraObjects[i] = camera; + _cameraTransforms[i] = camera.transform; + } + } + } + + private void UpdateMainCamera() + { + if (_cameraObjects == null) return; + for (int i = 0; i < _cameraNodes.Length; i++) + { + bool activeSelf = _cameraNodes[i].activeSelf; + bool flag = i == _activeCameraIndex; + _cameraNodes[i].SetActive(flag); + if (i == 0 && activeSelf != flag && flag && _cameraLookAt != null) + { + _cameraLookAt.ActivationUpdate(); + } + } + _mainCameraObject = _cameraObjects[_activeCameraIndex]; + _mainCameraTransform = _cameraTransforms[_activeCameraIndex]; + } + + private void SetupCharacterLocator() + { + if (!_liveTimelineControl) return; + for (int i = 0; i < CharaContainerScript.Count; i++) + { + var container = CharaContainerScript[i]; + container.LiveLocator = new LiveTimelineCharaLocator(container); + _liveTimelineControl.liveCharactorLocators[i] = container.LiveLocator; + container.LiveLocator.liveCharaInitialPosition = container.transform.position; + } } public void InitializeMusic(int songid, List characters) @@ -446,7 +546,6 @@ namespace Gallop.Live singer = 1; } - for (int i = 0; i < characters.Count; i++) { if (characters[i].CharaEntry.Name != "" && i < 3) @@ -479,8 +578,6 @@ namespace Gallop.Live liveMusic = UmaViewerAudio.ApplySound(string.Format(SONG_PATH, songid)); } - - public void Play() { @@ -582,6 +679,12 @@ namespace Gallop.Live } } } + UpdateMainCamera(); + } + + private void LateUpdate() + { + _liveTimelineControl.AlterLateUpdate(); } } diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 5b2143c..eeed19a 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -6,35 +6,35 @@ EditorUserSettings: serializedVersion: 4 m_ConfigSettings: RecentlyUsedScenePath-0: - value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7634dd152f71370ddb214943db041c021f09bd3e1dfe04151ed7158c54dd1115df00 - flags: 0 - RecentlyUsedScenePath-1: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7620ee37012c4e17e7070805f9020e4b330ff60b03bf583533e731ee53860a12c20d05 flags: 0 - RecentlyUsedScenePath-2: + RecentlyUsedScenePath-1: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7624cd1e2d154e0cfd090a0ee44b21021205b31b1ff6040a flags: 0 - RecentlyUsedScenePath-3: - value: 22424703114646680e0b0227036c731900122b292926237e38271427fb - flags: 0 - RecentlyUsedScenePath-4: + RecentlyUsedScenePath-2: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7624cd1e2d154e10f40c1a0ee24b2f0d170bfe1a1eed5e061fcc0cdc flags: 0 - RecentlyUsedScenePath-5: + RecentlyUsedScenePath-3: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23662d26f2f0312ccfe625fde22870031d27c2133771312dfd1a471ef8021e12 flags: 0 - RecentlyUsedScenePath-6: + RecentlyUsedScenePath-4: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23662d26f2f0312ccfe625fde22870031d27c21337712c3afe0f0c4bc51b020e0307fe0f1db1051d18d101 flags: 0 - RecentlyUsedScenePath-7: + RecentlyUsedScenePath-5: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23662d26f2f0312ccfe625fde22870031d27c2133771313ee01e000afa4b3a021f00f40016b1051d18d101 flags: 0 - RecentlyUsedScenePath-8: + RecentlyUsedScenePath-6: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7623e63144172a70d303044bc51c03051640e80018eb09 flags: 0 - RecentlyUsedScenePath-9: + RecentlyUsedScenePath-7: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7634dd152f71370ddb214943de021e4b230bfc0d05f61f1d588b0dcb13dc06 flags: 0 + RecentlyUsedScenePath-8: + value: 22424703114646680e0b0227036c731900122b292926237e38271427fb + flags: 0 + RecentlyUsedScenePath-9: + value: 22424703114646680e0b0227036c691504041125227a68252320092a + flags: 0 UnityRemoteCompression: value: 29617121 flags: 0