diff --git a/.gitignore b/.gitignore index 0e9a57f2..ef9e2c29 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,6 @@ vendor.zip /Assets/Plugins/FMOD/* /Assets/Plugins/FMOD.meta -/Assets/StreamingAssets* +/Assets/StreamingAssets/master* /FMOD/.* fmod_editor.log diff --git a/Assets/StreamingAssets.meta b/Assets/StreamingAssets.meta new file mode 100644 index 00000000..da1600a3 --- /dev/null +++ b/Assets/StreamingAssets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 06140fb01b7d94fa3a53f257522e3888 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/StreamingAssets/Rhythm Game Data.meta b/Assets/StreamingAssets/Rhythm Game Data.meta new file mode 100644 index 00000000..f8e9c90d --- /dev/null +++ b/Assets/StreamingAssets/Rhythm Game Data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 04cc33f171a944bf4b2a56eddba1f456 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/StreamingAssets/Rhythm Game Data/Demo.mid b/Assets/StreamingAssets/Rhythm Game Data/Demo.mid new file mode 100644 index 00000000..1cab99e0 Binary files /dev/null and b/Assets/StreamingAssets/Rhythm Game Data/Demo.mid differ diff --git a/Assets/StreamingAssets/Rhythm Game Data/Demo.mid.meta b/Assets/StreamingAssets/Rhythm Game Data/Demo.mid.meta new file mode 100644 index 00000000..e74ec222 --- /dev/null +++ b/Assets/StreamingAssets/Rhythm Game Data/Demo.mid.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 44132a14146d6421c9df3d06abf77630 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Unity/Prefabs/Rewired Input Manager.prefab b/Assets/Unity/Prefabs/Rewired Input Manager.prefab index f30397dd..b890ff3d 100644 --- a/Assets/Unity/Prefabs/Rewired Input Manager.prefab +++ b/Assets/Unity/Prefabs/Rewired Input Manager.prefab @@ -430,6 +430,42 @@ MonoBehaviour: _behaviorId: 0 _userAssignable: 1 _categoryId: 0 + - _id: 28 + _name: Rhythm Game Left + _type: 1 + _descriptiveName: Rhythm Game Left + _positiveDescriptiveName: + _negativeDescriptiveName: + _behaviorId: 0 + _userAssignable: 1 + _categoryId: 0 + - _id: 31 + _name: Rhythm Game Down + _type: 1 + _descriptiveName: Rhythm Game Down + _positiveDescriptiveName: + _negativeDescriptiveName: + _behaviorId: 0 + _userAssignable: 1 + _categoryId: 0 + - _id: 30 + _name: Rhythm Game Up + _type: 1 + _descriptiveName: Rhythm Game Up + _positiveDescriptiveName: + _negativeDescriptiveName: + _behaviorId: 0 + _userAssignable: 1 + _categoryId: 0 + - _id: 29 + _name: Rhythm Game Right + _type: 1 + _descriptiveName: Rhythm Game Right + _positiveDescriptiveName: + _negativeDescriptiveName: + _behaviorId: 0 + _userAssignable: 1 + _categoryId: 0 actionCategories: - _name: Default _descriptiveName: Default @@ -439,7 +475,7 @@ MonoBehaviour: actionCategoryMap: list: - categoryId: 0 - actionIds: 0000000001000000100000000f000000030000000400000005000000060000000700000008000000090000001b0000000a0000000b0000001300000014000000150000001700000018000000190000001a000000 + actionIds: 0000000001000000100000000f000000030000000400000005000000060000000700000008000000090000001b0000000a0000000b0000001300000014000000150000001700000018000000190000001a0000001c0000001f0000001e0000001d000000 inputBehaviors: - _id: 0 _name: Default @@ -542,10 +578,10 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 20 + _actionId: 29 _elementType: 0 _elementIdentifierId: 0 - _axisRange: 2 + _axisRange: 1 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 @@ -553,10 +589,10 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 1 + _actionId: 20 _elementType: 0 - _elementIdentifierId: 1 - _axisRange: 0 + _elementIdentifierId: 0 + _axisRange: 2 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 @@ -564,10 +600,10 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 16 + _actionId: 28 _elementType: 0 - _elementIdentifierId: 2 - _axisRange: 0 + _elementIdentifierId: 0 + _axisRange: 2 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 @@ -575,10 +611,10 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 15 + _actionId: 30 _elementType: 0 - _elementIdentifierId: 3 - _axisRange: 0 + _elementIdentifierId: 1 + _axisRange: 1 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 @@ -586,98 +622,10 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 23 + _actionId: 31 _elementType: 0 - _elementIdentifierId: 3 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 7 - _elementType: 1 - _elementIdentifierId: 4 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 6 - _elementType: 1 - _elementIdentifierId: 4 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 27 - _elementType: 1 - _elementIdentifierId: 5 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 8 - _elementType: 1 - _elementIdentifierId: 5 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: -1 - _elementType: 1 - _elementIdentifierId: 6 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 4 - _elementType: 1 - _elementIdentifierId: 7 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 11 - _elementType: 1 - _elementIdentifierId: 8 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: -1 - _elementType: 1 - _elementIdentifierId: 9 - _axisRange: 0 + _elementIdentifierId: 1 + _axisRange: 2 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 @@ -685,9 +633,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 9 - _elementType: 1 - _elementIdentifierId: 12 + _actionId: 1 + _elementType: 0 + _elementIdentifierId: 1 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -696,20 +644,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 23 - _elementType: 1 - _elementIdentifierId: 12 - _axisRange: 0 - _invert: 0 - _axisContribution: 1 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 3 + _actionId: 16 _elementType: 0 - _elementIdentifierId: 13 + _elementIdentifierId: 2 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -718,9 +655,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 23 + _actionId: 29 _elementType: 0 - _elementIdentifierId: 13 + _elementIdentifierId: 2 _axisRange: 1 _invert: 0 _axisContribution: 0 @@ -729,65 +666,10 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 10 - _elementType: 1 - _elementIdentifierId: 14 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 10 - _elementType: 1 - _elementIdentifierId: 15 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 10 - _elementType: 1 - _elementIdentifierId: 16 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: -1 - _elementType: 1 - _elementIdentifierId: 17 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: -1 - _elementType: 1 - _elementIdentifierId: 18 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 1 - _elementType: 1 - _elementIdentifierId: 19 - _axisRange: 0 + _actionId: 28 + _elementType: 0 + _elementIdentifierId: 2 + _axisRange: 2 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 @@ -795,9 +677,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 0 - _elementType: 1 - _elementIdentifierId: 20 + _actionId: 15 + _elementType: 0 + _elementIdentifierId: 3 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -806,10 +688,10 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 21 - _elementType: 1 - _elementIdentifierId: 20 - _axisRange: 0 + _actionId: 30 + _elementType: 0 + _elementIdentifierId: 3 + _axisRange: 1 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 @@ -817,397 +699,20 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 1 - _elementType: 1 - _elementIdentifierId: 21 - _axisRange: 0 - _invert: 0 - _axisContribution: 1 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 0 - _elementType: 1 - _elementIdentifierId: 22 - _axisRange: 0 - _invert: 0 - _axisContribution: 1 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 20 - _elementType: 1 - _elementIdentifierId: 22 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 27 - _elementType: 1 - _elementIdentifierId: 18 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - id: 2 - categoryId: 0 - layoutId: 0 - name: - hardwareGuidString: cd9718bf-a87a-44bc-8716-60a0def28a9f - customControllerUid: 0 - actionElementMaps: - - _actionCategoryId: 0 - _actionId: 0 - _elementType: 0 - _elementIdentifierId: 0 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 21 + _actionId: 31 _elementType: 0 - _elementIdentifierId: 0 - _axisRange: 1 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 20 - _elementType: 0 - _elementIdentifierId: 0 - _axisRange: 2 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 1 - _elementType: 1 - _elementIdentifierId: 1 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 16 - _elementType: 1 - _elementIdentifierId: 2 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 15 - _elementType: 1 - _elementIdentifierId: 3 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 23 - _elementType: 1 _elementIdentifierId: 3 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 7 - _elementType: 1 - _elementIdentifierId: 6 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 6 - _elementType: 1 - _elementIdentifierId: 6 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 27 - _elementType: 1 - _elementIdentifierId: 7 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 8 - _elementType: 1 - _elementIdentifierId: 7 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 4 - _elementType: 1 - _elementIdentifierId: 8 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 11 - _elementType: 1 - _elementIdentifierId: 9 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 9 - _elementType: 1 - _elementIdentifierId: 11 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 23 - _elementType: 1 - _elementIdentifierId: 11 - _axisRange: 0 - _invert: 0 - _axisContribution: 1 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 3 - _elementType: 0 - _elementIdentifierId: 5 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 23 - _elementType: 0 - _elementIdentifierId: 5 - _axisRange: 1 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 10 - _elementType: 1 - _elementIdentifierId: 12 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 10 - _elementType: 1 - _elementIdentifierId: 13 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 10 - _elementType: 1 - _elementIdentifierId: 14 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 10 - _elementType: 1 - _elementIdentifierId: 15 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: -1 - _elementType: 1 - _elementIdentifierId: 16 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: -1 - _elementType: 1 - _elementIdentifierId: 17 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 1 - _elementType: 1 - _elementIdentifierId: 18 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 0 - _elementType: 1 - _elementIdentifierId: 19 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 21 - _elementType: 1 - _elementIdentifierId: 19 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 1 - _elementType: 1 - _elementIdentifierId: 20 - _axisRange: 0 - _invert: 0 - _axisContribution: 1 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 0 - _elementType: 1 - _elementIdentifierId: 21 - _axisRange: 0 - _invert: 0 - _axisContribution: 1 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 20 - _elementType: 1 - _elementIdentifierId: 21 - _axisRange: 0 - _invert: 0 - _axisContribution: 0 - _keyboardKeyCode: 0 - _modifierKey1: 0 - _modifierKey2: 0 - _modifierKey3: 0 - - _actionCategoryId: 0 - _actionId: 27 - _elementType: 1 - _elementIdentifierId: 17 - _axisRange: 0 + _axisRange: 2 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 - - id: 3 - categoryId: 0 - layoutId: 0 - name: - hardwareGuidString: 71dfe6c8-9e81-428f-a58e-c7e664b7fbed - customControllerUid: 0 - actionElementMaps: - _actionCategoryId: 0 - _actionId: 0 + _actionId: 23 _elementType: 0 - _elementIdentifierId: 0 + _elementIdentifierId: 3 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1216,10 +721,10 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 21 - _elementType: 0 - _elementIdentifierId: 0 - _axisRange: 1 + _actionId: 7 + _elementType: 1 + _elementIdentifierId: 4 + _axisRange: 0 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 @@ -1227,10 +732,10 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 20 - _elementType: 0 - _elementIdentifierId: 0 - _axisRange: 2 + _actionId: 6 + _elementType: 1 + _elementIdentifierId: 4 + _axisRange: 0 _invert: 0 _axisContribution: 0 _keyboardKeyCode: 0 @@ -1238,9 +743,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 1 - _elementType: 0 - _elementIdentifierId: 1 + _actionId: 31 + _elementType: 1 + _elementIdentifierId: 4 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1249,9 +754,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 16 - _elementType: 0 - _elementIdentifierId: 2 + _actionId: 27 + _elementType: 1 + _elementIdentifierId: 5 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1260,9 +765,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 15 - _elementType: 0 - _elementIdentifierId: 3 + _actionId: 8 + _elementType: 1 + _elementIdentifierId: 5 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1271,9 +776,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 23 - _elementType: 0 - _elementIdentifierId: 3 + _actionId: 29 + _elementType: 1 + _elementIdentifierId: 5 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1282,9 +787,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 6 + _actionId: -1 _elementType: 1 - _elementIdentifierId: 4 + _elementIdentifierId: 6 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1293,9 +798,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 7 + _actionId: 4 _elementType: 1 - _elementIdentifierId: 4 + _elementIdentifierId: 7 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1304,9 +809,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 27 + _actionId: 28 _elementType: 1 - _elementIdentifierId: 5 + _elementIdentifierId: 7 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1315,9 +820,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 8 + _actionId: 11 _elementType: 1 - _elementIdentifierId: 5 + _elementIdentifierId: 8 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1326,9 +831,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 4 + _actionId: 30 _elementType: 1 - _elementIdentifierId: 6 + _elementIdentifierId: 8 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1337,9 +842,9 @@ MonoBehaviour: _modifierKey2: 0 _modifierKey3: 0 - _actionCategoryId: 0 - _actionId: 11 + _actionId: -1 _elementType: 1 - _elementIdentifierId: 7 + _elementIdentifierId: 9 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1350,7 +855,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 9 _elementType: 1 - _elementIdentifierId: 10 + _elementIdentifierId: 12 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1361,7 +866,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 23 _elementType: 1 - _elementIdentifierId: 10 + _elementIdentifierId: 12 _axisRange: 0 _invert: 0 _axisContribution: 1 @@ -1372,7 +877,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 3 _elementType: 0 - _elementIdentifierId: 11 + _elementIdentifierId: 13 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1383,7 +888,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 23 _elementType: 0 - _elementIdentifierId: 11 + _elementIdentifierId: 13 _axisRange: 1 _invert: 0 _axisContribution: 0 @@ -1394,7 +899,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 10 _elementType: 1 - _elementIdentifierId: 12 + _elementIdentifierId: 14 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1405,7 +910,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 10 _elementType: 1 - _elementIdentifierId: 13 + _elementIdentifierId: 15 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1416,7 +921,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 10 _elementType: 1 - _elementIdentifierId: 14 + _elementIdentifierId: 16 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1427,7 +932,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: -1 _elementType: 1 - _elementIdentifierId: 15 + _elementIdentifierId: 17 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1438,7 +943,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: -1 _elementType: 1 - _elementIdentifierId: 16 + _elementIdentifierId: 18 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1449,7 +954,18 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 1 _elementType: 1 - _elementIdentifierId: 17 + _elementIdentifierId: 19 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 0 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 30 + _elementType: 1 + _elementIdentifierId: 19 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1460,7 +976,18 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 0 _elementType: 1 - _elementIdentifierId: 18 + _elementIdentifierId: 20 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 0 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 29 + _elementType: 1 + _elementIdentifierId: 20 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1471,7 +998,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 21 _elementType: 1 - _elementIdentifierId: 18 + _elementIdentifierId: 20 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1482,7 +1009,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 1 _elementType: 1 - _elementIdentifierId: 19 + _elementIdentifierId: 21 _axisRange: 0 _invert: 0 _axisContribution: 1 @@ -1490,10 +1017,21 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 31 + _elementType: 1 + _elementIdentifierId: 21 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 0 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 0 _elementType: 1 - _elementIdentifierId: 20 + _elementIdentifierId: 22 _axisRange: 0 _invert: 0 _axisContribution: 1 @@ -1501,10 +1039,21 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 28 + _elementType: 1 + _elementIdentifierId: 22 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 0 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 20 _elementType: 1 - _elementIdentifierId: 20 + _elementIdentifierId: 22 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1515,7 +1064,7 @@ MonoBehaviour: - _actionCategoryId: 0 _actionId: 27 _elementType: 1 - _elementIdentifierId: 16 + _elementIdentifierId: 18 _axisRange: 0 _invert: 0 _axisContribution: 0 @@ -1542,6 +1091,17 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 30 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 119 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 0 _elementType: 1 @@ -1553,6 +1113,17 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 28 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 97 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 20 _elementType: 1 @@ -1575,6 +1146,17 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 31 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 115 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 0 _elementType: 1 @@ -1586,6 +1168,17 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 29 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 100 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 21 _elementType: 1 @@ -1608,6 +1201,17 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 30 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 273 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 0 _elementType: 1 @@ -1619,6 +1223,17 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 28 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 276 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 20 _elementType: 1 @@ -1641,6 +1256,17 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 31 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 274 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 0 _elementType: 1 @@ -1652,6 +1278,17 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 29 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 275 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 - _actionCategoryId: 0 _actionId: 21 _elementType: 1 @@ -1861,6 +1498,50 @@ MonoBehaviour: _modifierKey1: 0 _modifierKey2: 0 _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 28 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 104 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 31 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 106 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 30 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 107 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 + - _actionCategoryId: 0 + _actionId: 29 + _elementType: 1 + _elementIdentifierId: -1 + _axisRange: 0 + _invert: 0 + _axisContribution: 0 + _keyboardKeyCode: 108 + _modifierKey1: 0 + _modifierKey2: 0 + _modifierKey3: 0 mouseMaps: - id: 0 categoryId: 0 @@ -1940,7 +1621,7 @@ MonoBehaviour: controllerMapLayoutManagerRuleSets: [] controllerMapEnablerRuleSets: [] playerIdCounter: 2 - actionIdCounter: 28 + actionIdCounter: 32 actionCategoryIdCounter: 2 inputBehaviorIdCounter: 4 mapCategoryIdCounter: 1 diff --git a/Assets/Unity/Scenes/Test Rhythm Game.unity b/Assets/Unity/Scenes/Test Rhythm Game.unity new file mode 100644 index 00000000..e16283be --- /dev/null +++ b/Assets/Unity/Scenes/Test Rhythm Game.unity @@ -0,0 +1,1861 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: d2d0db6e4370340da8f48ad4806cf49b, + type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &50921000 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 50921001} + - component: {fileID: 50921003} + - component: {fileID: 50921002} + m_Layer: 5 + m_Name: Score and Note Grade + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &50921001 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 50921000} + 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: 2147322485} + - {fileID: 816043963} + - {fileID: 544028420} + m_Father: {fileID: 488498665} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: -192, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &50921002 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 50921000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 2 + m_VerticalFit: 2 +--- !u!114 &50921003 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 50921000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &67349635 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 67349636} + - component: {fileID: 67349638} + - component: {fileID: 67349637} + - component: {fileID: 67349639} + m_Layer: 5 + m_Name: Pop Pixie + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &67349636 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 67349635} + 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: 488498665} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 384.00006, y: 0} + m_SizeDelta: {x: -767.9999, y: 720} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &67349637 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 67349635} + 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: a1102afe6498b4cd49da0d9cff4a20b0, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &67349638 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 67349635} + m_CullTransparentMesh: 1 +--- !u!114 &67349639 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 67349635} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 68a817e8c6bf94c38be7b0ea3a19cc6a, type: 3} + m_Name: + m_EditorClassIdentifier: + Transform: {fileID: 67349636} + BaseScale: 1 + OscillationSpeed: 12.566371 + OscillationScale: 0.025 + XAxis: 1 + YAxis: 1 +--- !u!1 &80893927 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 80893928} + - component: {fileID: 80893930} + - component: {fileID: 80893929} + m_Layer: 5 + m_Name: Trail + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &80893928 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 80893927} + 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: 959757542} + 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: 30, y: 100} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &80893929 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 80893927} + 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: 1b5f5f98320794ffcaab523e6b6d47fd, type: 3} + m_Type: 3 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 1 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &80893930 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 80893927} + m_CullTransparentMesh: 1 +--- !u!1 &250930356 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 250930357} + - component: {fileID: 250930359} + - component: {fileID: 250930358} + - component: {fileID: 250930360} + m_Layer: 5 + m_Name: Down + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &250930357 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 250930356} + m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 452012667} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 120, y: 80} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &250930358 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 250930356} + 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.39999998, 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: bfb48dca50c3049d4af953850214ffd9, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &250930359 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 250930356} + m_CullTransparentMesh: 1 +--- !u!225 &250930360 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 250930356} + m_Enabled: 1 + m_Alpha: 0.6 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &327090774 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 327090775} + - component: {fileID: 327090777} + - component: {fileID: 327090776} + - component: {fileID: 327090778} + m_Layer: 5 + m_Name: Right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &327090775 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 327090774} + 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: 452012667} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 120, y: 80} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &327090776 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 327090774} + 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: 0.39999998, b: 0.39999998, 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: bfb48dca50c3049d4af953850214ffd9, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &327090777 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 327090774} + m_CullTransparentMesh: 1 +--- !u!225 &327090778 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 327090774} + m_Enabled: 1 + m_Alpha: 0.6 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &452012666 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 452012667} + - component: {fileID: 452012669} + - component: {fileID: 452012668} + m_Layer: 5 + m_Name: Note Targets + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &452012667 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 452012666} + 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: 787737352} + - {fileID: 250930357} + - {fileID: 2014153219} + - {fileID: 327090775} + m_Father: {fileID: 1489695913} + 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: 460} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &452012668 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 452012666} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 1 + m_VerticalFit: 1 +--- !u!114 &452012669 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 452012666} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 20 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &488498664 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 488498665} + - component: {fileID: 488498669} + - component: {fileID: 488498668} + - component: {fileID: 488498667} + - component: {fileID: 488498666} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &488498665 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 488498664} + 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: 1489695913} + - {fileID: 67349636} + - {fileID: 50921001} + m_Father: {fileID: 740930168} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &488498666 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 488498664} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: {x: 0, y: 0, z: 0, w: 0} + m_Softness: {x: 0, y: 0} +--- !u!114 &488498667 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 488498664} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.101960786} + 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 &488498668 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 488498664} + m_CullTransparentMesh: 1 +--- !u!114 &488498669 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 488498664} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AspectMode: 3 + m_AspectRatio: 1.7777778 +--- !u!1 &544028417 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 544028420} + - component: {fileID: 544028419} + - component: {fileID: 544028418} + m_Layer: 5 + m_Name: Note Grade + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &544028418 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 544028417} + 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: 4cd1de6e24c6e498f8e1d80f30605280, type: 2} + m_sharedMaterial: {fileID: 21776102841513868, guid: 4cd1de6e24c6e498f8e1d80f30605280, + 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: 72 + m_fontSizeBase: 72 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + 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 &544028419 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 544028417} + m_CullTransparentMesh: 1 +--- !u!224 &544028420 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 544028417} + 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: 50921001} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &596422148 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 596422149} + - component: {fileID: 596422151} + - component: {fileID: 596422150} + m_Layer: 5 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &596422149 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 596422148} + 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: 959757542} + 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: 120, y: 80} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &596422150 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 596422148} + 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: bfb48dca50c3049d4af953850214ffd9, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &596422151 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 596422148} + m_CullTransparentMesh: 1 +--- !u!1 &740930167 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 740930168} + - component: {fileID: 740930171} + - component: {fileID: 740930170} + - component: {fileID: 740930169} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &740930168 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 740930167} + 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: + - {fileID: 488498665} + m_Father: {fileID: 1090514947} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &740930169 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 740930167} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &740930170 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 740930167} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1920, y: 1080} + m_ScreenMatchMode: 1 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &740930171 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 740930167} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 1 + m_Camera: {fileID: 898746628} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 25 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1 &787737351 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 787737352} + - component: {fileID: 787737354} + - component: {fileID: 787737353} + - component: {fileID: 787737355} + m_Layer: 5 + m_Name: Left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &787737352 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 787737351} + m_LocalRotation: {x: 0, y: 0, z: 1, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 452012667} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 120, y: 80} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &787737353 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 787737351} + 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.7, g: 0.39999998, 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: bfb48dca50c3049d4af953850214ffd9, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &787737354 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 787737351} + m_CullTransparentMesh: 1 +--- !u!225 &787737355 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 787737351} + m_Enabled: 1 + m_Alpha: 0.6 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &816043962 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 816043963} + - component: {fileID: 816043965} + - component: {fileID: 816043964} + m_Layer: 5 + m_Name: Score Value + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &816043963 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 816043962} + 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: 50921001} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &816043964 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 816043962} + 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: 000000 + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 4cd1de6e24c6e498f8e1d80f30605280, type: 2} + m_sharedMaterial: {fileID: 21776102841513868, guid: 4cd1de6e24c6e498f8e1d80f30605280, + 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: 72 + m_fontSizeBase: 72 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + 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 &816043965 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 816043962} + m_CullTransparentMesh: 1 +--- !u!1001 &898746627 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1665900140710026, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_Name + value: Main Camera + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4198617257405980, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114253518789369406, guid: db7b40b7e04a74afa95cc6e82a722496, + type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 374538616986019307, guid: db7b40b7e04a74afa95cc6e82a722496, + type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 374538616986019307, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + - {fileID: 114253518789369406, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: db7b40b7e04a74afa95cc6e82a722496, type: 3} +--- !u!20 &898746628 stripped +Camera: + m_CorrespondingSourceObject: {fileID: 20682073832733502, guid: db7b40b7e04a74afa95cc6e82a722496, + type: 3} + m_PrefabInstance: {fileID: 898746627} + m_PrefabAsset: {fileID: 0} +--- !u!1 &959757541 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 959757542} + - component: {fileID: 959757543} + m_Layer: 5 + m_Name: Note Sprite Template + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &959757542 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959757541} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 80893928} + - {fileID: 596422149} + m_Father: {fileID: 1489695913} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &959757543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959757541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1a2ee74cef1fa490f899eb840223a9ef, type: 3} + m_Name: + m_EditorClassIdentifier: + Arrow: {fileID: 596422150} + Trail: {fileID: 80893929} + ArrowTransform: {fileID: 596422149} + TrailTransform: {fileID: 80893928} +--- !u!1 &1090514945 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1090514947} + - component: {fileID: 1090514946} + m_Layer: 0 + m_Name: Rhythm Game + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1090514946 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1090514945} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da791d72e319d492e9eb6f6d293b66a6, type: 3} + m_Name: + m_EditorClassIdentifier: + NotesView: {fileID: 1489695914} + ScoreText: {fileID: 816043964} + NoteGradeText: {fileID: 544028418} +--- !u!4 &1090514947 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1090514945} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 740930168} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1489695912 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1489695913} + - component: {fileID: 1489695914} + - component: {fileID: 1489695916} + - component: {fileID: 1489695915} + - component: {fileID: 1489695917} + m_Layer: 5 + m_Name: Notes View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1489695913 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1489695912} + 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: 452012667} + - {fileID: 959757542} + m_Father: {fileID: 488498665} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: -482, y: 0} + m_SizeDelta: {x: 580, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1489695914 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1489695912} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8112514d52eaa43adb5d0c47e84a79ed, type: 3} + m_Name: + m_EditorClassIdentifier: + PixelsBetweenEachBeat: 405 + LeftTarget: {fileID: 787737352} + DownTarget: {fileID: 250930357} + UpTarget: {fileID: 2014153219} + RightTarget: {fileID: 327090775} + NoteSpriteTemplate: {fileID: 959757543} +--- !u!114 &1489695915 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1489695912} + 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: 0.5019608} + 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 &1489695916 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1489695912} + m_CullTransparentMesh: 1 +--- !u!114 &1489695917 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1489695912} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 0 +--- !u!1001 &1945062054 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2254461912267086629, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_Name + value: Scene Essentials + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5636461190564298426, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5835818988283754399, guid: 310bd337419114b4595e5056c7463838, + type: 3} + propertyPath: FrameRate + value: 300 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 310bd337419114b4595e5056c7463838, type: 3} +--- !u!1 &2014153218 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2014153219} + - component: {fileID: 2014153221} + - component: {fileID: 2014153220} + - component: {fileID: 2014153222} + m_Layer: 5 + m_Name: Up + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2014153219 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014153218} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 452012667} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 120, y: 80} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2014153220 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014153218} + 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.7, g: 1, b: 0.39999998, 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: bfb48dca50c3049d4af953850214ffd9, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &2014153221 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014153218} + m_CullTransparentMesh: 1 +--- !u!225 &2014153222 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014153218} + m_Enabled: 1 + m_Alpha: 0.6 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &2147322484 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2147322485} + - component: {fileID: 2147322487} + - component: {fileID: 2147322486} + m_Layer: 5 + m_Name: Score Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2147322485 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2147322484} + 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: 50921001} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2147322486 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2147322484} + 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: Score + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 4cd1de6e24c6e498f8e1d80f30605280, type: 2} + m_sharedMaterial: {fileID: 21776102841513868, guid: 4cd1de6e24c6e498f8e1d80f30605280, + 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: 52 + m_fontSizeBase: 52 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + 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 &2147322487 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2147322484} + m_CullTransparentMesh: 1 +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1945062054} + - {fileID: 898746627} + - {fileID: 1090514947} diff --git a/Assets/Unity/Scenes/Test Rhythm Game.unity.meta b/Assets/Unity/Scenes/Test Rhythm Game.unity.meta new file mode 100644 index 00000000..1483d87b --- /dev/null +++ b/Assets/Unity/Scenes/Test Rhythm Game.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 78020175a1b404edd96e91f00bb0bcfb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/images/Rhythm Game Arrow.png b/Assets/images/Rhythm Game Arrow.png new file mode 100644 index 00000000..d5900e46 Binary files /dev/null and b/Assets/images/Rhythm Game Arrow.png differ diff --git a/Assets/images/Rhythm Game Arrow.png.meta b/Assets/images/Rhythm Game Arrow.png.meta new file mode 100644 index 00000000..c144e41d --- /dev/null +++ b/Assets/images/Rhythm Game Arrow.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: bfb48dca50c3049d4af953850214ffd9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src/GraphicsSettingsMenuEvents.cs b/Assets/src/GraphicsSettingsMenuEvents.cs index 7e672234..376dfc67 100644 --- a/Assets/src/GraphicsSettingsMenuEvents.cs +++ b/Assets/src/GraphicsSettingsMenuEvents.cs @@ -24,7 +24,7 @@ protected override void LocalStart() { ); if (ResolutionStepper.Value == -1) - ResolutionStepper.Value = Screen.resolutions.Count() - 1; + ResolutionStepper.Value = Screen.resolutions.Length - 1; Resolution = Screen.resolutions[ResolutionStepper.Value]; diff --git a/Assets/src/LinearWindow.cs b/Assets/src/LinearWindow.cs new file mode 100644 index 00000000..50829f6e --- /dev/null +++ b/Assets/src/LinearWindow.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +/** + * Utility class to track a moving window of items in a list for which some + * predicate is true. + * + * The list given to this class must not change, and items must enter the window + * in ascending order of their index. They can exit the window in any order. + */ +public class LinearWindow { + public List Current { get; } = new(); + + private T[] AllItems; + private Action OnEnterWindow; + private Action OnExitWindow; + private int LastEnteredWindow = -1; + + public LinearWindow( + IEnumerable allItems, + Action onEnterWindow = null, + Action onExitWindow = null + ) { + AllItems = allItems.ToArray(); + OnEnterWindow = onEnterWindow; + OnExitWindow = onExitWindow; + } + + public void Update(Func predicate) { + Current + .Where(item => !predicate(item)) + .ToList() + .ForEach(item => { + Current.Remove(item); + OnExitWindow?.Invoke(item); + }); + + while (LastEnteredWindow < AllItems.Length - 1) { + T item = AllItems[LastEnteredWindow + 1]; + + if (predicate(item)) { + LastEnteredWindow++; + Current.Add(item); + OnEnterWindow?.Invoke(item); + } else { + break; + } + } + } + + public void RemoveEarly(T item) { + Current.Remove(item); + } +} diff --git a/Assets/src/LinearWindow.cs.meta b/Assets/src/LinearWindow.cs.meta new file mode 100644 index 00000000..c537c2e1 --- /dev/null +++ b/Assets/src/LinearWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d764386ed33914366a8caff74bc3335a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src/MidiParser.cs b/Assets/src/MidiParser.cs new file mode 100644 index 00000000..2ff3bcd4 --- /dev/null +++ b/Assets/src/MidiParser.cs @@ -0,0 +1,346 @@ +/** + * https://github.com/davidluzgouveia/midi-parser + * Retrieved 2025-12-21 + * + * MIT License + * + * Copyright (c) 2018 David Gouveia + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +namespace MidiParser { + using System; + using System.Collections.Generic; + using System.IO; + using System.Text; + + public class MidiFile { + public readonly int Format; + + public readonly int TicksPerQuarterNote; + + public readonly MidiTrack[] Tracks; + + public readonly int TracksCount; + + public MidiFile(Stream stream) : this(Reader.ReadAllBytesFromStream(stream)) { } + + public MidiFile(string path) : this(File.ReadAllBytes(path)) { } + + public MidiFile(byte[] data) { + var position = 0; + + if (Reader.ReadString(data, ref position, 4) != "MThd") { + throw new FormatException("Invalid file header (expected MThd)"); + } + + if (Reader.Read32(data, ref position) != 6) { + throw new FormatException("Invalid header length (expected 6)"); + } + + this.Format = Reader.Read16(data, ref position); + this.TracksCount = Reader.Read16(data, ref position); + this.TicksPerQuarterNote = Reader.Read16(data, ref position); + + if ((this.TicksPerQuarterNote & 0x8000) != 0) { + throw new FormatException("Invalid timing mode (SMPTE timecode not supported)"); + } + + this.Tracks = new MidiTrack[this.TracksCount]; + + for (var i = 0; i < this.TracksCount; i++) { + this.Tracks[i] = ParseTrack(i, data, ref position); + } + } + + private static bool ParseMetaEvent( + byte[] data, + ref int position, + byte metaEventType, + ref byte data1, + ref byte data2 + ) { + switch (metaEventType) { + case (byte)MetaEventType.Tempo: + var mspqn = (data[position + 1] << 16) | (data[position + 2] << 8) | data[position + 3]; + data1 = (byte)Math.Round(60000000.0 / mspqn); + position += 4; + return true; + + case (byte)MetaEventType.TimeSignature: + data1 = data[position + 1]; + data2 = (byte)Math.Pow(2.0, data[position + 2]); + position += 5; + return true; + + case (byte)MetaEventType.KeySignature: + data1 = data[position + 1]; + data2 = data[position + 2]; + position += 3; + return true; + + // Ignore Other Meta Events + default: + var length = Reader.ReadVarInt(data, ref position); + position += length; + return false; + } + } + + private static MidiTrack ParseTrack(int index, byte[] data, ref int position) { + if (Reader.ReadString(data, ref position, 4) != "MTrk") { + throw new FormatException("Invalid track header (expected MTrk)"); + } + + var trackLength = Reader.Read32(data, ref position); + var trackEnd = position + trackLength; + + var track = new MidiTrack { Index = index }; + var time = 0; + var status = (byte)0; + + while (position < trackEnd) { + time += Reader.ReadVarInt(data, ref position); + + var peekByte = data[position]; + + // If the most significant bit is set then this is a status byte + if ((peekByte & 0x80) != 0) { + status = peekByte; + ++position; + } + + // If the most significant nibble is not an 0xF this is a channel event + if ((status & 0xF0) != 0xF0) { + // Separate event type from channel into two + var eventType = (byte)(status & 0xF0); + var channel = (byte)((status & 0x0F) + 1); + + var data1 = data[position++]; + + // If the event type doesn't start with 0b110 it has two bytes of data (i.e. except 0xC0 and 0xD0) + var data2 = (eventType & 0xE0) != 0xC0 ? data[position++] : (byte)0; + + // Convert NoteOn events with 0 velocity into NoteOff events + if (eventType == (byte)MidiEventType.NoteOn && data2 == 0) { + eventType = (byte)MidiEventType.NoteOff; + } + + track.MidiEvents.Add( + new MidiEvent { + Time = time, + Type = eventType, + Arg1 = channel, + Arg2 = data1, + Arg3 = data2, + } + ); + } else { + if (status == 0xFF) { + // Meta Event + var metaEventType = Reader.Read8(data, ref position); + + // There is a group of meta event types reserved for text events which we store separately + if (metaEventType >= 0x01 && metaEventType <= 0x0F) { + var textLength = Reader.ReadVarInt(data, ref position); + var textValue = Reader.ReadString(data, ref position, textLength); + var textEvent = new TextEvent { + Time = time, + Type = metaEventType, + Value = textValue, + }; + track.TextEvents.Add(textEvent); + } else { + var data1 = (byte)0; + var data2 = (byte)0; + + // We only handle the few meta events we care about and skip the rest + if (ParseMetaEvent(data, ref position, metaEventType, ref data1, ref data2)) { + track.MidiEvents.Add( + new MidiEvent { + Time = time, + Type = status, + Arg1 = metaEventType, + Arg2 = data1, + Arg3 = data2, + } + ); + } + } + } else if (status == 0xF0 || status == 0xF7) { + // SysEx event + var length = Reader.ReadVarInt(data, ref position); + position += length; + } else { + ++position; + } + } + } + + return track; + } + + private static class Reader { + public static int Read16(byte[] data, ref int i) { + return (data[i++] << 8) | data[i++]; + } + + public static int Read32(byte[] data, ref int i) { + return (data[i++] << 24) | (data[i++] << 16) | (data[i++] << 8) | data[i++]; + } + + public static byte Read8(byte[] data, ref int i) { + return data[i++]; + } + + public static byte[] ReadAllBytesFromStream(Stream input) { + var buffer = new byte[16 * 1024]; + using (var ms = new MemoryStream()) { + int read; + while ((read = input.Read(buffer, 0, buffer.Length)) > 0) { + ms.Write(buffer, 0, read); + } + + return ms.ToArray(); + } + } + + public static string ReadString(byte[] data, ref int i, int length) { + var result = Encoding.ASCII.GetString(data, i, length); + i += length; + return result; + } + + public static int ReadVarInt(byte[] data, ref int i) { + var result = (int)data[i++]; + + if ((result & 0x80) == 0) { + return result; + } + + result &= 0x7F; + + for (var j = 0; j < 3; j++) { + var value = (int)data[i++]; + + result = (result << 7) | (value & 0x7F); + + if ((value & 0x80) == 0) { + break; + } + } + + return result; + } + } + } + + public class MidiTrack { + public int Index; + + public List MidiEvents = new List(); + + public List TextEvents = new List(); + } + + public struct MidiEvent { + public int Time; + + public byte Type; + + public byte Arg1; + + public byte Arg2; + + public byte Arg3; + + public MidiEventType MidiEventType => (MidiEventType)this.Type; + + public MetaEventType MetaEventType => (MetaEventType)this.Arg1; + + public int Channel => this.Arg1; + + public int Note => this.Arg2; + + public int Velocity => this.Arg3; + + public ControlChangeType ControlChangeType => (ControlChangeType)this.Arg2; + + public int Value => this.Arg3; + } + + public struct TextEvent { + public int Time; + + public byte Type; + + public string Value; + + public TextEventType TextEventType => (TextEventType)this.Type; + } + + public enum MidiEventType : byte { + NoteOff = 0x80, + + NoteOn = 0x90, + + KeyAfterTouch = 0xA0, + + ControlChange = 0xB0, + + ProgramChange = 0xC0, + + ChannelAfterTouch = 0xD0, + + PitchBendChange = 0xE0, + + MetaEvent = 0xFF, + } + + public enum ControlChangeType : byte { + BankSelect = 0x00, + + Modulation = 0x01, + + Volume = 0x07, + + Balance = 0x08, + + Pan = 0x0A, + + Sustain = 0x40, + } + + public enum TextEventType : byte { + Text = 0x01, + + TrackName = 0x03, + + Lyric = 0x05, + } + + public enum MetaEventType : byte { + Tempo = 0x51, + + TimeSignature = 0x58, + + KeySignature = 0x59, + } +} diff --git a/Assets/src/MidiParser.cs.meta b/Assets/src/MidiParser.cs.meta new file mode 100644 index 00000000..0bcb7026 --- /dev/null +++ b/Assets/src/MidiParser.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ab1653643aa6b4451923d854b260e4f1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src/OptionsMenuEvents.cs b/Assets/src/OptionsMenuEvents.cs index e0d6a724..7cc7963d 100644 --- a/Assets/src/OptionsMenuEvents.cs +++ b/Assets/src/OptionsMenuEvents.cs @@ -23,7 +23,7 @@ protected override void LocalStart() { } protected override void LocalUpdate() { - if (WrappedInput.Player.controllers.Joysticks.Count() >= 1) + if (WrappedInput.Player.controllers.Joysticks.Count >= 1) ControllerIconsGameObject.SetActive(true); } diff --git a/Assets/src/RhythmGame.cs b/Assets/src/RhythmGame.cs new file mode 100644 index 00000000..6c87088a --- /dev/null +++ b/Assets/src/RhythmGame.cs @@ -0,0 +1,197 @@ +using System.Collections.Generic; +using System.Linq; +using TMPro; +using UnityEngine; + +public class RhythmGame : MonoBehaviour { + public RhythmGameNotesView NotesView; + public TMP_Text ScoreText; + public TMP_Text NoteGradeText; + + /** + * Constants and scoring algorithm modified from the source code of Friday + * Night Funkin' and used under the following license: + * https://github.com/FunkinCrew/Funkin/blob/24250549406207988b2718f5a05bf31e5af7629e/LICENSE.md + */ + private const float MISS_THRESHOLD = 0.16f; + private const float DROP_THRESHOLD = 0.08f; + private const int MAX_NOTE_SCORE = 500; + private const int MIN_NOTE_SCORE = 9; + private const int MISS_NOTE_SCORE = -100; + private const float SCORING_SLOPE = 80f; + private const float SCORING_OFFSET = 0.05499f; + private const float HOLD_SCORE_PER_SECOND = 250f; + private const float DROP_SCORE_PER_SECOND = -125f; + + private readonly (float, string)[] NOTE_GRADES = { + (0.012f, "Poppin'"), + (0.045f, "Perfect"), + (0.09f, "Pretty good"), + (0.135f, "Poor"), + (MISS_THRESHOLD, "Pathetic"), + }; + + private LinearWindow PressableNotesWindow; + private Dictionary HeldNotes = new(); + private float Score = 0f; + private int MaxPossibleScore; + + void Start() { + RhythmGameSong song = RhythmGameSongParser.ParseMidi( + System.IO.Path.Combine(Application.streamingAssetsPath, "Rhythm Game Data", "Demo.mid") + ); + + PressableNotesWindow = new(song.Notes, onExitWindow: MissedNote); + NotesView.Init(song, getTime: () => CurrentTime); + + MaxPossibleScore = song + .Notes.Select(note => { + int perfectHitScore = ScoreNoteHit(0f); + int holdScore = (int)(note.Duration * HOLD_SCORE_PER_SECOND); + return perfectHitScore + holdScore; + }) + .Sum(); + + Debug.Log("Max possible score: " + MaxPossibleScore.ToString()); + + UpdateScore(0f); + } + + void Update() { + PressableNotesWindow.Update(note => + note.RelativeTime(CurrentTime) <= MISS_THRESHOLD + && note.RelativeTime(CurrentTime, end: true) >= -MISS_THRESHOLD + ); + + if (WrappedInput.GetButtonDown("Rhythm Game Left")) { + HandleButtonDown(RhythmGameNoteType.Left); + } + + if (WrappedInput.GetButtonDown("Rhythm Game Down")) { + HandleButtonDown(RhythmGameNoteType.Down); + } + + if (WrappedInput.GetButtonDown("Rhythm Game Up")) { + HandleButtonDown(RhythmGameNoteType.Up); + } + + if (WrappedInput.GetButtonDown("Rhythm Game Right")) { + HandleButtonDown(RhythmGameNoteType.Right); + } + + if (WrappedInput.GetButtonUp("Rhythm Game Left")) { + HandleButtonUp(RhythmGameNoteType.Left); + } + if (WrappedInput.GetButtonUp("Rhythm Game Down")) { + HandleButtonUp(RhythmGameNoteType.Down); + } + + if (WrappedInput.GetButtonUp("Rhythm Game Up")) { + HandleButtonUp(RhythmGameNoteType.Up); + } + + if (WrappedInput.GetButtonUp("Rhythm Game Right")) { + HandleButtonUp(RhythmGameNoteType.Right); + } + } + + private void HandleButtonDown(RhythmGameNoteType noteType) { + /** + * If there are multiple matching notes, return the earliest one so that + * notes are pressed in the correct order. + */ + RhythmGameNote note = PressableNotes.Find(note => note.Type == noteType); + + if (note == null) { + NoteNotFound(noteType); + } else { + HitNote(note); + } + } + + private void HandleButtonUp(RhythmGameNoteType noteType) { + if (HeldNotes.ContainsKey(noteType)) { + ReleaseNote(HeldNotes[noteType]); + } + } + + private void HitNote(RhythmGameNote note) { + PressableNotesWindow.RemoveEarly(note); + NotesView.HitNote(note); + + if (note.IsHold) { + HeldNotes.Add(note.Type, note); + } + + float relativeTime = Mathf.Abs(note.RelativeTime(CurrentTime)); + UpdateScore(ScoreNoteHit(relativeTime)); + ShowNoteGrade(GradeNoteHit(relativeTime)); + } + + private void ReleaseNote(RhythmGameNote note) { + float remainingDuration = note.RelativeTime(CurrentTime, end: true); + + bool closeEnough = remainingDuration <= DROP_THRESHOLD; + if (closeEnough) + remainingDuration = 0f; + + float heldDuration = note.Duration - remainingDuration; + + HeldNotes.Remove(note.Type); + NotesView.ReleaseNote(note, closeEnough: closeEnough); + + float holdScore = heldDuration * HOLD_SCORE_PER_SECOND; + float dropScore = remainingDuration * DROP_SCORE_PER_SECOND; + int scoreChange = (int)(holdScore + dropScore); + UpdateScore(scoreChange); + } + + private void MissedNote(RhythmGameNote note) { + ShowNoteGrade("Miss"); + UpdateScore(MISS_NOTE_SCORE); + } + + private void NoteNotFound(RhythmGameNoteType noteType) { + UpdateScore(MISS_NOTE_SCORE); + } + + private int ScoreNoteHit(float relativeTime) { + /** + * Although most misses are handled by MissedNote, this case can arise if a + * hold note is pressed late. + */ + if (relativeTime > MISS_THRESHOLD) + return MISS_NOTE_SCORE; + + /** + * Curve that outputs a value close to 1 at relativeTime = 0 and approaches + * 0 at approximately relativeTime = 0.15. + */ + float factor = 1f - 1f / (1f + Mathf.Exp(-SCORING_SLOPE * (relativeTime - SCORING_OFFSET))); + + return (int)(MAX_NOTE_SCORE * factor + MIN_NOTE_SCORE); + } + + private string GradeNoteHit(float relativeTime) { + foreach (var (threshold, label) in NOTE_GRADES) { + if (relativeTime <= threshold) + return label; + } + + return "Miss"; + } + + private void UpdateScore(float scoreChange) { + Score = Mathf.Max(0f, Score + scoreChange); + int maxScoreDigits = Mathf.CeilToInt(Mathf.Log10((float)MaxPossibleScore)); + ScoreText.text = Score.ToString().PadLeft(maxScoreDigits, '0'); + } + + private void ShowNoteGrade(string grade) { + NoteGradeText.text = grade; + } + + private float CurrentTime => Time.time; + + private List PressableNotes => PressableNotesWindow.Current; +} diff --git a/Assets/src/RhythmGame.cs.meta b/Assets/src/RhythmGame.cs.meta new file mode 100644 index 00000000..eec13056 --- /dev/null +++ b/Assets/src/RhythmGame.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: da791d72e319d492e9eb6f6d293b66a6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src/RhythmGameNote.cs b/Assets/src/RhythmGameNote.cs new file mode 100644 index 00000000..4728256f --- /dev/null +++ b/Assets/src/RhythmGameNote.cs @@ -0,0 +1,18 @@ +public enum RhythmGameNoteType { + Left = 0, + Down = 1, + Up = 2, + Right = 3, +}; + +public class RhythmGameNote { + public RhythmGameNoteType Type; + public float Time; + public float Duration = 0f; + + public bool IsHold => Duration > 0f; + public bool IsInstant => !IsHold; + + public float RelativeTime(float currentTime, bool end = false) => + Time - currentTime + (end ? Duration : 0f); +} diff --git a/Assets/src/RhythmGameNote.cs.meta b/Assets/src/RhythmGameNote.cs.meta new file mode 100644 index 00000000..d8fdfd3c --- /dev/null +++ b/Assets/src/RhythmGameNote.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e67268fe7ddb74764a5603a4b36aef8c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src/RhythmGameNoteSprite.cs b/Assets/src/RhythmGameNoteSprite.cs new file mode 100644 index 00000000..b7ed90e3 --- /dev/null +++ b/Assets/src/RhythmGameNoteSprite.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using UnityEngine.UI; + +public class RhythmGameNoteSprite : MonoBehaviour { + public Image Arrow; + public Image Trail; + public RectTransform ArrowTransform; + public RectTransform TrailTransform; + + public bool IsHolding { get; private set; } = false; + + private RhythmGameNote Note; + + public void Initialize(RhythmGameNote note, Color color, Quaternion rotation, float trailLength) { + Note = note; + Arrow.color = color; + Trail.color = color; + TrailTransform.sizeDelta = new Vector2(TrailTransform.sizeDelta.x, trailLength); + ArrowTransform.localRotation = rotation; + gameObject.SetActive(true); + } + + public void StartHolding() { + Arrow.enabled = false; + IsHolding = true; + } + + public void UpdateHolding(float time) { + float remainingDuration = Note.RelativeTime(time, end: true); + Trail.fillAmount = remainingDuration / Note.Duration; + } + + public void StopHolding(float time, bool closeEnough) { + IsHolding = false; + + if (closeEnough) { + Trail.enabled = false; + } else { + Trail.color = new Color(Trail.color.r, Trail.color.g, Trail.color.b, 0.5f); + } + } + + public float ArrowHeight => ArrowTransform.rect.height; +} diff --git a/Assets/src/RhythmGameNoteSprite.cs.meta b/Assets/src/RhythmGameNoteSprite.cs.meta new file mode 100644 index 00000000..24fd8a34 --- /dev/null +++ b/Assets/src/RhythmGameNoteSprite.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1a2ee74cef1fa490f899eb840223a9ef +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src/RhythmGameNotesView.cs b/Assets/src/RhythmGameNotesView.cs new file mode 100644 index 00000000..01377ea7 --- /dev/null +++ b/Assets/src/RhythmGameNotesView.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class RhythmGameNotesView : MonoBehaviour { + public float PixelsBetweenEachBeat; + public Transform LeftTarget; + public Transform DownTarget; + public Transform UpTarget; + public Transform RightTarget; + public RhythmGameNoteSprite NoteSpriteTemplate; + + private LinearWindow VisibleNotesWindow; + private Func GetTime; + private Dictionary NoteSprites = new(); + + private bool AfterFirstUpdate = false; + private float TargetY; + private float SpawnY; + private float DespawnY; + private float NoteSpeed; + + public void Init(RhythmGameSong song, Func getTime) { + VisibleNotesWindow = new(song.Notes, onEnterWindow: SpawnNote, onExitWindow: DespawnNote); + GetTime = getTime; + + TargetY = transform.InverseTransformPoint(LeftTarget.position).y; + + float noteSize = NoteSpriteTemplate.ArrowHeight; + float bottomOfScreen = GetComponent().rect.yMin; + float topOfScreen = GetComponent().rect.yMax; + SpawnY = bottomOfScreen - noteSize / 2f; + DespawnY = topOfScreen + noteSize / 2f; + + float secondsPerBeat = 60f / song.BeatsPerMinute; + NoteSpeed = PixelsBetweenEachBeat / secondsPerBeat; + } + + void Update() { + /** + * Do not spawn any notes during the first update, since the positions can + * be incorrect. + */ + if (!AfterFirstUpdate) { + AfterFirstUpdate = true; + return; + } + + VisibleNotesWindow.Update(note => + YPositionForNote(note) >= SpawnY && YPositionForNote(note, end: true) <= DespawnY + ); + + foreach (RhythmGameNote note in VisibleNotes) { + if (NoteSprites.ContainsKey(note)) { + RhythmGameNoteSprite noteSprite = NoteSprites[note]; + + // Update note position + float y = YPositionForNote(note); + Transform noteTransform = noteSprite.transform; + noteTransform.localPosition = new Vector2(noteTransform.localPosition.x, y); + + if (noteSprite.IsHolding) { + noteSprite.UpdateHolding(CurrentTime); + } + } + } + } + + public void HitNote(RhythmGameNote note) { + if (note.IsInstant) { + DespawnNote(note); + VisibleNotesWindow.RemoveEarly(note); + } else if (NoteSprites.ContainsKey(note)) { + NoteSprites[note].StartHolding(); + } + } + + public void ReleaseNote(RhythmGameNote note, bool closeEnough) { + if (NoteSprites.ContainsKey(note)) { + NoteSprites[note].StopHolding(CurrentTime, closeEnough: closeEnough); + } + } + + private float YPositionForNote(RhythmGameNote note, bool end = false) { + float distanceToTarget = note.RelativeTime(CurrentTime, end: end) * NoteSpeed; + return TargetY - distanceToTarget; + } + + private void SpawnNote(RhythmGameNote note) { + Transform target = TargetForNoteType(note.Type); + float spawnX = transform.InverseTransformPoint(target.position).x; + + GameObject noteSpriteGameObject = Instantiate(NoteSpriteTemplate.gameObject, transform); + RhythmGameNoteSprite noteSprite = noteSpriteGameObject.GetComponent(); + noteSprite.transform.localPosition = new Vector2(spawnX, SpawnY); + NoteSprites.Add(note, noteSprite); + + noteSprite.Initialize( + note: note, + color: target.GetComponent().color, + rotation: target.localRotation, + trailLength: note.Duration * NoteSpeed + ); + } + + private void DespawnNote(RhythmGameNote note) { + if (NoteSprites.ContainsKey(note)) { + Destroy(NoteSprites[note].gameObject); + NoteSprites.Remove(note); + } + } + + private Transform TargetForNoteType(RhythmGameNoteType noteType) { + switch (noteType) { + case RhythmGameNoteType.Left: + return LeftTarget; + + case RhythmGameNoteType.Down: + return DownTarget; + + case RhythmGameNoteType.Up: + return UpTarget; + + case RhythmGameNoteType.Right: + return RightTarget; + } + + throw new System.ArgumentException("Unexpected note type"); + } + + public List VisibleNotes => VisibleNotesWindow.Current; + private float CurrentTime => GetTime(); +} diff --git a/Assets/src/RhythmGameNotesView.cs.meta b/Assets/src/RhythmGameNotesView.cs.meta new file mode 100644 index 00000000..08fda7d9 --- /dev/null +++ b/Assets/src/RhythmGameNotesView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8112514d52eaa43adb5d0c47e84a79ed +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src/RhythmGameSong.cs b/Assets/src/RhythmGameSong.cs new file mode 100644 index 00000000..1f576fd9 --- /dev/null +++ b/Assets/src/RhythmGameSong.cs @@ -0,0 +1,6 @@ +using System.Collections.Generic; + +public class RhythmGameSong { + public float BeatsPerMinute; + public List Notes; +} diff --git a/Assets/src/RhythmGameSong.cs.meta b/Assets/src/RhythmGameSong.cs.meta new file mode 100644 index 00000000..cdfaa89d --- /dev/null +++ b/Assets/src/RhythmGameSong.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a123018e666484d48bd94845db490ef7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src/RhythmGameSongParser.cs b/Assets/src/RhythmGameSongParser.cs new file mode 100644 index 00000000..6921d5ef --- /dev/null +++ b/Assets/src/RhythmGameSongParser.cs @@ -0,0 +1,100 @@ +using System.Collections.Generic; +using MidiParser; + +public class RhythmGameSongParser { + /** + * Each of the four note types is mapped to F4, A4, C5 and E5 respectively + * (the gaps on a treble stave in C Major). If a note's duration should be + * taken into consideration, it should be shifted up one degree in the C Major + * scale (i.e. on a line instead of a gap). + */ + private readonly Dictionary MIDI_PITCH_DATA = new() + { + { 65, (RhythmGameNoteType.Left, false) }, // F4 + { 67, (RhythmGameNoteType.Left, true) }, // G4 + { 69, (RhythmGameNoteType.Down, false) }, // A4 + { 71, (RhythmGameNoteType.Down, true) }, // B4 + { 72, (RhythmGameNoteType.Up, false) }, // C5 + { 74, (RhythmGameNoteType.Up, true) }, // D5 + { 76, (RhythmGameNoteType.Right, false) }, // E5 + { 77, (RhythmGameNoteType.Right, true) }, // F5 + }; + + private List Notes = new(); + private int TicksPerBeat; + private float BeatsPerMinute = 120f; + private Dictionary NoteOnEvents = new(); + + public static RhythmGameSong ParseMidi(string path) { + MidiFile midi = new MidiFile(path); + + if (midi.Tracks.Length != 1) + throw new System.Exception("MIDI file should have exactly one track"); + + RhythmGameSongParser parser = new(ticksPerBeat: midi.TicksPerQuarterNote); + midi.Tracks[0].MidiEvents.ForEach(parser.ParseMidiEvent); + return parser.GetSong(); + } + + private RhythmGameSongParser(int ticksPerBeat) { + TicksPerBeat = ticksPerBeat; + } + + private void ParseMidiEvent(MidiEvent midiEvent) { + switch (midiEvent.MidiEventType) { + case MidiEventType.MetaEvent: + ParseMetaEvent(midiEvent); + break; + + case MidiEventType.NoteOn: + ParseNoteOn(midiEvent); + break; + + case MidiEventType.NoteOff: + ParseNoteOff(midiEvent); + break; + } + } + + private void ParseMetaEvent(MidiEvent midiEvent) { + if (midiEvent.MetaEventType == MetaEventType.Tempo) { + // TODO: Track a list of tempo change events on the song object + BeatsPerMinute = (int)midiEvent.Arg2; + } + } + + private void ParseNoteOn(MidiEvent midiEvent) { + /** + * Store the note on event so that we can reference it from the note off + * event. + */ + NoteOnEvents[midiEvent.Note] = midiEvent; + } + + private void ParseNoteOff(MidiEvent midiEvent) { + int pitch = midiEvent.Note; + var (type, isHold) = MIDI_PITCH_DATA[pitch]; + + float onTime = TicksToSeconds(NoteOnEvents[pitch].Time); + float offTime = TicksToSeconds(midiEvent.Time); + float actualDuration = offTime - onTime; + float effectiveDuration = isHold ? actualDuration : 0f; + + AddNote(type, onTime, effectiveDuration); + } + + private void AddNote(RhythmGameNoteType type, float time, float duration) { + Notes.Add( + new() + { + Type = type, + Time = time, + Duration = duration, + } + ); + } + + private float TicksToSeconds(float ticks) => ticks / TicksPerBeat * 60f / BeatsPerMinute; + + private RhythmGameSong GetSong() => new() { BeatsPerMinute = BeatsPerMinute, Notes = Notes }; +} diff --git a/Assets/src/RhythmGameSongParser.cs.meta b/Assets/src/RhythmGameSongParser.cs.meta new file mode 100644 index 00000000..76b6ddd8 --- /dev/null +++ b/Assets/src/RhythmGameSongParser.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 27cdff99b9c214117bcbaf8810202565 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: