浏览代码

Character state machine

/main
Ciro Continisio 4 年前
当前提交
72d7c142
共有 117 个文件被更改,包括 1334 次插入972 次删除
  1. 858
      UOP1_Project/Assets/Scenes/StateMachines.unity
  2. 151
      UOP1_Project/Assets/Scripts/Characters/Character.cs
  3. 36
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
  4. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/RotateActionSO.cs.meta
  5. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ApplyMovementVectorActionSO.cs.meta
  6. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DescendActionSO.cs.meta
  7. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/GroundGravityActionSO.cs.meta
  8. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/HorizontalMoveActionSO.cs.meta
  9. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/SlideActionSO.cs.meta
  10. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasHitHeadConditionSO.cs.meta
  11. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/AscendActionSO.cs.meta
  12. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist.meta
  13. 8
      UOP1_Project/Assets/Scripts/Characters/StateMachine.meta
  14. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions.meta
  15. 14
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/ApplyMovementVector.asset
  16. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/ApplyMovementVector.asset.meta
  17. 14
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Ascend.asset
  18. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Ascend.asset.meta
  19. 14
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Descend.asset
  20. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Descend.asset.meta
  21. 15
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/GroundGravity.asset
  22. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/GroundGravity.asset.meta
  23. 15
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/MoveInTheAir.asset
  24. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/MoveInTheAir.asset.meta
  25. 15
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Rotate.asset
  26. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Rotate.asset.meta
  27. 15
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/RotateFast.asset
  28. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/RotateFast.asset.meta
  29. 15
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Slide.asset
  30. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Slide.asset.meta
  31. 15
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/SlidingGravity.asset
  32. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/SlidingGravity.asset.meta
  33. 15
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Walk.asset
  34. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Walk.asset.meta
  35. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions.meta
  36. 14
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/HasHitHead.asset
  37. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/HasHitHead.asset.meta
  38. 14
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsGrounded.asset
  39. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsGrounded.asset.meta
  40. 14
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsHoldingJump.asset
  41. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsHoldingJump.asset.meta
  42. 15
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsMoving.asset
  43. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsMoving.asset.meta
  44. 14
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsSliding.asset
  45. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsSliding.asset.meta
  46. 15
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/JumpHoldTimer.asset
  47. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/JumpHoldTimer.asset.meta
  48. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States.meta
  49. 20
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Idle.asset
  50. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Idle.asset.meta
  51. 22
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/JumpAscending.asset
  52. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/JumpAscending.asset.meta
  53. 22
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/JumpDescending.asset
  54. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/JumpDescending.asset.meta
  55. 21
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Sliding.asset
  56. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Sliding.asset.meta
  57. 24
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Walking.asset
  58. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Walking.asset.meta
  59. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions.meta
  60. 19
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/BeginJump.asset
  61. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/BeginJump.asset.meta
  62. 22
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/BeginJumpDescent.asset
  63. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/BeginJumpDescent.asset.meta
  64. 19
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/HitHead.asset
  65. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/HitHead.asset.meta
  66. 22
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/LandIdle.asset
  67. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/LandIdle.asset.meta
  68. 22
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/LandWalking.asset
  69. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/LandWalking.asset.meta
  70. 19
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StartSliding.asset
  71. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StartSliding.asset.meta
  72. 19
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StartWalking.asset
  73. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StartWalking.asset.meta
  74. 19
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StopSliding.asset
  75. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StopSliding.asset.meta
  76. 19
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StopWalking.asset
  77. 8
      UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StopWalking.asset.meta
  78. 8
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions.meta
  79. 24
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ApplyMovementVectorActionSO.cs
  80. 50
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/AscendActionSO.cs
  81. 42
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DescendActionSO.cs
  82. 35
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/GroundGravityActionSO.cs
  83. 35
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/HorizontalMoveActionSO.cs
  84. 48
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/RotateActionSO.cs
  85. 42
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/SlideActionSO.cs
  86. 8
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions.meta
  87. 45
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasHitHeadConditionSO.cs
  88. 18
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCharacterControllerGroundedConditionSO.cs
  89. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCharacterControllerGroundedConditionSO.cs.meta
  90. 19
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingJumpConditionSO.cs
  91. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingJumpConditionSO.cs.meta
  92. 39
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsMovingConditionSO.cs

858
UOP1_Project/Assets/Scenes/StateMachines.unity


