diff --git a/Assets/Resources/Games/dogNinja.prefab b/Assets/Resources/Games/dogNinja.prefab index f265f9753..36765f9d4 100644 --- a/Assets/Resources/Games/dogNinja.prefab +++ b/Assets/Resources/Games/dogNinja.prefab @@ -97,17 +97,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5ac06902fd6630045a550c76211fcc63, type: 3} m_Name: m_EditorClassIdentifier: - inList: 0 - state: - gameObject: {fileID: 119991411479083905} - early: 0 - perfect: 0 - late: 0 - createBeat: 0 - eligibleHitsList: [] - aceTimes: 0 - isEligible: 0 - triggersAutoplay: 1 + game: {fileID: 4542966729274958099} startBeat: 0 type: 0 fromLeft: 0 @@ -115,7 +105,8 @@ MonoBehaviour: direction: 0 sfxNum: curve: {fileID: 0} - barelyCurve: {fileID: 0} + LeftCurve: {fileID: 2592536718110886033} + RightCurve: {fileID: 8538313959133990924} BarelyLeftCurve: {fileID: 5959598018215963193} BarelyRightCurve: {fileID: 4156529297438955755} HalvesLeftBase: {fileID: 8462363345267808632} @@ -544,17 +535,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6f3ef60f47c093b45a623a707f33c877, type: 3} m_Name: m_EditorClassIdentifier: - inList: 0 - state: - gameObject: {fileID: 0} - early: 0 - perfect: 0 - late: 0 - createBeat: 0 - eligibleHitsList: [] - aceTimes: 0 - isEligible: 0 - triggersAutoplay: 1 startBeat: 0 objPos: {x: 0, y: 0, z: 0} lefty: 0 @@ -1695,9 +1675,7 @@ MonoBehaviour: looping: 0 offset: 0 parameters: [] - EligibleHits: [] scheduledInputs: [] - firstEnable: 0 DogAnim: {fileID: 1770250701376598399} BirdAnim: {fileID: 4964290445827434540} ObjectBase: {fileID: 119991411479083905} @@ -1728,6 +1706,8 @@ MonoBehaviour: - {fileID: 2196219148037962045, guid: 4e56f90ec52abea4ea8c4c7bb6df84d5, type: 3} - {fileID: -6292424158522327523, guid: 4e56f90ec52abea4ea8c4c7bb6df84d5, type: 3} - {fileID: 2053246660185171032, guid: 4e56f90ec52abea4ea8c4c7bb6df84d5, type: 3} + queuePrepare: 0 + preparing: 0 --- !u!1 &3156757135167865752 GameObject: m_ObjectHideFlags: 0 @@ -4165,17 +4145,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6f3ef60f47c093b45a623a707f33c877, type: 3} m_Name: m_EditorClassIdentifier: - inList: 0 - state: - gameObject: {fileID: 0} - early: 0 - perfect: 0 - late: 0 - createBeat: 0 - eligibleHitsList: [] - aceTimes: 0 - isEligible: 0 - triggersAutoplay: 1 startBeat: 0 objPos: {x: 0, y: 0, z: 0} lefty: 1 @@ -4730,15 +4699,17 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 + m_ActiveFontFeatures: 00000000 m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 + m_EmojiFallbackSupport: 1 m_parseCtrlCharacters: 1 m_isOrthographic: 0 m_isCullingEnabled: 0 diff --git a/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/DogAnim.controller b/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/DogAnim.controller index 6b3abe1a1..30b645fd8 100644 --- a/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/DogAnim.controller +++ b/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/DogAnim.controller @@ -54,31 +54,6 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: ---- !u!1101 &-8879658034113408578 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: needPrepare - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 5009988345090580314} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0 - m_TransitionOffset: 0 - m_ExitTime: 1 - m_HasExitTime: 1 - m_HasFixedDuration: 0 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 --- !u!1102 &-7628548708072257747 AnimatorState: serializedVersion: 6 @@ -333,31 +308,6 @@ AnimatorController: m_IKPass: 0 m_SyncedLayerAffectsTiming: 0 m_Controller: {fileID: 9100000} ---- !u!1101 &634343083532807637 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 2 - m_ConditionEvent: needPrepare - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1628397019354410076} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0 - m_TransitionOffset: 0 - m_ExitTime: 1 - m_HasExitTime: 1 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 --- !u!1102 &1183219720229009387 AnimatorState: serializedVersion: 6 @@ -368,9 +318,7 @@ AnimatorState: m_Name: Prepare m_Speed: 1 m_CycleOffset: 0 - m_Transitions: - - {fileID: -8879658034113408578} - - {fileID: 634343083532807637} + m_Transitions: [] m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -563,9 +511,6 @@ AnimatorStateMachine: - serializedVersion: 1 m_State: {fileID: 4106059006902303284} m_Position: {x: 400, y: 90, z: 0} - - serializedVersion: 1 - m_State: {fileID: 5009988345090580314} - m_Position: {x: 620, y: -110, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] @@ -576,33 +521,6 @@ AnimatorStateMachine: m_ExitPosition: {x: 420, y: 210, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_DefaultState: {fileID: 1628397019354410076} ---- !u!1102 &5009988345090580314 -AnimatorState: - serializedVersion: 6 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: PrepareIdle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: - - {fileID: 7023587105086888360} - 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: f9b4fb8d229e1d840b1663408bebfd18, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: --- !u!1101 &5032805319851727948 AnimatorStateTransition: m_ObjectHideFlags: 1 @@ -669,31 +587,6 @@ AnimatorStateTransition: m_InterruptionSource: 0 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 ---- !u!1101 &7023587105086888360 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 2 - m_ConditionEvent: needPrepare - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1628397019354410076} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0 - m_TransitionOffset: 0 - m_ExitTime: 1 - m_HasExitTime: 1 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 --- !u!1102 &7232969264737895159 AnimatorState: serializedVersion: 6 @@ -701,11 +594,10 @@ AnimatorState: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: UnPrepare + m_Name: Unprepare m_Speed: 1 m_CycleOffset: 0 - m_Transitions: - - {fileID: 7451574809715408383} + m_Transitions: [] m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -721,28 +613,6 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: ---- !u!1101 &7451574809715408383 -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: 1628397019354410076} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0 - m_TransitionOffset: 0 - m_ExitTime: 1 - m_HasExitTime: 1 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 --- !u!1102 &8456159042725552206 AnimatorState: serializedVersion: 6 diff --git a/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/Prepare.anim b/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/Prepare.anim index a4b6e9062..cb8d47856 100644 --- a/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/Prepare.anim +++ b/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/Prepare.anim @@ -450,7 +450,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/DogNinja/Animation/Dog/PrepareIdle.anim b/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/PrepareIdle.anim deleted file mode 100644 index 22cd4f106..000000000 --- a/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/PrepareIdle.anim +++ /dev/null @@ -1,1110 +0,0 @@ -%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: PrepareIdle - 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: 0} - inSlope: {x: Infinity, y: Infinity, z: Infinity} - outSlope: {x: Infinity, y: Infinity, z: Infinity} - 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: 20.166666 - value: {x: 0, y: 0, z: 0} - inSlope: {x: Infinity, y: Infinity, z: Infinity} - outSlope: {x: Infinity, y: Infinity, z: Infinity} - 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 - path: DogBody/DogArmRight - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: 0, y: -1.12, z: 0} - inSlope: {x: Infinity, y: Infinity, z: Infinity} - outSlope: {x: Infinity, y: Infinity, z: Infinity} - 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: 20.166666 - value: {x: 0, y: -1.12, z: 0} - inSlope: {x: Infinity, y: Infinity, z: Infinity} - outSlope: {x: Infinity, y: Infinity, z: Infinity} - 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 - path: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: 0, y: -0.07, z: 0} - inSlope: {x: Infinity, y: Infinity, z: Infinity} - outSlope: {x: Infinity, y: Infinity, z: Infinity} - 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: 20.166666 - value: {x: 0, y: -0.07, z: 0} - inSlope: {x: Infinity, y: Infinity, z: Infinity} - outSlope: {x: Infinity, y: Infinity, z: Infinity} - 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 - path: DogBody - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -9.18, y: -2.54, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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: 20.166666 - value: {x: -9.18, y: -2.54, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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 - path: DogBody/DogArmLeft - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -1.84, y: -1.93, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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: 20.166666 - value: {x: -1.84, y: -1.93, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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 - path: DogBody/DogArmRight - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -5.5894957, y: -3.1524081, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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: 20.166666 - value: {x: -5.5894957, y: -3.1524081, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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 - path: DogBody/DogTorso - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -5.8489957, y: -3.078408, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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: 20.166666 - value: {x: -5.8489957, y: -3.078408, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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 - path: DogBody/Sword - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -5.568996, y: -1.39, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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: 20.166666 - value: {x: -5.568996, y: -1.39, z: 20.748348} - inSlope: {x: Infinity, y: Infinity, z: 0} - outSlope: {x: Infinity, y: Infinity, 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 - path: DogHead - m_ScaleCurves: [] - m_FloatCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 2 - inSlope: -0 - outSlope: 0 - tangentMode: 69 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 20.166666 - value: 2 - inSlope: -0 - outSlope: 0 - tangentMode: 69 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SortingOrder - path: DogBody/DogArmRight - classID: 212 - script: {fileID: 0} - m_PPtrCurves: - - curve: - - time: 0 - value: {fileID: -7602907453496852081, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3} - - time: 20.166666 - value: {fileID: -7602907453496852081, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3} - attribute: m_Sprite - path: DogBody/DogArmRight - classID: 212 - script: {fileID: 0} - - curve: - - time: 0 - value: {fileID: 7849497092207798707, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3} - - time: 20.166666 - value: {fileID: 7849497092207798707, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3} - attribute: m_Sprite - path: DogBody/DogArmLeft - classID: 212 - script: {fileID: 0} - m_SampleRate: 30 - 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: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - - serializedVersion: 2 - path: 2772886358 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - - serializedVersion: 2 - path: 2375568945 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - - serializedVersion: 2 - path: 2794087405 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - - serializedVersion: 2 - path: 1010313433 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - - serializedVersion: 2 - path: 240240601 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - - serializedVersion: 2 - path: 3642564216 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - - serializedVersion: 2 - path: 2794087405 - attribute: 4 - script: {fileID: 0} - typeID: 4 - customType: 4 - isPPtrCurve: 0 - - serializedVersion: 2 - path: 2794087405 - attribute: 0 - script: {fileID: 0} - typeID: 212 - customType: 23 - isPPtrCurve: 1 - - serializedVersion: 2 - path: 2375568945 - attribute: 0 - script: {fileID: 0} - typeID: 212 - customType: 23 - isPPtrCurve: 1 - - serializedVersion: 2 - path: 2794087405 - attribute: 3762991556 - script: {fileID: 0} - typeID: 212 - customType: 26 - isPPtrCurve: 0 - pptrCurveMapping: - - {fileID: -7602907453496852081, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3} - - {fileID: -7602907453496852081, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3} - - {fileID: 7849497092207798707, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3} - - {fileID: 7849497092207798707, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3} - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 20.199999 - 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: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -1.12 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -1.12 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: DogBody - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -0.07 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -0.07 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: DogBody - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: DogBody - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -9.18 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -9.18 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: DogBody/DogArmLeft - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -2.54 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -2.54 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: DogBody/DogArmLeft - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: DogBody/DogArmLeft - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -1.84 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -1.84 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: DogBody/DogArmRight - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -1.93 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -1.93 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: DogBody/DogArmRight - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: DogBody/DogArmRight - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: localEulerAnglesRaw.x - path: DogBody/DogArmRight - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: localEulerAnglesRaw.y - path: DogBody/DogArmRight - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: localEulerAnglesRaw.z - path: DogBody/DogArmRight - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 2 - inSlope: -0 - outSlope: 0 - tangentMode: 69 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 20.166666 - value: 2 - inSlope: -0 - outSlope: 0 - tangentMode: 69 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SortingOrder - path: DogBody/DogArmRight - classID: 212 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -5.5894957 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -5.5894957 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: DogBody/DogTorso - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -3.1524081 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -3.1524081 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: DogBody/DogTorso - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: DogBody/DogTorso - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -5.8489957 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -5.8489957 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: DogBody/Sword - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -3.078408 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -3.078408 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: DogBody/Sword - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: DogBody/Sword - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -5.568996 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -5.568996 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: DogHead - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -1.39 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: -1.39 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: DogHead - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 20.166666 - value: 20.748348 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: DogHead - 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: DogBody/DogArmRight - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: [] - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalEulerAngles.y - path: DogBody/DogArmRight - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: [] - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalEulerAngles.z - path: DogBody/DogArmRight - classID: 4 - script: {fileID: 0} - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/PrepareIdle.anim.meta b/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/PrepareIdle.anim.meta deleted file mode 100644 index c0aaf447c..000000000 --- a/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/PrepareIdle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f9b4fb8d229e1d840b1663408bebfd18 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/UnPrepare.anim b/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/UnPrepare.anim index cee010030..ad1aceb8c 100644 --- a/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/UnPrepare.anim +++ b/Assets/Resources/Sprites/Games/DogNinja/Animation/Dog/UnPrepare.anim @@ -492,7 +492,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/Scripts/Games/DogNinja/DogNinja.cs b/Assets/Scripts/Games/DogNinja/DogNinja.cs index 5bba68607..19b28554a 100644 --- a/Assets/Scripts/Games/DogNinja/DogNinja.cs +++ b/Assets/Scripts/Games/DogNinja/DogNinja.cs @@ -17,7 +17,12 @@ namespace HeavenStudio.Games.Loaders { new GameAction("Bop", "Bop") { - function = delegate { DogNinja.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, eventCaller.currentEntity["auto"], eventCaller.currentEntity["toggle"]); }, + function = delegate { + var e = eventCaller.currentEntity; + if (eventCaller.gameManager.minigameObj.TryGetComponent(out DogNinja instance)) { + instance.Bop(e.beat, e.length, e["auto"], e["toggle"]); + } + }, resizable = true, parameters = new List() { @@ -27,17 +32,39 @@ namespace HeavenStudio.Games.Loaders }, new GameAction("Prepare", "Prepare") { - function = delegate { DogNinja.instance.Prepare(eventCaller.currentEntity.beat); }, + function = delegate { + if (eventCaller.gameManager.minigameObj.TryGetComponent(out DogNinja instance)) { + instance.Prepare(eventCaller.currentEntity.beat); + } + }, defaultLength = 0.5f, }, new GameAction("ThrowObject", "Throw Object") { - function = delegate { var e = eventCaller.currentEntity; DogNinja.QueueObject(e.beat, e["direction"], e["typeL"], e["typeR"], e["shouldPrepare"], false); }, - inactiveFunction = delegate { var e = eventCaller.currentEntity; DogNinja.QueueObject(e.beat, e["direction"], e["typeL"], e["typeR"], e["shouldPrepare"], e["muteThrow"]); }, + // function = delegate { + // var e = eventCaller.currentEntity; + // (int typeL, int typeR) = e["diffObjs"] ? ((int)e["typeL"], (int)e["typeR"]) : ((int)e["type"], (int)e["type"]); + // DogNinja.QueueObject(e.beat, e["direction"], e["diffObjs"], typeL, typeR, e["shouldPrepare"], false, e); + // }, + // inactiveFunction = delegate { + // var e = eventCaller.currentEntity; + // (int typeL, int typeR) = e["diffObjs"] ? ((int)e["typeL"], (int)e["typeR"]) : ((int)e["type"], (int)e["type"]); + // DogNinja.QueueObject(e.beat, e["direction"], e["diffObjs"], typeL, typeR, e["shouldPrepare"], e["muteThrow"], e); + // }, + preFunction = delegate { + var e = eventCaller.currentEntity; + (int typeL, int typeR) = e["diffObjs"] ? ((int)e["typeL"], (int)e["typeR"]) : ((int)e["type"], (int)e["type"]); + DogNinja.QueueObject(e.beat, e["direction"], e["diffObjs"], e["type"], typeL, typeR, e["shouldPrepare"], e["muteThrow"], e); + }, defaultLength = 2, parameters = new List() { new Param("direction", DogNinja.ObjectDirection.Left, "Which Side", "Choose the side(s) the object(s) should be thrown from."), + new Param("diffObjs", false, "Different Objects", "Toggle if the sides should be different.", new() { + new((x, _) => (bool)x, "typeL", "typeR"), + new((x, _) => !(bool)x, "type"), + }), + new Param("type", DogNinja.ObjectType.Random, "Object", "Choose the object to be thrown."), new Param("typeL", DogNinja.ObjectType.Random, "Left Object", "Choose the object to be thrown from the left."), new Param("typeR", DogNinja.ObjectType.Random, "Right Object", "Choose the object to be thrown from the right."), new Param("shouldPrepare", true, "Prepare", "Toggle if Dog Ninja should automatically prepare for this cue."), @@ -46,57 +73,27 @@ namespace HeavenStudio.Games.Loaders }, new GameAction("CutEverything", "Mister Eagle's Sign") { - function = delegate { var e = eventCaller.currentEntity; DogNinja.instance.CutEverything(e.beat, e["toggle"], e["text"]); }, - defaultLength = 0.5f, + function = delegate { + var e = eventCaller.currentEntity; + if (eventCaller.gameManager.minigameObj.TryGetComponent(out DogNinja instance)) { + instance.CutEverything(e.beat, e.length, e["toggle"], e["text"]); + } + }, + defaultLength = 4f, + resizable = true, parameters = new List() { - new Param("toggle", true, "Play Sound", "Toggle if the sound effect should play for flying in and out."), + new Param("toggle", true, "Play Sound", "Toggle if the sound effect should play for flying in."), new Param("text", "Cut everything!", "Sign Text", "Set the text to be displayed on the sign.") } }, new GameAction("HereWeGo", "Here We Go!") { - function = delegate { DogNinja.instance.HereWeGo(eventCaller.currentEntity.beat); }, + function = delegate { DogNinja.HereWeGo(eventCaller.currentEntity.beat); }, + inactiveFunction = delegate { DogNinja.HereWeGo(eventCaller.currentEntity.beat); }, defaultLength = 2, - inactiveFunction = delegate { DogNinja.HereWeGoInactive(eventCaller.currentEntity.beat); }, preFunctionLength = 1, }, - - // these are still here for backwards-compatibility but are hidden in the editor - new GameAction("ThrowObjectLeft", "Throw Object Left") - { - function = delegate { var e = eventCaller.currentEntity; DogNinja.QueueObject(e.beat, 0, e["type"], 0, true, false);}, - defaultLength = 2, - hidden = true, - parameters = new List() - { - new Param("type", DogNinja.ObjectType.Random, "Object", "The object to be thrown"), - }, - inactiveFunction = delegate { var e = eventCaller.currentEntity; DogNinja.QueueObject(e.beat, 0, e["type"], 0, true, false);}, - }, - new GameAction("ThrowObjectRight", "Throw Object Right") - { - function = delegate { var e = eventCaller.currentEntity; DogNinja.QueueObject(e.beat, 1, 0, e["type"], true, false);}, - defaultLength = 2, - hidden = true, - parameters = new List() - { - new Param("type", DogNinja.ObjectType.Random, "Object", "The object to be thrown"), - }, - inactiveFunction = delegate { var e = eventCaller.currentEntity; DogNinja.QueueObject(e.beat, 1, 0, e["type"], true, false);}, - }, - new GameAction("ThrowObjectBoth", "Throw Object Both") - { - function = delegate { var e = eventCaller.currentEntity; DogNinja.QueueObject(e.beat, 2, e["typeL"], e["typeR"], true, false);}, - defaultLength = 2, - hidden = true, - parameters = new List() - { - new Param("typeL", DogNinja.ObjectType.Random, "Left Object", "The object on the left to be thrown"), - new Param("typeR", DogNinja.ObjectType.Random, "Right Object", "The object on the right to be thrown"), - }, - inactiveFunction = delegate { var e = eventCaller.currentEntity; DogNinja.QueueObject(e.beat, 2, e["typeL"], e["typeR"], true, false);}, - }, }, new List() { "ntr", "normal" }, "ntrninja", "en", @@ -108,18 +105,14 @@ namespace HeavenStudio.Games.Loaders namespace HeavenStudio.Games { + using Jukebox; using Scripts_DogNinja; public class DogNinja : Minigame { - static List queuedThrows = new List(); struct QueuedThrow { - public double beat; - public int direction; - public int typeL; - public int typeR; - public string sfxNumL; - public string sfxNumR; + public int[] types; + public string sfxNumL, sfxNumR; } [Header("Animators")] @@ -140,10 +133,9 @@ namespace HeavenStudio.Games [SerializeField] Sprite[] ObjectTypes; - private bool birdOnScreen = false; - private const string sfxNum = "dogNinja/"; - - public static DogNinja instance; + private bool autoBop; + public bool queuePrepare; + public bool preparing; public enum ObjectDirection { @@ -152,7 +144,7 @@ namespace HeavenStudio.Games Both, } - public enum ObjectType + public enum ObjectType : int { Random, // random fruit Apple, // fruit @@ -195,199 +187,176 @@ namespace HeavenStudio.Games new("NtrNinjaTouchRelease", new int[] { IAEmptyCat, IAReleaseCat, IAEmptyCat }, IA_Empty, IA_TouchBasicRelease, IA_Empty); - private void Awake() + public override void OnLateBeatPulse(double beat) { - instance = this; - SetupBopRegion("dogNinja", "Bop", "auto"); - } - - void OnDestroy() - { - if (!Conductor.instance.isPlaying || Conductor.instance.isPaused) - { - if (queuedThrows.Count > 0) queuedThrows.Clear(); - } - foreach (var evt in scheduledInputs) - { - evt.Disable(); - } - } - - public override void OnBeatPulse(double beat) - { - if (BeatIsInBopRegion(beat) && DogAnim.IsAnimationNotPlaying() || DogAnim.IsPlayingAnimationNames("Idle")) { + if (autoBop && preparing && (DogAnim.IsAnimationNotPlaying() || DogAnim.IsPlayingAnimationNames("Idle"))) { DogAnim.DoScaledAnimationAsync("Bop", 0.5f); } } + public override void OnPlay(double beat) => Persist(beat, true); + public override void OnGameSwitch(double beat) => Persist(beat, false); + private void Persist(double beat, bool onPlay) + { + foreach (var e in gameManager.Beatmap.Entities.FindAll(e => e.datamodel is "dogNinja/ThrowObject" && beat > (onPlay ? e.beat : e.beat - 2) && beat < e.beat + 1)) + { + QueuedThrow t = new(); + if (e.dynamicData.TryGetValue("throwData", out dynamic temp)) { + t = temp; + } else { + QueueObject(e.beat, e["direction"], e["diffObjs"], e["type"], e["typeL"], e["typeR"], e["shouldPrepare"], true, e); + } + ThrowObject(e.beat, e["direction"], e["shouldPrepare"], t.types, t.sfxNumL, t.sfxNumR); + } + } + private void Update() { - if (DogAnim.GetBool("needPrepare") && DogAnim.IsAnimationNotPlaying()) + // prepare queuing stuff + if (queuePrepare && DogAnim.IsAnimationNotPlaying()) { DogAnim.DoScaledAnimationAsync("Prepare", 0.5f); - DogAnim.SetBool("needPrepare", true); + queuePrepare = false; } + // controls stuff if (PlayerInput.GetIsAction(InputAction_TouchPress) && !GameManager.instance.autoplay) { - DogAnim.SetBool("needPrepare", true); + queuePrepare = true; DogAnim.DoScaledAnimationAsync("Prepare", 0.5f); } if (PlayerInput.GetIsAction(InputAction_TouchRelease) && (!IsExpectingInputNow(InputAction_Press)) && (!GameManager.instance.autoplay)) { - DogAnim.SetBool("needPrepare", false); - DogAnim.DoScaledAnimationAsync("Bop", 0.5f); + queuePrepare = false; + preparing = false; + DogAnim.DoScaledAnimationAsync("Unprepare", 0.5f); } if (PlayerInput.GetIsAction(InputAction_Press) && !IsExpectingInputNow(InputAction_Press)) { - System.Random rd = new System.Random(); - string slice; - int LorR = rd.Next(0, 2); - if (LorR < 1) - { - slice = "WhiffRight"; - } - else - { - slice = "WhiffLeft"; - } - + string slice = UnityEngine.Random.Range(0, 1f) < 0.5f ? "WhiffRight" : "WhiffLeft"; DogAnim.DoScaledAnimationAsync(slice, 0.5f); - SoundByte.PlayOneShotGame("dogNinja/whiff"); - DogAnim.SetBool("needPrepare", false); - } - if (queuedThrows.Count > 0) - { - foreach (var obj in queuedThrows) { ThrowObject(obj.beat, obj.direction, obj.typeL, obj.typeR, obj.sfxNumL, obj.sfxNumR); } - queuedThrows.Clear(); + SoundByte.PlayOneShotGame("dogNinja/whiff"); + queuePrepare = false; } } public void Bop(double beat, float length, bool auto, bool bop) { + autoBop = auto; if (!bop) return; - List actions = new(); - for (int i = 0; i < length; i++) - { + List actions = new(); + for (int i = 0; i < length; i++) { actions.Add(new(beat + i, delegate { DogAnim.DoScaledAnimationAsync("Bop", 0.5f); })); } - if (actions.Count > 0) BeatAction.New(this, actions); } - public static void QueueObject(double beat, int direction, int typeL, int typeR, bool prepare, bool muteThrow) + public static void QueueObject(double beat, int direction, bool diffObjs, int type, int typeL, int typeR, bool prepare, bool muteThrow, RiqEntity e) { - int ObjSprite = 1; - if (typeL == 0 || typeR == 0) + int randomObj = 1; + int[] types = diffObjs ? new[] { typeL, typeR } : new[] { type, type }; + string[] sfxNums = new string[2]; + + for (int i = 0; i < 2; i++) { - // random object code. it makes a random number from 1-7 and sets that as the sprite - System.Random rd = new System.Random(); - ObjSprite = rd.Next(1, 7); + if (types[i] == 0 && (diffObjs || i == 0)) randomObj = UnityEngine.Random.Range((int)ObjectType.Apple, (int)ObjectType.Potato + 1); + if (types[i] == 0) types[i] = randomObj; + sfxNums[i] = "dogNinja/" + (types[i] < 7 ? "fruit" : Enum.GetName(typeof(ObjectType), types[i])); } - string sfxNumL = "dogNinja/"; - if (direction is 0 or 2) - { - sfxNumL += typeL < 7 ? "fruit" : Enum.GetName(typeof(ObjectType), typeL); - if (typeL == 0) typeL = ObjSprite; - if (!muteThrow) SoundByte.PlayOneShotGame(sfxNumL + "1", forcePlay: true); - } - - string sfxNumR = "dogNinja/"; - if (direction is 1 or 2) - { - sfxNumR += typeR < 7 ? "fruit" : Enum.GetName(typeof(ObjectType), typeR); - if (typeR == 0) typeR = ObjSprite; - if (!(direction == 2 && typeL == typeR) && !muteThrow) SoundByte.PlayOneShotGame(sfxNumR + "1", forcePlay: true); - } - - queuedThrows.Add(new QueuedThrow() - { - beat = beat, - direction = direction, - typeL = typeL, - typeR = typeR, - sfxNumL = sfxNumL, - sfxNumR = sfxNumR, - }); - - prepare = prepare && (PlayerInput.CurrentControlStyle != InputController.ControlStyles.Touch || GameManager.instance.autoplay); - if (prepare) DogNinja.instance.DogAnim.SetBool("needPrepare", true); - } - - public void ThrowObject(double beat, int direction, int typeL, int typeR, string sfxNumL, string sfxNumR) - { - // instantiate a game object and give it its variables - if (direction is 0 or 2) - { - WhichObject.sprite = ObjectTypes[typeL]; - ThrowObject ObjectL = Instantiate(ObjectBase, gameObject.transform).GetComponent(); - ObjectL.startBeat = beat; - ObjectL.curve = CurveFromLeft; - ObjectL.fromLeft = true; - ObjectL.direction = direction; - ObjectL.type = typeL; - ObjectL.sfxNum = sfxNumL; - if (direction == 2) ObjectL.shouldSfx = (typeL == typeR); - } - - if (direction is 1 or 2) - { - WhichObject.sprite = ObjectTypes[typeR]; - ThrowObject ObjectR = Instantiate(ObjectBase, gameObject.transform).GetComponent(); - ObjectR.startBeat = beat; - ObjectR.curve = CurveFromRight; - ObjectR.fromLeft = false; - ObjectR.direction = direction; - ObjectR.type = typeR; - ObjectR.sfxNum = sfxNumR; - if (direction == 2) ObjectR.shouldSfx = !(typeL == typeR); - } - } - - public void CutEverything(double beat, bool sound, string customText) - { - // plays one anim with sfx when it's not on screen, plays a different anim with no sfx when on screen. ez - if (!birdOnScreen) - { - FullBird.SetActive(true); - if (sound) - { - SoundByte.PlayOneShotGame(sfxNum + "bird_flap"); + if (!muteThrow) { + for (int i = 0; i < (direction == 2 && diffObjs ? 2 : 1); i++) { + SoundByte.PlayOneShotGame(sfxNums[i] + "1", beat, forcePlay: true); } - BirdAnim.Play("FlyIn", 0, 0); - birdOnScreen = true; - cutEverythingText.text = customText; } - else + + if (GameManager.instance.minigameObj.TryGetComponent(out DogNinja instance)) { + instance.ThrowObject(beat, direction, prepare, types, sfxNums[0], sfxNums[1]); + } else { + var queuedThrow = new QueuedThrow() { + types = types, + sfxNumL = sfxNums[0], + sfxNumR = sfxNums[1], + }; + // funny static variable workaround :) + if (!e.dynamicData.TryAdd("throwData", queuedThrow)) { + e["throwData"] = queuedThrow; + } + } + } + + public void ThrowObject(double beat, int direction, bool prepare, int[] types, string sfxNumL, string sfxNumR) + { + BeatAction.New(this, new() { + new(beat, () => queuePrepare = prepare && (PlayerInput.CurrentControlStyle != InputController.ControlStyles.Touch || GameManager.instance.autoplay)) + }); + for (int i = 0; i < (direction == 2 ? 2 : 1); i++) { - BirdAnim.Play("FlyOut", 0, 0); - birdOnScreen = false; + bool l = direction is 2 ? i == 0 : direction == 0; + WhichObject.sprite = ObjectTypes[l ? types[0] : types[1]]; + ThrowObject obj = Instantiate(ObjectBase, gameObject.transform).GetComponent(); + obj.startBeat = beat; + obj.direction = direction; + obj.fromLeft = l; + obj.type = types[i]; + obj.sfxNum = l ? sfxNumL : sfxNumR; + if (direction == 2) obj.shouldSfx = l == (types[0] == types[1]); } + // if (direction is 0 or 2) + // { + // WhichObject.sprite = ObjectTypes[typeL]; + // ThrowObject ObjectL = Instantiate(ObjectBase, gameObject.transform).GetComponent(); + // ObjectL.startBeat = beat; + // ObjectL.curve = CurveFromLeft; + // ObjectL.fromLeft = true; + // ObjectL.direction = direction; + // ObjectL.type = typeL; + // ObjectL.sfxNum = sfxNumL; + // if (direction == 2) ObjectL.shouldSfx = (typeL == typeR); + // } + + // if (direction is 1 or 2) + // { + // WhichObject.sprite = ObjectTypes[typeR]; + // ThrowObject ObjectR = Instantiate(ObjectBase, gameObject.transform).GetComponent(); + // ObjectR.startBeat = beat; + // ObjectR.curve = CurveFromRight; + // ObjectR.fromLeft = false; + // ObjectR.direction = direction; + // ObjectR.type = typeR; + // ObjectR.sfxNum = sfxNumR; + // if (direction == 2) ObjectR.shouldSfx = !(typeL == typeR); + // } + } + + public void CutEverything(double beat, float length, bool sound, string customText) + { + if (sound) SoundByte.PlayOneShotGame("dogNinja/bird_flap"); + BirdAnim.DoScaledAnimationAsync("FlyIn", 0.5f); + cutEverythingText.text = customText; + + BeatAction.New(this, new() { + new(beat + length, () => BirdAnim.Play("FlyOut", 0, 0)) + }); } public void Prepare(double beat) { if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch && PlayerInput.PlayerHasControl()) return; - if (!DogAnim.GetBool("needPrepare")) DogAnim.DoScaledAnimationAsync("Prepare", 0.5f); - DogAnim.SetBool("needPrepare", true); + if (!queuePrepare) DogAnim.DoScaledAnimationAsync("Prepare", 0.5f); + queuePrepare = true; } - public void HereWeGo(double beat) + public static void HereWeGo(double beat) { MultiSound.Play(new MultiSound.Sound[] { - new MultiSound.Sound(sfxNum+"here", beat), - new MultiSound.Sound(sfxNum+"we", beat + 0.5f), - new MultiSound.Sound(sfxNum+"go", beat + 1f) - }, forcePlay: true); - } - - public static void HereWeGoInactive(double beat) - { - DogNinja.instance.HereWeGo(beat); + new MultiSound.Sound("dogNinja/here", beat), + new MultiSound.Sound("dogNinja/we", beat + 0.5f), + new MultiSound.Sound("dogNinja/go", beat + 1f) + }, forcePlay: true); } } } diff --git a/Assets/Scripts/Games/DogNinja/SpawnHalves.cs b/Assets/Scripts/Games/DogNinja/SpawnHalves.cs index 30c76e4cf..b2ef7aba7 100644 --- a/Assets/Scripts/Games/DogNinja/SpawnHalves.cs +++ b/Assets/Scripts/Games/DogNinja/SpawnHalves.cs @@ -4,7 +4,6 @@ using System; using UnityEngine; using NaughtyBezierCurves; -using HeavenStudio.Util; namespace HeavenStudio.Games.Scripts_DogNinja { @@ -25,11 +24,9 @@ namespace HeavenStudio.Games.Scripts_DogNinja BezierCurve3D curve; [SerializeField] Transform halvesParent; - private DogNinja game; private void Awake() { - game = DogNinja.instance; bpmModifier = Conductor.instance.songBpm / 100; songPos = Conductor.instance.songPositionInBeatsAsDouble; } @@ -41,9 +38,10 @@ namespace HeavenStudio.Games.Scripts_DogNinja private void Update() { + // holy shit float flyPosHalves = (Conductor.instance.GetPositionFromBeat(songPos, 3f)*(Conductor.instance.GetPositionFromBeat(songPos, 2f)))+Conductor.instance.GetPositionFromBeat(songPos, 1f); - flyPosHalves = (flyPosHalves*0.2f)+0.35f; - transform.position = curve.GetPoint(flyPosHalves)+objPos; + flyPosHalves = (flyPosHalves * 0.2f) + 0.35f; + transform.position = curve.GetPoint(flyPosHalves) + objPos; float rot = rotSpeed; rot *= lefty ? bpmModifier : -1 * bpmModifier; @@ -51,12 +49,12 @@ namespace HeavenStudio.Games.Scripts_DogNinja // clean-up logic if (flyPosHalves > 1f) { - GameObject.Destroy(gameObject); + Destroy(gameObject); }; if ((!Conductor.instance.isPlaying && !Conductor.instance.isPaused) || GameManager.instance.currentGame != "dogNinja") { - GameObject.Destroy(gameObject); + Destroy(gameObject); }; } } diff --git a/Assets/Scripts/Games/DogNinja/ThrowObject.cs b/Assets/Scripts/Games/DogNinja/ThrowObject.cs index 8aaf1151e..b7b0edc86 100644 --- a/Assets/Scripts/Games/DogNinja/ThrowObject.cs +++ b/Assets/Scripts/Games/DogNinja/ThrowObject.cs @@ -10,6 +10,8 @@ namespace HeavenStudio.Games.Scripts_DogNinja { public class ThrowObject : MonoBehaviour { + [SerializeField] DogNinja game; + public double startBeat; public int type; public bool fromLeft; @@ -26,7 +28,9 @@ namespace HeavenStudio.Games.Scripts_DogNinja [Header("References")] public BezierCurve3D curve; - [SerializeField] BezierCurve3D barelyCurve; + [SerializeField] BezierCurve3D LeftCurve; + [SerializeField] BezierCurve3D RightCurve; + private BezierCurve3D barelyCurve; [SerializeField] BezierCurve3D BarelyLeftCurve; [SerializeField] BezierCurve3D BarelyRightCurve; [SerializeField] GameObject HalvesLeftBase; @@ -35,32 +39,26 @@ namespace HeavenStudio.Games.Scripts_DogNinja public Sprite[] objectLeftHalves; public Sprite[] objectRightHalves; - private DogNinja game; - - private void Awake() - { - game = DogNinja.instance; - DogAnim = game.DogAnim; - } - private void Start() { + DogAnim = game.DogAnim; + curve = fromLeft ? LeftCurve : RightCurve; barelyCurve = fromLeft ? BarelyRightCurve : BarelyLeftCurve; - - game.ScheduleInput(startBeat, 1f, DogNinja.InputAction_Press, Hit, Miss, Out); + + game.ScheduleInput(startBeat, 1f, DogNinja.InputAction_Press, Hit, Miss, null); } private void Update() { - float flyPos = Conductor.instance.GetPositionFromBeat(startBeat, 1f)+1.1f; - float flyPosBarely = Conductor.instance.GetPositionFromBeat(barelyTime, 1f)+1f; + float flyPos = game.conductor.GetPositionFromBeat(startBeat, 1f)+1.1f; + float flyPosBarely = game.conductor.GetPositionFromBeat(barelyTime, 1f)+1f; if (isActive) { flyPos *= 0.31f; transform.position = curve.GetPoint(flyPos); objPos = curve.GetPoint(flyPos); // destroy object when it's off-screen if (flyPos > 1f) { - GameObject.Destroy(gameObject); + Destroy(gameObject); } } else { flyPosBarely *= 0.3f; @@ -68,78 +66,54 @@ namespace HeavenStudio.Games.Scripts_DogNinja float rot = fromLeft ? 200f : -200f; transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (rot * Time.deltaTime)); if (flyPosBarely > 1f) { - GameObject.Destroy(gameObject); + Destroy(gameObject); } } - if ((!Conductor.instance.isPlaying && !Conductor.instance.isPaused) - || GameManager.instance.currentGame != "dogNinja") { - GameObject.Destroy(gameObject); + if ((!game.conductor.isPlaying && !game.conductor.isPaused) + || game.gameManager.currentGame != "dogNinja") { + Destroy(gameObject); } } - private void SuccessSlice() - { - string slice = "Slice" + direction switch - { - 0 => "Left", - 1 => "Right", - _ => "Both", - }; - - DogAnim.DoScaledAnimationAsync(slice, 0.5f); - if (shouldSfx) SoundByte.PlayOneShotGame(sfxNum+"2"); - - game.WhichLeftHalf.sprite = objectLeftHalves[type-1]; - game.WhichRightHalf.sprite = objectRightHalves[type-1]; - - SpawnHalves LeftHalf = Instantiate(HalvesLeftBase, game.gameObject.transform).GetComponent(); - LeftHalf.startBeat = startBeat; - LeftHalf.lefty = fromLeft; - LeftHalf.objPos = objPos; - - SpawnHalves RightHalf = Instantiate(HalvesRightBase, game.gameObject.transform).GetComponent(); - RightHalf.startBeat = startBeat; - RightHalf.lefty = fromLeft; - RightHalf.objPos = objPos; - - GameObject.Destroy(gameObject); - } - - private void JustSlice() - { - isActive = false; - barelyTime = Conductor.instance.songPositionInBeatsAsDouble; - - string barely = "Barely" + direction switch - { - 0 => "Left", - 1 => "Right", - 2 => "Both", - _ => "Both", - }; - - DogAnim.DoScaledAnimationAsync(barely, 0.5f); - SoundByte.PlayOneShotGame("dogNinja/barely"); - } - private void Hit(PlayerActionEvent caller, float state) { - game.DogAnim.SetBool("needPrepare", false); - if (state >= 1f || state <= -1f) JustSlice(); - else SuccessSlice(); + game.queuePrepare = false; + string dir = direction switch { + 0 => "Left", + 1 => "Right", + _ => "Both", + }; + if (state >= 1f || state <= -1f) { + isActive = false; + barelyTime = game.conductor.songPositionInBeatsAsDouble; + + DogAnim.DoScaledAnimationAsync("Barely" + dir, 0.5f); + SoundByte.PlayOneShotGame("dogNinja/barely"); + } else { + DogAnim.DoScaledAnimationAsync("Slice" + dir, 0.5f); + if (shouldSfx) SoundByte.PlayOneShotGame(sfxNum + "2"); + + Debug.Log("type - 1 : " + (type - 1)); + game.WhichLeftHalf.sprite = objectLeftHalves[type - 1]; + game.WhichRightHalf.sprite = objectRightHalves[type - 1]; + for (int i = 0; i < 2; i++) { + SpawnHalves half = Instantiate(i == 0 ? HalvesLeftBase : HalvesRightBase, game.transform).GetComponent(); + half.startBeat = startBeat; + half.lefty = fromLeft; + half.objPos = objPos; + } + + Destroy(gameObject); + } } private void Miss(PlayerActionEvent caller) { - if (!DogAnim.GetBool("needPrepare")) return; - DogAnim.DoScaledAnimationAsync("UnPrepare", 0.5f); - DogAnim.SetBool("needPrepare", false); - } - - private void Out(PlayerActionEvent caller) - { - DogAnim.SetBool("needPrepare", false); + if (!game.queuePrepare) return; + DogAnim.DoScaledAnimationAsync("Unprepare", 0.5f); + game.queuePrepare = false; + game.preparing = false; } } }