浏览代码

Merge branch 'feature/player-cane-hit-anim-variant' of https://github.com/treivize/open-project-1 into pr-bash

# Conflicts:
#	UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
#	UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/AttackTrigger.asset
#	UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/AttackTrigger.asset.meta
#	UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/AttackTrigger_OnEnter.asset
#	UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/AttackTrigger_OnEnter.asset.meta
#	UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_False_OnEnter.asset
#	UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_True_OnEnter.asset.meta
/UI
Ciro Continisio 4 年前
当前提交
7ea6bfdf
共有 38 个文件被更改,包括 3366 次插入207 次删除
  1. 156
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef.controller
  2. 13
      UOP1_Project/Assets/Art/Characters/PlantCritter/Animation/PlantCritter.controller
  3. 14
      UOP1_Project/Assets/Art/Characters/SlimeCritter/Animation/Attack.anim
  4. 21
      UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
  5. 105
      UOP1_Project/Assets/Prefabs/Characters/PlantCritter.prefab
  6. 13
      UOP1_Project/Assets/Prefabs/Characters/SlimeCritter_Base.prefab
  7. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/PlantCritter/States/Attack.asset
  8. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/SlimeRockCritter/States/Attack.asset
  9. 2
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsTalking_False_OnExit.asset
  10. 2
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset
  11. 6
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/PigChef_TransitionTable.asset
  12. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset
  13. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Idle.asset
  14. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Walking.asset
  15. 3
      UOP1_Project/Assets/Scripts/Characters/Attack.cs
  16. 2
      UOP1_Project/Assets/Scripts/Characters/Damageable.cs
  17. 9
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
  18. 12
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingAttackActionConditionSO.cs
  19. 12
      UOP1_Project/Assets/Scripts/Input/InputReader.cs
  20. 2
      UOP1_Project/Assets/Scripts/Characters/Attacker.cs.meta
  21. 1001
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit.anim
  22. 8
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit.anim.meta
  23. 1001
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit2.anim
  24. 8
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit2.anim.meta
  25. 1001
      UOP1_Project/Assets/Art/Characters/PlantCritter/Animation/Attack.anim
  26. 8
      UOP1_Project/Assets/Art/Characters/PlantCritter/Animation/Attack.anim.meta
  27. 20
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_False_OnEnter.asset
  28. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_False_OnEnter.asset.meta
  29. 20
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_True_OnEnter.asset
  30. 17
      UOP1_Project/Assets/Scripts/Characters/Attacker.cs
  31. 14
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/Actions/ActivateAttack.asset
  32. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/Actions/ActivateAttack.asset.meta
  33. 14
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ActivateWeapon.asset
  34. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ActivateWeapon.asset.meta
  35. 20
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/AttackTrigger_OnEnter.asset
  36. 40
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ActivateAttackSO.cs
  37. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_True_OnEnter.asset.meta
  38. 0
      /UOP1_Project/Assets/Scripts/Characters/Attacker.cs.meta

156
UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef.controller


m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: CaneHit
m_ConditionEvent: IsAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 5995182924539841906}

m_Position: {x: 30, y: 300, z: 0}
- serializedVersion: 1
m_State: {fileID: 5995182924539841906}
m_Position: {x: 310, y: 130, z: 0}
m_Position: {x: 450, y: 130, z: 0}
- serializedVersion: 1
m_State: {fileID: 440317740882946628}
m_Position: {x: 270, y: 490, z: 0}

m_Position: {x: 1020, y: -250, z: 0}
- serializedVersion: 1
m_State: {fileID: -450912674566187584}
m_Position: {x: 850, y: -160, z: 0}
m_Position: {x: 150, y: 130, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions:
- {fileID: -5538795969231381003}

m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-4762902591384597963
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: IsAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 5995182924539841906}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.34834528
m_TransitionOffset: 0
m_ExitTime: 0.5307515
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-4333447428942073748
AnimatorState:
serializedVersion: 5