m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 233317031}
m_LocalRotation: {x: 0.1815913, y: -0.34830034, z: 0.06897038, w: 0.91703576}
m_LocalRotation: {x: 0.18825838, y: -0.24172033, z: 0.047865424, w: 0.9507045}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &291513498 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
m_PrefabInstance: {fileID: 1531195266}
m_PrefabAsset: {fileID: 0}
--- !u!114 &291513499
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 291513498}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 96a840f8cd2f43e47a32dc87d494422f, type: 3}
m_Name:
m_EditorClassIdentifier:
_target: {fileID: 474047189}
_speed: 10
--- !u!1 &308908774
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &474047189 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
m_PrefabInstance: {fileID: 659246790}
m_PrefabAsset: {fileID: 0}
--- !u!1 &526256409
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &557383924
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.x
value: 3.58
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.73
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.z
value: -32.29
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_RootOrder
value: 36
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957525, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _maxFullness
value: 50
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957525, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _hungerPerSecond
value: 4
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957525, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _isHungryThreshold
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.data[0]
value:
objectReference: {fileID: 11400000, guid: ca8b5f6d1a6a0474d9ce887a85bc0d2b,
type: 2}
- target: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_Name
value: Sphere (5)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2ae670cd29a6f4843aa75201aa44ef31, type: 3}
--- !u!4 &654477362 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
m_PrefabInstance: {fileID: 1502309802}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &659246790
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 211818859182309264, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: gameplayCamera
value:
objectReference: {fileID: 1961065790}
- target: {fileID: 3341179906418240709, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_Name
value: Pig (1)
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalPosition.x
value: -8.85
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalPosition.z
value: -15.732899
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_RootOrder
value: 29
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0fa393e1e37bc9e4e829c25a9452bcd3, type: 3}
--- !u!1 &695792052
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &923580480 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
m_PrefabInstance: {fileID: 1926130911}
m_PrefabAsset: {fileID: 0}
--- !u!114 &923580481
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 923580480}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 96a840f8cd2f43e47a32dc87d494422f, type: 3}
m_Name:
m_EditorClassIdentifier:
_target: {fileID: 474047189}
_speed: 10
--- !u!1 &955504286
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 25
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 12.259001}
--- !u!1001 &987108458
PrefabInstance:
--- !u!1 &1044138825 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3341179906418240709, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
m_PrefabInstance: {fileID: 1780617058}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1044138829 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
m_PrefabInstance: {fileID: 1780617058}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1044138830
MonoBehaviour:
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.x
value: 3.58
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.73
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.z
value: -32.29
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_RootOrder
value: 32
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957525, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _maxFullness
value: 50
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957525, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _hungerPerSecond
value: 4
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957525, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _isHungryThreshold
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.data[0]
value:
objectReference: {fileID: 11400000, guid: ca8b5f6d1a6a0474d9ce887a85bc0d2b,
type: 2}
- target: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_Name
value: Sphere (1)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2ae670cd29a6f4843aa75201aa44ef31, type: 3}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1044138825}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1eeda163c70b3cb4ebb88ba92f608fd8, type: 3}
m_Name:
m_EditorClassIdentifier:
CurrentState:
debug: 1
_initialStateSO: {fileID: 11400000, guid: e128814ff6dbf63449bbc4dc8b6dc066, type: 2}
--- !u!1 &1057381576
GameObject:
m_ObjectHideFlags: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1069947040}
m_LocalRotation: {x: 0.1767857, y: -0.34865677, z: 0.067145154, w: 0.9179743}
m_LocalRotation: {x: 0.18327633, y: -0.24196772, z: 0.046598718, w: 0.9516775}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1184947906
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.x
value: 15.239536
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.z
value: -25.260427
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_RootOrder
value: 35
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.data[0]
value:
objectReference: {fileID: 11400000, guid: cd6e687e4cd39c64f94866ef95aacf5b,
type: 2}
- target: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_Name
value: Sphere (3)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2ae670cd29a6f4843aa75201aa44ef31, type: 3}
--- !u!1001 &1259640866
PrefabInstance:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1392770825 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
m_PrefabInstance: {fileID: 557383924}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1392770826
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1392770825}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 96a840f8cd2f43e47a32dc87d494422f, type: 3}
m_Name:
m_EditorClassIdentifier:
_target: {fileID: 654477362}
_speed: 10
--- !u!1 &1424964852
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 22
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1502309802
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 211818859182309264, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: gameplayCamera
value:
objectReference: {fileID: 1961065790}
- target: {fileID: 3341179906418240709, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_Name
value: Pig (2)
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalPosition.x
value: -6.01
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalPosition.z
value: -15.732899
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_RootOrder
value: 30
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0fa393e1e37bc9e4e829c25a9452bcd3, type: 3}
--- !u!1 &1502793900
GameObject:
m_ObjectHideFlags: 0

m_StreamingVersion: 20170927
m_Priority: 10
m_StandbyUpdate: 2
m_LookAt: {fileID: 1709899635}
m_Follow: {fileID: 1709899635}
m_LookAt: {fileID: 1044138829}
m_Follow: {fileID: 1044138829}
m_CommonLens: 1
m_Lens:
FieldOfView: 40

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1502793900}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.213417, y: 6, z: -23.211498}
m_LocalPosition: {x: 3.7763133, y: 6, z: -12.285604}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1069947042}

m_Father: {fileID: 0}
m_RootOrder: 27
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1531195266
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.x
value: -11.646828
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.z
value: -35.98156
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_RootOrder
value: 34
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.size
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.data[0]
value:
objectReference: {fileID: 11400000, guid: de18ec8184ba9ec418cfb61f39582a79,
type: 2}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.data[1]
value:
objectReference: {fileID: 11400000, guid: 2af0b23535059f54dbaef36909481aea,
type: 2}
- target: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_Name
value: Sphere (4)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2ae670cd29a6f4843aa75201aa44ef31, type: 3}
--- !u!1 &1538479374 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
m_PrefabInstance: {fileID: 1184947906}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1538479375
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1538479374}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 96a840f8cd2f43e47a32dc87d494422f, type: 3}
m_Name:
m_EditorClassIdentifier:
_target: {fileID: 654477362}
_speed: 10
--- !u!1 &1542425560 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
m_PrefabInstance: {fileID: 987108458}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1542425561
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1542425560}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 96a840f8cd2f43e47a32dc87d494422f, type: 3}
m_Name:
m_EditorClassIdentifier:
_target: {fileID: 1709899635}
_speed: 10
--- !u!1 &1550893637 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
m_PrefabInstance: {fileID: 8065985805952354429}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1550893638
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1550893637}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 96a840f8cd2f43e47a32dc87d494422f, type: 3}
m_Name:
m_EditorClassIdentifier:
_target: {fileID: 1709899635}
_speed: 10
--- !u!1 &1559010558
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 15
m_LocalEulerAnglesHint: {x: -3.5180001, y: 26.324001, z: 28.011002}
--- !u!1001 &1709899634
--- !u!1001 &1780617058
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2

