diff --git a/Assets/Resources/Music/theclappytrio.ogg b/Assets/Resources/Music/theclappytrio.ogg index 8553fcd7..4be14e2d 100644 Binary files a/Assets/Resources/Music/theclappytrio.ogg and b/Assets/Resources/Music/theclappytrio.ogg differ diff --git a/Assets/Resources/Sfx/audience.meta b/Assets/Resources/Sfx/audience.meta new file mode 100644 index 00000000..cf12ed21 --- /dev/null +++ b/Assets/Resources/Sfx/audience.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dcfa148ffe94506408bee37513c44816 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sfx/disappointed.ogg b/Assets/Resources/Sfx/audience/disappointed.ogg similarity index 100% rename from Assets/Resources/Sfx/disappointed.ogg rename to Assets/Resources/Sfx/audience/disappointed.ogg diff --git a/Assets/Resources/Sfx/disappointed.ogg.meta b/Assets/Resources/Sfx/audience/disappointed.ogg.meta similarity index 100% rename from Assets/Resources/Sfx/disappointed.ogg.meta rename to Assets/Resources/Sfx/audience/disappointed.ogg.meta diff --git a/Assets/Resources/Sfx/games.meta b/Assets/Resources/Sfx/games.meta new file mode 100644 index 00000000..d5b14f50 --- /dev/null +++ b/Assets/Resources/Sfx/games.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 503f493dccd32fc4bbcfd74dd6d41a3b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sfx/games/clappyTrio.meta b/Assets/Resources/Sfx/games/clappyTrio.meta new file mode 100644 index 00000000..cc73993f --- /dev/null +++ b/Assets/Resources/Sfx/games/clappyTrio.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8d002d5876b37374780aafaa5d67d0d9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sfx/games/clappyTrio/leftClap.ogg b/Assets/Resources/Sfx/games/clappyTrio/leftClap.ogg new file mode 100644 index 00000000..47eab8f5 Binary files /dev/null and b/Assets/Resources/Sfx/games/clappyTrio/leftClap.ogg differ diff --git a/Assets/Resources/Sfx/games/clappyTrio/leftClap.ogg.meta b/Assets/Resources/Sfx/games/clappyTrio/leftClap.ogg.meta new file mode 100644 index 00000000..e258ddeb --- /dev/null +++ b/Assets/Resources/Sfx/games/clappyTrio/leftClap.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: dd892336a06fd17418547cd47a9e91cc +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/clappyTrio/middleClap.ogg b/Assets/Resources/Sfx/games/clappyTrio/middleClap.ogg new file mode 100644 index 00000000..40a67153 Binary files /dev/null and b/Assets/Resources/Sfx/games/clappyTrio/middleClap.ogg differ diff --git a/Assets/Resources/Sfx/games/clappyTrio/middleClap.ogg.meta b/Assets/Resources/Sfx/games/clappyTrio/middleClap.ogg.meta new file mode 100644 index 00000000..f5d8d1ca --- /dev/null +++ b/Assets/Resources/Sfx/games/clappyTrio/middleClap.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 76818ab5cd344c945a3650ed340d4171 +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/clappyTrio/ready.ogg b/Assets/Resources/Sfx/games/clappyTrio/ready.ogg new file mode 100644 index 00000000..d19b2607 Binary files /dev/null and b/Assets/Resources/Sfx/games/clappyTrio/ready.ogg differ diff --git a/Assets/Resources/Sfx/games/clappyTrio/ready.ogg.meta b/Assets/Resources/Sfx/games/clappyTrio/ready.ogg.meta new file mode 100644 index 00000000..fb8ffa6f --- /dev/null +++ b/Assets/Resources/Sfx/games/clappyTrio/ready.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: acc74319ea85b7144820a1c755fe1b5b +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/clappyTrio/rightClap.ogg b/Assets/Resources/Sfx/games/clappyTrio/rightClap.ogg new file mode 100644 index 00000000..f43eb4b5 Binary files /dev/null and b/Assets/Resources/Sfx/games/clappyTrio/rightClap.ogg differ diff --git a/Assets/Resources/Sfx/games/clappyTrio/rightClap.ogg.meta b/Assets/Resources/Sfx/games/clappyTrio/rightClap.ogg.meta new file mode 100644 index 00000000..637e982d --- /dev/null +++ b/Assets/Resources/Sfx/games/clappyTrio/rightClap.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 42dc53c9d7d73fd4f90e89af21bd246c +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/clappyTrio/sign.ogg b/Assets/Resources/Sfx/games/clappyTrio/sign.ogg new file mode 100644 index 00000000..0d5d9638 Binary files /dev/null and b/Assets/Resources/Sfx/games/clappyTrio/sign.ogg differ diff --git a/Assets/Resources/Sfx/games/clappyTrio/sign.ogg.meta b/Assets/Resources/Sfx/games/clappyTrio/sign.ogg.meta new file mode 100644 index 00000000..154996ff --- /dev/null +++ b/Assets/Resources/Sfx/games/clappyTrio/sign.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 459c830aa2f50a2438b7ca6b9395fa8d +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/forkLifter.meta b/Assets/Resources/Sfx/games/forkLifter.meta new file mode 100644 index 00000000..c7984d67 --- /dev/null +++ b/Assets/Resources/Sfx/games/forkLifter.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab98aceb5b4d3d141bec52af5ea13096 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sfx/burger.ogg b/Assets/Resources/Sfx/games/forkLifter/burger.ogg similarity index 100% rename from Assets/Resources/Sfx/burger.ogg rename to Assets/Resources/Sfx/games/forkLifter/burger.ogg diff --git a/Assets/Resources/Sfx/burger.ogg.meta b/Assets/Resources/Sfx/games/forkLifter/burger.ogg.meta similarity index 100% rename from Assets/Resources/Sfx/burger.ogg.meta rename to Assets/Resources/Sfx/games/forkLifter/burger.ogg.meta diff --git a/Assets/Resources/Sfx/cough_1.wav b/Assets/Resources/Sfx/games/forkLifter/cough_1.wav similarity index 100% rename from Assets/Resources/Sfx/cough_1.wav rename to Assets/Resources/Sfx/games/forkLifter/cough_1.wav diff --git a/Assets/Resources/Sfx/cough_1.wav.meta b/Assets/Resources/Sfx/games/forkLifter/cough_1.wav.meta similarity index 100% rename from Assets/Resources/Sfx/cough_1.wav.meta rename to Assets/Resources/Sfx/games/forkLifter/cough_1.wav.meta diff --git a/Assets/Resources/Sfx/cough_2.wav b/Assets/Resources/Sfx/games/forkLifter/cough_2.wav similarity index 100% rename from Assets/Resources/Sfx/cough_2.wav rename to Assets/Resources/Sfx/games/forkLifter/cough_2.wav diff --git a/Assets/Resources/Sfx/cough_2.wav.meta b/Assets/Resources/Sfx/games/forkLifter/cough_2.wav.meta similarity index 100% rename from Assets/Resources/Sfx/cough_2.wav.meta rename to Assets/Resources/Sfx/games/forkLifter/cough_2.wav.meta diff --git a/Assets/Resources/Sfx/flick.ogg b/Assets/Resources/Sfx/games/forkLifter/flick.ogg similarity index 100% rename from Assets/Resources/Sfx/flick.ogg rename to Assets/Resources/Sfx/games/forkLifter/flick.ogg diff --git a/Assets/Resources/Sfx/flick.ogg.meta b/Assets/Resources/Sfx/games/forkLifter/flick.ogg.meta similarity index 100% rename from Assets/Resources/Sfx/flick.ogg.meta rename to Assets/Resources/Sfx/games/forkLifter/flick.ogg.meta diff --git a/Assets/Resources/Sfx/flickPrepare.ogg b/Assets/Resources/Sfx/games/forkLifter/flickPrepare.ogg similarity index 100% rename from Assets/Resources/Sfx/flickPrepare.ogg rename to Assets/Resources/Sfx/games/forkLifter/flickPrepare.ogg diff --git a/Assets/Resources/Sfx/flickPrepare.ogg.meta b/Assets/Resources/Sfx/games/forkLifter/flickPrepare.ogg.meta similarity index 100% rename from Assets/Resources/Sfx/flickPrepare.ogg.meta rename to Assets/Resources/Sfx/games/forkLifter/flickPrepare.ogg.meta diff --git a/Assets/Resources/Sfx/gulp.ogg b/Assets/Resources/Sfx/games/forkLifter/gulp.ogg similarity index 100% rename from Assets/Resources/Sfx/gulp.ogg rename to Assets/Resources/Sfx/games/forkLifter/gulp.ogg diff --git a/Assets/Resources/Sfx/gulp.ogg.meta b/Assets/Resources/Sfx/games/forkLifter/gulp.ogg.meta similarity index 100% rename from Assets/Resources/Sfx/gulp.ogg.meta rename to Assets/Resources/Sfx/games/forkLifter/gulp.ogg.meta diff --git a/Assets/Resources/Sfx/sigh.ogg b/Assets/Resources/Sfx/games/forkLifter/sigh.ogg similarity index 100% rename from Assets/Resources/Sfx/sigh.ogg rename to Assets/Resources/Sfx/games/forkLifter/sigh.ogg diff --git a/Assets/Resources/Sfx/sigh.ogg.meta b/Assets/Resources/Sfx/games/forkLifter/sigh.ogg.meta similarity index 100% rename from Assets/Resources/Sfx/sigh.ogg.meta rename to Assets/Resources/Sfx/games/forkLifter/sigh.ogg.meta diff --git a/Assets/Resources/Sfx/stab.ogg b/Assets/Resources/Sfx/games/forkLifter/stab.ogg similarity index 100% rename from Assets/Resources/Sfx/stab.ogg rename to Assets/Resources/Sfx/games/forkLifter/stab.ogg diff --git a/Assets/Resources/Sfx/stab.ogg.meta b/Assets/Resources/Sfx/games/forkLifter/stab.ogg.meta similarity index 100% rename from Assets/Resources/Sfx/stab.ogg.meta rename to Assets/Resources/Sfx/games/forkLifter/stab.ogg.meta diff --git a/Assets/Resources/Sfx/stabnohit.ogg b/Assets/Resources/Sfx/games/forkLifter/stabnohit.ogg similarity index 100% rename from Assets/Resources/Sfx/stabnohit.ogg rename to Assets/Resources/Sfx/games/forkLifter/stabnohit.ogg diff --git a/Assets/Resources/Sfx/stabnohit.ogg.meta b/Assets/Resources/Sfx/games/forkLifter/stabnohit.ogg.meta similarity index 100% rename from Assets/Resources/Sfx/stabnohit.ogg.meta rename to Assets/Resources/Sfx/games/forkLifter/stabnohit.ogg.meta diff --git a/Assets/Resources/Sfx/zoom.ogg b/Assets/Resources/Sfx/games/forkLifter/zoom.ogg similarity index 100% rename from Assets/Resources/Sfx/zoom.ogg rename to Assets/Resources/Sfx/games/forkLifter/zoom.ogg diff --git a/Assets/Resources/Sfx/zoom.ogg.meta b/Assets/Resources/Sfx/games/forkLifter/zoom.ogg.meta similarity index 100% rename from Assets/Resources/Sfx/zoom.ogg.meta rename to Assets/Resources/Sfx/games/forkLifter/zoom.ogg.meta diff --git a/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Bop.anim b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Bop.anim index 5174da8b..ec7284df 100644 --- a/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Bop.anim +++ b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Bop.anim @@ -614,7 +614,7 @@ AnimationClip: m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Clap.anim b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Clap.anim index 6dc35ca7..72c40570 100644 --- a/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Clap.anim +++ b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Clap.anim @@ -1050,7 +1050,7 @@ AnimationClip: m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Lion.controller b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Lion.controller index 5d1e205f..75cdc27f 100644 --- a/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Lion.controller +++ b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Lion.controller @@ -11,13 +11,16 @@ AnimatorStateMachine: m_ChildStates: - serializedVersion: 1 m_State: {fileID: 7320893320788749144} - m_Position: {x: 200, y: 0, z: 0} + m_Position: {x: 240, y: 30, z: 0} - serializedVersion: 1 m_State: {fileID: -4950955777122167105} - m_Position: {x: 235, y: 65, z: 0} + m_Position: {x: 240, y: -40, z: 0} - serializedVersion: 1 m_State: {fileID: -8011133457666120507} - m_Position: {x: 270, y: 130, z: 0} + m_Position: {x: 470, y: -40, z: 0} + - serializedVersion: 1 + m_State: {fileID: -2876685237385873646} + m_Position: {x: 470, y: 160, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] @@ -64,7 +67,8 @@ AnimatorState: m_Name: Bop m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: 8629958454042916054} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -80,6 +84,32 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: +--- !u!1102 &-2876685237385873646 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Prepare + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 1784136f181a33a4ab11824766b13d17, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: --- !u!91 &9100000 AnimatorController: m_ObjectHideFlags: 0 @@ -128,3 +158,25 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: +--- !u!1101 &8629958454042916054 +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: 7320893320788749144} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_ExitTime: 0 + m_HasExitTime: 1 + m_HasFixedDuration: 0 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 diff --git a/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Prepare.anim b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Prepare.anim new file mode 100644 index 00000000..a0d7dc7e --- /dev/null +++ b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Prepare.anim @@ -0,0 +1,813 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Prepare + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: -16.664} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: tail + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: -7.108} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Hands/handleft + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: -3.017, y: -2.119, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: wig + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: -2.997, y: -2.371, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: head_1 + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: -3.074, y: -3.116, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: torso + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: -3.622, y: -3.219, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: tail + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: -3.811, y: -2.484, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Hands/handleft + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: -2.306, y: -2.557, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Hands/handright + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 21300000, guid: 13f2b670460cb5348bf4f5bdf0b41a0d, type: 3} + attribute: m_Sprite + path: test (1) + classID: 212 + script: {fileID: 0} + - curve: + - time: 0 + value: {fileID: -3367980279426714170, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + attribute: m_Sprite + path: legs_2 + classID: 212 + script: {fileID: 0} + - curve: + - time: 0 + value: {fileID: -3056181920306362907, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + attribute: m_Sprite + path: Hands/handleft + classID: 212 + script: {fileID: 0} + - curve: + - time: 0 + value: {fileID: -2416298612415578532, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + attribute: m_Sprite + path: Hands/handright + classID: 212 + script: {fileID: 0} + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 131153305 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + - serializedVersion: 2 + path: 2593431319 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + - serializedVersion: 2 + path: 986104082 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + - serializedVersion: 2 + path: 73026576 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + - serializedVersion: 2 + path: 3373695954 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2752407186 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 660585605 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2084025437 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 986104082 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 73026576 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2084025437 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 986104082 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + pptrCurveMapping: + - {fileID: 21300000, guid: 13f2b670460cb5348bf4f5bdf0b41a0d, type: 3} + - {fileID: -3367980279426714170, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + - {fileID: -3056181920306362907, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + - {fileID: -2416298612415578532, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.016666668 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -3.017 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: wig + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -2.119 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: wig + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: wig + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -2.997 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: head_1 + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -2.371 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: head_1 + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: head_1 + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -3.074 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: torso + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -3.116 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: torso + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: torso + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -3.622 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: tail + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -3.219 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: tail + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: tail + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: tail + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: tail + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -16.664 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: tail + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -3.811 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Hands/handleft + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -2.484 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Hands/handleft + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Hands/handleft + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: Hands/handleft + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: Hands/handleft + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -7.108 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: Hands/handleft + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -2.306 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Hands/handright + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -2.557 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Hands/handright + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Hands/handright + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: tail + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: tail + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: tail + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: Hands/handleft + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: Hands/handleft + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: Hands/handleft + classID: 4 + script: {fileID: 0} + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Prepare.anim.meta b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Prepare.anim.meta new file mode 100644 index 00000000..a060fd7a --- /dev/null +++ b/Assets/Resources/Sprites/Games/ClappyTrio/Animations/Prepare.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1784136f181a33a4ab11824766b13d17 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/ClappyTrio/GameSprites.png.meta b/Assets/Resources/Sprites/Games/ClappyTrio/GameSprites.png.meta index 3645dfd8..204ce0e0 100644 --- a/Assets/Resources/Sprites/Games/ClappyTrio/GameSprites.png.meta +++ b/Assets/Resources/Sprites/Games/ClappyTrio/GameSprites.png.meta @@ -113,7 +113,7 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: 0 + filterMode: 1 aniso: 1 mipBias: 0 wrapU: 1 @@ -696,7 +696,7 @@ TextureImporter: width: 94 height: 118 alignment: 0 - pivot: {x: 0, y: 0} + pivot: {x: 0.5, y: 0.5} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -717,7 +717,7 @@ TextureImporter: width: 102 height: 94 alignment: 0 - pivot: {x: 0, y: 0} + pivot: {x: 0.5, y: 0.5} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -738,7 +738,7 @@ TextureImporter: width: 54 height: 94 alignment: 0 - pivot: {x: 0, y: 0} + pivot: {x: 0.5, y: 0.5} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index be741fcb..e403cf30 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -132,6 +132,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 49975355} + - component: {fileID: 49975356} m_Layer: 0 m_Name: clappyTrio m_TagString: Untagged @@ -155,6 +156,25 @@ Transform: m_Father: {fileID: 1923614611} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &49975356 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 49975354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a7c8ebd2f1b0ce448acc55b6f6608e15, type: 3} + m_Name: + m_EditorClassIdentifier: + LionLeft: {fileID: 1962334731} + faces: + - {fileID: -5723618315912617923, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + - {fileID: -2914173702609090789, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + - {fileID: -7678601869563919383, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + - {fileID: -7561877552320588135, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} + - {fileID: 1205416701152040810, guid: bfb4e4bb08acdb14792cdd4c46253ab0, type: 3} --- !u!1 &142958109 GameObject: m_ObjectHideFlags: 0 @@ -2670,7 +2690,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 767089604} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 5.77772, y: 0, z: 0} + m_LocalPosition: {x: 5.7654, y: 0, z: 0} m_LocalScale: {x: -1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 325946116} @@ -6635,7 +6655,7 @@ MonoBehaviour: currentEvent: 0 currentPlayerEvent: 0 txt: {fileID: 4900000, guid: 13908201c7935ea4c8e9d2a58b006b87, type: 3} - startOffset: 1 + startOffset: 0 --- !u!212 &2072389418 SpriteRenderer: m_ObjectHideFlags: 0 @@ -6757,7 +6777,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: -120 + m_SortingOrder: 30 m_Sprite: {fileID: 21300000, guid: 523719bd3643eea4e8b4e418b4571b7a, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 0.3764706} m_FlipX: 0 diff --git a/Assets/Scripts/EventCaller.cs b/Assets/Scripts/EventCaller.cs index 01545664..8db2ee15 100644 --- a/Assets/Scripts/EventCaller.cs +++ b/Assets/Scripts/EventCaller.cs @@ -14,6 +14,7 @@ namespace RhythmHeavenMania { public Transform GamesHolder; private float currentBeat; + private float currentLength; public delegate void EventCallback(); @@ -69,7 +70,12 @@ namespace RhythmHeavenMania }), new MiniGame("clappyTrio", new List() { - new GameAction("clap", delegate { Debug.Log("bruh"); }, true ), + // Claps + new GameAction("clap", delegate { ClappyTrio.instance.Clap(currentBeat, currentLength); }, true ), + + + new GameAction("prepare_0", delegate { ClappyTrio.instance.Prepare(0); }, true ), + new GameAction("prepare_4", delegate { ClappyTrio.instance.Prepare(4); }, true ), }) }; @@ -108,11 +114,14 @@ namespace RhythmHeavenMania try { + currentLength = GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent].length; + GameAction action = game.actions.Find(c => c.actionName == details[1]); action.function.Invoke(); if (action.playerAction == true) GameManager.instance.currentPlayerEvent++; + } catch (Exception ex) { diff --git a/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs b/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs index fef4fdd6..000a187e 100644 --- a/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs +++ b/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs @@ -2,13 +2,100 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using RhythmHeavenMania.Util; + namespace RhythmHeavenMania.Games.ClappyTrio { public class ClappyTrio : MonoBehaviour { - void Start() + [SerializeField] private GameObject LionLeft; + private GameObject LionMiddle; + private GameObject LionPlayer; + + [SerializeField] private Sprite[] faces; + + private bool isClapping; + private float currentClappingLength; + private float lastClapStart; + private int clapIndex; + + public static ClappyTrio instance { get; set; } + + private void Awake() { - Debug.Log("ClappyTrio"); + instance = this; + } + + private void Start() + { + LionMiddle = Instantiate(LionLeft, LionLeft.transform.parent); + LionMiddle.transform.localPosition = new Vector3(3.1f, 0); + + LionPlayer = Instantiate(LionLeft, LionLeft.transform.parent); + LionPlayer.transform.localPosition = new Vector3(6.2f, 0); + } + + private void Update() + { + if (isClapping) + { + float songPosBeat = Conductor.instance.songPositionInBeats; + + if (songPosBeat > lastClapStart && songPosBeat < lastClapStart + 1 && clapIndex == 0) + { + LionLeft.GetComponent().Play("Clap", 0, 0); + Jukebox.PlayOneShotGame("clappyTrio/leftClap"); + + clapIndex++; + } + else if (songPosBeat > lastClapStart + currentClappingLength && songPosBeat < lastClapStart + (currentClappingLength * 2) && clapIndex == 1) + { + LionMiddle.GetComponent().Play("Clap", 0, 0); + Jukebox.PlayOneShotGame("clappyTrio/middleClap"); + + clapIndex++; + } + else if (songPosBeat > lastClapStart + (currentClappingLength * 2) && clapIndex == 2) + { + LionPlayer.GetComponent().Play("Clap", 0, 0); + Jukebox.PlayOneShotGame("clappyTrio/rightClap"); + + clapIndex++; + } + } + } + + public void Clap(float beat, float length) + { + isClapping = true; + lastClapStart = beat; + currentClappingLength = length; + } + + public void Prepare(int type) + { + PlayAnimationAll("Prepare"); + Jukebox.PlayOneShotGame("clappyTrio/ready"); + SetFace(0, type); + SetFace(1, type); + SetFace(2, type); + } + + private void PlayAnimationAll(string anim) + { + LionLeft.GetComponent().Play(anim, 0, 0); + LionMiddle.GetComponent().Play(anim, 0, 0); + LionPlayer.GetComponent().Play(anim, 0, 0); + } + + private void SetFace(int lion, int type) + { + if (lion == 0) + LionLeft.transform.GetChild(1).GetComponent().sprite = faces[type]; + else if (lion == 1) + LionMiddle.transform.GetChild(1).GetComponent().sprite = faces[type]; + else if (lion == 3) + LionPlayer.transform.GetChild(1).GetComponent().sprite = faces[type]; } } } \ No newline at end of file diff --git a/Assets/Scripts/Games/ForkLifter/ForkLifter.cs b/Assets/Scripts/Games/ForkLifter/ForkLifter.cs index c9dbaa6a..83f9f3ca 100644 --- a/Assets/Scripts/Games/ForkLifter/ForkLifter.cs +++ b/Assets/Scripts/Games/ForkLifter/ForkLifter.cs @@ -62,7 +62,7 @@ namespace RhythmHeavenMania.Games.ForkLifter public void Flick(float beat, int type) { - Jukebox.PlayOneShot("flick"); + Jukebox.PlayOneShotGame("forkLifter/flick"); handAnim.Play("Hand_Flick", 0, 0); GameObject fo = Instantiate(flickedObject); fo.GetComponent().startBeat = beat; diff --git a/Assets/Scripts/Games/ForkLifter/ForkLifterHand.cs b/Assets/Scripts/Games/ForkLifter/ForkLifterHand.cs index 63587ddd..2be2d796 100644 --- a/Assets/Scripts/Games/ForkLifter/ForkLifterHand.cs +++ b/Assets/Scripts/Games/ForkLifter/ForkLifterHand.cs @@ -49,7 +49,7 @@ namespace RhythmHeavenMania.Games.ForkLifter public void Prepare() { - Jukebox.PlayOneShot("flickPrepare"); + Jukebox.PlayOneShotGame("forkLifter/flickPrepare"); GetComponent().Play("Hand_Prepare"); } } diff --git a/Assets/Scripts/Games/ForkLifter/ForkLifterPlayer.cs b/Assets/Scripts/Games/ForkLifter/ForkLifterPlayer.cs index de1289ca..8e8e5714 100644 --- a/Assets/Scripts/Games/ForkLifter/ForkLifterPlayer.cs +++ b/Assets/Scripts/Games/ForkLifter/ForkLifterPlayer.cs @@ -101,17 +101,17 @@ namespace RhythmHeavenMania.Games.ForkLifter { if (topbun && middleburger && bottombun) { - Jukebox.PlayOneShot("burger"); + Jukebox.PlayOneShotGame("forkLifter/burger"); } else { if (currentEarlyPeasOnFork > 0 || currentLatePeasOnFork > 0) { - Jukebox.PlayOneShot($"cough_{Random.Range(1, 3)}"); + Jukebox.PlayOneShotGame($"forkLifter/cough_{Random.Range(1, 3)}"); } else { - Jukebox.PlayOneShot("gulp"); + Jukebox.PlayOneShotGame("forkLifter/gulp"); } } @@ -186,7 +186,7 @@ namespace RhythmHeavenMania.Games.ForkLifter FastEffectHit(EligibleHits[currentHitInList].pea.type); - Jukebox.PlayOneShot("stab"); + Jukebox.PlayOneShotGame("forkLifter/stab"); currentPerfectPeasOnFork++; @@ -230,7 +230,7 @@ namespace RhythmHeavenMania.Games.ForkLifter FastEffectHit(EligibleHits[currentHitInList].pea.type); - Jukebox.PlayOneShot("miss"); + Jukebox.PlayOneShotGame("miss"); currentEarlyPeasOnFork++; @@ -259,7 +259,7 @@ namespace RhythmHeavenMania.Games.ForkLifter FastEffectHit(EligibleHits[currentHitInList].pea.type); - Jukebox.PlayOneShot("miss"); + Jukebox.PlayOneShotGame("miss"); currentLatePeasOnFork++; @@ -268,7 +268,7 @@ namespace RhythmHeavenMania.Games.ForkLifter } else { - Jukebox.PlayOneShot("stabnohit"); + Jukebox.PlayOneShotGame("forkLifter/stabnohit"); } anim.Play("Player_Stab", 0, 0); diff --git a/Assets/Scripts/Games/ForkLifter/Pea.cs b/Assets/Scripts/Games/ForkLifter/Pea.cs index 93fd8fea..c5c23e8f 100644 --- a/Assets/Scripts/Games/ForkLifter/Pea.cs +++ b/Assets/Scripts/Games/ForkLifter/Pea.cs @@ -29,7 +29,7 @@ namespace RhythmHeavenMania.Games.ForkLifter private void Start() { anim = GetComponent(); - Jukebox.PlayOneShot("zoom"); + Jukebox.PlayOneShotGame("forkLifter/zoom"); GetComponentInChildren().sprite = ForkLifter.instance.peaSprites[type]; e = new ForkLifterPlayer.Eligible(); @@ -73,7 +73,7 @@ namespace RhythmHeavenMania.Games.ForkLifter if (normalizedBeat > endTime && endstate <= 1) { endstate++; - Jukebox.PlayOneShot("disappointed"); + Jukebox.PlayOneShotGame("audience/disappointed"); } if (normalizedBeat > 1.35f) diff --git a/Assets/Scripts/Util/Jukebox.cs b/Assets/Scripts/Util/Jukebox.cs index 8e9f663e..74e343fd 100644 --- a/Assets/Scripts/Util/Jukebox.cs +++ b/Assets/Scripts/Util/Jukebox.cs @@ -48,6 +48,11 @@ namespace RhythmHeavenMania.Util Sound snd = oneShot.AddComponent(); snd.clip = Resources.Load($"Sfx/{name}"); } + + public static void PlayOneShotGame(string name) + { + PlayOneShot($"games/{name}"); + } } } \ No newline at end of file diff --git a/Assets/theclappytrio.json b/Assets/theclappytrio.json index 239d51bc..5eef145b 100644 --- a/Assets/theclappytrio.json +++ b/Assets/theclappytrio.json @@ -2,8 +2,12 @@ "bpm": 117.26, "entities": [ { - "beat": 9, - "length": 3, + "beat": 1, + "datamodel": "clappyTrio/prepare_4" + }, + { + "beat": 4, + "length": 2, "datamodel": "clappyTrio/clap" } ]