m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: IsWalking
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: IsAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 3444333041856388052}

m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-2033464475531255411
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: IsWalking
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: IsAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -5457889688521372895}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.8828125
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-1634290405553964278
AnimatorStateTransition:
m_ObjectHideFlags: 1

- m_ConditionMode: 2
m_ConditionEvent: IsWalking
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: IsAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -5457889688521372895}
m_Solo: 0

m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-890836485891151347
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: IsWalking
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: IsAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 3444333041856388052}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.8828125
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-450912674566187584
AnimatorState:
serializedVersion: 5

m_PrefabAsset: {fileID: 0}
m_Name: cane_hit2
m_Speed: 1
m_Speed: 1.5
m_Transitions: []
m_Transitions:
- {fileID: -4762902591384597963}
- {fileID: -2033464475531255411}
- {fileID: -890836485891151347}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0

m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -7615664969998887413, guid: 6b30ba958236e834e8e7ccec6f00f90c,
type: 3}
m_Motion: {fileID: 7400000, guid: 8c82fdb0da179794095b8f1f54e520ec, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:

m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: CaneHit
m_Type: 9
m_Controller: {fileID: 0}
- m_Name: IsAttacking
m_Type: 4
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer

m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: CaneHit
m_ConditionEvent: IsAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 5995182924539841906}

m_TransitionOffset: 0
m_ExitTime: 0.98747915
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &5384281710731791955
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: IsAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -450912674566187584}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.2348699
m_TransitionOffset: 0.0075354627
m_ExitTime: 0.5359604
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CaneHit
m_Speed: 2
m_Speed: 1.5
- {fileID: 5384281710731791955}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0

m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -4705932656720488405, guid: 45d1d02514297504a9e2d5547ce4333c,
type: 3}
m_Motion: {fileID: 7400000, guid: 2ac155304be9e4c4b981fc59fbf0ae99, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:

13
UOP1_Project/Assets/Art/Characters/PlantCritter/Animation/PlantCritter.controller


m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer

m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 6720303635017113406, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
m_Motion: {fileID: 7400000, guid: d369cba3ba8337d4b8a1c2d6f5d277f1, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:

14
UOP1_Project/Assets/Art/Characters/SlimeCritter/Animation/Attack.anim


floatParameter: 0
intParameter: 0
messageOptions: 0
- time: 0.5833333
functionName: EnableWeapon
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
- time: 0.75
functionName: DisableWeapon
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0

21
UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab


_walkingParticles: {fileID: 4559447277278735044}
_landParticles: {fileID: 334012115255375375}
_jumpParticles: {fileID: 4839788363397376542}
--- !u!114 &1144843397063430348
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 309633228405838073}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b11d8701791e30b4f8c6dd812db00c7e, type: 3}
m_Name:
m_EditorClassIdentifier:
_attack: {fileID: 2950959790634801748}
--- !u!1 &648091144661104905
GameObject:
m_ObjectHideFlags: 0

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8237582483159280860 stripped
--- !u!4 &8916725356198928834 stripped
m_CorrespondingSourceObject: {fileID: 8853132977705894260, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -922126996795814806, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8916725356198928834 stripped
--- !u!4 &8237582483159280860 stripped
m_CorrespondingSourceObject: {fileID: -922126996795814806, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 8853132977705894260, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

105
UOP1_Project/Assets/Prefabs/Characters/PlantCritter.prefab


_getHitEffectSO: {fileID: 11400000, guid: b025ed16ca528cd4da2ec4afe52db2d4, type: 2}
_mainMeshRenderer: {fileID: 855856000742017355}
_droppableRewardSO: {fileID: 11400000, guid: 6158158d6ef9a3d47827f7851295bcef, type: 2}
--- !u!114 &1889831287862199189
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745063237678790951}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b11d8701791e30b4f8c6dd812db00c7e, type: 3}
m_Name:
m_EditorClassIdentifier:
_attack: {fileID: 5383258290465724991}
--- !u!1001 &4629040063581857200
PrefabInstance:
m_ObjectHideFlags: 0

