Skip to content

Commit

Permalink
Merge branch 'feature/combat-update-consume-input' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
amel-unity committed Mar 19, 2021
2 parents a9c09d7 + 6269909 commit 676d768
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 0 additions & 8 deletions UOP1_Project/Assets/Prefabs/Audio/Accessories.meta

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ MonoBehaviour:
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 5cb6e4529b034ff4dbc7a7aa863ce969, type: 2}
- {fileID: 11400000, guid: 23e8862a3aca1b6439bda3bf27d03897, type: 2}
6 changes: 3 additions & 3 deletions UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ private void OnEnable()
_inputReader.startedRunning += OnStartedRunning;
_inputReader.stoppedRunning += OnStoppedRunning;
_inputReader.attackEvent += OnStartedAttack;
_inputReader.attackCanceledEvent += OnStoppedAttack;
//...
}

Expand All @@ -58,7 +57,6 @@ private void OnDisable()
_inputReader.startedRunning -= OnStartedRunning;
_inputReader.stoppedRunning -= OnStoppedRunning;
_inputReader.attackEvent -= OnStartedAttack;
_inputReader.attackCanceledEvent -= OnStoppedAttack;
//...
}

Expand Down Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public override void OnUpdate()
public override void OnStateEnter()
{
_protagonist.jumpInput = false;
_protagonist.attackInput = false;
_interactionManager.currentInteractionType = InteractionType.None;
}
}

0 comments on commit 676d768

Please sign in to comment.