propertyPath: gameplayCamera
value:
objectReference: {fileID: 1961065790}
- target: {fileID: 211818859182309264, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: _inputReader
value:
objectReference: {fileID: 11400000, guid: 945ec0365077176418488737deed54be,
type: 2}
- target: {fileID: 3341179906418240708, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
value: Pig
value: NewPig
value: -3.425148
value: -1
value: 0
value: -0
value: -15.732899
value: -3.5
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}

propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3341179907149091245, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_SlopeLimit
value: 45
objectReference: {fileID: 0}
--- !u!4 &1709899635 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3341179906418240731, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
m_PrefabInstance: {fileID: 1709899634}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1809933188
PrefabInstance:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1926130911
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.x
value: 15.239536
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.z
value: -25.260427
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_RootOrder
value: 33
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957530, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _scriptableObjects.Array.data[0]
value:
objectReference: {fileID: 11400000, guid: cd6e687e4cd39c64f94866ef95aacf5b,
type: 2}
- target: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_Name
value: Sphere (2)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2ae670cd29a6f4843aa75201aa44ef31, type: 3}
--- !u!1 &1961065787
GameObject:
m_ObjectHideFlags: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1961065787}
m_LocalRotation: {x: 0.17952348, y: -0.3484549, z: 0.068184994, w: 0.91744286}
m_LocalPosition: {x: 3.213417, y: 6, z: -23.211498}
m_LocalRotation: {x: 0.18611462, y: -0.24182759, z: 0.047320366, w: 0.9511265}
m_LocalPosition: {x: 3.7763133, y: 6, z: -12.285604}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2049112419}
m_LocalRotation: {x: 0.17952348, y: -0.3484549, z: 0.068184994, w: 0.9174428}
m_LocalRotation: {x: 0.18611464, y: -0.24182762, z: 0.04732037, w: 0.9511265}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: fe3004506b4c6cd478eb2cca639b3713, type: 3}
--- !u!1001 &8065985805952354429
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.x
value: 9.62
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.73
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalPosition.z
value: -15.743169
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_RootOrder
value: 31
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957521, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2ae670cd29a6f4843aa75201aa44ef31, type: 3}

151
UOP1_Project/Assets/Scripts/Characters/Character.cs


