From b4e8152d90bd8e415665bfde8704745d84c1d236 Mon Sep 17 00:00:00 2001 From: Carson Kompon Date: Mon, 7 Mar 2022 00:00:54 -0500 Subject: [PATCH] Working Drumming Practice --- .../Resources/Games/drummingPractice.prefab | 90 ++++ .../Sfx/games/drummingPractice/drum.ogg.meta | 22 + .../Sfx/games/drummingPractice/miss.ogg.meta | 22 + .../Animations/DrummerAnimator.controller | 107 +++- .../Animations/DrummerBop.anim | 148 ++---- .../Animations/DrummerHitLeft.anim | 9 +- .../Animations/DrummerHitRight.anim | 9 +- .../Animations/DrummerIdle.anim | 484 ++---------------- .../Scripts/Games/DrummingPractice/Drummer.cs | 59 +++ .../Games/DrummingPractice/DrummerHit.cs | 77 +++ .../Games/DrummingPractice/DrummerHit.cs.meta | 11 + .../DrummingPractice/DrummingPractice.cs | 67 ++- Assets/Scripts/Minigames.cs | 7 +- 13 files changed, 555 insertions(+), 557 deletions(-) create mode 100644 Assets/Resources/Sfx/games/drummingPractice/drum.ogg.meta create mode 100644 Assets/Resources/Sfx/games/drummingPractice/miss.ogg.meta create mode 100644 Assets/Scripts/Games/DrummingPractice/DrummerHit.cs create mode 100644 Assets/Scripts/Games/DrummingPractice/DrummerHit.cs.meta diff --git a/Assets/Resources/Games/drummingPractice.prefab b/Assets/Resources/Games/drummingPractice.prefab index 12eee3b3..8ce844a2 100644 --- a/Assets/Resources/Games/drummingPractice.prefab +++ b/Assets/Resources/Games/drummingPractice.prefab @@ -1,5 +1,92 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &1267604445988741763 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3533843519173060812} + m_Layer: 0 + m_Name: Hits + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3533843519173060812 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1267604445988741763} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 6252367538665576760} + m_Father: {fileID: 7248900333300803150} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2707293855688477128 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6252367538665576760} + - component: {fileID: 1376774670981630850} + m_Layer: 0 + m_Name: Hit + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &6252367538665576760 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2707293855688477128} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 3533843519173060812} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1376774670981630850 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2707293855688477128} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6a4698fb27db1ad4995391c5b6cd1ddb, type: 3} + m_Name: + m_EditorClassIdentifier: + inList: 0 + lastState: 0 + state: + gameObject: {fileID: 0} + early: 0 + perfect: 0 + late: 0 + createBeat: 0 + eligibleHitsList: [] + aceTimes: 0 + isEligible: 0 + triggersAutoplay: 1 + startBeat: 0 --- !u!1 &6253388915924582274 GameObject: m_ObjectHideFlags: 0 @@ -114,6 +201,7 @@ Transform: - {fileID: 7454105062301250827} - {fileID: 8362243043720385897} - {fileID: 4767419199465391264} + - {fileID: 3533843519173060812} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -135,6 +223,8 @@ MonoBehaviour: player: {fileID: 1392736437434169712} leftDrummer: {fileID: 12689295882508562} rightDrummer: {fileID: 3893632247804889307} + hitPrefab: {fileID: 2707293855688477128} + count: 0 --- !u!1 &8963803634876878173 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/Sfx/games/drummingPractice/drum.ogg.meta b/Assets/Resources/Sfx/games/drummingPractice/drum.ogg.meta new file mode 100644 index 00000000..8bd92682 --- /dev/null +++ b/Assets/Resources/Sfx/games/drummingPractice/drum.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6700bc1bfa3dcec47ba19227beb16ac6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sfx/games/drummingPractice/miss.ogg.meta b/Assets/Resources/Sfx/games/drummingPractice/miss.ogg.meta new file mode 100644 index 00000000..44007a54 --- /dev/null +++ b/Assets/Resources/Sfx/games/drummingPractice/miss.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4719f52b355bc9e48a08ca31f50338ef +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerAnimator.controller b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerAnimator.controller index 2a1ff988..568ef11d 100644 --- a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerAnimator.controller +++ b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerAnimator.controller @@ -8,9 +8,10 @@ AnimatorState: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: HitRight - m_Speed: 0.25 + m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: -2027018955617299144} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -34,9 +35,10 @@ AnimatorState: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Bop - m_Speed: 0.25 + m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: -4831383733179702630} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -60,9 +62,10 @@ AnimatorState: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: HitLeft - m_Speed: 0.25 + m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: 7579008626126242272} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -86,7 +89,7 @@ AnimatorState: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: PrepareRight - m_Speed: 0.25 + m_Speed: 1 m_CycleOffset: 0 m_Transitions: [] m_StateMachineBehaviours: [] @@ -104,6 +107,72 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: +--- !u!1101 &-5688770049663966888 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 6351492053978300819} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1101 &-4831383733179702630 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 6351492053978300819} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1101 &-2027018955617299144 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 6351492053978300819} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 --- !u!91 &9100000 AnimatorController: m_ObjectHideFlags: 0 @@ -134,7 +203,7 @@ AnimatorState: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: PrepareLeft - m_Speed: 0.25 + m_Speed: 1 m_CycleOffset: 0 m_Transitions: [] m_StateMachineBehaviours: [] @@ -178,6 +247,28 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: +--- !u!1101 &7579008626126242272 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 6351492053978300819} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 --- !u!1107 &8828564168240574946 AnimatorStateMachine: serializedVersion: 6 diff --git a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerBop.anim b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerBop.anim index 7e763600..9e120489 100644 --- a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerBop.anim +++ b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerBop.anim @@ -27,7 +27,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -52,7 +52,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -77,7 +77,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: 0, y: 0, z: 20} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -102,7 +102,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -127,7 +127,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: 0, y: 0, z: -20} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -153,16 +153,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.016666668 - value: {x: 0.02, y: -0.53, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: 0.02, y: -0.014337629, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -187,7 +178,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: -1.43, y: 0.12, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -212,7 +203,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: -0.088, y: 0.255, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -237,7 +228,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: 1.43, y: 0.12, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -262,7 +253,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: 0.088, y: 0.255, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -288,7 +279,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: {x: 1, y: 1, z: 1} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -313,15 +304,6 @@ AnimationClip: weightedMode: 0 inWeight: 0 outWeight: 0 - - serializedVersion: 3 - time: 0.13333334 - value: 3 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -341,15 +323,6 @@ AnimationClip: weightedMode: 0 inWeight: 0 outWeight: 0 - - serializedVersion: 3 - time: 0.13333334 - value: 3 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -361,7 +334,7 @@ AnimationClip: - curve: - time: 0 value: {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} - - time: 0.11666667 + - time: 0.083333336 value: {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} attribute: m_Sprite path: Body/LeftHand/LeftDrumstick @@ -370,7 +343,7 @@ AnimationClip: - curve: - time: 0 value: {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} - - time: 0.11666667 + - time: 0.083333336 value: {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} attribute: m_Sprite path: Body/RightHand/RightDrumstick @@ -498,7 +471,7 @@ AnimationClip: m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 - m_StopTime: 0.13333334 + m_StopTime: 0.1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 @@ -527,7 +500,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0.02 inSlope: 0 outSlope: 0 @@ -555,16 +528,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.016666668 - value: -0.53 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: -0.014337629 inSlope: 0 outSlope: 0 @@ -592,7 +556,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -620,7 +584,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -648,7 +612,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -676,7 +640,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -704,7 +668,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: -1.43 inSlope: 0 outSlope: 0 @@ -732,7 +696,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0.12 inSlope: 0 outSlope: 0 @@ -760,7 +724,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -788,7 +752,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -816,7 +780,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -844,7 +808,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -872,7 +836,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: -0.088 inSlope: 0 outSlope: 0 @@ -900,7 +864,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0.255 inSlope: 0 outSlope: 0 @@ -928,7 +892,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -956,7 +920,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -984,7 +948,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -1012,7 +976,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 20 inSlope: 0 outSlope: 0 @@ -1040,7 +1004,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 1.43 inSlope: 0 outSlope: 0 @@ -1068,7 +1032,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0.12 inSlope: 0 outSlope: 0 @@ -1096,7 +1060,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -1124,7 +1088,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -1152,7 +1116,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -1180,7 +1144,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -1208,7 +1172,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0.088 inSlope: 0 outSlope: 0 @@ -1236,7 +1200,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0.255 inSlope: 0 outSlope: 0 @@ -1264,7 +1228,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -1292,7 +1256,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -1320,7 +1284,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 0 inSlope: 0 outSlope: 0 @@ -1348,7 +1312,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: -20 inSlope: 0 outSlope: 0 @@ -1376,7 +1340,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 1 inSlope: 0 outSlope: 0 @@ -1404,7 +1368,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 1 inSlope: 0 outSlope: 0 @@ -1432,7 +1396,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.11666667 + time: 0.083333336 value: 1 inSlope: 0 outSlope: 0 @@ -1459,15 +1423,6 @@ AnimationClip: weightedMode: 0 inWeight: 0 outWeight: 0 - - serializedVersion: 3 - time: 0.13333334 - value: 3 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1487,15 +1442,6 @@ AnimationClip: weightedMode: 0 inWeight: 0 outWeight: 0 - - serializedVersion: 3 - time: 0.13333334 - value: 3 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 diff --git a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerHitLeft.anim b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerHitLeft.anim index 48a875a7..dada7a90 100644 --- a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerHitLeft.anim +++ b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerHitLeft.anim @@ -2148,4 +2148,11 @@ AnimationClip: script: {fileID: 0} m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 - m_Events: [] + m_Events: + - time: 0.016666668 + functionName: EndHit + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 diff --git a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerHitRight.anim b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerHitRight.anim index 5d5e1da7..a68aee94 100644 --- a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerHitRight.anim +++ b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerHitRight.anim @@ -2427,4 +2427,11 @@ AnimationClip: script: {fileID: 0} m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 - m_Events: [] + m_Events: + - time: 0.016666668 + functionName: EndHit + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 diff --git a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerIdle.anim b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerIdle.anim index 9c18c649..514b29e5 100644 --- a/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerIdle.anim +++ b/Assets/Resources/Sprites/Games/DrummingPractice/Animations/DrummerIdle.anim @@ -26,15 +26,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: 0, y: 0, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -51,15 +42,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: 0, y: 0, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -76,15 +58,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: 0, y: 0, z: 20} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -101,15 +74,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1.0166667 - value: {x: 0, y: 0, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -126,15 +90,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1.0166667 - value: {x: 0, y: 0, z: -20} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -152,15 +107,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: 0.02, y: -0.014337629, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -177,15 +123,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -1.43, y: 0.12, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -202,15 +139,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.088, y: 0.255, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -227,15 +155,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1.0166667 - value: {x: 1.43, y: 0.12, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -252,15 +171,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1.0166667 - value: {x: 0.088, y: 0.255, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -278,15 +188,6 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: 1, y: 1, z: 1} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -296,8 +197,6 @@ AnimationClip: - curve: - time: 0 value: {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} - - time: 1 - value: {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} attribute: m_Sprite path: Body/LeftHand/LeftDrumstick classID: 212 @@ -305,8 +204,6 @@ AnimationClip: - curve: - time: 0 value: {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} - - time: 1.0166667 - value: {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} attribute: m_Sprite path: Body/RightHand/RightDrumstick classID: 212 @@ -412,14 +309,12 @@ AnimationClip: pptrCurveMapping: - {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} - {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} - - {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} - - {fileID: -6295135488227773171, guid: 75ff12e8f30ba5a4aba0d8c4268d28a8, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 - m_StopTime: 1.0333333 + m_StopTime: 0.016666668 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 @@ -447,15 +342,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0.02 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -475,15 +361,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.014337629 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -503,15 +380,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -531,15 +399,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -559,15 +418,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -587,15 +437,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -615,15 +456,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -643,15 +475,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -671,15 +494,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -699,15 +513,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -1.43 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -727,15 +532,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0.12 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -755,15 +551,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -783,15 +570,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -811,15 +589,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -839,15 +608,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -867,15 +627,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -895,15 +646,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -923,15 +665,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 20 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -951,15 +684,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.088 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -979,15 +703,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0.255 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1007,15 +722,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1035,15 +741,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 1.43 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1063,15 +760,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0.12 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1091,15 +779,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1119,15 +798,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1147,15 +817,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1175,15 +836,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1203,15 +855,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0.088 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1231,15 +874,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0.255 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1259,15 +893,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1287,15 +912,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1315,15 +931,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1343,15 +950,6 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0166667 - value: -20 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -1367,7 +965,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.z - path: Body/RightHand + path: Body/LeftHand/LeftDrumstick classID: 4 script: {fileID: 0} - curve: @@ -1377,7 +975,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.y - path: Body/RightHand + path: Body/LeftHand/LeftDrumstick classID: 4 script: {fileID: 0} - curve: @@ -1387,7 +985,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.x - path: Body/RightHand + path: Body/LeftHand/LeftDrumstick classID: 4 script: {fileID: 0} - curve: @@ -1397,7 +995,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.z - path: Body + path: Body/RightHand/RightDrumstick classID: 4 script: {fileID: 0} - curve: @@ -1407,7 +1005,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.y - path: Body + path: Body/RightHand/RightDrumstick classID: 4 script: {fileID: 0} - curve: @@ -1417,7 +1015,37 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.x - path: Body + path: Body/RightHand/RightDrumstick + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: Body/RightHand + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: Body/RightHand + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: Body/RightHand classID: 4 script: {fileID: 0} - curve: @@ -1456,8 +1084,8 @@ AnimationClip: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - attribute: m_LocalEulerAngles.z - path: Body/LeftHand/LeftDrumstick + attribute: m_LocalEulerAngles.x + path: Body classID: 4 script: {fileID: 0} - curve: @@ -1467,37 +1095,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.y - path: Body/LeftHand/LeftDrumstick - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: [] - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalEulerAngles.x - path: Body/LeftHand/LeftDrumstick - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: [] - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalEulerAngles.x - path: Body/RightHand/RightDrumstick - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: [] - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalEulerAngles.y - path: Body/RightHand/RightDrumstick + path: Body classID: 4 script: {fileID: 0} - curve: @@ -1507,7 +1105,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.z - path: Body/RightHand/RightDrumstick + path: Body classID: 4 script: {fileID: 0} m_HasGenericRootTransform: 0 diff --git a/Assets/Scripts/Games/DrummingPractice/Drummer.cs b/Assets/Scripts/Games/DrummingPractice/Drummer.cs index dcb4eb3a..0ea2d27a 100644 --- a/Assets/Scripts/Games/DrummingPractice/Drummer.cs +++ b/Assets/Scripts/Games/DrummingPractice/Drummer.cs @@ -17,7 +17,11 @@ namespace RhythmHeavenMania.Games.DrummingPractice public SpriteRenderer face; public bool player = false; + public int mii = 0; + public int count = 0; + + private bool hitting = false; [System.Serializable] public class MiiFace @@ -25,5 +29,60 @@ namespace RhythmHeavenMania.Games.DrummingPractice public List Sprites; } + private void Update() + { + if (player && PlayerInput.Pressed()) + { + Hit(false); + } + } + + public void SetFace(int type) + { + face.sprite = miiFaces[mii].Sprites[type]; + } + + public void Bop() + { + if (animator.IsAnimationNotPlaying()) + animator.Play("Bop", 0, 0); + } + + public void Prepare(int type) + { + count = type; + if (count % 2 == 0) + animator.Play("PrepareLeft", 0, 0); + else + animator.Play("PrepareRight", 0, 0); + } + + public void Hit(bool hit) + { + if (!hitting) + { + if (count % 2 == 0) + animator.Play("HitLeft", 0, 0); + else + animator.Play("HitRight", 0, 0); + count++; + + if (player) + { + if (hit) + Jukebox.PlayOneShotGame("drummingPractice/hit"); + else + Jukebox.PlayOneShotGame("drummingPractice/miss"); + } + + hitting = true; + } + } + + public void EndHit() + { + hitting = false; + } + } } \ No newline at end of file diff --git a/Assets/Scripts/Games/DrummingPractice/DrummerHit.cs b/Assets/Scripts/Games/DrummingPractice/DrummerHit.cs new file mode 100644 index 00000000..47ef89d1 --- /dev/null +++ b/Assets/Scripts/Games/DrummingPractice/DrummerHit.cs @@ -0,0 +1,77 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +using RhythmHeavenMania.Util; + +namespace RhythmHeavenMania.Games.DrummingPractice +{ + public class DrummerHit : PlayerActionObject + { + public float startBeat; + private bool hit = false; + private bool hasHit = false; + + // Start is called before the first frame update + void Start() + { + PlayerActionInit(gameObject, startBeat); + } + + public override void OnAce() + { + Hit(true); + } + + // Update is called once per frame + void Update() + { + if (Conductor.instance.GetPositionFromBeat(startBeat, 2) >= 1) + { + DrummingPractice.instance.SetFaces(0); + CleanUp(); + } + + if (!hit && Conductor.instance.GetPositionFromBeat(startBeat, 1) >= 1) + { + Jukebox.PlayOneShotGame("drummingPractice/drum"); + DrummingPractice.instance.leftDrummer.Hit(true); + DrummingPractice.instance.rightDrummer.Hit(true); + hit = true; + if (hasHit) CleanUp(); + } + + float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, 1f); + StateCheck(normalizedBeat); + + if (PlayerInput.Pressed()) + { + if (state.perfect) + { + Hit(true); + } else if (state.notPerfect()) + { + Hit(false); + } + } + } + + public void Hit(bool _hit) + { + if (!hasHit) + { + DrummingPractice.instance.player.Hit(_hit); + DrummingPractice.instance.SetFaces(_hit ? 1 : 2); + + hasHit = true; + + if (hit) CleanUp(); + } + } + + public void CleanUp() + { + Destroy(gameObject); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Games/DrummingPractice/DrummerHit.cs.meta b/Assets/Scripts/Games/DrummingPractice/DrummerHit.cs.meta new file mode 100644 index 00000000..7a14ec4c --- /dev/null +++ b/Assets/Scripts/Games/DrummingPractice/DrummerHit.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6a4698fb27db1ad4995391c5b6cd1ddb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs b/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs index cc942218..862a9c44 100644 --- a/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs +++ b/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs @@ -15,7 +15,10 @@ namespace RhythmHeavenMania.Games.DrummingPractice public Drummer player; public Drummer leftDrummer; public Drummer rightDrummer; + public GameObject hitPrefab; + public GameEvent bop = new GameEvent(); + public int count = 0; public static DrummingPractice instance; @@ -24,9 +27,71 @@ namespace RhythmHeavenMania.Games.DrummingPractice instance = this; } + // TODO: Move this to OnGameSwitch() when functional? + private void Start() + { + player.mii = UnityEngine.Random.Range(0, player.miiFaces.Count); + do + { + leftDrummer.mii = UnityEngine.Random.Range(0, leftDrummer.miiFaces.Count); + } + while (leftDrummer.mii == player.mii); + do + { + rightDrummer.mii = UnityEngine.Random.Range(0, rightDrummer.miiFaces.Count); + } + while (rightDrummer.mii == leftDrummer.mii || rightDrummer.mii == player.mii); + + SetFaces(0); + } + private void Update() { - + if (Conductor.instance.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1)) + { + if (Conductor.instance.songPositionInBeats >= bop.startBeat && Conductor.instance.songPositionInBeats < bop.startBeat + bop.length) + { + Bop(); + } + } + } + + public void SetBop(float beat, float length) + { + bop.startBeat = beat; + bop.length = length; + } + + public void Bop() + { + player.Bop(); + leftDrummer.Bop(); + rightDrummer.Bop(); + } + + public void Prepare(float beat) + { + int type = count % 2; + player.Prepare(type); + leftDrummer.Prepare(type); + rightDrummer.Prepare(type); + count++; + + SetFaces(0); + Jukebox.PlayOneShotGame("drummingPractice/prepare"); + + GameObject hit = Instantiate(hitPrefab); + hit.transform.parent = hitPrefab.transform.parent; + hit.SetActive(true); + DrummerHit h = hit.GetComponent(); + h.startBeat = beat; + } + + public void SetFaces(int type) + { + player.SetFace(type); + leftDrummer.SetFace(type); + rightDrummer.SetFace(type); } } diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index d1371989..51b77fa8 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -18,6 +18,7 @@ using RhythmHeavenMania.Games.TapTrial; using RhythmHeavenMania.Games.CropStomp; using RhythmHeavenMania.Games.WizardsWaltz; using RhythmHeavenMania.Games.MrUpbeat; +using RhythmHeavenMania.Games.DrummingPractice; namespace RhythmHeavenMania { @@ -383,9 +384,11 @@ namespace RhythmHeavenMania new Param("toggle", false, "Applause") }), }), - new Minigame("drummingPractice", "Drumming Practice \n[WIP don't use]", "2BCF33", false, false, new List() + new Minigame("drummingPractice", "Drumming Practice", "2BCF33", false, false, new List() { - + new GameAction("bop", delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.SetBop(e.beat, e.length); }, 0.5f, true), + new GameAction("drum", delegate { DrummingPractice.instance.Prepare(eventCaller.currentEntity.beat); }, 2f), + }), /*new Minigame("spaceDance", "Space Dance", "B888F8", new List() {