diff --git a/Assets/000_assets/material/M_SquareFrame 1.mat b/Assets/000_assets/material/M_SquareFrame 1.mat index b42e0f31..deda1964 100644 --- a/Assets/000_assets/material/M_SquareFrame 1.mat +++ b/Assets/000_assets/material/M_SquareFrame 1.mat @@ -213,7 +213,7 @@ Material: - _Dst: 10 - _DstBlend: 0 - _DstBlendAlpha: 0 - - _EdgeValue: 0.019051252 + - _EdgeValue: 0.5645372 - _EnvironmentReflections: 1 - _FNLfanxiangkaiguan: 0 - _Face: 1 @@ -258,7 +258,7 @@ Material: - _Mask_scale: 1 - _Metallic: 0 - _OcclusionStrength: 1 - - _Opacity: 0.98094875 + - _Opacity: 0.43546277 - _Parallax: 0.005 - _Pass: 0 - _QueueOffset: 0 diff --git a/Assets/000_assets/material/M_hold.mat b/Assets/000_assets/material/M_hold.mat index 33add737..862c1768 100644 --- a/Assets/000_assets/material/M_hold.mat +++ b/Assets/000_assets/material/M_hold.mat @@ -147,9 +147,9 @@ Material: - _ZWrite: 1 - _alpha: 1 - _alpha1: 2.42 - - _edge: 0.4 - - _line_angle: 3.1415 - - _line_density: 10 + - _edge: 0.25 + - _line_angle: 12 + - _line_density: 4 - _line_width: 0.06 - _roll_speed: 0.2 - _speed: 0 @@ -165,7 +165,7 @@ Material: - _IN: {r: 0.007843138, g: 0.019607844, b: 0.043137256, a: 1} - _ImageColor: {r: 1, g: 1, b: 1, a: 0} - _LINE: {r: 0.54245293, g: 0.6397447, b: 1.0000002, a: 1} - - _OUT: {r: 0.40277463, g: 1.0166805, b: 1.498039, a: 1} + - _OUT: {r: 0.4027747, g: 1.0166806, b: 1.4980391, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - _Vector0: {r: -0.05, g: 1, b: 0, a: 0} - _colorremap: {r: 0.5, g: 1, b: 0, a: 1} diff --git a/Assets/Dreamteck/Splines/Components/SplineUser.cs b/Assets/Dreamteck/Splines/Components/SplineUser.cs index 0f9e8c08..636aa31f 100644 --- a/Assets/Dreamteck/Splines/Components/SplineUser.cs +++ b/Assets/Dreamteck/Splines/Components/SplineUser.cs @@ -248,7 +248,7 @@ namespace Dreamteck.Splines { #if UNITY_EDITOR public virtual void EditorAwake() { - + } #endif diff --git a/Assets/Prefabs/BasePrefabsCollection.asset b/Assets/Prefabs/BasePrefabsCollection.asset index 5621275f..6cd317e7 100644 --- a/Assets/Prefabs/BasePrefabsCollection.asset +++ b/Assets/Prefabs/BasePrefabsCollection.asset @@ -155,3 +155,13 @@ MonoBehaviour: type: 2} audioEventObject: {fileID: 308406596911943559, guid: e3708c94d5457194f93da5c077888870, type: 3} + judgeRankHint: {fileID: 875725123896983698, guid: 8686b4d4ddfecbe41a5750db58253067, + type: 3} + tapInputMark: {fileID: 7671065637303904002, guid: e6a7bed69b49a8642a4e20e27b85eadb, + type: 3} + touchInputMark: {fileID: 7671065637303904002, guid: 06c817e062a4f55409fb06597c78a4fb, + type: 3} + directionalSwipeInputMark: {fileID: 7671065637303904002, guid: 62ab32c12d108ca4d84d82b1d817c0de, + type: 3} + genericSwipeInputMark: {fileID: 7671065637303904002, guid: 215490c21a03d9f48b5438a1748b3147, + type: 3} diff --git a/Assets/StreamingAssets/Audio/GeneratedSoundBanks/Windows/DecodedBanks.meta b/Assets/Prefabs/Debug.meta similarity index 77% rename from Assets/StreamingAssets/Audio/GeneratedSoundBanks/Windows/DecodedBanks.meta rename to Assets/Prefabs/Debug.meta index ea84fe7e..2c8d48a6 100644 --- a/Assets/StreamingAssets/Audio/GeneratedSoundBanks/Windows/DecodedBanks.meta +++ b/Assets/Prefabs/Debug.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 48089449dbf7ace4693123715927e02c +guid: 3472d7ab7e76f304aa49f6eae6eec06f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/StreamingAssets/Audio/GeneratedSoundBanks/Windows/DecodedBanks/English(US).meta b/Assets/Prefabs/Debug/Input.meta similarity index 77% rename from Assets/StreamingAssets/Audio/GeneratedSoundBanks/Windows/DecodedBanks/English(US).meta rename to Assets/Prefabs/Debug/Input.meta index c03ef60c..6364e6e6 100644 --- a/Assets/StreamingAssets/Audio/GeneratedSoundBanks/Windows/DecodedBanks/English(US).meta +++ b/Assets/Prefabs/Debug/Input.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 28261e21279bc33438bc9aedad170ef3 +guid: 765f2193b7467734bab384fe87d415df folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Debug/Input/DirectionalSwipeInputMark.prefab b/Assets/Prefabs/Debug/Input/DirectionalSwipeInputMark.prefab new file mode 100644 index 00000000..763e2d11 --- /dev/null +++ b/Assets/Prefabs/Debug/Input/DirectionalSwipeInputMark.prefab @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7671065637303904002 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5502985463212138770} + - component: {fileID: 2890788359140629188} + - component: {fileID: 7768496905287876572} + m_Layer: 5 + m_Name: DirectionalSwipeInputMark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5502985463212138770 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 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: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2890788359140629188 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + m_CullTransparentMesh: 1 +--- !u!114 &7768496905287876572 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + 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: 9e09e2a2dc8f2864190a125cba002b62, 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 diff --git a/Assets/Prefabs/Debug/Input/DirectionalSwipeInputMark.prefab.meta b/Assets/Prefabs/Debug/Input/DirectionalSwipeInputMark.prefab.meta new file mode 100644 index 00000000..da2661c3 --- /dev/null +++ b/Assets/Prefabs/Debug/Input/DirectionalSwipeInputMark.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 62ab32c12d108ca4d84d82b1d817c0de +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Debug/Input/GenericSwipeInputMark.prefab b/Assets/Prefabs/Debug/Input/GenericSwipeInputMark.prefab new file mode 100644 index 00000000..6d14c7b2 --- /dev/null +++ b/Assets/Prefabs/Debug/Input/GenericSwipeInputMark.prefab @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7671065637303904002 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5502985463212138770} + - component: {fileID: 2890788359140629188} + - component: {fileID: 7768496905287876572} + m_Layer: 5 + m_Name: GenericSwipeInputMark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5502985463212138770 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 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: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2890788359140629188 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + m_CullTransparentMesh: 1 +--- !u!114 &7768496905287876572 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + 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: 21300002, guid: 66995b6b61aed864daa956ae255d7fee, 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 diff --git a/Assets/Prefabs/Debug/Input/GenericSwipeInputMark.prefab.meta b/Assets/Prefabs/Debug/Input/GenericSwipeInputMark.prefab.meta new file mode 100644 index 00000000..c7650dea --- /dev/null +++ b/Assets/Prefabs/Debug/Input/GenericSwipeInputMark.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 215490c21a03d9f48b5438a1748b3147 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Debug/Input/TapInputMark.prefab b/Assets/Prefabs/Debug/Input/TapInputMark.prefab new file mode 100644 index 00000000..2c7ca423 --- /dev/null +++ b/Assets/Prefabs/Debug/Input/TapInputMark.prefab @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7671065637303904002 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5502985463212138770} + - component: {fileID: 2890788359140629188} + - component: {fileID: 7768496905287876572} + m_Layer: 5 + m_Name: TapInputMark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5502985463212138770 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 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: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2890788359140629188 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + m_CullTransparentMesh: 1 +--- !u!114 &7768496905287876572 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + 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: 3b01fe90eb34c7c4bab30f287241c158, 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: 1 diff --git a/Assets/Prefabs/Debug/Input/TapInputMark.prefab.meta b/Assets/Prefabs/Debug/Input/TapInputMark.prefab.meta new file mode 100644 index 00000000..e095cbeb --- /dev/null +++ b/Assets/Prefabs/Debug/Input/TapInputMark.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e6a7bed69b49a8642a4e20e27b85eadb +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Debug/Input/TouchInputMark.prefab b/Assets/Prefabs/Debug/Input/TouchInputMark.prefab new file mode 100644 index 00000000..d715a736 --- /dev/null +++ b/Assets/Prefabs/Debug/Input/TouchInputMark.prefab @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7671065637303904002 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5502985463212138770} + - component: {fileID: 2890788359140629188} + - component: {fileID: 7768496905287876572} + m_Layer: 5 + m_Name: TouchInputMark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5502985463212138770 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + m_LocalRotation: {x: 0, y: 0, z: 0.38268343, w: 0.92387956} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 45} + 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: 50, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2890788359140629188 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + m_CullTransparentMesh: 1 +--- !u!114 &7768496905287876572 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7671065637303904002} + 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: b325a13e94f3bac4199e75b91fa98449, 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: 1 diff --git a/Assets/Prefabs/Debug/Input/TouchInputMark.prefab.meta b/Assets/Prefabs/Debug/Input/TouchInputMark.prefab.meta new file mode 100644 index 00000000..6b046f12 --- /dev/null +++ b/Assets/Prefabs/Debug/Input/TouchInputMark.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 06c817e062a4f55409fb06597c78a4fb +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Debug/JudgeRankHint.prefab b/Assets/Prefabs/Debug/JudgeRankHint.prefab new file mode 100644 index 00000000..5d55add0 --- /dev/null +++ b/Assets/Prefabs/Debug/JudgeRankHint.prefab @@ -0,0 +1,173 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &875725123896983698 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1922651230217077645} + - component: {fileID: 2003759591061076146} + - component: {fileID: 7348685914350442380} + m_Layer: 0 + m_Name: JudgeRankHint + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1922651230217077645 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 875725123896983698} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + 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: 4, y: 1} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!23 &2003759591061076146 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 875725123896983698} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &7348685914350442380 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 875725123896983698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, 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: PERFECT + 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: 8.6 + m_fontSizeBase: 12 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 6 + m_fontSizeMax: 12 + 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: 0 + 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 + _SortingLayer: 0 + _SortingLayerID: 0 + _SortingOrder: 0 + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 2003759591061076146} + m_maskType: 0 diff --git a/Assets/Prefabs/Debug/JudgeRankHint.prefab.meta b/Assets/Prefabs/Debug/JudgeRankHint.prefab.meta new file mode 100644 index 00000000..bc9b80b8 --- /dev/null +++ b/Assets/Prefabs/Debug/JudgeRankHint.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8686b4d4ddfecbe41a5750db58253067 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/GameElements/Note/Tap.prefab b/Assets/Prefabs/GameElements/Note/Tap.prefab index 1cf5d2ca..d6770dd2 100644 --- a/Assets/Prefabs/GameElements/Note/Tap.prefab +++ b/Assets/Prefabs/GameElements/Note/Tap.prefab @@ -81,10 +81,12 @@ MonoBehaviour: isOnTrack: 0 track: {fileID: 0} trackPositioner: {fileID: 0} - noteVisual: {fileID: 0} audioContainer: {fileID: -3299791098757412080} + noteVisual: {fileID: 0} + isDuringJudging: 0 noteScreenPosition: {x: 0, y: 0} isFirstJudged: 0 + isFinalJudged: 0 --- !u!114 &-3299791098757412080 MonoBehaviour: m_ObjectHideFlags: 0 @@ -109,3 +111,6 @@ MonoBehaviour: - Name: SoundEventDictionary Entry: 6 Data: + - Name: SoundRTPCDictionary + Entry: 6 + Data: diff --git a/Assets/Prefabs/Menu/SongSelection/SongSelectionTab.prefab b/Assets/Prefabs/Menu/SongSelection/SongSelectionTab.prefab index 1c928fcd..792faec3 100644 --- a/Assets/Prefabs/Menu/SongSelection/SongSelectionTab.prefab +++ b/Assets/Prefabs/Menu/SongSelection/SongSelectionTab.prefab @@ -58,11 +58,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e65fe538f854fc041a6bc0065c5959b9, type: 3} m_Name: m_EditorClassIdentifier: + isLocked: 0 connectedSong: songName: displaySongName: composer: - isNewSong: 0 songSwitch: idInternal: 0 valueGuidInternal: @@ -73,12 +73,89 @@ MonoBehaviour: illustratorName: additionalInformation: difficultyDataList: [] + unlockKey: songNameText: {fileID: 1112448872792176886} quickSwitchButton: {fileID: 6856252238896320904} distanceToCenter: 0 background: {fileID: 8125269448312031469} selectedImage: {fileID: 7953488331568891204} unselectedImage: {fileID: 9036177453652706891} + lockMark: {fileID: 3657367309530734305} +--- !u!1 &2951456904172631153 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2944383566287635091} + - component: {fileID: 7102711962827206714} + - component: {fileID: 3657367309530734305} + m_Layer: 5 + m_Name: LockMark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2944383566287635091 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2951456904172631153} + 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: 395816751245027092} + 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: -50, y: 0} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7102711962827206714 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2951456904172631153} + m_CullTransparentMesh: 1 +--- !u!114 &3657367309530734305 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2951456904172631153} + 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: cacaf83c4f5642244a1e47f13500c4a0, 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!1 &4315792707800784636 GameObject: m_ObjectHideFlags: 0 @@ -113,8 +190,8 @@ RectTransform: 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: 402.5, y: 0} - m_SizeDelta: {x: 695, y: 100} + m_AnchoredPosition: {x: 400, y: 0} + m_SizeDelta: {x: 700, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &449787441181856078 CanvasRenderer: @@ -476,6 +553,7 @@ RectTransform: m_Children: - {fileID: 8125269448312031469} - {fileID: 6247940886474273465} + - {fileID: 2944383566287635091} - {fileID: 3782351297585486155} m_Father: {fileID: 8536548118669694916} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/Beatmap.bytes b/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/Beatmap.bytes index 1571b0b5..68d1a78d 100644 Binary files a/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/Beatmap.bytes and b/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/Beatmap.bytes differ diff --git a/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/CommandScripts.bytes b/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/CommandScripts.bytes index 8d945fcd..77587221 100644 Binary files a/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/CommandScripts.bytes and b/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/CommandScripts.bytes differ diff --git a/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/ProjectInfo.bytes b/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/ProjectInfo.bytes index 6ecfd5d0..bbf67d87 100644 Binary files a/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/ProjectInfo.bytes and b/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/ProjectInfo.bytes differ diff --git a/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/SongInfo.bytes b/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/SongInfo.bytes index a8fc70f9..9734e63f 100644 Binary files a/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/SongInfo.bytes and b/Assets/Resources/Beatmaps/Chapter0/Alunite Cas/Hard/SongInfo.bytes differ diff --git a/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy.meta b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy.meta new file mode 100644 index 00000000..ed6f6f18 --- /dev/null +++ b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 55bdd9c13e36cf84e9c4d9099bed9a88 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/Beatmap.bytes b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/Beatmap.bytes new file mode 100644 index 00000000..c67b500f Binary files /dev/null and b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/Beatmap.bytes differ diff --git a/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/Beatmap.bytes.meta b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/Beatmap.bytes.meta new file mode 100644 index 00000000..99b34f11 --- /dev/null +++ b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/Beatmap.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 75cadcc3831a6f941b854bb0b8a17cfa +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/CommandScripts.bytes b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/CommandScripts.bytes new file mode 100644 index 00000000..f88d0b2a Binary files /dev/null and b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/CommandScripts.bytes differ diff --git a/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/CommandScripts.bytes.meta b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/CommandScripts.bytes.meta new file mode 100644 index 00000000..9aab7563 --- /dev/null +++ b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/CommandScripts.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8b8317c0b356c624ead4fcc27bdfbe3c +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/ProjectInfo.bytes b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/ProjectInfo.bytes new file mode 100644 index 00000000..d4b001a8 Binary files /dev/null and b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/ProjectInfo.bytes differ diff --git a/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/ProjectInfo.bytes.meta b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/ProjectInfo.bytes.meta new file mode 100644 index 00000000..75138173 --- /dev/null +++ b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/ProjectInfo.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5ca517371cbd08849a4ed80ed839be3b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/SongInfo.bytes b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/SongInfo.bytes new file mode 100644 index 00000000..b0819320 --- /dev/null +++ b/Assets/Resources/Beatmaps/Chapter0/Chaos Zone/Easy/SongInfo.bytes @@ -0,0 +1 @@ +r̨H]KDNYԆm7ֈgOq셟f!Y^g*6R3iSp"/t#U ʺB9.-/U|fN GameManager.instance.audioManager.isUpdating) .Subscribe(_ => UpdateTransform()) .AddTo(transformSubmodule.attachedGameElement); } - public void UpdateTransform() + public void UpdateTransform(bool refreshAll = true) { - if (!GameManager.instance.audioManager.isUpdating) - { - return; - } - GameElement attachedGameElement = transformSubmodule.attachedGameElement; bool willRefresh = false; @@ -168,7 +161,7 @@ namespace Ichni.RhythmGame transformSubmodule.positionOffset = Vector3.zero; } - if(willRefresh) + if(refreshAll && willRefresh) { attachedGameElement.Refresh(); } diff --git a/Assets/Scripts/Game/GameElements/GameCamera/GameCamera.cs b/Assets/Scripts/Game/GameElements/GameCamera/GameCamera.cs index ddf655ed..3f6dc092 100644 --- a/Assets/Scripts/Game/GameElements/GameCamera/GameCamera.cs +++ b/Assets/Scripts/Game/GameElements/GameCamera/GameCamera.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using Ichni.RhythmGame.Beatmap; +using Ichni.UI; using UniRx; using UnityEngine; using UnityEngine.Rendering.Universal; @@ -21,6 +22,8 @@ namespace Ichni.RhythmGame public float perspectiveAngle; public float orthographicSize; + public float perspectiveOffset; + public TransformSubmodule transformSubmodule { get; set; } public TimeDurationSubmodule timeDurationSubmodule { get; set; } private static CameraManager cameraManager => GameManager.instance.cameraManager; @@ -42,6 +45,17 @@ namespace Ichni.RhythmGame gameCamera.orthographicSize = orthographicSize; gameCamera.cameraTransform = gameCamera.transform; + float ratioDifference = UIManager.GetScreenRatio() - UIManager.StandardRatio; + if (ratioDifference > 0) + { + gameCamera.perspectiveOffset = -22f * ratioDifference; + } + else + { + //gameCamera.perspectiveOffset = 11f * ratioDifference; + } + + gameCamera.gameCamera.fieldOfView = perspectiveAngle + gameCamera.perspectiveOffset; return gameCamera; } @@ -71,39 +85,38 @@ namespace Ichni.RhythmGame { public void SetTransformObserver() { - Observable.EveryLateUpdate().Subscribe(_ => + transformSubmodule.observer = Observable.EveryLateUpdate() + .Where(_=>GameManager.instance.audioManager.isUpdating) + .Subscribe(_ => UpdateTransform()) + .AddTo(transformSubmodule.attachedGameElement); + } + + public void UpdateTransform(bool refreshAll = true) + { + bool willRefresh = false; + + if (!transformSubmodule.eulerAnglesOffsetLock && transformSubmodule.eulerAnglesDirtyMark) { - if (transformSubmodule == null) - { - return; - } + transformSubmodule.currentEulerAngles = transformSubmodule.originalEulerAngles + transformSubmodule.eulerAnglesOffset; + transform.localEulerAngles = transformSubmodule.currentEulerAngles; + transformSubmodule.eulerAnglesDirtyMark = false; + willRefresh = true; + transformSubmodule.eulerAnglesOffset = Vector3.zero; + } - bool willRefresh = false; + if (transformSubmodule.positionDirtyMark) + { + transformSubmodule.currentPosition = transformSubmodule.originalPosition + transformSubmodule.positionOffset; + transform.localPosition = transformSubmodule.currentPosition; + transformSubmodule.positionDirtyMark = false; + willRefresh = true; + transformSubmodule.positionOffset = Vector3.zero; + } - if (!transformSubmodule.eulerAnglesOffsetLock && transformSubmodule.eulerAnglesDirtyMark) - { - transformSubmodule.currentEulerAngles = transformSubmodule.originalEulerAngles + transformSubmodule.eulerAnglesOffset; - transform.localEulerAngles = transformSubmodule.currentEulerAngles; - transformSubmodule.eulerAnglesDirtyMark = false; - willRefresh = true; - transformSubmodule.eulerAnglesOffset = Vector3.zero; - } - - if (transformSubmodule.positionDirtyMark) - { - transformSubmodule.currentPosition = transformSubmodule.originalPosition + transformSubmodule.positionOffset; - transform.localPosition = transformSubmodule.currentPosition; - transformSubmodule.positionDirtyMark = false; - willRefresh = true; - transformSubmodule.positionOffset = Vector3.zero; - } - - if (willRefresh) - { - Refresh(); - } - - }).AddTo(gameObject); + if (refreshAll && willRefresh) + { + Refresh(); + } } } diff --git a/Assets/Scripts/Game/GameElements/GameElement.cs b/Assets/Scripts/Game/GameElements/GameElement.cs index 7e25a439..7cd2f7d1 100644 --- a/Assets/Scripts/Game/GameElements/GameElement.cs +++ b/Assets/Scripts/Game/GameElements/GameElement.cs @@ -7,7 +7,7 @@ using UnityEngine; namespace Ichni.RhythmGame { - public abstract partial class GameElement : MonoBehaviour, IBaseElement, IComparable + public abstract partial class GameElement : SerializedMonoBehaviour, IBaseElement, IComparable { //物体名 public string elementName; diff --git a/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/FullScreenNearTimeJudgeUnit.cs b/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/FullScreenNearTimeJudgeUnit.cs index 8ae464f4..ee99e500 100644 --- a/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/FullScreenNearTimeJudgeUnit.cs +++ b/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/FullScreenNearTimeJudgeUnit.cs @@ -29,6 +29,16 @@ namespace Ichni.RhythmGame { return new FullScreenNearTimeJudgeUnit_BM(); } + + public override bool CheckJudgeAvailability(InputUnit inputUnit) + { + if (inputUnit is InputUnitSwipe swipe && note is Flick flick) + { + return flick.CheckSwipeDirection(swipe); + } + + return true; + } } namespace Beatmap diff --git a/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/TouchAreaJudgeUnit.cs b/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/TouchAreaJudgeUnit.cs index b8c123b0..57928a4c 100644 --- a/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/TouchAreaJudgeUnit.cs +++ b/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/TouchAreaJudgeUnit.cs @@ -7,10 +7,14 @@ namespace Ichni.RhythmGame public class TouchAreaJudgeUnit : NoteJudgeUnit { public float areaRadius; - protected override GameObject GetHintImagePrefab() => GameManager.instance.basePrefabs.areaHint; + + protected override GameObject GetHintImagePrefab() + { + return GameManager.instance.basePrefabs.areaHint; + } private float CurrentScreenRatio() => Screen.width / 1920f; - + public TouchAreaJudgeUnit(NoteBase note, float areaRadius) : base(note) { this.areaRadius = areaRadius; @@ -18,7 +22,7 @@ namespace Ichni.RhythmGame public override void UpdateJudge() { - if(note.isFirstJudged) return; + if (note.isFirstJudged) return; Vector2 noteScreenPosition = note.noteScreenPosition; RectTransform canvasRect = GameManager.instance.judgeHintCanvas.GetComponent(); if (RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRect, noteScreenPosition, null, out Vector2 uiPosition)) @@ -37,21 +41,26 @@ namespace Ichni.RhythmGame { Vector2 inputScreenPosition = inputUnit.inputPosition; Vector2 noteScreenPosition = note.noteScreenPosition; - + float distance = Vector2.Distance(inputScreenPosition, noteScreenPosition); - - //Debug.Log("Input Position: " + inputScreenPosition + ", Note Position: " + noteScreenPosition + ", Distance: " + distance); - - if (distance <= areaRadius * CurrentScreenRatio()) + + + if (distance <= areaRadius) { if (inputUnit is InputUnitSwipe swipe && note is Flick flick) { - return flick.CheckSwipeDirection(swipe.swipeDirection); + return flick.CheckSwipeDirection(swipe); } - + + Debug.Log("Input Position: " + inputScreenPosition + + ", Note Position: " + noteScreenPosition + + ", Distance: " + distance + + ", Area Radius: " + areaRadius + + ", Current Screen Ratio: " + CurrentScreenRatio()); + return true; } - + return false; } } @@ -74,7 +83,11 @@ namespace Ichni.RhythmGame public override NoteJudgeUnit ConvertToGameType(NoteBase attachedNote) { - return new TouchAreaJudgeUnit(attachedNote, areaRadius); +#if UNITY_EDITOR || UNITY_STANDALONE + return new FullScreenNearTimeJudgeUnit(attachedNote); +#elif UNITY_ANDROID || UNITY_IOS + return new TouchAreaJudgeUnit(attachedNote, areaRadius);//TODO:改这里 +#endif } } } diff --git a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Flick.cs b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Flick.cs index ce7d9042..489bc200 100644 --- a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Flick.cs +++ b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Flick.cs @@ -13,6 +13,8 @@ namespace Ichni.RhythmGame { public partial class Flick : NoteBase { + public NoteJudgeType preJudgeType; + public List availableFlickDirections; public float flickBuffer = 0.5f; @@ -66,22 +68,64 @@ namespace Ichni.RhythmGame } base.Update(); + ExecuteFinalJudge(songTime); } protected override void RemoveFromCheckingList() { - GameManager.instance.inputManager.checkingFlickList.Remove(this); + if (GameManager.instance.inputManager.checkingFlickList.Contains(this)) + { + GameManager.instance.inputManager.checkingFlickList.Remove(this); + } } public override void ExecuteStartJudge() { - base.ExecuteStartJudge(); - - isFinalJudged = true; + float triggerTime = GameManager.instance.songTime; + float timeDifference = triggerTime - exactJudgeTime; - if (GameManager.instance.inputManager.checkingFlickList.Contains(this)) + NoteJudgeType startJudgeType = GetStartJudgeType(timeDifference); + + if (startJudgeType != NoteJudgeType.Perfect) { - GameManager.instance.inputManager.checkingFlickList.Remove(this); + return; + } + + preJudgeType = startJudgeType; + + isFirstJudged = true; + + RemoveFromCheckingList(); + } + + public void ExecuteFinalJudge(float triggerTime) + { + if (isFirstJudged && !isFinalJudged && preJudgeType != NoteJudgeType.NotJudged && + GameManager.instance.songTime >= exactJudgeTime) + { + if (preJudgeType == NoteJudgeType.Perfect) + { + Perfect(triggerTime); + } + else if (preJudgeType == NoteJudgeType.Good) + { + Good(triggerTime); + } + else if (preJudgeType == NoteJudgeType.Bad) + { + Bad(triggerTime); + } + else if (preJudgeType == NoteJudgeType.Miss) + { + Miss(triggerTime); + } + + if (preJudgeType != NoteJudgeType.Miss) + { + noteAudioSubmodule.PlayGeneralJudgeAudios(); + } + + isFinalJudged = true; } } } @@ -93,8 +137,14 @@ namespace Ichni.RhythmGame return noteJudgeSubmodule.judgeUnitList.All(judgeUnit => judgeUnit.CheckJudgeAvailability(inputUnitSwipe)); } - public bool CheckSwipeDirection(Vector2 screenSwipeDirection) + public bool CheckSwipeDirection(InputUnitSwipe inputUnitSwipe) { + if (inputUnitSwipe.isGeneric) + { + Debug.Log($"输入方向 {inputUnitSwipe.swipeDirection} 是通用的,直接匹配成功。"); + return true; + } + Camera gameCamera = GameManager.instance.cameraManager.gameCamera.gameCamera; foreach (Vector2 localDir in availableFlickDirections) @@ -113,18 +163,18 @@ namespace Ichni.RhythmGame continue; } - float dotProduct = Vector2.Dot(screenSwipeDirection, noteScreenDirection); + float dotProduct = Vector2.Dot(inputUnitSwipe.swipeDirection, noteScreenDirection); // 4. 检查点积是否满足阈值 if (dotProduct >= flickBuffer) { // 匹配成功!无需再检查其他方向。 - Debug.Log($"匹配成功! 输入方向 {screenSwipeDirection} 匹配了本地方向 {localDir} (屏幕投影: {noteScreenDirection}), 点积: {dotProduct}"); + Debug.Log($"匹配成功! 输入方向 {inputUnitSwipe.swipeDirection} 匹配了本地方向 {localDir} (屏幕投影: {noteScreenDirection}), 点积: {dotProduct}"); return true; } } - Debug.Log($"匹配失败. 输入方向 {screenSwipeDirection} 未匹配任何允许的方向。"); + Debug.Log($"匹配失败. 输入方向 {inputUnitSwipe.swipeDirection} 未匹配任何允许的方向。"); return false; } } diff --git a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Hold.cs b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Hold.cs index 1b0361d0..a52dc287 100644 --- a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Hold.cs +++ b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Hold.cs @@ -184,6 +184,33 @@ namespace Ichni.RhythmGame { return isFirstJudged && noteJudgeSubmodule.judgeUnitList.All(judgeUnit => judgeUnit.CheckJudgeAvailability(inputUnitTouch)); } + + protected override void SetJudgeArea() + { + if (noteJudgeSubmodule != null) + { + if (GameManager.instance.songTime > exactJudgeTime - 0.1f && !isFirstJudged) + { + foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => !unit.isShowingJudge)) + { + unit.SetShowingJudge(true); + } + } + + foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge)) + { + unit.UpdateJudge(); + } + + if (GameManager.instance.songTime >= holdEndTime - Time.deltaTime) + { + foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge)) + { + unit.SetShowingJudge(false); + } + } + } + } } public partial class Hold @@ -225,6 +252,8 @@ namespace Ichni.RhythmGame noteScreenPosition = GameManager.instance.cameraManager.gameCamera.gameCamera.WorldToScreenPoint(noteVisual.transform.position); } + SetJudgeArea(); + foreach (EffectBase e in noteVisual.effectSubmodule.effectCollection["Generate"]) { e.UpdateEffect(exactJudgeTime); diff --git a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/NoteBase.cs b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/NoteBase.cs index ca45e562..d730542e 100644 --- a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/NoteBase.cs +++ b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/NoteBase.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using Dreamteck.Splines; using Sirenix.OdinInspector; +using TMPro; using UniRx; using UnityEngine; using UnityEngine.Serialization; @@ -39,6 +40,8 @@ namespace Ichni.RhythmGame public bool isFinalJudged; public override int HierarchyPriority => -10; + [Title("Debug")] public TMP_Text judgeRankHint; + /// /// 在MovableTrack上更新Note的位置,注意HoldNote需要重写这个方法 /// @@ -86,6 +89,8 @@ namespace Ichni.RhythmGame gameObject.SetActive(false); GameManager.instance.noteManager.RegisterNote(this, exactJudgeTime - beyondTime - 0.5f); } + + //judgeRankHint = Instantiate(GameManager.instance.basePrefabs.judgeRankHint, noteVisual.transform).GetComponent(); } protected virtual void Update() @@ -108,6 +113,10 @@ namespace Ichni.RhythmGame noteScreenPosition = GameManager.instance.cameraManager.gameCamera.gameCamera.WorldToScreenPoint(noteVisual.transform.position); } + SetJudgeArea(); + + //SetJudgeRankText(); + foreach (EffectBase e in noteVisual.effectSubmodule.effectCollection["Generate"]) { e.UpdateEffect(exactJudgeTime); @@ -191,6 +200,12 @@ namespace Ichni.RhythmGame }).AddTo(gameObject); if (isOnTrack) track.childElementList.Remove(this); + + foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge)) + { + unit.SetShowingJudge(false); + } + Destroy(gameObject, 1.2f); //注意所有特效时间不得超过1.2秒 } @@ -207,6 +222,12 @@ namespace Ichni.RhythmGame }).AddTo(gameObject); if (isOnTrack) track.childElementList.Remove(this); + + foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge)) + { + unit.SetShowingJudge(false); + } + Destroy(gameObject, 1.2f); } public virtual void Bad(float triggerTime){ @@ -222,6 +243,12 @@ namespace Ichni.RhythmGame }).AddTo(gameObject); if (isOnTrack) track.childElementList.Remove(this); + + foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge)) + { + unit.SetShowingJudge(false); + } + Destroy(gameObject, 1.2f); }} @@ -237,17 +264,23 @@ namespace Ichni.RhythmGame }).AddTo(gameObject); if (isOnTrack) track.childElementList.Remove(this); + + foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge)) + { + unit.SetShowingJudge(false); + } + Destroy(gameObject, 1.2f); } } public abstract partial class NoteBase { - protected void SetJudgeArea() + protected virtual void SetJudgeArea() { if (noteJudgeSubmodule != null) { - if (GameManager.instance.songTime > exactJudgeTime - 0.25f && !isFirstJudged) + if (GameManager.instance.songTime > exactJudgeTime - 0.1f && !isFirstJudged) { foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => !unit.isShowingJudge)) { @@ -260,7 +293,7 @@ namespace Ichni.RhythmGame unit.UpdateJudge(); } - if (GameManager.instance.songTime > exactJudgeTime + 0.25f) + if (GameManager.instance.songTime > exactJudgeTime + 0.1f) { foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge)) { @@ -274,6 +307,34 @@ namespace Ichni.RhythmGame { return exactJudgeTime.CompareTo(other.exactJudgeTime); } + + private void SetJudgeRankText() + { + float triggerTime = GameManager.instance.songTime; + float timeDifference = triggerTime - exactJudgeTime; + + NoteJudgeType startJudgeType = GetStartJudgeType(timeDifference); + if (startJudgeType == NoteJudgeType.Perfect) + { + judgeRankHint.text = "PERFECT"; + judgeRankHint.color = Color.cyan; + } + else if (startJudgeType == NoteJudgeType.Good) + { + judgeRankHint.text = "GOOD"; + judgeRankHint.color = Color.green; + } + else if (startJudgeType == NoteJudgeType.Bad) + { + judgeRankHint.text = "BAD"; + judgeRankHint.color = Color.magenta; + } + else if (startJudgeType == NoteJudgeType.Miss) + { + judgeRankHint.text = "MISS"; + judgeRankHint.color = Color.white; + } + } } public abstract partial class NoteBase diff --git a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Stay.cs b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Stay.cs index 0074ac00..163d1e24 100644 --- a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Stay.cs +++ b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Stay.cs @@ -73,11 +73,6 @@ namespace Ichni.RhythmGame { GameManager.instance.inputManager.checkingStayList.Remove(this); } - - protected override NoteJudgeType GetStartJudgeType(float timeDifference) - { - return judgeIntervals.GetNoteJudgeType(timeDifference); - } public override void ExecuteStartJudge() { @@ -85,6 +80,12 @@ namespace Ichni.RhythmGame float timeDifference = triggerTime - exactJudgeTime; NoteJudgeType startJudgeType = GetStartJudgeType(timeDifference); + + if (startJudgeType != NoteJudgeType.Perfect) + { + return; + } + preJudgeType = startJudgeType; isFirstJudged = true; diff --git a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Tap.cs b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Tap.cs index 75c514f0..eb72e9f3 100644 --- a/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Tap.cs +++ b/Assets/Scripts/Game/GameElements/Notes/NoteObjects/Tap.cs @@ -5,6 +5,7 @@ using System.Linq; using Dreamteck.Splines; using Ichni.RhythmGame.Beatmap; using Lean.Pool; +using TMPro; using UniRx; using Unity.VisualScripting; using UnityEngine; @@ -24,7 +25,7 @@ namespace Ichni.RhythmGame new TimeInterval(-0.15f, -0.15f), new TimeInterval(-0.15f, -0.125f), new TimeInterval(-0.125f, -0.1f), new TimeInterval(-0.1f, 0.1f), new TimeInterval(0.1f, 0.125f), new TimeInterval(0.125f, 0.15f), 0.15f); - + if (parentElement.TryGetComponent(out Track track)) { if (track.trackTimeSubmodule != null) diff --git a/Assets/Scripts/Game/GameElements/Track/ParticleTracker/ParticleTracker.cs b/Assets/Scripts/Game/GameElements/Track/ParticleTracker/ParticleTracker.cs index 70abd96d..23daf79f 100644 --- a/Assets/Scripts/Game/GameElements/Track/ParticleTracker/ParticleTracker.cs +++ b/Assets/Scripts/Game/GameElements/Track/ParticleTracker/ParticleTracker.cs @@ -49,6 +49,8 @@ namespace Ichni.RhythmGame particleTracker.particleController.spline = track.trackPathSubmodule.path; particleTracker.playTime = playTime; particleTracker.stopTime = stopTime; + particleTracker.themeBundleName = themeBundleName; + particleTracker.materialName = materialName; particleTracker.SetParticleMaterial(themeBundleName, materialName); particleTracker.SetParticleSettings(prewarm, is3D, width, extendDirection, density, lifeTime, isAutoOrient, particleRotation); return particleTracker; diff --git a/Assets/Scripts/Game/GameElements/Track/TrackPoints/TrackHeadPoint.cs b/Assets/Scripts/Game/GameElements/Track/TrackPoints/TrackHeadPoint.cs index 006a512c..34e466d7 100644 --- a/Assets/Scripts/Game/GameElements/Track/TrackPoints/TrackHeadPoint.cs +++ b/Assets/Scripts/Game/GameElements/Track/TrackPoints/TrackHeadPoint.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Dreamteck.Splines; using Ichni.RhythmGame.Beatmap; +using UnityEngine; namespace Ichni.RhythmGame { @@ -28,6 +29,7 @@ namespace Ichni.RhythmGame head.motionApplyRotation = motionApplyRotation; head.trackPositioner.motion.applyRotation = motionApplyRotation; + head.transform.localEulerAngles = Vector3.zero; return head; } diff --git a/Assets/Scripts/Game/UI/GamePauseInterface.cs b/Assets/Scripts/Game/UI/GamePauseInterface.cs index 18b3b5dc..dd4a4ffb 100644 --- a/Assets/Scripts/Game/UI/GamePauseInterface.cs +++ b/Assets/Scripts/Game/UI/GamePauseInterface.cs @@ -18,7 +18,11 @@ namespace Ichni.RhythmGame.UI { resumeButton.onClick.AddListener(()=> { - FadeOut(0.5f, true, GameManager.instance.audioManager.songPlayer.ResumeSong); + FadeOut(0.5f, true, ()=> + { + GameManager.instance.audioManager.songPlayer.ResumeSong(); + GameManager.instance.gameUICanvas.pauseButton.interactable = true; + }); }); restartButton.onClick.AddListener(GameManager.RestartGame); diff --git a/Assets/Scripts/Game/UI/GameUICanvas.cs b/Assets/Scripts/Game/UI/GameUICanvas.cs index d196ebfe..4c4ae25e 100644 --- a/Assets/Scripts/Game/UI/GameUICanvas.cs +++ b/Assets/Scripts/Game/UI/GameUICanvas.cs @@ -27,6 +27,7 @@ namespace Ichni.RhythmGame.UI pauseButton.onClick.AddListener(()=> { GameManager.instance.audioManager.songPlayer.PauseSong(); + pauseButton.interactable = false; pauseInterface.FadeIn(0.5f, true); }); } diff --git a/Assets/Scripts/Manager/BasePrefabsCollection.cs b/Assets/Scripts/Manager/BasePrefabsCollection.cs index 8f5edf70..b2eebe21 100644 --- a/Assets/Scripts/Manager/BasePrefabsCollection.cs +++ b/Assets/Scripts/Manager/BasePrefabsCollection.cs @@ -53,4 +53,11 @@ public class BasePrefabsCollection : SerializedScriptableObject [Title("音频相关")] public GameObject audioEventObject; public Dictionary noteSounds; + + [Title("Debug")] public GameObject judgeRankHint; + public GameObject tapInputMark; + public GameObject touchInputMark; + [FormerlySerializedAs("swipeInputMark")] public GameObject directionalSwipeInputMark; + public GameObject genericSwipeInputMark; + } diff --git a/Assets/Scripts/Manager/InputManager.cs b/Assets/Scripts/Manager/InputManager.cs index 4955a3be..668455e0 100644 --- a/Assets/Scripts/Manager/InputManager.cs +++ b/Assets/Scripts/Manager/InputManager.cs @@ -165,9 +165,9 @@ namespace Ichni //Debug.Log("Touch: " + fingerId + " " + inputPosition); } - public void SetNewInputUnitSwipe(int fingerId, Vector2 inputPosition, Vector2 delta) + public void SetNewInputUnitSwipe(int fingerId, Vector2 inputPosition, bool isGeneric, Vector2 delta) { - InputUnitSwipe inputUnitSwipe = new InputUnitSwipe(fingerId, inputPosition, delta); + InputUnitSwipe inputUnitSwipe = new InputUnitSwipe(fingerId, inputPosition, isGeneric, delta); if(!inputUnitSwipeList.Exists(x => x.fingerId == fingerId)) { inputUnitSwipeList.Add(inputUnitSwipe); @@ -203,11 +203,13 @@ namespace Ichni public class InputUnitSwipe : InputUnit { public Vector2 swipeDirection; + public bool isGeneric; - public InputUnitSwipe(int fingerId, Vector2 inputPosition, Vector2 swipeDirection) + public InputUnitSwipe(int fingerId, Vector2 inputPosition, bool isGeneric, Vector2 swipeDirection) { this.fingerId = fingerId; this.inputPosition = inputPosition; + this.isGeneric = isGeneric; this.swipeDirection = swipeDirection.normalized; } } diff --git a/Assets/Scripts/Manager/PostProcessingManager.cs b/Assets/Scripts/Manager/PostProcessingManager.cs index 7b915ea8..d3cb696d 100644 --- a/Assets/Scripts/Manager/PostProcessingManager.cs +++ b/Assets/Scripts/Manager/PostProcessingManager.cs @@ -55,7 +55,7 @@ namespace Ichni if (feature != null) { pixelateFeature = feature; - Debug.Log("成功找到并缓存 pixelateFeature (通过反射)!"); + //Debug.Log("成功找到并缓存 pixelateFeature (通过反射)!"); break; } } diff --git a/Assets/Scripts/Manager/RhythmInputManager.cs b/Assets/Scripts/Manager/RhythmInputManager.cs index ed9f5188..811223b9 100644 --- a/Assets/Scripts/Manager/RhythmInputManager.cs +++ b/Assets/Scripts/Manager/RhythmInputManager.cs @@ -2,6 +2,13 @@ using UnityEngine; using UnityEngine.InputSystem; using System; using System.Collections.Generic; +using DG.Tweening; +using Ichni; +using Lean.Common; +using Lean.Pool; +using Sirenix.OdinInspector; +using UnityEngine.InputSystem.Controls; +using UnityEngine.UI; using Touch = UnityEngine.InputSystem.EnhancedTouch.Touch; using TouchPhase = UnityEngine.InputSystem.TouchPhase; @@ -9,14 +16,14 @@ using TouchPhase = UnityEngine.InputSystem.TouchPhase; /// 为节奏游戏设计的输入管理器,处理多点触控并分发三种主要事件。 /// 【重要】此版本内置了编辑器内的鼠标模拟功能,无需手机即可测试。 /// -public class RhythmInputManager : MonoBehaviour +public class RhythmInputManager : SerializedMonoBehaviour { // ===================================================================== // 公共事件 (Public Events) // ===================================================================== public static event Action OnTap; public static event Action OnTouch; - public static event Action OnSwipe; + public static event Action OnSwipe; // ===================================================================== // 可配置参数 (Configurable Parameters) @@ -24,7 +31,8 @@ public class RhythmInputManager : MonoBehaviour [Header("划动设置 (Swipe Settings)")] [Tooltip("识别为划动的最小移动距离(像素)")] - [SerializeField] private float minSwipeDistance = 50.0f; + [SerializeField] private float minSwipeDistance = 200.0f; + [SerializeField] private float swipeAngleThreshold = 1f; // ===================================================================== // 内部状态 (Internal State) @@ -52,14 +60,19 @@ public class RhythmInputManager : MonoBehaviour //OnTap += (id, pos)=> Debug.Log($"Tap Detected: Touch ID {id}, Position {pos}"); //OnTouch += (id, pos) => Debug.Log($"Touch Detected: Touch ID {id}, Position {pos}"); //OnSwipe += (id, pos, dir) => Debug.Log($"Swipe Detected: Touch ID {id}, Position {pos}, Direction {dir}"); + + OnTap += GenerateTapMark; + OnTouch += GenerateTouchMark; + OnSwipe += GenerateSwipeMark; } private void Update() { // 使用预处理指令区分平台 -#if UNITY_EDITOR +#if UNITY_EDITOR || UNITY_STANDALONE // --- 在Unity编辑器中,使用鼠标模拟触摸 --- - ProcessMouseInput(); + //ProcessMouseInput(); + ProcessKeyboardInput(); #else // --- 在真机设备上,使用真实的触摸输入 --- ProcessRealTouchInput(); @@ -124,6 +137,48 @@ public class RhythmInputManager : MonoBehaviour } #endif +#if UNITY_EDITOR || UNITY_STANDALONE + public static List availableKeys = new List() + { + Keyboard.current.dKey, + Keyboard.current.fKey, + Keyboard.current.jKey, + Keyboard.current.kKey, + }; + public static List flickKeys = new List() + { + Keyboard.current.sKey, + Keyboard.current.lKey, + }; + private void ProcessKeyboardInput() + { + for (int index = 0; index < availableKeys.Count; index++) + { + Vector2 inputPosition = new Vector2(index * 400 - 600 + Screen.width * 0.5f, 200f); // 假设每个按键的虚拟位置 + + if (availableKeys[index].wasPressedThisFrame) + { + OnTap?.Invoke(index, inputPosition); + } + + if (availableKeys[index].isPressed) + { + OnTouch?.Invoke(index, inputPosition); + } + } + + for (int index = 0; index < flickKeys.Count; index++) + { + Vector2 inputPosition = new Vector2(index * 1600 - 800 + Screen.width * 0.5f, 200f); // 假设每个划动按键的虚拟位置 + + if (flickKeys[index].wasPressedThisFrame) + { + OnSwipe?.Invoke(index, inputPosition, true, Vector2.zero); + } + } + } +#endif + /// /// 【仅在真机上运行】处理真实的触摸屏输入。 /// @@ -198,12 +253,86 @@ public class RhythmInputManager : MonoBehaviour Vector2 direction = swipeVector.normalized; // 检查是否是新的划动方向 - if (Vector2.Dot(direction, state.LastSwipeDirection) < 0.5f) + if (Vector2.Dot(direction, state.LastSwipeDirection) <= swipeAngleThreshold) { - OnSwipe?.Invoke(state.TouchId, state.StartPosition, direction); + OnSwipe?.Invoke(state.TouchId, state.StartPosition, false, direction); state.LastSwipeDirection = direction; state.StartPosition = currentPosition; state.StartTime = Time.time; } } + + private void GenerateTapMark(int id, Vector2 pos) + { + RectTransform mark = LeanPool.Spawn(GameManager.instance.basePrefabs.tapInputMark, + GameManager.instance.judgeHintCanvas.transform). GetComponent(); + + RectTransform canvasRect = GameManager.instance.judgeHintCanvas.GetComponent(); + if (RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRect, pos, null, out Vector2 uiPosition)) + { + mark.anchoredPosition = uiPosition; + } + + Sequence ss = DOTween.Sequence(); + ss.OnStart(() => + { + mark.GetComponent().color = Color.white; + mark.localScale = Vector3.zero; + }); + ss.Join(mark.GetComponent().DOFade(0, 0.5f)); + ss.Join(mark.DOScale(5, 0.5f)); + ss.OnComplete(() => LeanPool.Despawn(mark.gameObject)); + ss.SetUpdate(true); + ss.Play(); + } + + private void GenerateTouchMark(int id, Vector2 pos) + { + RectTransform mark = LeanPool.Spawn(GameManager.instance.basePrefabs.touchInputMark, + GameManager.instance.judgeHintCanvas.transform). GetComponent(); + + RectTransform canvasRect = GameManager.instance.judgeHintCanvas.GetComponent(); + if (RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRect, pos, null, out Vector2 uiPosition)) + { + mark.anchoredPosition = uiPosition; + } + + Sequence ss = DOTween.Sequence(); + ss.OnStart(() => + { + mark.GetComponent().color = Color.white; + }); + ss.Join(mark.GetComponent().DOFade(0, 0.1f)); + ss.OnComplete(() => LeanPool.Despawn(mark.gameObject)); + ss.SetUpdate(true); + ss.Play(); + } + + private void GenerateSwipeMark(int id, Vector2 pos, bool isGeneric, Vector2 direction) + { + GameObject markPrefab = isGeneric + ? GameManager.instance.basePrefabs.genericSwipeInputMark + : GameManager.instance.basePrefabs.directionalSwipeInputMark; + + RectTransform mark = LeanPool.Spawn(markPrefab, GameManager.instance.judgeHintCanvas.transform). GetComponent(); + + RectTransform canvasRect = GameManager.instance.judgeHintCanvas.GetComponent(); + if (RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRect, pos, null, out Vector2 uiPosition)) + { + mark.anchoredPosition = uiPosition; + } + mark.localEulerAngles = new Vector3(0, 0, Mathf.Atan2(direction.y, direction.x) * Mathf.Rad2Deg - 90f); + + Sequence ss = DOTween.Sequence(); + ss.OnStart(() => + { + mark.GetComponent().color = Color.white; + mark.localScale = Vector3.zero; + }); + ss.Join(mark.GetComponent().DOFade(0, 0.5f)); + ss.Join(mark.DOScale(5, 0.5f)); + ss.OnComplete(() => LeanPool.Despawn(mark.gameObject)); + ss.SetUpdate(true); + ss.Play(); + } } diff --git a/Assets/Scripts/Menu/ChapterSelection/ChapterSelectionUnit.cs b/Assets/Scripts/Menu/ChapterSelection/ChapterSelectionUnit.cs index f190f4e3..28816eac 100644 --- a/Assets/Scripts/Menu/ChapterSelection/ChapterSelectionUnit.cs +++ b/Assets/Scripts/Menu/ChapterSelection/ChapterSelectionUnit.cs @@ -29,13 +29,15 @@ namespace Ichni.Menu { if(song.difficultyDataList.All(d => d.difficultyName != "Easy")) { - song.difficultyDataList.Add(new DifficultyData(0, "Easy","", 0, "", + song.difficultyDataList.Add(new DifficultyData( + 0, "Easy","Easy", 0, "", new Color(0f, 0.7f, 0.2f, 1f))); } if (song.difficultyDataList.All(d => d.difficultyName != "Hard")) { - song.difficultyDataList.Add(new DifficultyData(1,"Hard", "", 0, "", + song.difficultyDataList.Add(new DifficultyData( + 1,"Hard", "Hard", 0, "", new Color(1f, 0.2f, 0.2f, 1f))); } } @@ -75,6 +77,9 @@ namespace Ichni.Menu [FoldoutGroup("$songName")] public List difficultyDataList; + + [FoldoutGroup("$songName")] + public string unlockKey; } [Serializable] diff --git a/Assets/Scripts/Menu/MenuAudioManager.cs b/Assets/Scripts/Menu/MenuAudioManager.cs index 875a2478..da5fc8d6 100644 --- a/Assets/Scripts/Menu/MenuAudioManager.cs +++ b/Assets/Scripts/Menu/MenuAudioManager.cs @@ -12,6 +12,9 @@ namespace Ichni.Menu public static MenuAudioManager instance; public AudioContainer audioContainer; + + public Switch testCptSwitch; + public Switch testSongSwitch; private void Awake() { diff --git a/Assets/Scripts/Menu/SongSelection/SongSelectionManager.cs b/Assets/Scripts/Menu/SongSelection/SongSelectionManager.cs index cb8f04b1..d1a002dd 100644 --- a/Assets/Scripts/Menu/SongSelection/SongSelectionManager.cs +++ b/Assets/Scripts/Menu/SongSelection/SongSelectionManager.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using DG.Tweening; using Ichni.Menu.UI; using Ichni.RhythmGame; using Ichni.UI; @@ -14,17 +15,38 @@ namespace Ichni.Menu public static SongSelectionManager instance; public SongSelectionUIPage songSelectionUIPage; - + + public float currentFilterValue; + public Tweener filterTweener; private void Awake() { instance = this; + currentFilterValue = 100f; } } public partial class SongSelectionManager { + public void SetPreview(SongItemData connectedSong, bool isLocked) + { + MenuAudioManager.instance.audioContainer.StopEvent("PlayPreview"); + MenuAudioManager.instance.audioContainer.SetSwitch(connectedSong.songSwitch); + MenuAudioManager.instance.audioContainer.PostEvent("PlayPreview"); + float targetFilterValue = isLocked ? 50 : 100; + if (!Mathf.Approximately(currentFilterValue, targetFilterValue)) + { + filterTweener.Kill(true); + filterTweener = + DOTween.To(() => currentFilterValue, x => currentFilterValue = x, targetFilterValue, 1f) + .SetEase(Ease.OutQuad) + .OnUpdate(() => + { + MenuAudioManager.instance.audioContainer.SetRTPC("PreviewLowPassFilter", currentFilterValue); + }).Play(); + } + } } } \ No newline at end of file diff --git a/Assets/Scripts/Saving/BeatmapSave.cs b/Assets/Scripts/Saving/BeatmapSave.cs index fe0a09ad..8884c072 100644 --- a/Assets/Scripts/Saving/BeatmapSave.cs +++ b/Assets/Scripts/Saving/BeatmapSave.cs @@ -9,5 +9,17 @@ namespace Ichni.RhythmGame public float accuracy; public bool isFullCombo; public bool isAllPerfect; + + public BeatmapSave() + { + + } + + public BeatmapSave(float accuracy, bool isFullCombo, bool isAllPerfect) + { + this.accuracy = accuracy; + this.isFullCombo = isFullCombo; + this.isAllPerfect = isAllPerfect; + } } } diff --git a/Assets/Scripts/Saving/GameSaveManager.cs b/Assets/Scripts/Saving/GameSaveManager.cs index 95f00eaa..3d562c5f 100644 --- a/Assets/Scripts/Saving/GameSaveManager.cs +++ b/Assets/Scripts/Saving/GameSaveManager.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using Ichni.Menu; using Ichni.RhythmGame; using Ichni.Story; using Sirenix.OdinInspector; @@ -14,20 +15,15 @@ namespace Ichni public SongSaveModule SongSaveModule; public StorySaveModule StorySaveModule; + + [Title("Debug")] + public UnlockKeysCollection unlockKeysCollection; private void Awake() { if (instance == null) { instance = this; - - SongSaveModule = new SongSaveModule(); - SongSaveModule.LoadSongStatuses(); - - StorySaveModule = new StorySaveModule(); - StorySaveModule.LoadStoryVariables(); - StorySaveModule.LoadChoices(); - DontDestroyOnLoad(gameObject); } else @@ -35,22 +31,117 @@ namespace Ichni Destroy(gameObject); } } + + private void Start() + { + SongSaveModule = new SongSaveModule(); + SongSaveModule.LoadSongStatuses(); + SongSaveModule.LoadUnlockKeys(); + + StorySaveModule = new StorySaveModule(); + StorySaveModule.LoadStoryVariables(); + StorySaveModule.LoadChoices(); + } } public partial class SongSaveModule { + public HashSet unlockKeys; public Dictionary songStatusSaves; - private string SongSavePath => Application.streamingAssetsPath + "/GameSaves/SongSaves.json"; + private string SongSavePath => Application.persistentDataPath + "/GameSaves/SongSaves.json"; + private string UnlockKeysPath => Application.persistentDataPath + "/GameSaves/UnlockKeys.json"; public SongSaveModule() { songStatusSaves = new Dictionary(); + unlockKeys = new HashSet(); Debug.Log("Song save path: " + SongSavePath); } } public partial class SongSaveModule { + public void InitializeUnlockKeys() + { + unlockKeys = new HashSet(GameSaveManager.instance.unlockKeysCollection.unlockKeys); + SaveUnlockKeys(); + } + + public void SaveUnlockKeys() + { + ES3.Save("UnlockKeys", unlockKeys, UnlockKeysPath); + } + + public void LoadUnlockKeys() + { + if (ES3.FileExists(UnlockKeysPath)) + { + unlockKeys = ES3.Load>("UnlockKeys", UnlockKeysPath); + } + else + { + InitializeUnlockKeys(); + } + } + + public bool CheckUnlock(string key) + { + return key == string.Empty || unlockKeys.Contains(key); + } + + public void ClearUnlock() + { + unlockKeys.Clear(); + SaveUnlockKeys(); + } + } + + public partial class SongSaveModule + { + private void InitializeSongStatuses() + { + foreach (ChapterSelectionUnit chapter in ChapterSelectionManager.instance.chapters) + { + foreach (SongItemData song in chapter.songs) + { + SongStatusSave songStatus = new SongStatusSave(false, string.Empty, new List()); + foreach (DifficultyData difficulty in song.difficultyDataList) + { + songStatus.beatmapSaves.Add(new BeatmapSave(0f,false, false)); + } + + songStatusSaves.Add(song.songName, songStatus); + } + } + + SaveSongStatuses(); + } + + private void CheckSongStatuses() + { + foreach (ChapterSelectionUnit chapter in ChapterSelectionManager.instance.chapters) + { + foreach (SongItemData song in chapter.songs) + { + SongStatusSave songStatus = songStatusSaves[song.songName]; + int difficultiesCount = song.difficultyDataList.Count; + if (songStatus.beatmapSaves.Count < difficultiesCount) + { + for (int i = songStatus.beatmapSaves.Count; i < difficultiesCount; i++) + { + songStatus.beatmapSaves.Add(new BeatmapSave(0f, false, false)); + } + } + else if (songStatus.beatmapSaves.Count > difficultiesCount) + { + songStatus.beatmapSaves.RemoveRange(difficultiesCount, songStatus.beatmapSaves.Count - difficultiesCount); + } + } + } + + SaveSongStatuses(); + } + [Button] public void SaveSongStatuses() { @@ -62,23 +153,11 @@ namespace Ichni if (ES3.FileExists(SongSavePath)) { songStatusSaves = ES3.Load>("SongSaves", SongSavePath); + CheckSongStatuses(); } else { - songStatusSaves = new Dictionary(); - - //TODO: delete - songStatusSaves.Add("Chaos Zone", new SongStatusSave - { - isCompleted = false, - additionalInfo = "", - beatmapSaves = new Dictionary() - { - { "Easy", new BeatmapSave { accuracy = 0.0f, isFullCombo = false, isAllPerfect = false } }, - { "Hard", new BeatmapSave { accuracy = 0.0f, isFullCombo = false, isAllPerfect = false } }, - { "Chaos", new BeatmapSave { accuracy = 0.0f, isFullCombo = false, isAllPerfect = false } } - } - }); + InitializeSongStatuses(); } } @@ -87,7 +166,7 @@ namespace Ichni { foreach (var songStatus in songStatusSaves.Values) { - foreach (var beatmapSave in songStatus.beatmapSaves.Values) + foreach (var beatmapSave in songStatus.beatmapSaves) { beatmapSave.accuracy = 0.0f; beatmapSave.isFullCombo = false; @@ -97,6 +176,17 @@ namespace Ichni SaveSongStatuses(); } + + public SongStatusSave GetSongStatusSave(string songName) + { + if (songStatusSaves.TryGetValue(songName, out SongStatusSave save)) + { + return save; + } + + Debug.LogWarning("Song status save for " + songName + " does not exist."); + return null; + } } public partial class StorySaveModule @@ -152,6 +242,20 @@ namespace Ichni SaveStoryVariables(); SaveChoices(); } + + public void ClearAllStoryline() + { + string path = GetStorySavePath("Chapter0"); + if (ES3.FileExists(path)) + { + ES3.DeleteFile(path); + Debug.Log("Cleared all story saves at: " + path); + } + else + { + Debug.LogWarning("No story saves found at: " + path); + } + } } public partial class StorySaveModule diff --git a/Assets/Scripts/Saving/SongStatusSave.cs b/Assets/Scripts/Saving/SongStatusSave.cs index 038b31a1..791fe54c 100644 --- a/Assets/Scripts/Saving/SongStatusSave.cs +++ b/Assets/Scripts/Saving/SongStatusSave.cs @@ -8,6 +8,18 @@ namespace Ichni.RhythmGame { public bool isCompleted; public string additionalInfo; - public Dictionary beatmapSaves; + public List beatmapSaves; + + public SongStatusSave() + { + + } + + public SongStatusSave(bool isCompleted, string additionalInfo, List beatmapSaves) + { + this.isCompleted = isCompleted; + this.additionalInfo = additionalInfo; + this.beatmapSaves = beatmapSaves; + } } } \ No newline at end of file diff --git a/Assets/Scripts/Saving/UnlockKeysCollection.asset b/Assets/Scripts/Saving/UnlockKeysCollection.asset new file mode 100644 index 00000000..9b10cbb6 --- /dev/null +++ b/Assets/Scripts/Saving/UnlockKeysCollection.asset @@ -0,0 +1,41 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 15eae34b5665c7141ae96e00af60b2d0, type: 3} + m_Name: UnlockKeysCollection + m_EditorClassIdentifier: + serializationData: + SerializedFormat: 2 + SerializedBytes: + ReferencedUnityObjects: [] + SerializedBytesString: + Prefab: {fileID: 0} + PrefabModificationsReferencedUnityObjects: [] + PrefabModifications: [] + SerializationNodes: + - Name: unlockKeys + Entry: 7 + Data: 0|System.Collections.Generic.HashSet`1[[System.String, mscorlib]], System.Core + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 1 + Data: Test_Key + - Name: + Entry: 1 + Data: Omega + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: diff --git a/Assets/Scripts/Saving/UnlockKeysCollection.asset.meta b/Assets/Scripts/Saving/UnlockKeysCollection.asset.meta new file mode 100644 index 00000000..cc51e3de --- /dev/null +++ b/Assets/Scripts/Saving/UnlockKeysCollection.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7dabd6d0cf475864c819364a7a359a8b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Saving/UnlockKeysCollection.cs b/Assets/Scripts/Saving/UnlockKeysCollection.cs new file mode 100644 index 00000000..3cf703bc --- /dev/null +++ b/Assets/Scripts/Saving/UnlockKeysCollection.cs @@ -0,0 +1,13 @@ +using System.Collections; +using System.Collections.Generic; +using Sirenix.OdinInspector; +using UnityEngine; + +namespace Ichni.RhythmGame +{ + [CreateAssetMenu(fileName = "UnlockKeysCollection", menuName = "Ichni/RhythmGame/UnlockKeysCollection")] + public class UnlockKeysCollection : SerializedScriptableObject + { + public HashSet unlockKeys; + } +} \ No newline at end of file diff --git a/Assets/Scripts/Saving/UnlockKeysCollection.cs.meta b/Assets/Scripts/Saving/UnlockKeysCollection.cs.meta new file mode 100644 index 00000000..6f2ef694 --- /dev/null +++ b/Assets/Scripts/Saving/UnlockKeysCollection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 15eae34b5665c7141ae96e00af60b2d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Story/Dialog/DialogManager.cs b/Assets/Scripts/Story/Dialog/DialogManager.cs index 3f41c32b..856c4214 100644 --- a/Assets/Scripts/Story/Dialog/DialogManager.cs +++ b/Assets/Scripts/Story/Dialog/DialogManager.cs @@ -41,8 +41,9 @@ namespace Ichni.Story public void SetDialog(string dialogName) { - string chapter = ChapterSelectionManager.instance.currentChapter.chapterName; + string chapter = ChapterSelectionManager.instance.currentChapter.chapterIndex; TextAsset dialog = Resources.Load("Story/" + chapter + "/Dialogs/" + dialogName); + dialogUIPage.dialogContentFrame.ClearAllSentences(); SetDialog(new List { dialog }); } @@ -53,12 +54,10 @@ namespace Ichni.Story isPlayingDialog = true; currentDialog = "NULL"; + LoadDialog(dialogFiles, out string firstHeader); - Debug.Log($"Loaded dialog, first header: {firstHeader}"); currentDialog = dialogParagraphName == "" ? firstHeader : dialogParagraphName; - - Debug.Log($"Setting dialog to: {currentDialog}"); } public void PlayNextDialogParagraph(string nextDialog, bool invokeFunctions = true) @@ -138,6 +137,9 @@ namespace Ichni.Story { StoryManager.instance.storyline.currentBlock.state = StoryBlockState.Completed; isPlayingDialog = false; + dialogUIPage.FadeOut(); + Debug.Log("Dialog completed, setting block state to Completed."); + StoryManager.instance.storyline.SaveStoryline(ChapterSelectionManager.instance.currentChapter.chapterIndex); } } @@ -145,7 +147,7 @@ namespace Ichni.Story { string finalType; int max = 0; - + Debug.Log($"Revealing dialog: {currentDialog}, currentFinalType: {currentFinalType}"); do { finalType = currentFinalType; diff --git a/Assets/Scripts/Story/Dialog/StoryInterpreters.cs b/Assets/Scripts/Story/Dialog/StoryInterpreters.cs index ee6c94b8..6e728d21 100644 --- a/Assets/Scripts/Story/Dialog/StoryInterpreters.cs +++ b/Assets/Scripts/Story/Dialog/StoryInterpreters.cs @@ -26,6 +26,7 @@ namespace Ichni.Story FunctionInterpreter.SetFunction("GetVariable", new Func(GetStoryVariable)); FunctionInterpreter.SetFunction("GenerateDialogBlock", new Action(GenerateDialogBlock)); FunctionInterpreter.SetFunction("GenerateSongBlock", new Action(GenerateSongBlock)); + FunctionInterpreter.SetFunction("SetUnlockKey", new Action(SetUnlockKey)); } static void SetConditionInterpreter() @@ -75,5 +76,13 @@ namespace Ichni.Story SongBlockUI newBlock = StoryManager.instance.storyline.GenerateSongBlock(blockName, currentBlock.blockPosition + positionOffset, StoryBlockState.Current); StoryManager.instance.storyline.GenerateConnector(currentBlock, newBlock); } + + static void SetUnlockKey(string key) + { + if (GameSaveManager.instance.SongSaveModule.unlockKeys.Add(key)) + { + GameSaveManager.instance.SongSaveModule.SaveUnlockKeys(); + } + } } } \ No newline at end of file diff --git a/Assets/Scripts/Story/Dialog/StoryManager.cs b/Assets/Scripts/Story/Dialog/StoryManager.cs index 2268aec9..370f19ef 100644 --- a/Assets/Scripts/Story/Dialog/StoryManager.cs +++ b/Assets/Scripts/Story/Dialog/StoryManager.cs @@ -26,7 +26,12 @@ namespace Ichni.Story public partial class StoryManager { - + [Button] + public void ClearAllStorySave() + { + GameSaveManager.instance.StorySaveModule.ClearAllStoryline(); + GameSaveManager.instance.SongSaveModule.ClearUnlock(); + } } public enum StoryBlockState diff --git a/Assets/Scripts/Story/StoryUI/Blocks/DialogBlockUI.cs b/Assets/Scripts/Story/StoryUI/Blocks/DialogBlockUI.cs index 1cf5d0c3..fb7f8089 100644 --- a/Assets/Scripts/Story/StoryUI/Blocks/DialogBlockUI.cs +++ b/Assets/Scripts/Story/StoryUI/Blocks/DialogBlockUI.cs @@ -25,6 +25,8 @@ namespace Ichni.Story.UI button.onClick.AddListener(() => { + state = this.state; + if(state == StoryBlockState.Locked) return; StoryManager.instance.storyline.currentBlock = this; diff --git a/Assets/Scripts/Story/StoryUI/Blocks/SongBlockUI.cs b/Assets/Scripts/Story/StoryUI/Blocks/SongBlockUI.cs index 012bf6c7..8d147073 100644 --- a/Assets/Scripts/Story/StoryUI/Blocks/SongBlockUI.cs +++ b/Assets/Scripts/Story/StoryUI/Blocks/SongBlockUI.cs @@ -45,33 +45,30 @@ namespace Ichni.Story.UI { SongStatusSave songStatusSave = GameSaveManager.instance.SongSaveModule.songStatusSaves[songName]; - string chapter = ChapterSelectionManager.instance.currentChapter.chapterName; + string chapter = ChapterSelectionManager.instance.currentChapter.chapterIndex; ChapterSelectionUnit cpt = ChapterSelectionManager.instance.chapters.First(c => c.chapterIndex == chapter); SongItemData song = cpt.songs.First(s => s.songName == this.songName); - foreach (DifficultyData difficulty in song.difficultyDataList) + for (var index = 0; index < song.difficultyDataList.Count; index++) { - foreach (KeyValuePair beatmapSave in songStatusSave.beatmapSaves) + var difficulty = song.difficultyDataList[index]; + var beatmapSave = songStatusSave.beatmapSaves[index]; + + if (beatmapSave.isAllPerfect) { - if (beatmapSave.Key == difficulty.difficultyName) - { - if (beatmapSave.Value.isAllPerfect) - { - GameObject mark = Instantiate(beatmapStatusMarkPrefab, beatmapStatusMarkContainer); - mark.GetComponent().color = difficulty.color; - mark.transform.GetChild(0).GetComponent().color = difficulty.color; - mark.transform.GetChild(0).GetComponent().text = "AP"; - break; - } - - if (beatmapSave.Value.isFullCombo) - { - GameObject mark = Instantiate(beatmapStatusMarkPrefab, beatmapStatusMarkContainer); - mark.GetComponent().color = difficulty.color; - mark.transform.GetChild(0).GetComponent().color = difficulty.color; - mark.transform.GetChild(0).GetComponent().text = "FC"; - break; - } - } + GameObject mark = Instantiate(beatmapStatusMarkPrefab, beatmapStatusMarkContainer); + mark.GetComponent().color = difficulty.color; + mark.transform.GetChild(0).GetComponent().color = difficulty.color; + mark.transform.GetChild(0).GetComponent().text = "AP"; + break; + } + + if (beatmapSave.isFullCombo) + { + GameObject mark = Instantiate(beatmapStatusMarkPrefab, beatmapStatusMarkContainer); + mark.GetComponent().color = difficulty.color; + mark.transform.GetChild(0).GetComponent().color = difficulty.color; + mark.transform.GetChild(0).GetComponent().text = "FC"; + break; } } } diff --git a/Assets/Scripts/Story/StoryUI/DialogUI/ChoiceGroupUI.cs b/Assets/Scripts/Story/StoryUI/DialogUI/ChoiceGroupUI.cs index 1a1e0101..8ee0d46b 100644 --- a/Assets/Scripts/Story/StoryUI/DialogUI/ChoiceGroupUI.cs +++ b/Assets/Scripts/Story/StoryUI/DialogUI/ChoiceGroupUI.cs @@ -28,7 +28,7 @@ namespace Ichni.Story.UI int cIndex = index; // Capture the current index for the listener GameObject choiceButton = Instantiate(choiceButtonPrefab, container); - choiceButton.GetComponentInChildren().SetTerm(ChapterSelectionManager.instance.currentChapter + "/" + choice.choiceText); + choiceButton.GetComponentInChildren().SetTerm(ChapterSelectionManager.instance.currentChapter.chapterIndex + "/" + choice.choiceText); choiceButton.GetComponent