浏览代码

Initial Plant Critter combat system - Get Hit - Killed

/main
treivize 4 年前
当前提交
a4dc96e7
共有 68 个文件被更改,包括 1053 次插入90 次删除
  1. 18
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef.controller
  2. 52
      UOP1_Project/Assets/Art/Characters/PlantCritter/Animation/PlantCritter.controller
  3. 131
      UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
  4. 18
      UOP1_Project/Assets/Prefabs/Characters/PlantCritter.prefab
  5. 45
      UOP1_Project/Assets/Prefabs/Props/FryingPan.prefab
  6. 69
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/PlantCritter_TransitionTable.asset
  7. 3
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/States/Dying.asset
  8. 4
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/States/GettingHit.asset
  9. 30
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/PigChef_TransitionTable.asset
  10. 45
      UOP1_Project/Assets/Scripts/Characters/Critter.cs
  11. 4
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
  12. 14
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/DestroyCritter.asset
  13. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/DestroyCritter.asset.meta
  14. 20
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/GettingHitTrigger.asset
  15. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/GettingHitTrigger.asset.meta
  16. 20
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/KilledTrigger.asset
  17. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/KilledTrigger.asset.meta
  18. 14
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/ResetGetHitState.asset
  19. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/ResetGetHitState.asset.meta
  20. 15
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/IsCritterGettingHit.asset
  21. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/IsCritterGettingHit.asset.meta
  22. 15
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/IsCritterKilled.asset
  23. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/IsCritterKilled.asset.meta
  24. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_AttackDuration.asset
  25. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantAttackReload.asset
  26. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantFainting.asset
  27. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantFainting.asset.meta
  28. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantGettingHit.asset
  29. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantGettingHit.asset.meta
  30. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantSpawning.asset
  31. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/States/Killed.asset
  32. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/States/Killed.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.asset
  36. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/AttackTrigger.asset.meta
  37. 15
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsHoldingAttackAction.asset
  38. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsHoldingAttackAction.asset.meta
  39. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset
  40. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset.meta
  41. 17
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset
  42. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset.meta
  43. 40
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ActivateWeaponSO.cs
  44. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ActivateWeaponSO.cs.meta
  45. 29
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DestroyCritterSO.cs
  46. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DestroyCritterSO.cs.meta
  47. 29
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ResetGetHitStateSO.cs
  48. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ResetGetHitStateSO.cs.meta
  49. 31
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCritterGettingHitSO.cs
  50. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCritterGettingHitSO.cs.meta
  51. 29
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCritterKilledHitSO.cs
  52. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCritterKilledHitSO.cs.meta
  53. 32
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingAttackActionConditionSO.cs
  54. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingAttackActionConditionSO.cs.meta
  55. 21
      UOP1_Project/Assets/Scripts/Characters/Weapon.cs
  56. 11
      UOP1_Project/Assets/Scripts/Characters/Weapon.cs.meta
  57. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Time_AttackDuration.asset
  58. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Time_PlantAttackReload.asset
  59. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Time_PlantSpawning.asset
  60. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/UnderAlert_False_OnEnter.asset
  61. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/UnderAlert_False_OnEnter.asset.meta
  62. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/UnderAlert_True_OnEnter.asset
  63. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/UnderAlert_True_OnEnter.asset.meta
  64. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/AttackTrigger.asset
  65. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/AttackTrigger.asset.meta
  66. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_AttackDuration.asset.meta
  67. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantAttackReload.asset.meta
  68. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantSpawning.asset.meta

18
UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef.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_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_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CaneHit
m_Speed: 1
m_Speed: 2
m_CycleOffset: 0
m_Transitions:
- {fileID: -3235251470832908421}

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


m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-3863499363013708062
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: GetHit
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -3077816066201406678}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.70000005
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-3077816066201406678
AnimatorState:
serializedVersion: 5

m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &4871403619933923880
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: Killed
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -1129748727142868905}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.70000005
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &7857801635076326762
AnimatorState:
serializedVersion: 5