using UnityEngine;
using UnityEngine.PlayerLoop;
private CharacterController characterController;
[Tooltip("Horizontal XZ plane speed multiplier")] public float speed = 8f;
[Tooltip("Smoothing for rotating the character to their movement direction")] public float turnSmoothTime = 0.2f;
[Tooltip("General multiplier for gravity (affects jump and freefall)")] public float gravityMultiplier = 5f;
[Tooltip("The initial upwards push when pressing jump. This is injected into verticalMovement, and gradually cancelled by gravity")] public float initialJumpForce = 10f;
[Tooltip("How long can the player hold the jump button")] public float jumpInputDuration = .4f;
[Tooltip("Represents how fast gravityContributionMultiplier will go back to 1f. The higher, the faster")] public float gravityComebackMultiplier = 15f;
[Tooltip("The maximum speed reached when falling (in units/frame)")] public float maxFallSpeed = 50f;
[Tooltip("Each frame while jumping, gravity will be multiplied by this amount in an attempt to 'cancel it' (= jump higher)")] public float gravityDivider = .6f;
[Tooltip("Adjust the friction of the slope")] public float slideFriction = 0.3f;
[Tooltip("Starting vertical movement when falling from a platform")] public float fallingVerticalMovement = -5f;
private float gravityContributionMultiplier = 0f; //The factor which determines how much gravity is affecting verticalMovement
private bool isJumping = false; //If true, a jump is in effect and the player is holding the jump button
private float jumpBeginTime = -Mathf.Infinity; //Time of the last jump
private float turnSmoothSpeed; //Used by Mathf.SmoothDampAngle to smoothly rotate the character to their movement direction
private float verticalMovement = 0f; //Represents how much a player will move vertically in a frame. Affected by gravity * gravityContributionMultiplier
private float currentSlope;
private Vector3 hitNormal; // ground normal
private bool shouldSlide; // Should player slide?
private Vector3 inputVector; //Initial input horizontal movement (y == 0f)
private Vector3 movementVector; //Final movement vector
public bool jumpInput;
public Vector3 movementInput; //Initial input coming from the Protagonist script
public Vector3 movementVector; //Final movement vector, manipulated by the StateMachine actions
public ControllerColliderHit lastHit;
private const float ROTATION_TRESHOLD = .02f; // Used to prevent NaN result causing rotation in a non direction
private void Awake()
private void OnControllerColliderHit(ControllerColliderHit hit)
characterController = GetComponent<CharacterController>();
lastHit = hit;
private void Update()
{
//Raises the multiplier to how much gravity will affect vertical movement when in mid-air
//This is 0f at the beginning of a jump and will raise to maximum 1f
if (!characterController.isGrounded)
{
gravityContributionMultiplier += Time.deltaTime * gravityComebackMultiplier;
}
//Reduce the influence of the gravity while holding the Jump button
if (isJumping)
{
//The player can only hold the Jump button for so long
if (Time.time >= jumpBeginTime + jumpInputDuration)
{
isJumping = false;
gravityContributionMultiplier = 1f; //Gravity influence is reset to full effect
}
else
{
gravityContributionMultiplier *= gravityDivider; //Reduce the gravity effect
}
}
//Calculate the final verticalMovement
if (!characterController.isGrounded)
{
//Less control in mid-air, conserving momentum from previous frame
movementVector = inputVector * speed;
//The character is either jumping or in freefall, so gravity will add up
gravityContributionMultiplier = Mathf.Clamp01(gravityContributionMultiplier);
verticalMovement += Physics.gravity.y * gravityMultiplier * Time.deltaTime * gravityContributionMultiplier; //Add gravity contribution
//Note that even if it's added, the above value is negative due to Physics.gravity.y
//Cap the maximum so the player doesn't reach incredible speeds when freefalling from high positions
verticalMovement = Mathf.Clamp(verticalMovement, -maxFallSpeed, 100f);
}
else
{
//Full speed ground movement
movementVector = inputVector * speed;
//Resets the verticalMovement while on the ground,
//so that regardless of whether the player landed from a high fall or not,
//if they drop off a platform they will always start with the same verticalMovement.
//-5f is a good value to make it so the player also sticks to uneven terrain/bumps without floating
if (!isJumping)
{
verticalMovement = fallingVerticalMovement;
gravityContributionMultiplier = 0f;
}
}
UpdateSlide();
//Apply the result and move the character in space
movementVector.y = verticalMovement;
characterController.Move(movementVector * Time.deltaTime);
//Rotate to the movement direction
movementVector.y = 0f;
if (movementVector.sqrMagnitude >= ROTATION_TRESHOLD)
{
float targetRotation = Mathf.Atan2(movementVector.x, movementVector.z) * Mathf.Rad2Deg;
transform.eulerAngles = Vector3.up * Mathf.SmoothDampAngle(
transform.eulerAngles.y,
targetRotation,
ref turnSmoothSpeed,
turnSmoothTime);
}
}
private void OnControllerColliderHit(ControllerColliderHit hit)
{
hitNormal = hit.normal;
bool isMovingUpwards = verticalMovement > 0f;
if (isMovingUpwards)
{
// Making sure the collision is near the top of the head
float permittedDistance = characterController.radius / 2f;
float topPositionY = transform.position.y + characterController.height;
float distance = Mathf.Abs(hit.point.y - topPositionY);
if (distance <= permittedDistance)
{
// Stopping any upwards movement
// and having the player fall back down
isJumping = false;
gravityContributionMultiplier = 1f;
verticalMovement = 0f;
}
}
}
inputVector = movement;
movementInput = movement;
// Disable jumping if player has to slide
if (characterController.isGrounded && !shouldSlide)
{
isJumping = true;
jumpBeginTime = Time.time;
verticalMovement = initialJumpForce; //This is the only place where verticalMovement is set to a positive value
gravityContributionMultiplier = 0f;
}
jumpInput = true;
isJumping = false; //This will stop the reduction to the gravity, which will then quickly pull down the character
}
private void UpdateSlide()
{
// if player has to slide then add sideways speed to make it go down
if (shouldSlide)
{
movementVector.x += (1f - hitNormal.y) * hitNormal.x * (speed - slideFriction);
movementVector.z += (1f - hitNormal.y) * hitNormal.z * (speed - slideFriction);
}
// check if the controller is grounded and above slope limit
// if player is grounded and above slope limit
// player has to slide
if (characterController.isGrounded)
{
currentSlope = Vector3.Angle(Vector3.up, hitNormal);
shouldSlide = currentSlope >= characterController.slopeLimit;
}
jumpInput = false;
}
}

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


public class Protagonist : MonoBehaviour
{
public InputReader inputReader;
[SerializeField] private InputReader _inputReader = default;
private Character charScript;
private Vector2 previousMovementInput;
private bool controlsEnabled = true;
private Character _charScript;
private Vector2 _previousMovementInput;
charScript = GetComponent<Character>();
_charScript = GetComponent<Character>();
inputReader.jumpEvent += OnJumpInitiated;
inputReader.jumpCanceledEvent += OnJumpCanceled;
inputReader.moveEvent += OnMove;
_inputReader.jumpEvent += OnJumpInitiated;
_inputReader.jumpCanceledEvent += OnJumpCanceled;
_inputReader.moveEvent += OnMove;
//...
}

inputReader.jumpEvent -= OnJumpInitiated;
inputReader.jumpCanceledEvent -= OnJumpCanceled;
inputReader.moveEvent -= OnMove;
_inputReader.jumpEvent -= OnJumpInitiated;
_inputReader.jumpCanceledEvent -= OnJumpCanceled;
_inputReader.moveEvent -= OnMove;
//...
}

cameraRight.y = 0f;
//Use the two axes, modulated by the corresponding inputs, and construct the final vector
Vector3 adjustedMovement = cameraRight.normalized * previousMovementInput.x +
cameraForward.normalized * previousMovementInput.y;
Vector3 adjustedMovement = cameraRight.normalized * _previousMovementInput.x +
cameraForward.normalized * _previousMovementInput.y;
charScript.Move(Vector3.ClampMagnitude(adjustedMovement, 1f));
_charScript.Move(Vector3.ClampMagnitude(adjustedMovement, 1f));
}
//---- EVENT LISTENERS ----