- target: {fileID: -8049899988642145405, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -36.228962
value: -45.332375
value: 20.119268
value: 23.118322
value: -4.7836666
value: -7.9019136
value: 18.346647
value: 21.510841
value: -5.9808598
value: -2.8930762
value: 4.430854
value: 4.5766134
objectReference: {fileID: 0}
- target: {fileID: -7897143885434458789, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: -7194598512780364571, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -86.44921
value: -85.697975
value: -89.99974
value: -179.9978
value: 89.99977
value: 179.99785
value: 71.03555
value: 72.76993
value: 58.439453
value: 65.12152
value: 68.42059
value: 75.654755
value: -0.000048070175
value: -0.00004816352
value: -0.00004288628
value: -0.00004276867
objectReference: {fileID: 0}
- target: {fileID: -5533980067985051259, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: -3870551865322967335, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -0.7203539
value: -0.720354
value: 0.030121556
value: 0.030121585
objectReference: {fileID: 0}
- target: {fileID: -3870551865322967335, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: -3027282400719110748, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 1.1414187
value: 1.3124862
value: -21.61716
value: -25.091242
value: -49.253605
value: -49.330902
objectReference: {fileID: 0}
- target: {fileID: -2196441651781931383, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: -2196441651781931383, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0.030210743
value: 0.030210676
objectReference: {fileID: 0}
- target: {fileID: -2196441651781931383, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: -1718802088460758174, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 1.6105578
value: 1.8499092
value: 22.786781
value: 26.44861
value: 48.60588
value: 48.72076
objectReference: {fileID: 0}
- target: {fileID: -108859347475657411, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: 1029193162744603170, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 40.749504
value: 32.331055
value: -9.233517
value: -11.734205
value: 12.623396
value: 8.81739
objectReference: {fileID: 0}
- target: {fileID: 1745331680755163471, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: 3424184763994540682, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -15.019405
value: -13.612426
value: 101.400505
value: 103.49201
value: 59.39059
value: 52.997936
objectReference: {fileID: 0}
- target: {fileID: 5746564759562468899, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: 5746564759562468899, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -0.000014109932
value: -0.000014063178
objectReference: {fileID: 0}
- target: {fileID: 5836807036472995663, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: 5836807036472995663, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -0.16106656
value: -0.16106635
value: 0.38635737
value: 0.38635758
value: 0.000041032625
value: 0.000040839575
value: -0.00004908869
value: -0.000049223487
objectReference: {fileID: 0}
- target: {fileID: 6520636896438483499, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: 6566495199314442476, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 15.653004
value: 12.180236
value: -84.78919
value: -85.24309
value: 8.174323
value: 6.288136
value: 55.15468
value: 54.348297
value: -176.37294
value: -176.32777
value: -172.34407
value: -172.51015
value: -23.481403
value: -11.398729
value: -83.25889
value: -85.32961
value: -12.735316
value: -5.8720756
objectReference: {fileID: 0}
- target: {fileID: 8417361359673230750, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

- target: {fileID: 8781925660957204314, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -72.5076
value: -67.510216
value: -115.546875
value: -139.38078
value: 118.352394
value: 142.70969
objectReference: {fileID: 0}
- target: {fileID: 8879528566716807029, guid: 415e24332f8993c4da4c452ed27d2873,
type: 3}

13
UOP1_Project/Assets/Prefabs/Characters/SlimeCritter_Base.prefab


_playerTransform: {fileID: 11400000, guid: 35fc4039342b6ba458d0d4429e89ee74, type: 2}
_propelFactor: 0.8
_propelDuration: 0.2
--- !u!114 &4216565540698897756
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8687264390989375961}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b11d8701791e30b4f8c6dd812db00c7e, type: 3}
m_Name:
m_EditorClassIdentifier:
_attack: {fileID: 4088571348706217679}
--- !u!114 &4341850141098197772
MonoBehaviour:
m_ObjectHideFlags: 0

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/PlantCritter/States/Attack.asset


m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 68e8e627e360ecb42ac7f67e1d73b6ce, type: 2}
- {fileID: 11400000, guid: 1635753dee8f59a4495211e1f6d07835, type: 2}

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/SlimeRockCritter/States/Attack.asset


m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 68e8e627e360ecb42ac7f67e1d73b6ce, type: 2}
- {fileID: 11400000, guid: 1635753dee8f59a4495211e1f6d07835, type: 2}

2
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsTalking_False_OnExit.asset


m_Name: IsTalking_False_OnExit
m_EditorClassIdentifier:
parameterType: 0
parameterName: IsTalking
parameterName: IsAttacking
boolValue: 0
intValue: 0
floatValue: 0

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


m_Name: Timer_AttackAnimation
m_EditorClassIdentifier:
cacheResult: 1
timerLength: 1.15
timerLength: 0.5

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


- 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: 1
Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, 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: 0b38abb4ef196264188f86997cf47770, type: 2}

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


- {fileID: 11400000, guid: bd85c54d16eb60c4c99504f1679af851, type: 2}
- {fileID: 11400000, guid: 47d9da417e68970419335f80f4395239, type: 2}
- {fileID: 11400000, guid: 23e8862a3aca1b6439bda3bf27d03897, type: 2}
- {fileID: 11400000, guid: ba1e9b4d062da724c909db617eb613ae, type: 2}

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


- {fileID: 11400000, guid: 5aac41c53e47f1040a52303b2000ceb5, type: 2}
- {fileID: 11400000, guid: 74800142628360a42bb516b1e5c630e1, type: 2}
- {fileID: 11400000, guid: 23e8862a3aca1b6439bda3bf27d03897, type: 2}
- {fileID: 11400000, guid: ba1e9b4d062da724c909db617eb613ae, type: 2}

3
UOP1_Project/Assets/Scripts/Characters/Attack.cs


{
[SerializeField]
private AttackConfigSO _attackConfigSO;
private bool _enable = false;
public bool Enable { get; set; }
public AttackConfigSO AttackConfig => _attackConfigSO;

2
UOP1_Project/Assets/Scripts/Characters/Damageable.cs


}
}
private void OnTriggerEnter(Collider other)
private void OnTriggerStay(Collider other)
{
// Avoid friendly fire!
if (!other.tag.Equals(gameObject.tag))

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


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

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

_openInventoryChannel.RaiseEvent();
}
private void OnAttack() => attackInput = true;
private void OnStartedAttack() => attackInput = true;
private void OnStoppedAttack() => attackInput = false;
}

12
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingAttackActionConditionSO.cs


protected override bool Statement()
{
if (_protagonistScript.attackInput)
{
// Consume the input
_protagonistScript.attackInput = false;
return true;
}
else
{
return false;
}
return _protagonistScript.attackInput;
}
}

12
UOP1_Project/Assets/Scripts/Input/InputReader.cs


public event UnityAction jumpEvent = delegate { };
public event UnityAction jumpCanceledEvent = delegate { };
public event UnityAction attackEvent = delegate { };
public event UnityAction attackCanceledEvent = delegate { };
public event UnityAction interactEvent = delegate { }; // Used to talk, pickup objects, interact with tools like the cooking cauldron
public event UnityAction openInventoryEvent = delegate { }; // Used to bring up the inventory
public event UnityAction pauseEvent = delegate { };

public void OnAttack(InputAction.CallbackContext context)
{
if (context.phase == InputActionPhase.Performed)
attackEvent.Invoke();
switch (context.phase)
{
case InputActionPhase.Performed:
attackEvent.Invoke();
break;
case InputActionPhase.Canceled:
attackCanceledEvent.Invoke();
break;
}
}
public void OnOpenInventory(InputAction.CallbackContext context)

2
UOP1_Project/Assets/Scripts/Characters/Attacker.cs.meta


fileFormatVersion: 2
guid: 505a5fc22f9d36c4592a17e08c85263d
guid: b11d8701791e30b4f8c6dd812db00c7e
MonoImporter:
externalObjects: {}
serializedVersion: 2

1001
UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit.anim
文件差异内容过多而无法显示
查看文件

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


fileFormatVersion: 2
guid: 2ac155304be9e4c4b981fc59fbf0ae99
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

1001
UOP1_Project/Assets/Art/Characters/PigChef/Animation/CaneHit2.anim
文件差异内容过多而无法显示
查看文件

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


fileFormatVersion: 2
guid: 8c82fdb0da179794095b8f1f54e520ec
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

1001
UOP1_Project/Assets/Art/Characters/PlantCritter/Animation/Attack.anim
文件差异内容过多而无法显示
查看文件

8
UOP1_Project/Assets/Art/Characters/PlantCritter/Animation/Attack.anim.meta


fileFormatVersion: 2
guid: d369cba3ba8337d4b8a1c2d6f5d277f1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

20
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_False_OnEnter.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: 4c70afd7f911db7449d578cc18700875, type: 3}
m_Name: IsAttacking_False_OnEnter
m_EditorClassIdentifier:
parameterType: 0
parameterName: IsAttacking
boolValue: 0
intValue: 0
floatValue: 0
whenToRun: 0

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_False_OnEnter.asset.meta


fileFormatVersion: 2
guid: ba1e9b4d062da724c909db617eb613ae
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

20
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_True_OnEnter.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: 4c70afd7f911db7449d578cc18700875, type: 3}
m_Name: IsAttacking_True_OnEnter
m_EditorClassIdentifier:
parameterType: 0
parameterName: IsAttacking
boolValue: 1
intValue: 0
floatValue: 0
whenToRun: 0

17
UOP1_Project/Assets/Scripts/Characters/Attacker.cs


using UnityEngine;
public class Attacker : MonoBehaviour
{
[SerializeField]
private Attack _attack;
public void EnableWeapon()
{
_attack.Enable = true;
}
public void DisableWeapon()
{
_attack.Enable = false;
}
}

14
UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/Actions/ActivateAttack.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: 505a5fc22f9d36c4592a17e08c85263d, type: 3}
m_Name: ActivateAttack
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/Actions/ActivateAttack.asset.meta


fileFormatVersion: 2
guid: 1635753dee8f59a4495211e1f6d07835
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

14
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ActivateWeapon.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: 505a5fc22f9d36c4592a17e08c85263d, type: 3}
m_Name: ActivateWeapon
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ActivateWeapon.asset.meta


fileFormatVersion: 2
guid: 0b38abb4ef196264188f86997cf47770
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

20
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/AttackTrigger_OnEnter.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: 4c70afd7f911db7449d578cc18700875, type: 3}
m_Name: AttackTrigger_OnEnter
m_EditorClassIdentifier:
parameterType: 3
parameterName: CaneHit
boolValue: 0
intValue: 0
floatValue: 0
whenToRun: 0

40
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ActivateAttackSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "ActivateAttack", menuName = "State Machines/Actions/Activate Attack")]
public class ActivateAttackSO : StateActionSO
{
protected override StateAction CreateAction() => new ActivateAttack();
}
public class ActivateAttack : StateAction
{
private Attack _attack;
public override void Awake(StateMachine stateMachine)
{
_attack = stateMachine.gameObject.GetComponentInChildren<Attack>();
}
public override void OnUpdate()
{
}
public override void OnStateEnter()
{
if (_attack != null)
{
_attack.Enable = true;
}
}
public override void OnStateExit()
{
if (_attack != null)
{
_attack.Enable = false;
}
}
}

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/AttackTrigger_OnEnter.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsAttacking_True_OnEnter.asset.meta

/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ActivateAttackSO.cs.meta → /UOP1_Project/Assets/Scripts/Characters/Attacker.cs.meta

正在加载...
取消
保存