m_CycleOffset: 0
m_Transitions:
- {fileID: 2566808087933946074}
- {fileID: 4871403619933923880}
- {fileID: -3863499363013708062}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0

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


type: 2}
jumpInput: 0
extraActionInput: 0
attackInput: 0
isRunning: 0
--- !u!114 &6243045328629046901
MonoBehaviour:
m_ObjectHideFlags: 0

type: 3}
m_PrefabInstance: {fileID: 63278755811306411}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &252170123294662968
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2973733550900446787}
m_Modifications:
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.02
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.02
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 90
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalScale.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalScale.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3516024816309364338, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_LocalScale.z
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4287635054787804360, guid: 643afa2b8f6ada34199e4bd953233667,
type: 3}
propertyPath: m_Name
value: FryingPan
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 643afa2b8f6ada34199e4bd953233667, type: 3}
--- !u!1001 &616254372594363816
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c478a391cfbc4b74ebda3f9a57283705, type: 3}
--- !u!4 &6856479198010907045 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6316997315383997453, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &675585260765626204 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -9084524466672233740, guid: c478a391cfbc4b74ebda3f9a57283705,

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5745820188237013370 stripped
--- !u!4 &8613994902604584134 stripped
m_CorrespondingSourceObject: {fileID: -4093735697823429422, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 9153124993310210414, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8613994902604584134 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 9153124993310210414, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &4150588075678938521 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3536655889091270705, guid: c478a391cfbc4b74ebda3f9a57283705,

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5745820188237013370 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4093735697823429422, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &996919128022108076 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 385238895606393348, guid: c478a391cfbc4b74ebda3f9a57283705,

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6856479198010907045 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6316997315383997453, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2293294246731547253
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f8a6e96eef53e5a4686f9a85a72fe73b, type: 3}
--- !u!198 &4559447277278735044 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 8368940308521127494, guid: f8a6e96eef53e5a4686f9a85a72fe73b,
type: 3}
m_PrefabInstance: {fileID: 5431934865371800706}
m_PrefabAsset: {fileID: 0}
type: 3}
m_PrefabInstance: {fileID: 5431934865371800706}
m_PrefabAsset: {fileID: 0}
--- !u!198 &4559447277278735044 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 8368940308521127494, guid: f8a6e96eef53e5a4686f9a85a72fe73b,
type: 3}
m_PrefabInstance: {fileID: 5431934865371800706}
m_PrefabAsset: {fileID: 0}

type: 3}
propertyPath: m_Name
value: Interaction
objectReference: {fileID: 0}
- target: {fileID: 7947030310713933739, guid: f8b7770f18df7614e90765b366548764,
type: 3}
propertyPath: m_Layer
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f8b7770f18df7614e90765b366548764, type: 3}

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


m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.7
m_Radius: 0.5180242
m_Center: {x: 0, y: 2, z: 0}
m_Center: {x: -0.01654327, y: 2, z: 0.03308654}
--- !u!95 &950100416
Animator:
serializedVersion: 3

m_Script: {fileID: 11500000, guid: d83d74df43f0a0b42afeaffe5c3e02cc, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!136 &1330865802894030747
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745063237678790951}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
m_Radius: 0.38419735
m_Height: 0.9338093
m_Direction: 1
m_Center: {x: 0, y: 0.50470877, z: 0.03308642}
--- !u!1001 &8475173613595968630
PrefabInstance:
m_ObjectHideFlags: 0

45
UOP1_Project/Assets/Prefabs/Props/FryingPan.prefab


- component: {fileID: 3516024816309364338}
- component: {fileID: 532751197952338391}
- component: {fileID: 2341943470874959133}
- component: {fileID: 5014624704208733057}
- component: {fileID: 5113541021563803720}
- component: {fileID: 8314518154369723250}
m_Layer: 0
m_Name: FryingPan
m_TagString: Untagged

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &5014624704208733057
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4287635054787804360}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.5486597, y: 0.13224906, z: 0.54617786}
m_Center: {x: 0, y: -0.07155061, z: 0.5646882}
--- !u!54 &5113541021563803720
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4287635054787804360}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &8314518154369723250
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4287635054787804360}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 37d3da059d8e76b439a7bd852dfb1f1f, type: 3}
m_Name:
m_EditorClassIdentifier:
_attackStrength: 5