if (controlsEnabled)
previousMovementInput = movement;
_previousMovementInput = movement;
if (controlsEnabled)
charScript.Jump();
_charScript.Jump();
if (controlsEnabled)
charScript.CancelJump();
_charScript.CancelJump();
}
}

2
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/RotateActionSO.cs.meta


fileFormatVersion: 2
guid: 42ecc2ef8dcbbe4449a3f1d0bb1d04b2
guid: 8c2b40ff7519a5e41a2dc48c2aca516c
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ApplyMovementVectorActionSO.cs.meta


fileFormatVersion: 2
guid: 75d9f06548de07e41ae283a5d2780a8a
guid: 816d77d35a7ae9041969e6fdee982452
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DescendActionSO.cs.meta


fileFormatVersion: 2
guid: 5260d866577959e46866a3ee0a81b691
guid: bc39053ee56f2cf40af8511f79013117
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/GroundGravityActionSO.cs.meta


fileFormatVersion: 2
guid: 73b2ab05b3639324fa7ee388464d5a23
guid: 5e724f945a0fb204fa0f39919afe653b
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/HorizontalMoveActionSO.cs.meta


fileFormatVersion: 2
guid: 55ccc92fc10cbb547900d6ee359aa7c2
guid: 09fcb347b6cb3524c9f59fbde36ec7c7
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/SlideActionSO.cs.meta


fileFormatVersion: 2
guid: ebe256ce45e39fe448901c4a1f489366
guid: 3d6639e9199e4ec44852fe925b2dc470
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasHitHeadConditionSO.cs.meta


fileFormatVersion: 2
guid: 9ea14bb700bdcb64e9855f6bd0837d08
guid: 07e6889b70ab561458e46326d9c2a88b
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/AscendActionSO.cs.meta


fileFormatVersion: 2
guid: 96a840f8cd2f43e47a32dc87d494422f
guid: d102e2f241954884fba03c7553584369
MonoImporter:
externalObjects: {}
serializedVersion: 2

8
UOP1_Project/Assets/ScriptableObjects/Protagonist.meta


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

8
UOP1_Project/Assets/Scripts/Characters/StateMachine.meta


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

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions.meta


fileFormatVersion: 2
guid: 8e60fd50527f7904794623b771901faf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

14
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/ApplyMovementVector.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: 816d77d35a7ae9041969e6fdee982452, type: 3}
m_Name: ApplyMovementVector
m_EditorClassIdentifier: Assembly-CSharp::ApplyMovementVectorSO

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/ApplyMovementVector.asset.meta


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

14
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Ascend.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: d102e2f241954884fba03c7553584369, type: 3}
m_Name: Ascend
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Ascend.asset.meta


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

14
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Descend.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: bc39053ee56f2cf40af8511f79013117, type: 3}
m_Name: Descend
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Descend.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/GroundGravity.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: 5e724f945a0fb204fa0f39919afe653b, type: 3}
m_Name: GroundGravity
m_EditorClassIdentifier:
_verticalPull: -5

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/GroundGravity.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/MoveInTheAir.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: 09fcb347b6cb3524c9f59fbde36ec7c7, type: 3}
m_Name: MoveInTheAir
m_EditorClassIdentifier:
_speed: 6

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/MoveInTheAir.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Rotate.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: 8c2b40ff7519a5e41a2dc48c2aca516c, type: 3}
m_Name: Rotate
m_EditorClassIdentifier:
_turnSmoothTime: 0.2

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Rotate.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/RotateFast.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: 8c2b40ff7519a5e41a2dc48c2aca516c, type: 3}
m_Name: RotateFast
m_EditorClassIdentifier:
_turnSmoothTime: 0.1

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/RotateFast.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Slide.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: 3d6639e9199e4ec44852fe925b2dc470, type: 3}
m_Name: Slide
m_EditorClassIdentifier:
_slideSpeed: 10

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Slide.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/SlidingGravity.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: 5e724f945a0fb204fa0f39919afe653b, type: 3}
m_Name: SlidingGravity
m_EditorClassIdentifier:
_verticalPull: -10

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/SlidingGravity.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Walk.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: 09fcb347b6cb3524c9f59fbde36ec7c7, type: 3}
m_Name: Walk
m_EditorClassIdentifier:
_speed: 8

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Actions/Walk.asset.meta


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

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions.meta


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

14
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/HasHitHead.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: 07e6889b70ab561458e46326d9c2a88b, type: 3}
m_Name: HasHitHead
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/HasHitHead.asset.meta


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

14
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsGrounded.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: 953dea50bde69be4fb0df0c3a49eef08, type: 3}
m_Name: IsGrounded
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsGrounded.asset.meta


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

14
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsHoldingJump.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: aea20a61197822e49aaa66318da39267, type: 3}
m_Name: IsHoldingJump
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsHoldingJump.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsMoving.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: fc2d5ccac974a0d41a92a30245aa08eb, type: 3}
m_Name: IsMoving
m_EditorClassIdentifier: Assembly-CSharp::StartMovingConditionSO
_treshold: 0.02

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsMoving.asset.meta


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

14
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsSliding.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: 9352ebfadd39e754e86b2aa1daffdca0, type: 3}
m_Name: IsSliding
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/IsSliding.asset.meta


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

15
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/JumpHoldTimer.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: JumpHoldTimer
m_EditorClassIdentifier:
_timerLength: 0.4

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Conditions/JumpHoldTimer.asset.meta


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

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/States.meta


fileFormatVersion: 2
guid: 804b3b4960b69144db0d6ee7bb8249bb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

