diff --git a/Assets/Resources/Games/rhythmRally.prefab b/Assets/Resources/Games/rhythmRally.prefab index 34fec253..fafaf62c 100644 --- a/Assets/Resources/Games/rhythmRally.prefab +++ b/Assets/Resources/Games/rhythmRally.prefab @@ -326,7 +326,7 @@ SpriteRenderer: m_Size: {x: 1, y: 1} m_AdaptiveModeThreshold: 0.5 m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 + m_WasSpriteAssigned: 0 m_MaskInteraction: 0 m_SpriteSortPoint: 0 --- !u!1 &2081744100163324485 @@ -425,6 +425,38 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &3112497704503559489 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3001474442492713424} + m_Layer: 0 + m_Name: Paddlers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3001474442492713424 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3112497704503559489} + 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: 7291063904195614871} + - {fileID: 397144130134918796} + m_Father: {fileID: 3337760827311893485} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &3667855830336901894 GameObject: m_ObjectHideFlags: 0 @@ -790,7 +822,7 @@ Transform: - {fileID: 4367797717584319458} - {fileID: 4959957736091286558} - {fileID: 1845910055258765698} - - {fileID: 1933715706757907182} + - {fileID: 3001474442492713424} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -806,83 +838,119 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 35772aee9756b5040ab64a73ebc3f8ae, type: 3} m_Name: m_EditorClassIdentifier: + EligibleHits: [] + firstEnable: 0 cameraPos: {fileID: 6509993024069972873} ball: {fileID: 1668061868608559892} curve3D: {fileID: 6371738825610660614} ---- !u!1001 &2116490948628931845 + playerAnim: {fileID: 9089436218394572253} + opponentAnim: {fileID: 4559734961269837672} +--- !u!1001 &146447278275535207 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 3337760827311893485} + m_TransformParent: {fileID: 3001474442492713424} m_Modifications: - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} propertyPath: m_RootOrder - value: 6 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} - propertyPath: m_LocalPosition.x - value: 1.4075856 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} - propertyPath: m_LocalPosition.y - value: -0.8016417 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} - propertyPath: m_LocalPosition.z - value: 5.2011175 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} - propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalScale.x + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalScale.y + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalScale.z + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalPosition.z + value: 2.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} propertyPath: m_LocalRotation.y - value: -0 + value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 0 + value: 180 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -7372821682919313366, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} + - target: {fileID: -1851684669048352328, guid: cebeb8610d89fb34688750080a285ddb, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 46d08bc7bd1c6e94d899e9bc785d439c, type: 2} - - target: {fileID: 323984207950980072, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} - propertyPath: m_Materials.Array.data[0] + - target: {fileID: -1851684669048352328, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_Materials.Array.data[1] value: objectReference: {fileID: 2100000, guid: 46d08bc7bd1c6e94d899e9bc785d439c, type: 2} - - target: {fileID: 919132149155446097, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} + - target: {fileID: 919132149155446097, guid: cebeb8610d89fb34688750080a285ddb, type: 3} propertyPath: m_Name - value: pingpong_model + value: Opponent objectReference: {fileID: 0} - - target: {fileID: 8436642643293991623, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 46d08bc7bd1c6e94d899e9bc785d439c, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} ---- !u!4 &1933715706757907182 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 53ba8cbf4003b7e46b8a3d43c92657fc, type: 3} - m_PrefabInstance: {fileID: 2116490948628931845} + m_SourcePrefab: {fileID: 100100000, guid: cebeb8610d89fb34688750080a285ddb, type: 3} +--- !u!1 &1065418898597387318 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_PrefabInstance: {fileID: 146447278275535207} m_PrefabAsset: {fileID: 0} +--- !u!4 &397144130134918796 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_PrefabInstance: {fileID: 146447278275535207} + m_PrefabAsset: {fileID: 0} +--- !u!95 &4559734961269837672 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1065418898597387318} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 2aa298442461db342a7bb7efa6cce915, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1001 &3256800228231493117 PrefabInstance: m_ObjectHideFlags: 0 @@ -953,3 +1021,109 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 11e67fcf8c072044eb96c34e94477a0f, type: 3} m_PrefabInstance: {fileID: 3256800228231493117} m_PrefabAsset: {fileID: 0} +--- !u!1001 &7108288251017691004 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 3001474442492713424} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalScale.x + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalScale.y + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalScale.z + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalPosition.z + value: -2.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1851684669048352328, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 46d08bc7bd1c6e94d899e9bc785d439c, type: 2} + - target: {fileID: -1851684669048352328, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_Materials.Array.data[1] + value: + objectReference: {fileID: 2100000, guid: 46d08bc7bd1c6e94d899e9bc785d439c, type: 2} + - target: {fileID: 919132149155446097, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + propertyPath: m_Name + value: Player + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: cebeb8610d89fb34688750080a285ddb, type: 3} +--- !u!1 &7954728381481796141 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_PrefabInstance: {fileID: 7108288251017691004} + m_PrefabAsset: {fileID: 0} +--- !u!4 &7291063904195614871 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_PrefabInstance: {fileID: 7108288251017691004} + m_PrefabAsset: {fileID: 0} +--- !u!95 &9089436218394572253 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7954728381481796141} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 2aa298442461db342a7bb7efa6cce915, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 diff --git a/Assets/Resources/Sprites/Games/RhythmRally/Paddler.controller b/Assets/Resources/Sprites/Games/RhythmRally/Paddler.controller new file mode 100644 index 00000000..0e8e8001 --- /dev/null +++ b/Assets/Resources/Sprites/Games/RhythmRally/Paddler.controller @@ -0,0 +1,246 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-3986917046676279002 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Ready0 + m_Speed: 2 + 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: 1714167061415133377, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &-2228367576635253465 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 6416047872712211942} + m_Position: {x: 200, y: 190, z: 0} + - serializedVersion: 1 + m_State: {fileID: 4424825005415695879} + m_Position: {x: 290, y: 330, z: 0} + - serializedVersion: 1 + m_State: {fileID: -3986917046676279002} + m_Position: {x: 460, y: 190, z: 0} + - serializedVersion: 1 + m_State: {fileID: 124654373728809099} + m_Position: {x: 510, y: 260, z: 0} + - serializedVersion: 1 + m_State: {fileID: 7339080780637248285} + m_Position: {x: 550, y: 330, z: 0} + - serializedVersion: 1 + m_State: {fileID: 7948488236895607926} + m_Position: {x: 250, y: 260, z: 0} + - serializedVersion: 1 + m_State: {fileID: 7618035723044257044} + m_Position: {x: 270, y: 120, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 7618035723044257044} +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Paddler + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: -2228367576635253465} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &124654373728809099 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Ready1 + m_Speed: 2 + 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: -4791534359250169297, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &4424825005415695879 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Pose + m_Speed: 2 + 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: -3228990746527544536, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &6416047872712211942 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Beat + m_Speed: 2 + 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: 602069206741416926, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &7339080780637248285 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ReadyBeat + m_Speed: 2 + 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: 503707742415235358, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &7618035723044257044 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Idle + m_Speed: 0 + 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: 602069206741416926, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &7948488236895607926 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Swing + m_Speed: 2 + 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: 6756124044812718541, guid: cebeb8610d89fb34688750080a285ddb, type: 3} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: diff --git a/Assets/Resources/Sprites/Games/RhythmRally/Paddler.controller.meta b/Assets/Resources/Sprites/Games/RhythmRally/Paddler.controller.meta new file mode 100644 index 00000000..55203a14 --- /dev/null +++ b/Assets/Resources/Sprites/Games/RhythmRally/Paddler.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2aa298442461db342a7bb7efa6cce915 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/RhythmRally/paddler.fbx b/Assets/Resources/Sprites/Games/RhythmRally/paddler.fbx index 55ed87a2..576c9709 100644 Binary files a/Assets/Resources/Sprites/Games/RhythmRally/paddler.fbx and b/Assets/Resources/Sprites/Games/RhythmRally/paddler.fbx differ diff --git a/Assets/Resources/Sprites/Games/RhythmRally/paddler.fbx.meta b/Assets/Resources/Sprites/Games/RhythmRally/paddler.fbx.meta index c5151d6f..6758bc1e 100644 --- a/Assets/Resources/Sprites/Games/RhythmRally/paddler.fbx.meta +++ b/Assets/Resources/Sprites/Games/RhythmRally/paddler.fbx.meta @@ -2,7 +2,25 @@ fileFormatVersion: 2 guid: cebeb8610d89fb34688750080a285ddb ModelImporter: serializedVersion: 20200 - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 74: 602069206741416926 + second: pingpong_model_skeleton|pingpong_beat + - first: + 74: -3228990746527544536 + second: pingpong_model_skeleton|pingpong_pose + - first: + 74: 1714167061415133377 + second: pingpong_model_skeleton|pingpong_ready00 + - first: + 74: -4791534359250169297 + second: pingpong_model_skeleton|pingpong_ready01 + - first: + 74: 503707742415235358 + second: pingpong_model_skeleton|pingpong_ready_beat + - first: + 74: 6756124044812718541 + second: pingpong_model_skeleton|pingpong_swing externalObjects: {} materials: materialImportMode: 2 diff --git a/Assets/Scripts/Games/RhythmRally/RhythmRally.cs b/Assets/Scripts/Games/RhythmRally/RhythmRally.cs index 360050ef..eaa00d4e 100644 --- a/Assets/Scripts/Games/RhythmRally/RhythmRally.cs +++ b/Assets/Scripts/Games/RhythmRally/RhythmRally.cs @@ -2,15 +2,28 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using RhythmHeavenMania.Util; namespace RhythmHeavenMania.Games.RhythmRally { - public class RhythmRally : MonoBehaviour + public class RhythmRally : Minigame { public Transform cameraPos; public GameObject ball; public NaughtyBezierCurves.BezierCurve3D curve3D; + public Animator playerAnim; + public Animator opponentAnim; + + public GameEvent bop = new GameEvent(); + + public static RhythmRally instance; + + private void Awake() + { + instance = this; + } + // Start is called before the first frame update void Start() { @@ -18,13 +31,38 @@ namespace RhythmHeavenMania.Games.RhythmRally GameCamera.instance.camera.transform.rotation = cameraPos.rotation; GameCamera.instance.camera.fieldOfView = 41f; GameCamera.instance.camera.backgroundColor = Color.white; + + playerAnim.Play("Idle", 0, 0); + opponentAnim.Play("Idle", 0, 0); } // Update is called once per frame void Update() { - ball.transform.position = curve3D.GetPoint(Mathf.Clamp(Conductor.instance.GetPositionFromBeat(0, 2f), 0, 1)); + var cond = Conductor.instance; + + ball.transform.position = curve3D.GetPoint(Mathf.Clamp(cond.GetPositionFromBeat(0, 2f), 0, 1)); ball.transform.GetChild(0).transform.position = new Vector3(ball.transform.position.x, -0.399f, ball.transform.position.z); + + if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1)) + { + if (cond.songPositionInBeats >= bop.startBeat && cond.songPositionInBeats < bop.startBeat + bop.length) + { + var playerState = playerAnim.GetCurrentAnimatorStateInfo(0); + if (playerAnim.IsAnimationNotPlaying() || playerState.IsName("Idle") || playerState.IsName("Beat")) + playerAnim.Play("Beat", 0, 0); + + var opponentState = opponentAnim.GetCurrentAnimatorStateInfo(0); + if (opponentAnim.IsAnimationNotPlaying() || opponentState.IsName("Idle") || opponentState.IsName("Beat")) + opponentAnim.Play("Beat", 0, 0); + } + } + } + + public void Bop(float beat, float length) + { + bop.length = length; + bop.startBeat = beat; } } } \ No newline at end of file diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 12fc6eb1..eb4f1add 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -11,6 +11,7 @@ using RhythmHeavenMania.Games.KarateMan; using RhythmHeavenMania.Games.SpaceSoccer; using RhythmHeavenMania.Games.DJSchool; using RhythmHeavenMania.Games.RhythmTweezers; +using RhythmHeavenMania.Games.RhythmRally; namespace RhythmHeavenMania { @@ -207,7 +208,7 @@ namespace RhythmHeavenMania new Minigame("rhythmRally", "Rhythm Rally", "B888F8", true, false, new List() { - + new GameAction("bop", delegate { RhythmRally.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 0.5f, true), }), /*new Minigame("spaceDance", "Space Dance", "B888F8", new List() {