diff --git a/UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit.anim b/UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit.anim index b0cbf48be6..751f72c2ea 100644 --- a/UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit.anim +++ b/UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit.anim @@ -75675,6 +75675,13 @@ AnimationClip: m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: + - time: 0.68333334 + functionName: ConsumeAttackInput + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 - time: 0.73333335 functionName: PlaySlashEffect data: diff --git a/UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit2.anim b/UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit2.anim index d9f361f37e..5097ed1109 100644 --- a/UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit2.anim +++ b/UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit2.anim @@ -80121,6 +80121,13 @@ AnimationClip: m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: + - time: 0.78333336 + functionName: ConsumeAttackInput + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 - time: 0.8666667 functionName: PlayReverseSlashEffect data: diff --git a/UOP1_Project/Assets/Prefabs/Audio/Accessories.meta b/UOP1_Project/Assets/Prefabs/Audio/Accessories.meta deleted file mode 100644 index e9d15c834d..0000000000 --- a/UOP1_Project/Assets/Prefabs/Audio/Accessories.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3f7366dd9fb8c2d4e86ccd5c928fe955 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset b/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset deleted file mode 100644 index 13f14f5515..0000000000 --- a/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset +++ /dev/null @@ -1,16 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8139f9f328ed1144690b7a9ffca2d5b4, type: 3} - m_Name: Timer_AttackAnimation - m_EditorClassIdentifier: - cacheResult: 1 - timerLength: 0.5 diff --git a/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset.meta b/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset.meta deleted file mode 100644 index 1cb54ada8d..0000000000 --- a/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 373ff606aeb23834eb964bdf9a6f6e3c -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/PigChef_TransitionTable.asset b/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/PigChef_TransitionTable.asset index b2c278ae35..afa9983ebb 100644 --- a/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/PigChef_TransitionTable.asset +++ b/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/PigChef_TransitionTable.asset @@ -169,26 +169,20 @@ MonoBehaviour: - FromState: {fileID: 11400000, guid: bda8bfafdf35e3e4092bb96279d4894c, type: 2} ToState: {fileID: 11400000, guid: 027d32476800b3543b2f5446a59054c8, type: 2} Conditions: - - ExpectedResult: 0 - Condition: {fileID: 11400000, guid: 373ff606aeb23834eb964bdf9a6f6e3c, type: 2} + - ExpectedResult: 1 + Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2} Operator: 0 - ExpectedResult: 0 Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2} Operator: 0 - - ExpectedResult: 1 - Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2} - Operator: 0 - FromState: {fileID: 11400000, guid: bda8bfafdf35e3e4092bb96279d4894c, type: 2} ToState: {fileID: 11400000, guid: e128814ff6dbf63449bbc4dc8b6dc066, type: 2} Conditions: - - ExpectedResult: 0 - Condition: {fileID: 11400000, guid: 373ff606aeb23834eb964bdf9a6f6e3c, type: 2} - Operator: 0 - ExpectedResult: 1 - Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2} + Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2} Operator: 0 - ExpectedResult: 1 - Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2} + Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2} Operator: 0 - FromState: {fileID: 11400000, guid: 027d32476800b3543b2f5446a59054c8, type: 2} ToState: {fileID: 11400000, guid: 78675b2bf031c3f4a9c28dda969298e2, type: 2} diff --git a/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset b/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset index 47e410c839..e807178821 100644 --- a/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset +++ b/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset @@ -14,3 +14,4 @@ MonoBehaviour: m_EditorClassIdentifier: _actions: - {fileID: 11400000, guid: 5cb6e4529b034ff4dbc7a7aa863ce969, type: 2} + - {fileID: 11400000, guid: 23e8862a3aca1b6439bda3bf27d03897, type: 2} diff --git a/UOP1_Project/Assets/Scripts/Characters/Protagonist.cs b/UOP1_Project/Assets/Scripts/Characters/Protagonist.cs index 4b668700bf..93e4d0f5cd 100644 --- a/UOP1_Project/Assets/Scripts/Characters/Protagonist.cs +++ b/UOP1_Project/Assets/Scripts/Characters/Protagonist.cs @@ -44,7 +44,6 @@ private void OnEnable() _inputReader.startedRunning += OnStartedRunning; _inputReader.stoppedRunning += OnStoppedRunning; _inputReader.attackEvent += OnStartedAttack; - _inputReader.attackCanceledEvent += OnStoppedAttack; //... } @@ -58,7 +57,6 @@ private void OnDisable() _inputReader.startedRunning -= OnStartedRunning; _inputReader.stoppedRunning -= OnStoppedRunning; _inputReader.attackEvent -= OnStartedAttack; - _inputReader.attackCanceledEvent -= OnStoppedAttack; //... } @@ -123,5 +121,7 @@ private void OnOpenInventory() } private void OnStartedAttack() => attackInput = true; - private void OnStoppedAttack() => attackInput = false; + + // Triggered from Animation Event + public void ConsumeAttackInput() => attackInput = false; } diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs index cb7cb814b9..57997e754b 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs @@ -26,7 +26,6 @@ public override void OnUpdate() public override void OnStateEnter() { _protagonist.jumpInput = false; - _protagonist.attackInput = false; _interactionManager.currentInteractionType = InteractionType.None; } }