Skip to content

Commit 676d768

Browse files
committed
Merge branch 'feature/combat-update-consume-input' into main
2 parents a9c09d7 + 6269909 commit 676d768

File tree

9 files changed

+22
-46
lines changed

9 files changed

+22
-46
lines changed

UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit.anim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75675,6 +75675,13 @@ AnimationClip:
7567575675
m_HasGenericRootTransform: 0
7567675676
m_HasMotionFloatCurves: 0
7567775677
m_Events:
75678+
- time: 0.68333334
75679+
functionName: ConsumeAttackInput
75680+
data:
75681+
objectReferenceParameter: {fileID: 0}
75682+
floatParameter: 0
75683+
intParameter: 0
75684+
messageOptions: 0
7567875685
- time: 0.73333335
7567975686
functionName: PlaySlashEffect
7568075687
data:

UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit2.anim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80121,6 +80121,13 @@ AnimationClip:
8012180121
m_HasGenericRootTransform: 0
8012280122
m_HasMotionFloatCurves: 0
8012380123
m_Events:
80124+
- time: 0.78333336
80125+
functionName: ConsumeAttackInput
80126+
data:
80127+
objectReferenceParameter: {fileID: 0}
80128+
floatParameter: 0
80129+
intParameter: 0
80130+
messageOptions: 0
8012480131
- time: 0.8666667
8012580132
functionName: PlayReverseSlashEffect
8012680133
data:

UOP1_Project/Assets/Prefabs/Audio/Accessories.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset

Lines changed: 0 additions & 16 deletions
This file was deleted.

UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/PigChef_TransitionTable.asset

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,26 +169,20 @@ MonoBehaviour:
169169
- FromState: {fileID: 11400000, guid: bda8bfafdf35e3e4092bb96279d4894c, type: 2}
170170
ToState: {fileID: 11400000, guid: 027d32476800b3543b2f5446a59054c8, type: 2}
171171
Conditions:
172-
- ExpectedResult: 0
173-
Condition: {fileID: 11400000, guid: 373ff606aeb23834eb964bdf9a6f6e3c, type: 2}
172+
- ExpectedResult: 1
173+
Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2}
174174
Operator: 0
175175
- ExpectedResult: 0
176176
Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2}
177177
Operator: 0
178-
- ExpectedResult: 1
179-
Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2}
180-
Operator: 0
181178
- FromState: {fileID: 11400000, guid: bda8bfafdf35e3e4092bb96279d4894c, type: 2}
182179
ToState: {fileID: 11400000, guid: e128814ff6dbf63449bbc4dc8b6dc066, type: 2}
183180
Conditions:
184-
- ExpectedResult: 0
185-
Condition: {fileID: 11400000, guid: 373ff606aeb23834eb964bdf9a6f6e3c, type: 2}
186-
Operator: 0
187181
- ExpectedResult: 1
188-
Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2}
182+
Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2}
189183
Operator: 0
190184
- ExpectedResult: 1
191-
Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2}
185+
Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2}
192186
Operator: 0
193187
- FromState: {fileID: 11400000, guid: 027d32476800b3543b2f5446a59054c8, type: 2}
194188
ToState: {fileID: 11400000, guid: 78675b2bf031c3f4a9c28dda969298e2, type: 2}

UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ MonoBehaviour:
1414
m_EditorClassIdentifier:
1515
_actions:
1616
- {fileID: 11400000, guid: 5cb6e4529b034ff4dbc7a7aa863ce969, type: 2}
17+
- {fileID: 11400000, guid: 23e8862a3aca1b6439bda3bf27d03897, type: 2}

UOP1_Project/Assets/Scripts/Characters/Protagonist.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ private void OnEnable()
4444
_inputReader.startedRunning += OnStartedRunning;
4545
_inputReader.stoppedRunning += OnStoppedRunning;
4646
_inputReader.attackEvent += OnStartedAttack;
47-
_inputReader.attackCanceledEvent += OnStoppedAttack;
4847
//...
4948
}
5049

@@ -58,7 +57,6 @@ private void OnDisable()
5857
_inputReader.startedRunning -= OnStartedRunning;
5958
_inputReader.stoppedRunning -= OnStoppedRunning;
6059
_inputReader.attackEvent -= OnStartedAttack;
61-
_inputReader.attackCanceledEvent -= OnStoppedAttack;
6260
//...
6361
}
6462

@@ -123,5 +121,7 @@ private void OnOpenInventory()
123121
}
124122

125123
private void OnStartedAttack() => attackInput = true;
126-
private void OnStoppedAttack() => attackInput = false;
124+
125+
// Triggered from Animation Event
126+
public void ConsumeAttackInput() => attackInput = false;
127127
}

UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public override void OnUpdate()
2626
public override void OnStateEnter()
2727
{
2828
_protagonist.jumpInput = false;
29-
_protagonist.attackInput = false;
3029
_interactionManager.currentInteractionType = InteractionType.None;
3130
}
3231
}

0 commit comments

Comments
 (0)