diff --git a/Assets/Scenes/MenuScene.unity b/Assets/Scenes/MenuScene.unity index 7eed48515..df240458b 100644 --- a/Assets/Scenes/MenuScene.unity +++ b/Assets/Scenes/MenuScene.unity @@ -1133,6 +1133,83 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 451462194} m_CullTransparentMesh: 1 +--- !u!1 &784751310 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 784751311} + - component: {fileID: 784751313} + - component: {fileID: 784751312} + m_Layer: 5 + m_Name: Loading Screen + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &784751311 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 784751310} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 976689291} + m_Father: {fileID: 1458336823} + 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, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &784751312 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 784751310} + 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: 0, g: 0, b: 0, 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: 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 &784751313 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 784751310} + m_CullTransparentMesh: 1 --- !u!1 &965740405 GameObject: m_ObjectHideFlags: 0 @@ -1200,6 +1277,83 @@ MonoBehaviour: preSongDocument: {fileID: 1069176316} postSongDocument: {fileID: 1207599223} songSelect: {fileID: 1458336822} +--- !u!1 &976689290 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 976689291} + - component: {fileID: 976689293} + - component: {fileID: 976689292} + m_Layer: 5 + m_Name: Progress Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &976689291 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 976689290} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1649890903} + m_Father: {fileID: 784751311} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -30, y: 15} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &976689292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 976689290} + 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: 0.16299999, g: 0.16299999, b: 0.16299999, 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: 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 &976689293 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 976689290} + m_CullTransparentMesh: 1 --- !u!1 &1069176315 GameObject: m_ObjectHideFlags: 0 @@ -1872,6 +2026,7 @@ RectTransform: - {fileID: 267019433} - {fileID: 1339554101} - {fileID: 63677085} + - {fileID: 784751311} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1899,6 +2054,8 @@ MonoBehaviour: songListContent: {fileID: 396272154} selectedSongView: {fileID: 2044165076} searchField: {fileID: 63677086} + loadingScreen: {fileID: 784751310} + progressBar: {fileID: 1649890904} --- !u!1 &1528156284 GameObject: m_ObjectHideFlags: 0 @@ -1952,6 +2109,82 @@ MonoBehaviour: m_EditorClassIdentifier: m_Padding: {x: -8, y: -5, z: -8, w: -5} m_Softness: {x: 0, y: 0} +--- !u!1 &1649890902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1649890903} + - component: {fileID: 1649890905} + - component: {fileID: 1649890904} + m_Layer: 5 + m_Name: Progress + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1649890903 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1649890902} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 976689291} + 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, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1649890904 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1649890902} + 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: b038556afd6775c4d8eeea78927256ca, type: 3} + m_Type: 3 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 0 + m_FillAmount: 0 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1649890905 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1649890902} + m_CullTransparentMesh: 1 --- !u!1 &1844302444 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/PlayScene.unity b/Assets/Scenes/PlayScene.unity index 7ffea9001..2cf7a1ac3 100644 --- a/Assets/Scenes/PlayScene.unity +++ b/Assets/Scenes/PlayScene.unity @@ -201,6 +201,141 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 274394382} m_CullTransparentMesh: 1 +--- !u!1 &296535526 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 296535527} + - component: {fileID: 296535529} + - component: {fileID: 296535528} + m_Layer: 5 + m_Name: Song Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &296535527 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 296535526} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1476172820} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -10} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &296535528 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 296535526} + 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: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Song - Artist + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 16 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + 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 &296535529 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 296535526} + m_CullTransparentMesh: 1 --- !u!1 &330585543 GameObject: m_ObjectHideFlags: 0 @@ -334,8 +469,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 24 - m_fontSizeBase: 24 + m_fontSize: 16 + m_fontSizeBase: 16 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -384,6 +519,141 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 468187698} m_CullTransparentMesh: 1 +--- !u!1 &484464889 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 484464890} + - component: {fileID: 484464892} + - component: {fileID: 484464891} + m_Layer: 5 + m_Name: Lyric + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &484464890 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 484464889} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1476172820} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -21.999908} + m_SizeDelta: {x: 0, y: 50} + m_Pivot: {x: 0.5, y: 0.99999976} +--- !u!114 &484464891 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 484464889} + 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: + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 36 + m_fontSizeBase: 36 + 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: 1 + 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 &484464892 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 484464889} + m_CullTransparentMesh: 1 --- !u!1 &1476172816 GameObject: m_ObjectHideFlags: 0 @@ -481,6 +751,8 @@ RectTransform: - {fileID: 274394383} - {fileID: 2062919431} - {fileID: 1967822877} + - {fileID: 296535527} + - {fileID: 484464890} - {fileID: 2146974096} m_Father: {fileID: 0} m_RootOrder: 1 @@ -504,6 +776,8 @@ MonoBehaviour: m_EditorClassIdentifier: trackContainer: {fileID: 2062919431} songProgress: {fileID: 2146974097} + songTitle: {fileID: 296535528} + lyric: {fileID: 484464891} --- !u!1 &1967822876 GameObject: m_ObjectHideFlags: 0 @@ -540,9 +814,9 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 14.219299, y: -17} - m_SizeDelta: {x: 28.438599, y: 30} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0, y: 1} --- !u!114 &1967822878 MonoBehaviour: m_ObjectHideFlags: 0 @@ -705,7 +979,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: -20} m_SizeDelta: {x: 0, y: 2} m_Pivot: {x: 0.5, y: 1} --- !u!114 &2146974097 diff --git a/Assets/Script/Data/Chart.cs b/Assets/Script/Data/Chart.cs index c59d302c4..8782a8a53 100644 --- a/Assets/Script/Data/Chart.cs +++ b/Assets/Script/Data/Chart.cs @@ -3,13 +3,15 @@ namespace YARG.Data { public class Chart { - public List[]> allParts = null; + public List[]> allParts; public List[] guitar = new List[4]; public List[] bass = new List[4]; public List[] keys = new List[4]; - public List events = null; - public List beats = null; + public List events; + public List beats; + + public List genericLyrics; public Chart() { allParts = new() { diff --git a/Assets/Script/Data/GenericLyricInfo.cs b/Assets/Script/Data/GenericLyricInfo.cs new file mode 100644 index 000000000..5dc3f8969 --- /dev/null +++ b/Assets/Script/Data/GenericLyricInfo.cs @@ -0,0 +1,11 @@ +namespace YARG.Data { + public class GenericLyricInfo { + public float time; + public string lyric; + + public GenericLyricInfo(float time, string lyric) { + this.time = time; + this.lyric = lyric; + } + } +} \ No newline at end of file diff --git a/Assets/Script/Data/GenericLyricInfo.cs.meta b/Assets/Script/Data/GenericLyricInfo.cs.meta new file mode 100644 index 000000000..46c1c40db --- /dev/null +++ b/Assets/Script/Data/GenericLyricInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7269c2f0677e9e547b8e43cda2ef44d2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/PlayMode/Play.cs b/Assets/Script/PlayMode/Play.cs index b6b81f740..56459d5ee 100644 --- a/Assets/Script/PlayMode/Play.cs +++ b/Assets/Script/PlayMode/Play.cs @@ -45,6 +45,7 @@ public float SongTime { public Chart chart; private int beatIndex = 0; + private int lyricIndex = 0; private void Awake() { Instance = this; @@ -114,6 +115,12 @@ private void Update() { beatIndex++; } + // Update lyrics + while (chart.genericLyrics.Count > lyricIndex && chart.genericLyrics[lyricIndex].time <= SongTime) { + GameUI.Instance.SetGenericLyric(chart.genericLyrics[lyricIndex].lyric); + lyricIndex++; + } + // End song if (realSongTime > song.songLength.Value + 0.5f) { MainMenu.postSong = true; diff --git a/Assets/Script/Serialization/MidiParser.cs b/Assets/Script/Serialization/MidiParser.cs index 55bde463d..5ddc1411f 100644 --- a/Assets/Script/Serialization/MidiParser.cs +++ b/Assets/Script/Serialization/MidiParser.cs @@ -40,6 +40,7 @@ public MidiParser(string file, float delay) : base(file, delay) { public override void Parse(Chart chart) { var eventIR = new List(); + var tempo = midi.GetTempoMap(); foreach (var trackChunk in midi.GetTrackChunks()) { foreach (var trackEvent in trackChunk.Events) { @@ -68,6 +69,9 @@ public override void Parse(Chart chart) { } ParseStarpower(eventIR, trackChunk, "keys"); break; + case "PART VOCALS": + chart.genericLyrics = ParseGenericLyrics(trackChunk, tempo); + break; case "BEAT": ParseBeats(eventIR, trackChunk); break; @@ -105,7 +109,6 @@ public override void Parse(Chart chart) { // Generate beat line events if there aren't any - var tempo = midi.GetTempoMap(); if (!eventIR.Any(i => i.name == "beatLine_minor" || i.name == "beatLine_major")) { GenerateBeats(eventIR, tempo, lastNoteTime); } @@ -428,5 +431,75 @@ private void GenerateBeats(List eventIR, TempoMap tempo, float lastNote quatersIn++; } while (currentTime < lastNoteTime); } + + private List ParseGenericLyrics(TrackChunk trackChunk, TempoMap tempo) { + var lyrics = new List(); + + long totalDelta = 0; + + // Convert track events into intermediate representation + GenericLyricInfo currentGroup = null; + bool connected = false; + foreach (var trackEvent in trackChunk.Events) { + totalDelta += trackEvent.DeltaTime; + + if (trackEvent is not LyricEvent lyricEvent) { + continue; + } + + // Combine lyric events together into phrases + + var time = (float) TimeConverter.ConvertTo(totalDelta, tempo).TotalSeconds; + string text = lyricEvent.Text; + + // Remove all metadata + for (int i = text.Length - 1; i >= 0; i--) { + if (!char.IsWhiteSpace(text[i]) && + !char.IsLetter(text[i]) && + !char.IsNumber(text[i]) && + text[i] != '\'' && + text[i] != '-') { + + text = text.Remove(i, 1); + } + } + text = text.Trim(); + + // Skip blanks + if (string.IsNullOrEmpty(text)) { + continue; + } + + // Uppercase is a new phrase + if (currentGroup != null && char.IsUpper(text[0])) { + lyrics.Add(currentGroup); + connected = false; + currentGroup = null; + } + + if (currentGroup == null) { + currentGroup = new GenericLyricInfo(time, lyricEvent.Text); + } else { + if (!connected) { + currentGroup.lyric += " "; + } + + if (text.EndsWith("-")) { + connected = true; + currentGroup.lyric += text[..^1]; + } else { + connected = false; + currentGroup.lyric += text; + } + } + } + + // Deal with last lyric group + if (currentGroup != null) { + lyrics.Add(currentGroup); + } + + return lyrics; + } } } \ No newline at end of file diff --git a/Assets/Script/Serialization/SongIni.cs b/Assets/Script/Serialization/SongIni.cs index 9284c48ab..5d84d6a87 100644 --- a/Assets/Script/Serialization/SongIni.cs +++ b/Assets/Script/Serialization/SongIni.cs @@ -49,9 +49,8 @@ public static SongInfo CompleteSongInfo(SongInfo song, FileIniDataParser parser) int rawLength = int.Parse(section["song_length"]); song.songLength = rawLength / 1000f; } else { - song.errored = true; - Debug.LogError($"No song length found for `{song.folder}`."); - return song; + Debug.LogWarning($"No song length found for `{song.folder}`. Loading audio file. This might take longer."); + LoadSongLengthFromAudio(song); } // Get song delay (0 if none) @@ -73,5 +72,14 @@ public static SongInfo CompleteSongInfo(SongInfo song, FileIniDataParser parser) public static SongInfo CompleteSongInfo(SongInfo song) { return CompleteSongInfo(song, new FileIniDataParser()); } + + private static void LoadSongLengthFromAudio(SongInfo song) { + // Load file + var songOggPath = Path.Combine(song.folder.FullName, "song.ogg"); + var file = TagLib.File.Create(songOggPath); + + // Save + song.songLength = (float) file.Properties.Duration.TotalSeconds; + } } } \ No newline at end of file diff --git a/Assets/Script/Server/Host.cs b/Assets/Script/Server/Host.cs index cadac4875..17c665d37 100644 --- a/Assets/Script/Server/Host.cs +++ b/Assets/Script/Server/Host.cs @@ -73,13 +73,13 @@ private void ServerThread(TcpClient client) { string path = str[8..]; // See if valid - if (!path.StartsWith(SongLibrary.SONG_FOLDER.FullName)) { + if (!path.StartsWith(SongLibrary.songFolder.FullName)) { return; } // Create unique temp file name string name = $"temp_{Thread.CurrentThread.ManagedThreadId}.zip"; - name = Path.Combine(SongLibrary.SONG_FOLDER.FullName, name); + name = Path.Combine(SongLibrary.songFolder.FullName, name); // Zip up folder ZipFile.CreateFromDirectory(path, name); @@ -95,7 +95,7 @@ private void ServerThread(TcpClient client) { string path = str[14..]; // See if valid - if (!path.StartsWith(SongLibrary.SONG_FOLDER.FullName)) { + if (!path.StartsWith(SongLibrary.songFolder.FullName)) { return; } diff --git a/Assets/Script/SongLibrary.cs b/Assets/Script/SongLibrary.cs index 064bb32dc..9bed05f40 100644 --- a/Assets/Script/SongLibrary.cs +++ b/Assets/Script/SongLibrary.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.IO; -using System.Threading.Tasks; +using System.Threading; using IniParser; using Newtonsoft.Json; using YARG.Data; @@ -8,7 +8,9 @@ namespace YARG { public static class SongLibrary { - public static readonly DirectoryInfo SONG_FOLDER = new(@"B:\Clone Hero Alpha\Songs"); + public static DirectoryInfo songFolder = new(@"B:\YARG_Songs"); + + public static float loadPercent = 0f; /// /// The location of the local or remote cache (depending on whether we are connected to a server). @@ -19,7 +21,7 @@ public static FileInfo CacheFile { return GameManager.client.remoteCache; } - return new(Path.Combine(SONG_FOLDER.ToString(), "yarg_cache.json")); + return new(Path.Combine(songFolder.ToString(), "yarg_cache.json")); } } @@ -35,31 +37,46 @@ public static List Songs { /// /// Should be called before you access . /// - public static void FetchSongs() { + public static bool FetchSongs() { if (Songs != null) { - return; + return true; } if (CacheFile.Exists || GameManager.client != null) { ReadCache(); + return true; } else { - CreateSongInfoFromFiles(); - ReadSongIni(); - CreateCache(); + ThreadPool.QueueUserWorkItem(_ => { + Songs = new(); + + loadPercent = 0f; + CreateSongInfoFromFiles(songFolder); + loadPercent = 0.1f; + ReadSongIni(); + loadPercent = 0.9f; + CreateCache(); + loadPercent = 1f; + }); + return false; } } /// - /// Populate with contents.
+ /// Populate with contents.
/// This is create a basic object for each song.
/// We need to look at the song.ini files for more details. ///
- private static void CreateSongInfoFromFiles() { - var directories = SONG_FOLDER.GetDirectories(); + private static void CreateSongInfoFromFiles(DirectoryInfo songDir) { + var directories = songDir.GetDirectories(); - Songs = new(directories.Length); foreach (var folder in directories) { - Songs.Add(new SongInfo(folder)); + if (new FileInfo(Path.Combine(folder.FullName, "song.ini")).Exists) { + // If the folder has a song.ini, it is a song folder + Songs.Add(new SongInfo(folder)); + } else { + // Otherwise, treat it as a sub-folder + CreateSongInfoFromFiles(folder); + } } } @@ -71,6 +88,9 @@ private static void ReadSongIni() { var parser = new FileIniDataParser(); foreach (var song in Songs) { SongIni.CompleteSongInfo(song, parser); + + // song.ini loading accounts for 80% of loading + loadPercent += 1f / Songs.Count * 0.8f; } } diff --git a/Assets/Script/UI/GameUI.cs b/Assets/Script/UI/GameUI.cs index c115cb4cf..329a3c376 100644 --- a/Assets/Script/UI/GameUI.cs +++ b/Assets/Script/UI/GameUI.cs @@ -1,3 +1,4 @@ +using TMPro; using UnityEngine; using UnityEngine.UI; using YARG.PlayMode; @@ -8,6 +9,10 @@ public class GameUI : MonoBehaviour { private Transform trackContainer; [SerializeField] private Image songProgress; + [SerializeField] + private TextMeshProUGUI songTitle; + [SerializeField] + private TextMeshProUGUI lyric; public static GameUI Instance { get; @@ -18,6 +23,10 @@ private void Awake() { Instance = this; } + private void Start() { + songTitle.text = $"{Play.song.SongName} - {Play.song.artistName}"; + } + private void Update() { songProgress.fillAmount = Play.Instance.SongTime / Play.song.songLength.Value; } @@ -33,6 +42,10 @@ public void AddTrackImage(RenderTexture rt) { UpdateRawImageSizing(); } + public void SetGenericLyric(string str) { + lyric.text = str; + } + private void UpdateRawImageSizing() { foreach (var rawImage in trackContainer.GetComponentsInChildren()) { float percent = 1f / trackContainer.childCount; diff --git a/Assets/Script/UI/SongSelect.cs b/Assets/Script/UI/SongSelect.cs index 1ae9324b3..894fdd74f 100644 --- a/Assets/Script/UI/SongSelect.cs +++ b/Assets/Script/UI/SongSelect.cs @@ -3,6 +3,7 @@ using TMPro; using UnityEngine; using UnityEngine.InputSystem; +using UnityEngine.UI; using YARG.Data; namespace YARG.UI { @@ -24,6 +25,12 @@ public class SongSelect : MonoBehaviour { [SerializeField] private TMP_InputField searchField; + [Space] + [SerializeField] + private GameObject loadingScreen; + [SerializeField] + private Image progressBar; + private List songs; private List songViewsBefore = new(); @@ -33,7 +40,8 @@ public class SongSelect : MonoBehaviour { private int selectedSongIndex = 0; private void Start() { - SongLibrary.FetchSongs(); + bool loading = !SongLibrary.FetchSongs(); + loadingScreen.SetActive(loading); // Create before (insert backwards) for (int i = 0; i < SONG_VIEW_EXTRA; i++) { @@ -51,8 +59,10 @@ private void Start() { songViewsAfter.Add(gameObject.GetComponent()); } - // Automatically loads songs and updates song views - UpdateSearch(); + if (!loading) { + // Automatically loads songs and updates song views + UpdateSearch(); + } } private void UpdateSongViews() { @@ -91,6 +101,20 @@ private void UpdateSongViews() { } private void Update() { + // Update progress if loading + + if (loadingScreen.activeSelf) { + progressBar.fillAmount = SongLibrary.loadPercent; + + // Finish loading + if (SongLibrary.loadPercent >= 1f) { + loadingScreen.SetActive(false); + UpdateSearch(); + } + + return; + } + // Update input timer inputTimer -= Time.deltaTime; diff --git a/Assets/packages.config b/Assets/packages.config index 323709e5d..3db62dbb2 100644 --- a/Assets/packages.config +++ b/Assets/packages.config @@ -2,4 +2,5 @@ + \ No newline at end of file diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 133548c46..dae017e44 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -133,8 +133,7 @@ PlayerSettings: vulkanEnableCommandBufferRecycling: 1 loadStoreDebugModeEnabled: 0 bundleVersion: 0.1.0 - preloadedAssets: - - {fileID: 11400000, guid: 8efbce013f4e1c34895851b7038c76e9, type: 2} + preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1