20
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Idle.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: Idle
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: bd85c54d16eb60c4c99504f1679af851, type: 2}
- {fileID: 11400000, guid: 47d9da417e68970419335f80f4395239, type: 2}
_transitions:
- {fileID: 11400000, guid: 15394873b380a284bbf425c98e1f7ff5, type: 2}
- {fileID: 11400000, guid: a397ed7ab7a1ef24082946a116ba98ed, type: 2}

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Idle.asset.meta


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

22
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/JumpAscending.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: JumpAscending
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: f1f9b67c2b957d74dae6555b3598ae49, type: 2}
- {fileID: 11400000, guid: 5d9c1bbe4ffcb2146a540998d17b665d, type: 2}
- {fileID: 11400000, guid: 47d9da417e68970419335f80f4395239, type: 2}
- {fileID: 11400000, guid: 096d532f9a47f3145892efa1c4322e72, type: 2}
_transitions:
- {fileID: 11400000, guid: 06d55bd43e60a1a469545b18bca1061c, type: 2}
- {fileID: 11400000, guid: d0d2423b580ea5a4789dcee21f62cba6, type: 2}

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/JumpAscending.asset.meta


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

22
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/JumpDescending.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: JumpDescending
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: f1f9b67c2b957d74dae6555b3598ae49, type: 2}
- {fileID: 11400000, guid: 5d442cfcb78da8b418d6ae3e93e5748e, type: 2}
- {fileID: 11400000, guid: 47d9da417e68970419335f80f4395239, type: 2}
- {fileID: 11400000, guid: 096d532f9a47f3145892efa1c4322e72, type: 2}
_transitions:
- {fileID: 11400000, guid: 426d4a126aac5f94abff16fd4fd22450, type: 2}
- {fileID: 11400000, guid: bdbd98a2bcdc25c47bdae39b7ab3bac6, type: 2}

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/JumpDescending.asset.meta


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

21
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Sliding.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: Sliding
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 088f3e34793299349983d53aaf39e5e3, type: 2}
- {fileID: 11400000, guid: 9e558dc250163db40a4e1f7241ee15c2, type: 2}
- {fileID: 11400000, guid: 47d9da417e68970419335f80f4395239, type: 2}
- {fileID: 11400000, guid: 4badb7afa3370ba4d8a229584c5c744f, type: 2}
_transitions:
- {fileID: 11400000, guid: d65431b4fa02b494ab91bafd68cb5a8f, type: 2}

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Sliding.asset.meta


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

24
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Walking.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: Walking
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 6a9da1e686e8c3142bcbcc7ccb5bd5ac, type: 2}
- {fileID: 11400000, guid: bd85c54d16eb60c4c99504f1679af851, type: 2}
- {fileID: 11400000, guid: 47d9da417e68970419335f80f4395239, type: 2}
- {fileID: 11400000, guid: 096d532f9a47f3145892efa1c4322e72, type: 2}
_transitions:
- {fileID: 11400000, guid: 41433dadcfe624b41a29409bd2049c85, type: 2}
- {fileID: 11400000, guid: a397ed7ab7a1ef24082946a116ba98ed, type: 2}
- {fileID: 11400000, guid: 54b0ebefbe8767c41a7e981ea0857f68, type: 2}
- {fileID: 11400000, guid: 06d55bd43e60a1a469545b18bca1061c, type: 2}

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/States/Walking.asset.meta


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

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions.meta


fileFormatVersion: 2
guid: 7273e93cd813a8947b64537b38daed30
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

19
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/BeginJump.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: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: BeginJump
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: 0aa906b71b1b4504d950f5ee8e1f06e8, type: 2}
_conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 620f4efd93744084a8ac9ba272f093dc, type: 2}
Operator: 0

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/BeginJump.asset.meta


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

22
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/BeginJumpDescent.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: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: BeginJumpDescent
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: c57ed1dc57a890943b2648ca8a581075, type: 2}
_conditions:
- ExpectedResult: 1
Condition: {fileID: 11400000, guid: 620f4efd93744084a8ac9ba272f093dc, type: 2}
Operator: 1
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: bf6a2f4642738ac4f8e84bcdf1cb5f93, type: 2}
Operator: 0

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/BeginJumpDescent.asset.meta


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

19
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/HitHead.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: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: HitHead
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: c57ed1dc57a890943b2648ca8a581075, type: 2}
_conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 41dbff2af0b6f7141a32bb464309ba69, type: 2}
Operator: 0

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/HitHead.asset.meta


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

22
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/LandIdle.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: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: LandIdle
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: e128814ff6dbf63449bbc4dc8b6dc066, type: 2}
_conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: c7258bdb2558a214f916c8b5b3c0fa1f, type: 2}
Operator: 0
- ExpectedResult: 1
Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2}
Operator: 0

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/LandIdle.asset.meta


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

22
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/LandWalking.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: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: LandWalking
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: 027d32476800b3543b2f5446a59054c8, type: 2}
_conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: c7258bdb2558a214f916c8b5b3c0fa1f, type: 2}
Operator: 0
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2}
Operator: 0

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/LandWalking.asset.meta


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

19
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StartSliding.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: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: StartSliding
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: 4c2c0dc4f7ee62b4d95b20ac3dce281e, type: 2}
_conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: c5090b215e4f1594f9d1ef6680cd15bb, type: 2}
Operator: 0

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StartSliding.asset.meta


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