69
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/PlantCritter_TransitionTable.asset


Operator: 0
- FromState: {fileID: 11400000, guid: ea7a8e48b1a87c241bb721da98d1d812, type: 2}
ToState: {fileID: 11400000, guid: 5b0e38103a74c054cb968153b3227b71, type: 2}
Conditions: []
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 1ff6d66c9ad367543beb3f2455a1d06c, type: 2}
Operator: 0
ToState: {fileID: 11400000, guid: 628073f665cfda9468013b5ecbc7e6c3, type: 2}
Conditions: []
ToState: {fileID: 11400000, guid: 05826b0374eccc245b9b1da390ab7d04, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 3d30788033cfd9d4fa24fa5112d9430c, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: ea7a8e48b1a87c241bb721da98d1d812, type: 2}
ToState: {fileID: 11400000, guid: 0fe0dc68c0fc2604ca06ad36d16b1117, type: 2}
Conditions:

- ExpectedResult: 1
Condition: {fileID: 11400000, guid: 3d30788033cfd9d4fa24fa5112d9430c, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: ea7a8e48b1a87c241bb721da98d1d812, type: 2}
ToState: {fileID: 11400000, guid: 05826b0374eccc245b9b1da390ab7d04, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 3d30788033cfd9d4fa24fa5112d9430c, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 05826b0374eccc245b9b1da390ab7d04, type: 2}

- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 8d78c6cbad5610342b28e8f66a8a9d11, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: ea7a8e48b1a87c241bb721da98d1d812, type: 2}
ToState: {fileID: 11400000, guid: 628073f665cfda9468013b5ecbc7e6c3, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: fa8a674126a68004888ee6cef86cb5f5, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 628073f665cfda9468013b5ecbc7e6c3, type: 2}
ToState: {fileID: 11400000, guid: f4a07080dd036db4392317bdcd3c20b4, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: c06b3d79b9eb00344825524cd0f6091a, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 5b0e38103a74c054cb968153b3227b71, type: 2}
ToState: {fileID: 11400000, guid: ea7a8e48b1a87c241bb721da98d1d812, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: b5098991df6fea14294cbd13e586cfd8, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 05826b0374eccc245b9b1da390ab7d04, type: 2}
ToState: {fileID: 11400000, guid: 5b0e38103a74c054cb968153b3227b71, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 1ff6d66c9ad367543beb3f2455a1d06c, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 5b0e38103a74c054cb968153b3227b71, type: 2}
ToState: {fileID: 11400000, guid: 05826b0374eccc245b9b1da390ab7d04, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: b5098991df6fea14294cbd13e586cfd8, type: 2}
Operator: 0
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 3d30788033cfd9d4fa24fa5112d9430c, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 05826b0374eccc245b9b1da390ab7d04, type: 2}
ToState: {fileID: 11400000, guid: 628073f665cfda9468013b5ecbc7e6c3, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: fa8a674126a68004888ee6cef86cb5f5, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 0fe9688a46e58a24d8a88cd363a8e472, type: 2}
ToState: {fileID: 11400000, guid: 628073f665cfda9468013b5ecbc7e6c3, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: fa8a674126a68004888ee6cef86cb5f5, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 0fe9688a46e58a24d8a88cd363a8e472, type: 2}
ToState: {fileID: 11400000, guid: 5b0e38103a74c054cb968153b3227b71, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 1ff6d66c9ad367543beb3f2455a1d06c, type: 2}
Operator: 0

3
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/States/Dying.asset


m_Script: {fileID: 11500000, guid: 35432205b9a6a374bbbfe6b7cac92179, type: 3}
m_Name: Dying
m_EditorClassIdentifier:
_actions: []
_actions:
- {fileID: 11400000, guid: 0b27e7b7a119315429d153652b19d7ba, type: 2}

