浏览代码

Merge branch 'feature/combat-update-consume-input' into main

/devlogs-4-addressable-assets
Amel Negra 4 年前
当前提交
5464088e
共有 9 个文件被更改,包括 22 次插入46 次删除
  1. 7
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit.anim
  2. 7
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit2.anim
  3. 14
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/PigChef_TransitionTable.asset
  4. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset
  5. 6
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
  6. 1
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs
  7. 8
      UOP1_Project/Assets/Prefabs/Audio/Accessories.meta
  8. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset
  9. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset.meta

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


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:

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


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:

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


- 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: 1
Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2}
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 373ff606aeb23834eb964bdf9a6f6e3c, type: 2}
- ExpectedResult: 1
Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2}
Operator: 0
- ExpectedResult: 1
Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 027d32476800b3543b2f5446a59054c8, type: 2}
ToState: {fileID: 11400000, guid: 78675b2bf031c3f4a9c28dda969298e2, type: 2}

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


m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 5cb6e4529b034ff4dbc7a7aa863ce969, type: 2}
- {fileID: 11400000, guid: 23e8862a3aca1b6439bda3bf27d03897, type: 2}

6
UOP1_Project/Assets/Scripts/Characters/Protagonist.cs


_inputReader.startedRunning += OnStartedRunning;
_inputReader.stoppedRunning += OnStoppedRunning;
_inputReader.attackEvent += OnStartedAttack;
_inputReader.attackCanceledEvent += OnStoppedAttack;
//...
}

_inputReader.startedRunning -= OnStartedRunning;
_inputReader.stoppedRunning -= OnStoppedRunning;
_inputReader.attackEvent -= OnStartedAttack;
_inputReader.attackCanceledEvent -= OnStoppedAttack;
//...
}

}
private void OnStartedAttack() => attackInput = true;
private void OnStoppedAttack() => attackInput = false;
// Triggered from Animation Event
public void ConsumeAttackInput() => attackInput = false;
}

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


public override void OnStateEnter()
{
_protagonist.jumpInput = false;
_protagonist.attackInput = false;
_interactionManager.currentInteractionType = InteractionType.None;
}
}

8
UOP1_Project/Assets/Prefabs/Audio/Accessories.meta


fileFormatVersion: 2
guid: 3f7366dd9fb8c2d4e86ccd5c928fe955
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

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


%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

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


fileFormatVersion: 2
guid: 373ff606aeb23834eb964bdf9a6f6e3c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存