19
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StartWalking.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: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: StartWalking
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: 027d32476800b3543b2f5446a59054c8, type: 2}
_conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2}
Operator: 0

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StartWalking.asset.meta


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

19
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StopSliding.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: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: StopSliding
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: e128814ff6dbf63449bbc4dc8b6dc066, type: 2}
_conditions:
- ExpectedResult: 1
Condition: {fileID: 11400000, guid: c5090b215e4f1594f9d1ef6680cd15bb, type: 2}
Operator: 0

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StopSliding.asset.meta


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

19
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StopWalking.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: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: StopWalking
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: e128814ff6dbf63449bbc4dc8b6dc066, type: 2}
_conditions:
- ExpectedResult: 1
Condition: {fileID: 11400000, guid: a79b812272ab8314aa305b39f9a2740a, type: 2}
Operator: 0

8
UOP1_Project/Assets/ScriptableObjects/Protagonist/Transitions/StopWalking.asset.meta


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

8
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions.meta


fileFormatVersion: 2
guid: 5709933eec4549d4f9c4389785d44d3d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

24
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ApplyMovementVectorActionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "ApplyMovementVector", menuName = "State Machines/Actions/Apply Movement Vector")]
public class ApplyMovementVectorActionSO : StateActionSO<ApplyMovementVectorAction> { }
public class ApplyMovementVectorAction : StateAction
{
//Component references
private Character _characterScript;
private CharacterController _characterController;
public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
_characterController = stateMachine.GetComponent<CharacterController>();
}
public override void OnUpdate()
{
_characterController.Move(_characterScript.movementVector * Time.deltaTime);
}
}

50
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/AscendActionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "Ascend", menuName = "State Machines/Actions/Ascend")]
public class AscendActionSO : StateActionSO
{
[Tooltip("The initial upwards push when pressing jump. This is injected into verticalMovement, and gradually cancelled by gravity")]
[SerializeField] private float _initialJumpForce = 10f;
protected override StateAction CreateAction() => new AscendAction(_initialJumpForce);
}
public class AscendAction : StateAction
{
//Component references
private Character _characterScript;
private float _verticalMovement;
private float _gravityContributionMultiplier;
private float _initialJumpForce;
private const float GRAVITY_COMEBACK_MULTIPLIER = 15f;
private const float GRAVITY_DIVIDER = .6f;
private const float GRAVITY_MULTIPLIER = 5f;
public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
}
public AscendAction(float initialJumpForce)
{
_initialJumpForce = initialJumpForce;
}
public override void OnStateEnter()
{
_verticalMovement = _initialJumpForce;
}
public override void OnUpdate()
{
_gravityContributionMultiplier += Time.deltaTime * GRAVITY_COMEBACK_MULTIPLIER;
_gravityContributionMultiplier *= GRAVITY_DIVIDER; //Reduce the gravity effect
_verticalMovement += Physics.gravity.y * GRAVITY_MULTIPLIER * Time.deltaTime * _gravityContributionMultiplier;
//Note that even if it's added, the above value is negative due to Physics.gravity.y
_characterScript.movementVector.y = _verticalMovement;
}
}

42
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DescendActionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "Descend", menuName = "State Machines/Actions/Descend")]
public class DescendActionSO : StateActionSO
{
protected override StateAction CreateAction() => new DescendAction();
}
public class DescendAction : StateAction
{
//Component references
private Character _characterScript;
private float _verticalMovement;
private const float GRAVITY_MULTIPLIER = 5f;
private const float MAX_FALL_SPEED = -50f;
private const float MAX_RISE_SPEED = 100f;
public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
}
public override void OnStateEnter()
{
_verticalMovement = _characterScript.movementVector.y;
_characterScript.jumpInput = false; //Prevents a double jump if the player keeps holding the jump button
}
public override void OnUpdate()
{
_verticalMovement += Physics.gravity.y * GRAVITY_MULTIPLIER * Time.deltaTime;
//Note that even if it's added, the above value is negative due to Physics.gravity.y
//Cap the maximum so the player doesn't reach incredible speeds when freefalling from high positions
_verticalMovement = Mathf.Clamp(_verticalMovement, MAX_FALL_SPEED, MAX_RISE_SPEED);
_characterScript.movementVector.y = _verticalMovement;
}
}

35
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/GroundGravityActionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "GroundGravity", menuName = "State Machines/Actions/Ground Gravity")]
public class GroundGravityActionSO : StateActionSO
{
[Tooltip("Vertical movement pulling down the player to keep it anchored to the ground.")]
[SerializeField] private float _verticalPull = -5f;
protected override StateAction CreateAction() => new GroundGravityAction(_verticalPull);
}
public class GroundGravityAction : StateAction
{
//Component references
private Character _characterScript;
private float _verticalPull;
public GroundGravityAction(float slideSpeed)
{
_verticalPull = slideSpeed;
}
public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
}
public override void OnUpdate()
{
_characterScript.movementVector.y = _verticalPull;
}
}

35
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/HorizontalMoveActionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "HorizontalMove", menuName = "State Machines/Actions/Horizontal Move")]
public class HorizontalMoveActionSO : StateActionSO
{
[Tooltip("Horizontal XZ plane speed multiplier")] [SerializeField] private float _speed = 8f;
protected override StateAction CreateAction() => new WalkAction(_speed);
}
public class WalkAction : StateAction
{
//Component references
private Character _characterScript;
private float _speed;
public WalkAction(float speed)
{
_speed = speed;
}
public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
}
public override void OnUpdate()
{
_characterScript.movementVector.x = _characterScript.movementInput.x * _speed;
_characterScript.movementVector.z = _characterScript.movementInput.z * _speed;
}
}

