From d1d1a2f771a6179ef9af1353b1039fc31d0fea25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=9C=8B?= <1918891542@qq.com> Date: Wed, 12 Jul 2023 17:22:00 +0800 Subject: [PATCH] simple progress bar --- Assets/Scenes/LiveScene.unity | 614 +++++++++++++++++- Assets/Scripts/LiveToolBox.meta | 8 + Assets/Scripts/LiveToolBox/LiveViewerUI.cs | 18 + .../Scripts/LiveToolBox/LiveViewerUI.cs.meta | 11 + Assets/Scripts/LiveToolBox/SliderControl.cs | 23 + .../Scripts/LiveToolBox/SliderControl.cs.meta | 11 + Assets/Scripts/UmaViewerAudio.cs | 2 + Assets/Scripts/UmaViewerBuilder.cs | 1 + .../umamusume/Gallop/FaceDrivenKeyTarget.cs | 98 +-- .../Gallop/Live/Cutt/FacialDataUpdateInfo.cs | 5 + .../Gallop/Live/Cutt/LiveTimelineControl.cs | 55 +- .../Gallop/Live/Cutt/LiveTimelineWorkSheet.cs | 17 + .../Scripts/umamusume/Gallop/Live/Director.cs | 104 ++- 13 files changed, 866 insertions(+), 101 deletions(-) create mode 100644 Assets/Scripts/LiveToolBox.meta create mode 100644 Assets/Scripts/LiveToolBox/LiveViewerUI.cs create mode 100644 Assets/Scripts/LiveToolBox/LiveViewerUI.cs.meta create mode 100644 Assets/Scripts/LiveToolBox/SliderControl.cs create mode 100644 Assets/Scripts/LiveToolBox/SliderControl.cs.meta diff --git a/Assets/Scenes/LiveScene.unity b/Assets/Scenes/LiveScene.unity index 1febacf..35a6531 100644 --- a/Assets/Scenes/LiveScene.unity +++ b/Assets/Scenes/LiveScene.unity @@ -123,6 +123,371 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &374273517 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 374273518} + - component: {fileID: 374273520} + - component: {fileID: 374273519} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &374273518 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 374273517} + 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: 912298140} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + 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_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &374273519 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 374273517} + 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: 10907, 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 &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 &912298139 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 912298140} + - component: {fileID: 912298141} + - component: {fileID: 912298142} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &912298140 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 912298139} + 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_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_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &912298141 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 912298139} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, 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: 993298148} + m_FillRect: {fileID: 1006231794} + m_HandleRect: {fileID: 993298147} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &912298142 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 912298139} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 251eb16db8790644e8c7fb6ab2b73e24, type: 3} + m_Name: + m_EditorClassIdentifier: + is_Touched: 0 +--- !u!1 &993298146 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 993298147} + - component: {fileID: 993298149} + - component: {fileID: 993298148} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &993298147 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 993298146} + 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: 1378933079} + 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: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &993298148 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 993298146} + 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: 10913, 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 &993298149 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 993298146} + m_CullTransparentMesh: 1 +--- !u!1 &1006231793 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1006231794} + - component: {fileID: 1006231796} + - component: {fileID: 1006231795} + m_Layer: 5 + m_Name: Fill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1006231794 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1006231793} + 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: 1839609385} + 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: 0} + m_SizeDelta: {x: 10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1006231795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1006231793} + 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 &1006231796 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1006231793} + m_CullTransparentMesh: 1 +--- !u!1 &1378933078 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1378933079} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1378933079 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1378933078} + 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: 993298147} + m_Father: {fileID: 912298140} + m_RootOrder: 2 + 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: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1529990365 GameObject: m_ObjectHideFlags: 0 @@ -283,5 +648,252 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: -180, z: 0} +--- !u!1 &1839609384 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1839609385} + m_Layer: 5 + m_Name: Fill Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1839609385 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1839609384} + 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: 1006231794} + m_Father: {fileID: 912298140} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: -5, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1975009925 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1975009928} + - component: {fileID: 1975009927} + - component: {fileID: 1975009926} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1975009926 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975009925} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1975009927 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975009925} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1975009928 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975009925} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -960, y: -540, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2146838901} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2017920247 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2017920248} + - component: {fileID: 2017920249} + m_Layer: 0 + m_Name: LiveUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2017920248 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017920247} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 155.5308, y: 9.989714, z: -1049.1421} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2017920249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017920247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d264e9377d3d9f4998e913092994486, type: 3} + m_Name: + m_EditorClassIdentifier: + ProgressBar: {fileID: 912298141} +--- !u!1 &2146838897 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2146838901} + - component: {fileID: 2146838900} + - component: {fileID: 2146838899} + - component: {fileID: 2146838898} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2146838898 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2146838897} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &2146838899 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2146838897} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &2146838900 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2146838897} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &2146838901 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2146838897} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 912298140} + - {fileID: 1975009928} + m_Father: {fileID: 0} + m_RootOrder: 2 + 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: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} diff --git a/Assets/Scripts/LiveToolBox.meta b/Assets/Scripts/LiveToolBox.meta new file mode 100644 index 0000000..2f97b09 --- /dev/null +++ b/Assets/Scripts/LiveToolBox.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2120fed729437c646b32dc359f984db6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/LiveToolBox/LiveViewerUI.cs b/Assets/Scripts/LiveToolBox/LiveViewerUI.cs new file mode 100644 index 0000000..921b4e4 --- /dev/null +++ b/Assets/Scripts/LiveToolBox/LiveViewerUI.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UIElements; +using UnityEngine.UI; + +public class LiveViewerUI : MonoBehaviour +{ + public static LiveViewerUI Instance; + + public UnityEngine.UI.Slider ProgressBar; + + private void Awake() + { + Instance = this; + //TrueProgressBar = (UnityEngine.UIElements.Slider)ProgressBar; + } +} diff --git a/Assets/Scripts/LiveToolBox/LiveViewerUI.cs.meta b/Assets/Scripts/LiveToolBox/LiveViewerUI.cs.meta new file mode 100644 index 0000000..32dd7d4 --- /dev/null +++ b/Assets/Scripts/LiveToolBox/LiveViewerUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0d264e9377d3d9f4998e913092994486 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/LiveToolBox/SliderControl.cs b/Assets/Scripts/LiveToolBox/SliderControl.cs new file mode 100644 index 0000000..10b512b --- /dev/null +++ b/Assets/Scripts/LiveToolBox/SliderControl.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; + +public class SliderControl : MonoBehaviour, IPointerDownHandler, IPointerUpHandler +{ + public bool is_Touched = false; + public bool is_Outed = false; + + public void OnPointerDown(PointerEventData eventData) + { + is_Touched = true; + Debug.Log("Dowm"); + } + + public void OnPointerUp(PointerEventData eventData) + { + is_Touched = false; + is_Outed = true; + Debug.Log("Up"); + } +} diff --git a/Assets/Scripts/LiveToolBox/SliderControl.cs.meta b/Assets/Scripts/LiveToolBox/SliderControl.cs.meta new file mode 100644 index 0000000..99bfc7a --- /dev/null +++ b/Assets/Scripts/LiveToolBox/SliderControl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 251eb16db8790644e8c7fb6ab2b73e24 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UmaViewerAudio.cs b/Assets/Scripts/UmaViewerAudio.cs index 40a036f..6ff9422 100644 --- a/Assets/Scripts/UmaViewerAudio.cs +++ b/Assets/Scripts/UmaViewerAudio.cs @@ -1,4 +1,5 @@ using CriWare; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -48,6 +49,7 @@ public class UmaViewerAudio static public void AlterUpdate(float _liveCurrentTime, PartEntry partInfo, List liveVocal) { + var timeLineData = partInfo.PartSettings["time"]; //need to improve diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index 5162383..99bde25 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -708,6 +708,7 @@ public class UmaViewerBuilder : MonoBehaviour }, delegate () { + Gallop.Live.Director.instance.InitializeUI(); Gallop.Live.Director.instance.InitializeTimeline(characters, UI.LiveMode); Gallop.Live.Director.instance.Play(live.MusicId, characters); } diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index 1e0a350..6d435d9 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -806,23 +806,15 @@ namespace Gallop return morphs.Find(m => m.index == (int)Type); } - private LiveTimelineKeyLipSyncData _prevLipKeyData; - private LiveTimelineKeyLipSyncData _lastLipKeyData; - - public void AlterUpdateAutoLip(LiveTimelineKeyLipSyncData keyData_, float liveTime_, float _switch) + public void AlterUpdateAutoLip(LiveTimelineKeyLipSyncData _prevLipKeyData, LiveTimelineKeyLipSyncData keyData_, float liveTime_, float _switch) { //|| lockMouth + if (_switch == 0 || lockMouth) { - _prevLipKeyData = null; - _lastLipKeyData = null; return; } - - if(_lastLipKeyData != keyData_) - { - _prevLipKeyData = _lastLipKeyData; - } + float weightRatio = CalcMorphWeight(liveTime_, keyData_.time, keyData_.interpolateType, keyData_, null); @@ -855,22 +847,8 @@ namespace Gallop } ChangeMorphMouth(); - - _lastLipKeyData = keyData_; } - private LiveTimelineKeyFacialMouthData _prevMouthKeyData; - private LiveTimelineKeyFacialMouthData _lastMouthKeyData; - - private LiveTimelineKeyFacialEyeData _prevEyesKeyData; - private LiveTimelineKeyFacialEyeData _lastEyesKeyData; - - private LiveTimelineKeyFacialEyebrowData _prevEyebrowsKeyData; - private LiveTimelineKeyFacialEyebrowData _lastEyebrowsKeyData; - - private LiveTimelineKeyFacialEarData _prevEarsKeyData; - private LiveTimelineKeyFacialEarData _lastEarsKeyData; - public bool lockMouth = false; public void AlterUpdateFacialNew(ref FacialDataUpdateInfo updateInfo_, float liveTime_) @@ -886,28 +864,24 @@ namespace Gallop lockMouth = false; } - if (_lastMouthKeyData != updateInfo_.mouthCur) - { - _prevMouthKeyData = _lastMouthKeyData; - } float weightRatio = CalcMorphWeight(liveTime_, updateInfo_.mouthCur.time, updateInfo_.mouthCur.interpolateType, updateInfo_.mouthCur, updateInfo_.mouthNext); MouthMorphs.ForEach(morph => morph.weight = 0); - if (_prevMouthKeyData != null) + if (updateInfo_.mouthPrev != null) { if (weightRatio != 1) { - foreach (var part in _prevMouthKeyData.facialPartsDataArray) + foreach (var part in updateInfo_.mouthPrev.facialPartsDataArray) { if (part.FacialPartsId == 0) { continue; } - MouthMorphs[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevMouthKeyData.weight / 100); + MouthMorphs[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.mouthPrev.weight / 100); } } else { - foreach (var part in _prevMouthKeyData.facialPartsDataArray) + foreach (var part in updateInfo_.mouthPrev.facialPartsDataArray) { if (part.FacialPartsId == 0) { continue; } MouthMorphs[part.FacialPartsId - 1].weight = 0; @@ -923,42 +897,37 @@ namespace Gallop ChangeMorphMouth(); - _lastMouthKeyData = updateInfo_.mouthCur; } if (updateInfo_.eyeCur != null) { - if (_lastEyesKeyData != updateInfo_.eyeCur) - { - _prevEyesKeyData = _lastEyesKeyData; - } float weightRatio = CalcMorphWeight(liveTime_, updateInfo_.eyeCur.time, updateInfo_.eyeCur.interpolateType, updateInfo_.eyeCur, updateInfo_.eyeNext); EyeMorphs.ForEach(morph => morph.weight = 0); - if (_prevEyesKeyData != null) + if (updateInfo_.eyePrev != null) { if (weightRatio != 1) { - foreach (var part in _prevEyesKeyData.facialPartsDataArrayL) + foreach (var part in updateInfo_.eyePrev.facialPartsDataArrayL) { if (part.FacialPartsId == 0) { continue; } - leftEyeMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevEyesKeyData.weight / 100); + leftEyeMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.eyePrev.weight / 100); } - foreach (var part in _prevEyesKeyData.facialPartsDataArrayR) + foreach (var part in updateInfo_.eyePrev.facialPartsDataArrayR) { if (part.FacialPartsId == 0) { continue; } - rightEyeMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevEyesKeyData.weight / 100); + rightEyeMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.eyePrev.weight / 100); } } else { - foreach (var part in _prevEyesKeyData.facialPartsDataArrayL) + foreach (var part in updateInfo_.eyePrev.facialPartsDataArrayL) { if (part.FacialPartsId == 0) { continue; } leftEyeMorph[part.FacialPartsId - 1].weight = 0; } - foreach (var part in _prevEyesKeyData.facialPartsDataArrayR) + foreach (var part in updateInfo_.eyePrev.facialPartsDataArrayR) { if (part.FacialPartsId == 0) { continue; } rightEyeMorph[part.FacialPartsId - 1].weight = 0; @@ -979,43 +948,38 @@ namespace Gallop ChangeMorphEye(); - _lastEyesKeyData = updateInfo_.eyeCur; } if (updateInfo_.eyebrowCur != null) { - if (_lastEyebrowsKeyData != updateInfo_.eyebrowCur) - { - _prevEyebrowsKeyData = _lastEyebrowsKeyData; - } float weightRatio = CalcMorphWeight(liveTime_, updateInfo_.eyebrowCur.time, updateInfo_.eyebrowCur.interpolateType, updateInfo_.eyebrowCur, updateInfo_.eyebrowNext); EyeBrowMorphs.ForEach(morph => morph.weight = 0); - if (_prevEyebrowsKeyData != null) + if (updateInfo_.eyebrowPrev != null) { if (weightRatio != 1) { - foreach (var part in _prevEyebrowsKeyData.facialPartsDataArrayL) + foreach (var part in updateInfo_.eyebrowPrev.facialPartsDataArrayL) { if (part.FacialPartsId == 0) { continue; } - leftEyebrowMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevEyebrowsKeyData.weight / 100); + leftEyebrowMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.eyebrowPrev.weight / 100); } - foreach (var part in _prevEyebrowsKeyData.facialPartsDataArrayR) + foreach (var part in updateInfo_.eyebrowPrev.facialPartsDataArrayR) { if (part.FacialPartsId == 0) { continue; } - rightEyebrowMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevEyebrowsKeyData.weight / 100); + rightEyebrowMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.eyebrowPrev.weight / 100); } } else { - foreach (var part in _prevEyebrowsKeyData.facialPartsDataArrayL) + foreach (var part in updateInfo_.eyebrowPrev.facialPartsDataArrayL) { if (part.FacialPartsId == 0) { continue; } leftEyebrowMorph[part.FacialPartsId - 1].weight = 0; } - foreach (var part in _prevEyebrowsKeyData.facialPartsDataArrayR) + foreach (var part in updateInfo_.eyebrowPrev.facialPartsDataArrayR) { if (part.FacialPartsId == 0) { continue; } rightEyebrowMorph[part.FacialPartsId - 1].weight = 0; @@ -1036,48 +1000,43 @@ namespace Gallop ChangeMorphEyebrow(); - _lastEyebrowsKeyData = updateInfo_.eyebrowCur; } if (updateInfo_.earCur != null) { - if (_lastEarsKeyData != updateInfo_.earCur) - { - _prevEarsKeyData = _lastEarsKeyData; - } float weightRatio = CalcMorphWeight(liveTime_, updateInfo_.earCur.time, updateInfo_.earCur.interpolateType, updateInfo_.earCur, updateInfo_.earNext); EarMorphs.ForEach(morph => morph.weight = 0); - if (_prevEarsKeyData != null) + if (updateInfo_.earPrev != null) { if (weightRatio != 1) { - var partL = _prevEarsKeyData.facialEarIdL; + var partL = updateInfo_.earPrev.facialEarIdL; if (partL != 0) { - leftEarMorph[partL - 1].weight = (((1 - weightRatio)) * ((float)_prevEarsKeyData.weight / 100)); + leftEarMorph[partL - 1].weight = (((1 - weightRatio)) * ((float)updateInfo_.earPrev.weight / 100)); } - var partR = _prevEarsKeyData.facialEarIdR; + var partR = updateInfo_.earPrev.facialEarIdR; if (partR != 0) { - rightEarMorph[partR - 1].weight = (((1 - weightRatio)) * ((float)_prevEarsKeyData.weight / 100)); + rightEarMorph[partR - 1].weight = (((1 - weightRatio)) * ((float)updateInfo_.earPrev.weight / 100)); } } else { - var partL = _prevEarsKeyData.facialEarIdL; + var partL = updateInfo_.earPrev.facialEarIdL; if (partL != 0) { leftEarMorph[partL - 1].weight = 0; } - var partR = _prevEarsKeyData.facialEarIdR; + var partR = updateInfo_.earPrev.facialEarIdR; if (partR != 0) { @@ -1102,7 +1061,6 @@ namespace Gallop ChangeMorphEar(); - _lastEarsKeyData = updateInfo_.earCur; } } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/FacialDataUpdateInfo.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/FacialDataUpdateInfo.cs index 71e56cb..8943372 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/FacialDataUpdateInfo.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/FacialDataUpdateInfo.cs @@ -7,15 +7,20 @@ namespace Gallop.Live.Cutt public struct FacialDataUpdateInfo // TypeDefIndex: 29410 { // Fields + public LiveTimelineKeyFacialFaceData facePrev; // 0x0 public LiveTimelineKeyFacialFaceData faceCur; // 0x0 public LiveTimelineKeyFacialFaceData faceNext; // 0x8 + public LiveTimelineKeyFacialMouthData mouthPrev; // 0x10 public LiveTimelineKeyFacialMouthData mouthCur; // 0x10 public LiveTimelineKeyFacialMouthData mouthNext; // 0x10 + public LiveTimelineKeyFacialEyeData eyePrev; // 0x18 public LiveTimelineKeyFacialEyeData eyeCur; // 0x18 public LiveTimelineKeyFacialEyeData eyeNext; // 0x20 + public LiveTimelineKeyFacialEyebrowData eyebrowPrev; // 0x28 public LiveTimelineKeyFacialEyebrowData eyebrowCur; // 0x28 public LiveTimelineKeyFacialEyebrowData eyebrowNext; // 0x28 public LiveTimelineKeyFacialEyeTrackData eyeTrack; // 0x30 + public LiveTimelineKeyFacialEarData earPrev; // 0x38 public LiveTimelineKeyFacialEarData earCur; // 0x38 public LiveTimelineKeyFacialEarData earNext; // 0x38 public LiveTimelineKeyFacialEffectData effect; // 0x40 diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs index 0130769..d13001e 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs @@ -28,7 +28,7 @@ namespace Gallop.Live.Cutt public LiveTimelineKeyCharaMotionSeqDataList[] _keyArray; - public event Action OnUpdateLipSync; + public event Action OnUpdateLipSync; public event Action OnUpdateFacial; @@ -166,14 +166,18 @@ namespace Gallop.Live.Cutt { LiveTimelineKey liveTimelineKey = null; LiveTimelineKey liveTimelineKey2 = null; + LiveTimelineKey liveTimelineKey3 = null; LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time); if (curKey != null) { - liveTimelineKey = curKey.key; - liveTimelineKey2 = curKey.nextKey; - updateInfo.mouthCur = liveTimelineKey as LiveTimelineKeyFacialMouthData; - updateInfo.mouthNext = liveTimelineKey2 as LiveTimelineKeyFacialMouthData; + liveTimelineKey = curKey.prevKey; + liveTimelineKey2 = curKey.key; + liveTimelineKey3 = curKey.nextKey; + + updateInfo.mouthPrev = liveTimelineKey as LiveTimelineKeyFacialMouthData; + updateInfo.mouthCur = liveTimelineKey2 as LiveTimelineKeyFacialMouthData; + updateInfo.mouthNext = liveTimelineKey3 as LiveTimelineKeyFacialMouthData; updateInfo.mouthKeyIndex = curKey.index; } } @@ -182,14 +186,18 @@ namespace Gallop.Live.Cutt { LiveTimelineKey liveTimelineKey = null; LiveTimelineKey liveTimelineKey2 = null; + LiveTimelineKey liveTimelineKey3 = null; LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time); if (curKey != null) { - liveTimelineKey = curKey.key; - liveTimelineKey2 = curKey.nextKey; - updateInfo.eyeCur = liveTimelineKey as LiveTimelineKeyFacialEyeData; - updateInfo.eyeNext = liveTimelineKey2 as LiveTimelineKeyFacialEyeData; + liveTimelineKey = curKey.prevKey; + liveTimelineKey2 = curKey.key; + liveTimelineKey3 = curKey.nextKey; + + updateInfo.eyePrev = liveTimelineKey as LiveTimelineKeyFacialEyeData; + updateInfo.eyeCur = liveTimelineKey2 as LiveTimelineKeyFacialEyeData; + updateInfo.eyeNext = liveTimelineKey3 as LiveTimelineKeyFacialEyeData; updateInfo.eyeKeyIndex = curKey.index; } } @@ -198,14 +206,18 @@ namespace Gallop.Live.Cutt { LiveTimelineKey liveTimelineKey = null; LiveTimelineKey liveTimelineKey2 = null; + LiveTimelineKey liveTimelineKey3 = null; LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time); if (curKey != null) { - liveTimelineKey = curKey.key; - liveTimelineKey2 = curKey.nextKey; - updateInfo.eyebrowCur = liveTimelineKey as LiveTimelineKeyFacialEyebrowData; - updateInfo.eyebrowNext = liveTimelineKey2 as LiveTimelineKeyFacialEyebrowData; + liveTimelineKey = curKey.prevKey; + liveTimelineKey2 = curKey.key; + liveTimelineKey3 = curKey.nextKey; + + updateInfo.eyebrowPrev = liveTimelineKey as LiveTimelineKeyFacialEyebrowData; + updateInfo.eyebrowCur = liveTimelineKey2 as LiveTimelineKeyFacialEyebrowData; + updateInfo.eyebrowNext = liveTimelineKey3 as LiveTimelineKeyFacialEyebrowData; updateInfo.eyebrowKeyIndex = curKey.index; } } @@ -214,14 +226,18 @@ namespace Gallop.Live.Cutt { LiveTimelineKey liveTimelineKey = null; LiveTimelineKey liveTimelineKey2 = null; + LiveTimelineKey liveTimelineKey3 = null; LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time); if (curKey != null) { - liveTimelineKey = curKey.key; - liveTimelineKey2 = curKey.nextKey; - updateInfo.earCur = liveTimelineKey as LiveTimelineKeyFacialEarData; - updateInfo.earNext = liveTimelineKey2 as LiveTimelineKeyFacialEarData; + liveTimelineKey = curKey.prevKey; + liveTimelineKey2 = curKey.key; + liveTimelineKey3 = curKey.nextKey; + + updateInfo.earPrev = liveTimelineKey as LiveTimelineKeyFacialEarData; + updateInfo.earCur = liveTimelineKey2 as LiveTimelineKeyFacialEarData; + updateInfo.earNext = liveTimelineKey3 as LiveTimelineKeyFacialEarData; updateInfo.earKeyIndex = curKey.index; } } @@ -234,8 +250,7 @@ namespace Gallop.Live.Cutt if (curKey != null && curKey.index != -1) { - LiveTimelineKeyLipSyncData arg = curKey.key as LiveTimelineKeyLipSyncData; - this.OnUpdateLipSync(arg, liveTime); + this.OnUpdateLipSync(curKey, liveTime); } } @@ -279,7 +294,7 @@ namespace Gallop.Live.Cutt { LiveTimelineKeyIndex curKey = keys.TimeKeyIndex; - if (curKey.index == -1) + if (curKey.index == -1 || Director.instance.sliderControl.is_Touched) { FindTimelineKeyCurrent(out curKey, keys, curTime); } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineWorkSheet.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineWorkSheet.cs index f02c8d4..c82ece5 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineWorkSheet.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineWorkSheet.cs @@ -160,6 +160,14 @@ namespace Gallop.Live.Cutt else { thisTimeKeyIndex.nextKey = null; + } + if(i-1 >= 0) + { + thisTimeKeyIndex.prevKey = thisList[i - 1]; + } + else + { + thisTimeKeyIndex.prevKey = null; } return thisTimeKeyIndex; } @@ -182,6 +190,14 @@ namespace Gallop.Live.Cutt else { thisTimeKeyIndex.nextKey = null; + } + if(thisTimeKeyIndex.index - 1 >= 0) + { + thisTimeKeyIndex.prevKey = thisList[thisTimeKeyIndex.index - 1]; + } + else + { + thisTimeKeyIndex.prevKey = null; } } } @@ -195,6 +211,7 @@ namespace Gallop.Live.Cutt public class LiveTimelineKeyIndex { public int index = -1; + public LiveTimelineKey prevKey = null; public LiveTimelineKey key = null; public LiveTimelineKey nextKey = null; } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Director.cs b/Assets/Scripts/umamusume/Gallop/Live/Director.cs index 0145b5e..75d1961 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Director.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Director.cs @@ -6,6 +6,8 @@ using System.Linq; using Gallop.Live.Cutt; using CriWare; using UnityEngine.SceneManagement; +using UnityEngine.UIElements; +using UnityEngine.SocialPlatforms; namespace Gallop.Live { @@ -322,7 +324,7 @@ namespace Gallop.Live public bool _isLiveScene; - public AudioSource liveSong; + public AudioSource[] liveSong; public List liveVocal; public CriAtomSource liveMusic; @@ -337,6 +339,12 @@ namespace Gallop.Live public int liveMode = 0; + public LiveViewerUI UI; + + public float totalTime; + + public SliderControl sliderControl; + private void Awake() { if (live != null) @@ -374,8 +382,18 @@ namespace Gallop.Live } } + + public void InitializeUI() + { + UI = GameObject.Find("LiveUI").GetComponent(); + + sliderControl = UI.ProgressBar.GetComponent(); + } + public void InitializeTimeline(List characters, int mode) { + totalTime = _liveTimelineControl.data.timeLength; + liveMode = mode; allowCount = characters.Count; @@ -394,14 +412,17 @@ namespace Gallop.Live _liveTimelineControl.InitCharaMotionSequence(_liveTimelineControl.data.characterSettings.motionSequenceIndices); - _liveTimelineControl.OnUpdateLipSync += delegate (LiveTimelineKeyLipSyncData keyData_, float liveTime_) + _liveTimelineControl.OnUpdateLipSync += delegate (LiveTimelineKeyIndex keyData_, float liveTime_) { + var prevKey = keyData_.prevKey as LiveTimelineKeyLipSyncData; + var curKey = keyData_.key as LiveTimelineKeyLipSyncData; + var nextKey = keyData_.nextKey as LiveTimelineKeyLipSyncData; for (int k = 0; k < charaObjs.Count; k++) { var container = charaObjs[k].GetComponentInChildren(); if(container != null) { - container.FaceDrivenKeyTarget.AlterUpdateAutoLip(keyData_, liveTime_, ((int)keyData_.character >> k) % 2); + container.FaceDrivenKeyTarget.AlterUpdateAutoLip(prevKey, curKey, liveTime_, ((int)curKey.character >> k) % 2); } } }; @@ -479,7 +500,7 @@ namespace Gallop.Live } UmaViewerBuilder.Instance.LoadLiveSound(songid, entry, false); - liveSong = GameObject.Find("SoundController").GetComponent(); + liveSong = GameObject.Find("SoundController").GetComponents(); } _isLiveSetup = true; @@ -530,19 +551,82 @@ namespace Gallop.Live } else { - if(liveSong.time > 0.1) + if (liveSong[0].time > 0.1) { - _liveCurrentTime = liveSong.time; + _liveCurrentTime = liveSong[0].time; _syncTime = true; } } } else { - _liveCurrentTime += Time.deltaTime; - //Debug.Log((float)liveMusic.time / 1000); - //Debug.Log(_liveCurrentTime); - OnTimelineUpdate(_liveCurrentTime); + if (sliderControl.is_Outed) + { + _liveCurrentTime = UI.ProgressBar.value * totalTime; + + if (liveMusic) + { + int CriTime = Convert.ToInt32(_liveCurrentTime * 1000); + + liveMusic.startTime = CriTime; + + foreach (var vocal in liveVocal) + { + vocal.startTime = CriTime; + } + + liveMusic.Play(0); + + foreach (var vocal in liveVocal) + { + vocal.Play(0); + } + } + else + { + foreach (var song in liveSong) + { + song.time = _liveCurrentTime; + } + } + + OnTimelineUpdate(_liveCurrentTime); + + sliderControl.is_Outed = false; + sliderControl.is_Touched = false; + _syncTime = false; + } + else if (sliderControl.is_Touched) + { + _liveCurrentTime = UI.ProgressBar.value * totalTime; + + if (liveMusic) + { + liveMusic.Stop(); + foreach (var vocal in liveVocal) + { + vocal.Stop(); + } + } + else + { + foreach(var song in liveSong) + { + song.Stop(); + } + } + + OnTimelineUpdate(_liveCurrentTime); + } + else + { + _liveCurrentTime += Time.deltaTime; + + UI.ProgressBar.value = _liveCurrentTime / totalTime; + //Debug.Log((float)liveMusic.time / 1000); + //Debug.Log(_liveCurrentTime); + OnTimelineUpdate(_liveCurrentTime); + } } } }