4
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/States/GettingHit.asset


m_Script: {fileID: 11500000, guid: 35432205b9a6a374bbbfe6b7cac92179, type: 3}
m_Name: GettingHit
m_EditorClassIdentifier:
_actions: []
_actions:
- {fileID: 11400000, guid: c6283e9de49b5c243bc610ea00467646, type: 2}
- {fileID: 11400000, guid: bb773df23fde8154e8c970004ac7e561, type: 2}

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


- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 0222b854529fb8f418abda000d3b9b32, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: e128814ff6dbf63449bbc4dc8b6dc066, type: 2}
ToState: {fileID: 11400000, guid: bda8bfafdf35e3e4092bb96279d4894c, type: 2}
Conditions:
- ExpectedResult: 0
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}
Operator: 0
- FromState: {fileID: 11400000, guid: 027d32476800b3543b2f5446a59054c8, type: 2}
ToState: {fileID: 11400000, guid: bda8bfafdf35e3e4092bb96279d4894c, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: ac445a33a0d072a4b96458c8ea343d49, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: bda8bfafdf35e3e4092bb96279d4894c, type: 2}
ToState: {fileID: 11400000, guid: 027d32476800b3543b2f5446a59054c8, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 373ff606aeb23834eb964bdf9a6f6e3c, type: 2}
Operator: 0
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2}
Operator: 0

45
UOP1_Project/Assets/Scripts/Characters/Critter.cs


public class Critter : MonoBehaviour
{
[SerializeField] private int _maxHealth = 20;
private int _currentHealth = default;
private bool _playerInAlertZone = default;
public bool IsPlayerInAlertZone

set => _isPlayerInAttackZone = value;
}
private bool _getHit = default;
public bool GetHit
{
get => _getHit;
set => _getHit = value;
}
private bool _killed = default;
public bool Killed
{
get => _killed;
set => _killed = true;
}
private void Awake()
{
_currentHealth = _maxHealth;
}
private void ReceiveAnAttack(int damange)
{
_currentHealth -= damange;
_getHit = true;
if (_currentHealth <= 0)
{
_killed = true;
}
}
private void OnTriggerEnter(Collider other)
{
Weapon playerWeapon = other.GetComponent<Weapon>();
if (!_getHit && playerWeapon != null && playerWeapon.Enable)
{
ReceiveAnAttack(playerWeapon.AttackStrength);
}
}
public void DestroyCritter()
{
GameObject.Destroy(this.gameObject);
}
}

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


//These fields are read and manipulated by the StateMachine actions
[HideInInspector] public bool jumpInput;
[HideInInspector] public bool extraActionInput;
[HideInInspector] public bool attackInput;
[HideInInspector] public Vector3 movementInput; //Initial input coming from the Protagonist script
[HideInInspector] public Vector3 movementVector; //Final movement vector, manipulated by the StateMachine actions
[HideInInspector] public ControllerColliderHit lastHit;

_inputReader.extraActionEvent += OnExtraAction;
_inputReader.startedRunning += OnStartedRunning;
_inputReader.stoppedRunning += OnStoppedRunning;
_inputReader.attackEvent += OnAttack;
//...
}

{
extraActionInput = true;
}
private void OnAttack() => attackInput = true;
}

14
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/DestroyCritter.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: bb7c6fab05b95d045b98f018c24aaa2e, type: 3}
m_Name: DestroyCritter
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/DestroyCritter.asset.meta


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

20
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/GettingHitTrigger.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: GettingHitTrigger
m_EditorClassIdentifier:
parameterType: 3
parameterName: GetHit
boolValue: 0
intValue: 0
floatValue: 0
whenToRun: 0

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/GettingHitTrigger.asset.meta


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

20
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/KilledTrigger.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: KilledTrigger
m_EditorClassIdentifier:
parameterType: 3
parameterName: Killed
boolValue: 0
intValue: 0
floatValue: 0
whenToRun: 0

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/KilledTrigger.asset.meta


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