48
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/RotateActionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "RotateAction", menuName = "State Machines/Actions/Rotate")]
public class RotateActionSO : StateActionSO
{
[Tooltip("Smoothing for rotating the character to their movement direction")] [SerializeField] private float _turnSmoothTime = 0.2f;
protected override StateAction CreateAction() => new RotateAction(_turnSmoothTime);
}
public class RotateAction : StateAction
{
//Component references
private Character _characterScript;
private Transform _transform;
private float _turnSmoothTime;
private float _turnSmoothSpeed; //Used by Mathf.SmoothDampAngle to smoothly rotate the character to their movement direction
private const float ROTATION_TRESHOLD = .02f; // Used to prevent NaN result causing rotation in a non direction
public RotateAction(float turnSmoothTime)
{
_turnSmoothTime = turnSmoothTime;
}
public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
_transform = stateMachine.GetComponent<Transform>();
}
public override void OnUpdate()
{
Vector3 horizontalMovement = _characterScript.movementVector;
horizontalMovement.y = 0f;
if (horizontalMovement.sqrMagnitude >= ROTATION_TRESHOLD)
{
float targetRotation = Mathf.Atan2(_characterScript.movementVector.x, _characterScript.movementVector.z) * Mathf.Rad2Deg;
_transform.eulerAngles = Vector3.up * Mathf.SmoothDampAngle(
_transform.eulerAngles.y,
targetRotation,
ref _turnSmoothSpeed,
_turnSmoothTime);
}
}
}

42
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/SlideActionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "SlideAction", menuName = "State Machines/Actions/Slide")]
public class SlideActionSO : StateActionSO
{
[Tooltip("Sliding speed on the XZ plane.")]
[SerializeField] private float _slideSpeed = 6f;
protected override StateAction CreateAction() => new SlideAction(_slideSpeed);
}
public class SlideAction : StateAction
{
//Component references
private Character _characterScript;
private float _slideSpeed;
public SlideAction(float slideSpeed)
{
_slideSpeed = slideSpeed;
}
public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
}
public override void OnUpdate()
{
Vector3 hitNormal = _characterScript.lastHit.normal;
_characterScript.movementVector.x = (1f - hitNormal.y) * hitNormal.x * _slideSpeed;
_characterScript.movementVector.z = (1f - hitNormal.y) * hitNormal.z * _slideSpeed;
}
public override void OnStateExit()
{
_characterScript.movementVector = Vector3.zero;
}
}

8
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions.meta


fileFormatVersion: 2
guid: 59fdd8de429b64e42b395e599c7af313
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

45
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasHitHeadConditionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "HasHitHead", menuName = "State Machines/Conditions/Has Hit the Head")]
public class HasHitHeadConditionSO : StateConditionSO<HasHitHeadCondition> { }
public class HasHitHeadCondition : Condition
{
//Component references
private Character _characterScript;
private CharacterController _characterController;
private Transform _transform;
public override void Awake(StateMachine stateMachine)
{
_transform = stateMachine.GetComponent<Transform>();
_characterScript = stateMachine.GetComponent<Character>();
_characterController = stateMachine.GetComponent<CharacterController>();
}
public override bool Statement()
{
bool isMovingUpwards = _characterScript.movementVector.y > 0f;
if (isMovingUpwards)
{
// Making sure the collision is near the top of the head
float permittedDistance = _characterController.radius / 2f;
float topPositionY = _transform.position.y + _characterController.height;
float distance = Mathf.Abs(_characterScript.lastHit.point.y - topPositionY);
if (distance <= permittedDistance)
{
return true;
}
}
return false;
}
public override void OnStateExit()
{
_characterScript.jumpInput = false;
_characterScript.movementVector.y = 0f;
}
}

18
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCharacterControllerGroundedConditionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "IsGrounded", menuName = "State Machines/Conditions/Is Character Controller Grounded")]
public class IsCharacterControllerGroundedConditionSO : StateConditionSO<IsCharacterControllerGroundedCondition> { }
public class IsCharacterControllerGroundedCondition : Condition
{
private CharacterController _characterController;
public override void Awake(StateMachine stateMachine)
{
_characterController = stateMachine.GetComponent<CharacterController>();
}
public override bool Statement() => _characterController.isGrounded;
}

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


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

19
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingJumpConditionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "IsHoldingJump", menuName = "State Machines/Conditions/Is Holding Jump")]
public class IsHoldingJumpConditionSO : StateConditionSO<IsHoldingJumpCondition> { }
public class IsHoldingJumpCondition : Condition
{
//Component references
private Character _characterScript;
public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
}
public override bool Statement() => _characterScript.jumpInput;
}

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


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

39
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsMovingConditionSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "StartedMoving", menuName = "State Machines/Conditions/Started Moving")]
public class IsMovingConditionSO : StateConditionSO
{
[SerializeField] private float _treshold = 0.02f;
protected override Condition CreateCondition() => new IsMovingCondition(_treshold);
}
public class IsMovingCondition : Condition
{
private float _treshold;
private Character _characterScript;
public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
}
public IsMovingCondition(float treshold)
{
_treshold = treshold;
}
public override bool Statement()
{
Vector3 movementVector = _characterScript.movementInput;
movementVector.y = 0f;
return movementVector.sqrMagnitude > _treshold;
}
public override void OnStateExit()
{
_characterScript.movementVector = Vector3.zero;
}
}

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存