14
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/ResetGetHitState.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: fb06e68cc8cd29640979fa1a0ed31fad, type: 3}
m_Name: ResetGetHitState
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/ResetGetHitState.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/IsCritterGettingHit.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: 229c3ea8a20812548985db8aafd01b5f, type: 3}
m_Name: IsCritterGettingHit
m_EditorClassIdentifier:
cacheResult: 1

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/IsCritterGettingHit.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/IsCritterKilled.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: 53e847bca5e64154c9c78ff8acbbe27e, type: 3}
m_Name: IsCritterKilled
m_EditorClassIdentifier:
cacheResult: 1

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/IsCritterKilled.asset.meta


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

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_AttackDuration.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_AttackDuration
m_EditorClassIdentifier:
cacheResult: 1
timerLength: 0.5

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantAttackReload.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_PlantAttackReload
m_EditorClassIdentifier:
cacheResult: 1
timerLength: 0.5

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantFainting.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_PlantFainting
m_EditorClassIdentifier:
cacheResult: 1
timerLength: 2.3

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantFainting.asset.meta


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

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantGettingHit.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_PlantGettingHit
m_EditorClassIdentifier:
cacheResult: 1
timerLength: 0.5

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantGettingHit.asset.meta


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

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantSpawning.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_PlantSpawning
m_EditorClassIdentifier:
cacheResult: 1
timerLength: 0.5

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/States/Killed.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: 35432205b9a6a374bbbfe6b7cac92179, type: 3}
m_Name: Killed
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: c8685ebf9783eb6439751e33431f3107, type: 2}

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/States/Killed.asset.meta


fileFormatVersion: 2
guid: f4a07080dd036db4392317bdcd3c20b4
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.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
m_EditorClassIdentifier:
parameterType: 3
parameterName: CaneHit
boolValue: 0
intValue: 0
floatValue: 0
whenToRun: 0

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


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

15
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsHoldingAttackAction.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: 6f0c74685e74c2546a191f9f99c8b4f8, type: 3}
m_Name: IsHoldingAttackAction
m_EditorClassIdentifier:
cacheResult: 1

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


fileFormatVersion: 2
guid: ac445a33a0d072a4b96458c8ea343d49
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
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:

17
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.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: 35432205b9a6a374bbbfe6b7cac92179, type: 3}
m_Name: Attack
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 5cb6e4529b034ff4dbc7a7aa863ce969, type: 2}
- {fileID: 11400000, guid: 0b38abb4ef196264188f86997cf47770, type: 2}

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


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

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


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

11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ActivateWeaponSO.cs.meta


fileFormatVersion: 2
guid: 505a5fc22f9d36c4592a17e08c85263d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

29
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DestroyCritterSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "DestroyCritter", menuName = "State Machines/Actions/Destroy Critter")]
public class DestroyCritterSO : StateActionSO
{
protected override StateAction CreateAction() => new DestroyCritter();
}
public class DestroyCritter : StateAction
{
private Critter _critter;
public override void Awake(StateMachine stateMachine)
{
_critter = stateMachine.GetComponent<Critter>();
}
public override void OnUpdate()
{
}
public override void OnStateEnter()
{
_critter.DestroyCritter();
}
}

11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DestroyCritterSO.cs.meta


fileFormatVersion: 2
guid: bb7c6fab05b95d045b98f018c24aaa2e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

29
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ResetGetHitStateSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "ResetGetHitState", menuName = "State Machines/Actions/Reset Get Hit State")]
public class ResetGetHitStateSO : StateActionSO
{
protected override StateAction CreateAction() => new ResetGetHitState();
}
public class ResetGetHitState : StateAction
{
private Critter _critter;
public override void Awake(StateMachine stateMachine)
{
_critter = stateMachine.GetComponent<Critter>();
}
public override void OnUpdate()
{
}
public override void OnStateExit()
{
_critter.GetHit = false;
}
}

11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ResetGetHitStateSO.cs.meta


fileFormatVersion: 2
guid: fb06e68cc8cd29640979fa1a0ed31fad
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

31
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCritterGettingHitSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "IsCritterGettingHit", menuName = "State Machines/Conditions/Is Critter Getting Hit")]
public class IsCritterGettingHitSO : StateConditionSO
{
protected override Condition CreateCondition() => new IsCritterGettingHit();
}
public class IsCritterGettingHit : Condition
{
private Critter _critter;
public override void Awake(StateMachine stateMachine)
{
_critter = stateMachine.GetComponent<Critter>();
}
protected override bool Statement()
{
bool result = false;
if (_critter != null)
{
result = _critter.GetHit;
}
return result;
}
}

11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCritterGettingHitSO.cs.meta


fileFormatVersion: 2
guid: 229c3ea8a20812548985db8aafd01b5f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

29
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCritterKilledHitSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "IsCritterKilled", menuName = "State Machines/Conditions/Is Critter Killed")]
public class IsCritterKilledHitSO : StateConditionSO
{
protected override Condition CreateCondition() => new IsCritterKilled();
}
public class IsCritterKilled : Condition
{
private Critter _critter;
public override void Awake(StateMachine stateMachine)
{
_critter = stateMachine.GetComponent<Critter>();
}
protected override bool Statement()
{
bool result = false;
if (_critter != null)
{
result = _critter.Killed;
}
return result;
}
}

11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCritterKilledHitSO.cs.meta


fileFormatVersion: 2
guid: 53e847bca5e64154c9c78ff8acbbe27e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

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


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(menuName = "State Machines/Conditions/Is Holding Attack Action")]
public class IsHoldingAttackActionConditionSO : StateConditionSO<IsHoldingAttackActionCondition> { }
public class IsHoldingAttackActionCondition : Condition
{
//Component references
private Protagonist _protagonistScript;
public override void Awake(StateMachine stateMachine)
{
_protagonistScript = stateMachine.GetComponent<Protagonist>();
}
protected override bool Statement()
{
if (_protagonistScript.attackInput)
{
// Consume the input
_protagonistScript.attackInput = false;
return true;
}
else
{
return false;
}
}
}

11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingAttackActionConditionSO.cs.meta


fileFormatVersion: 2
guid: 6f0c74685e74c2546a191f9f99c8b4f8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

21
UOP1_Project/Assets/Scripts/Characters/Weapon.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Weapon : MonoBehaviour
{
[SerializeField] private int _attackStrength = default;
private bool _enable = false;
public bool Enable
{
get => _enable;
set => _enable = value;
}
public int AttackStrength
{
get => _attackStrength;
}
}

11
UOP1_Project/Assets/Scripts/Characters/Weapon.cs.meta


fileFormatVersion: 2
guid: 37d3da059d8e76b439a7bd852dfb1f1f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Time_AttackDuration.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: Time_AttackDuration
m_EditorClassIdentifier:
cacheResult: 1
_timerLength: 0.5

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Time_PlantAttackReload.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: Time_PlantAttackReload
m_EditorClassIdentifier:
cacheResult: 1
_timerLength: 0.5

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Time_PlantSpawning.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: Time_PlantSpawning
m_EditorClassIdentifier:
cacheResult: 1
_timerLength: 2

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/SetFalseAnimatorUnderAlert.asset → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/UnderAlert_False_OnEnter.asset

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/SetFalseAnimatorUnderAlert.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/UnderAlert_False_OnEnter.asset.meta

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/SetTrueAnimatorUnderAlert.asset → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/UnderAlert_True_OnEnter.asset

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/SetTrueAnimatorUnderAlert.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/UnderAlert_True_OnEnter.asset.meta

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/TriggerAnimatorAttack.asset → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/AttackTrigger.asset

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/TriggerAnimatorAttack.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Actions/AttackTrigger.asset.meta

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Time_AttackDuration.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_AttackDuration.asset.meta

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Time_PlantAttackReload.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantAttackReload.asset.meta

/UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Time_PlantSpawning.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachine/Enemies/PlantCritter/Conditions/Timer_PlantSpawning.asset.meta

正在加载...
取消
保存