浏览代码

Merge pull request #2 from UnityTechnologies/main

import changes from main
/main
GitHub 4 年前
当前提交
5c82e99e
共有 1689 个文件被更改,包括 3545 次插入1836 次删除
  1. 28
      README.md
  2. 9
      UOP1_Project/.gitignore
  3. 28
      UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable
  4. 4
      UOP1_Project/Assets/Materials/Debug_Semitransparent.mat
  5. 870
      UOP1_Project/Assets/Prefabs/GameplayEssentials/CameraSystem.prefab
  6. 5
      UOP1_Project/Assets/Prefabs/GameplayEssentials/SpawnSystem.prefab
  7. 2
      UOP1_Project/Assets/Scenes/Examples.meta
  8. 874
      UOP1_Project/Assets/Scenes/Examples/CutsceneExample.unity
  9. 70
      UOP1_Project/Assets/Scenes/Initialization.unity
  10. 988
      UOP1_Project/Assets/Scenes/Locations/Beach.unity
  11. 2
      UOP1_Project/Assets/Scenes/Locations/Beach.unity.meta
  12. 992
      UOP1_Project/Assets/Scenes/Locations/Forest.unity
  13. 7
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/BardHare.asset
  14. 7
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Hamlet.asset
  15. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Townsfolk.asset
  16. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/HeadToCentre.asset
  17. 7
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/Welcome.asset
  18. 7
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/GenericOink.asset
  19. 7
      UOP1_Project/Assets/ScriptableObjects/SceneData/Locations/Forest.asset
  20. 7
      UOP1_Project/Assets/ScriptableObjects/SceneData/Locations/Beach.asset
  21. 34
      UOP1_Project/Assets/Scripts/CameraManager.cs
  22. 9
      UOP1_Project/Assets/Scripts/CameraManager.cs.meta
  23. 58
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
  24. 5
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs.meta
  25. 6
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ApplyMovementVectorActionSO.cs
  26. 25
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/AscendActionSO.cs
  27. 17
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DescendActionSO.cs
  28. 19
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/GroundGravityActionSO.cs
  29. 25
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/HorizontalMoveActionSO.cs
  30. 23
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/RotateActionSO.cs
  31. 26
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/SlideActionSO.cs
  32. 16
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasHitHeadConditionSO.cs
  33. 4
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCharacterControllerGroundedConditionSO.cs
  34. 8
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingJumpConditionSO.cs
  35. 27
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsMovingConditionSO.cs
  36. 10
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsSlidingConditionSO.cs
  37. 16
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/TimeElapsedConditionSO.cs
  38. 30
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs
  39. 30
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs
  40. 6
      UOP1_Project/Assets/Scripts/Dialogues/ActorSO.cs
  41. 5
      UOP1_Project/Assets/Scripts/Dialogues/DialogueLineSO.cs
  42. 7
      UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs
  43. 39
      UOP1_Project/Assets/Scripts/Editor/ClickToPlaceHelperEditor.cs
  44. 32
      UOP1_Project/Assets/Scripts/Events/IntEventListener.cs
  45. 2
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/VoidEventChannelSO.cs.meta
  46. 30
      UOP1_Project/Assets/Scripts/Events/VoidEventListener.cs
  47. 7
      UOP1_Project/Assets/Scripts/Factory/FactorySO.cs
  48. 49
      UOP1_Project/Assets/Scripts/Input/InputReader.cs
  49. 59
      UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs
  50. 2
      UOP1_Project/Assets/Scripts/Pool/Example/Assets/Example.unity
  51. 34
      UOP1_Project/Assets/Scripts/Pool/Example/LocalPoolTester.cs
  52. 16
      UOP1_Project/Assets/Scripts/Pool/Example/ParticleFactorySO.cs
  53. 18
      UOP1_Project/Assets/Scripts/Pool/Example/ParticlePoolSO.cs
  54. 21
      UOP1_Project/Assets/Scripts/Pool/Example/PoolTester.cs
  55. 1
      UOP1_Project/Assets/Scripts/Pool/IPool.cs
  56. 55
      UOP1_Project/Assets/Scripts/Pool/PoolSO.cs
  57. 5
      UOP1_Project/Assets/Scripts/SceneManagement/EditorInitialisationLoader.cs
  58. 2
      UOP1_Project/Assets/Scripts/SceneManagement/EditorInitialisationLoader.cs.meta
  59. 11
      UOP1_Project/Assets/Scripts/SceneManagement/LocationExit.cs
  60. 3
      UOP1_Project/Assets/Scripts/SceneManagement/LocationExit.cs.meta
  61. 156
      UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs
  62. 8
      UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs.meta
  63. 2
      UOP1_Project/Assets/Scripts/SceneManagement/ScriptableObjects/GameSceneSO.cs
  64. 2
      UOP1_Project/Assets/Scripts/SceneManagement/ScriptableObjects/LocationSO.cs
  65. 4
      UOP1_Project/Assets/Scripts/SceneManagement/StartGame.cs
  66. 32
      UOP1_Project/Assets/Scripts/SpawnSystem.cs
  67. 19
      UOP1_Project/Assets/Scripts/StateMachine/Core/State.cs
  68. 16
      UOP1_Project/Assets/Scripts/StateMachine/Core/StateAction.cs
  69. 48
      UOP1_Project/Assets/Scripts/StateMachine/Core/StateCondition.cs
  70. 21
      UOP1_Project/Assets/Scripts/StateMachine/Core/StateMachine.cs
  71. 32
      UOP1_Project/Assets/Scripts/StateMachine/Core/StateTransition.cs
  72. 4
      UOP1_Project/Assets/Scripts/StateMachine/ScriptableObjects/StateActionSO.cs
  73. 23
      UOP1_Project/Assets/Scripts/StateMachine/ScriptableObjects/StateConditionSO.cs
  74. 24
      UOP1_Project/Assets/Scripts/StateMachine/ScriptableObjects/StateSO.cs
  75. 23
      UOP1_Project/Assets/Settings/Graphics/UniversalRP-HighQuality.asset
  76. 9
      UOP1_Project/Packages/manifest.json
  77. 80
      UOP1_Project/Packages/packages-lock.json
  78. 26
      UOP1_Project/ProjectSettings/EditorBuildSettings.asset
  79. 26
      UOP1_Project/ProjectSettings/PresetManager.asset
  80. 7
      UOP1_Project/ProjectSettings/ProjectSettings.asset
  81. 4
      UOP1_Project/ProjectSettings/ProjectVersion.txt
  82. 10
      UOP1_Project/ProjectSettings/TagManager.asset
  83. 2
      UOP1_Project/ProjectSettings/URPProjectSettings.asset
  84. 2
      UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab.meta
  85. 34
      UOP1_Project/Assets/Scenes/Menus/MainMenu.unity
  86. 7
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Walking.asset
  87. 4
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Sliding.asset
  88. 5
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/JumpDescending.asset
  89. 6
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/JumpAscending.asset
  90. 6
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Idle.asset
  91. 5
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_JumpHoldButton.asset
  92. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsSliding.asset
  93. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsMoving.asset
  94. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsHoldingJump.asset
  95. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsGrounded.asset
  96. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/HasHitHead.asset
  97. 2
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/Slide.asset
  98. 2
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/RotateFast.asset
  99. 2
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/MoveInTheAir.asset
  100. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/Ascend.asset

28
README.md


![Unity Open Projects](https://imgur.com/Y0svl0w.png)
# Unity Open Project #1
![Unity Open Projects](/Docs/ReadmeImages/Main_header.jpg)
# Unity Open Project #1: Chop Chop
Welcome! This is the repository for the first Unity **Open Project**, an initiative where Unity and the community collaborate together to create **a small game**, in an open source way. As of now the game is still unnamed so we just refer to it as *Open Project #1*.
Welcome! This is the repository for the first Unity **Open Project**, an initiative where Unity and the community collaborate together to create a small **open-source game demo**.
The first game, which is currently under development, is an action-adventure titled _Chop Chop_ ([more info](https://open.codecks.io/unity-open-project-1/decks/32/card/126-what-is-this)).
![OP1 WIP Screenshot](/Docs/ReadmeImages/Jumping.png)
_A work in progress screenshot_
The [dedicated sub-forum](https://forum.unity.com/forums/open-projects.531/) on the Unity Forums is where the Unity team and the whole community discuss and brainstorm ideas.
The [public roadmap](https://open.codecks.io/unity-open-project-1) is the central location to know what's coming to the game. Also a great way to find something to contribute on!
The [#open-projects channel](https://discord.gg/EZBXA4V) on the Official Unity Discord is where collaborators can meet for quick feedback and non-threaded discussion.
* The [dedicated sub-forum](https://forum.unity.com/forums/open-projects.531/) on the Unity forums is where the Unity team and the whole community discuss and brainstorm ideas.
* The [roadmap](https://open.codecks.io/unity-open-project-1) is the central location to know what's coming to the game. Also a great way to find tasks to contribute on!
* The Unity team does bi-weekly livestreams on Unity's [YouTube channel](https://www.youtube.com/c/unity/) (subscribe to be notified). Find the past ones [in this playlist](https://www.youtube.com/playlist?list=PLX2vGYjWbI0S6CnkDm0AwVgA6E6L_vJNf).
* The [#open-projects channel](https://discord.gg/EZBXA4V) on the Official Unity Discord is where collaborators can meet for a quick chat and non-threaded discussion.
We would love to get your contributions into the game! Whether you create code, art, narrative, sounds; whether you feel you are experienced enough or not; there is probably something you can add to it.
We would love to get your contributions into the game! Whether you create code, art, narrative, sounds; whether you feel you are experienced enough or not; there is probably [something](https://open.codecks.io/unity-open-project-1) you can add to it.
To learn all about contributing, head to the [Contribution Guidelines](https://docs.google.com/document/d/1PwBF4yQl69RxvVHZ2m2iiy5pYjd9QO-VcuXWDjB7QwA/edit#). For code style, scene hierarchy, and project organisation standards, read the [Conventions](https://docs.google.com/document/d/1-eUWZ0lWREFu5iH-ggofwnixDDQqalOoT4Yc0NpWR3k/edit) document.
⚠ Please **read the [forums](https://forum.unity.com/forums/open-projects.531/) and check the [roadmap](https://open.codecks.io/unity-open-project-1) before starting to work on big contributions!**
To learn all about contributing, we have [a series of short videos](https://www.youtube.com/watch?v=RbSrx0QoTG4&list=PLZplUm29-Z-xOYY9Tw6t3tSIvlbhVhzUn) to get you started with Git and with this project in general.
In addition to that, make sure you read the [Contribution Guidelines](https://docs.google.com/document/d/1PwBF4yQl69RxvVHZ2m2iiy5pYjd9QO-VcuXWDjB7QwA/edit#). For code style, scene hierarchy, and project organisation standards, read the [Conventions](https://docs.google.com/document/d/1-eUWZ0lWREFu5iH-ggofwnixDDQqalOoT4Yc0NpWR3k/edit) document. And for art contributions, we have the [Art Guidelines](https://docs.google.com/document/d/18zqe31J8EipTiEBZuwzLyG3jH7-5teAOViLEio4uko8/).
⚠ Please **post on the [forums](https://forum.unity.com/forums/open-projects.531/) and check the [roadmap](https://open.codecks.io/unity-open-project-1) before starting to work on big contributions!**
![OP1 WIP Screenshot](/Docs/ReadmeImages/Forest.png)
_A work in progress screenshot of the main character_
## Play the game
Just want to try the game out? Head to the [release page](https://github.com/UnityTechnologies/open-project-1/releases) and grab the latest version.

9
UOP1_Project/.gitignore


# Crashlytics generated file
crashlytics-build.properties
# Individual Package settings that can safely be ignored
# Any image or video created by the Recorder package
/Recordings/
# Package related files that can be ignored or are better kept user-specific
ProjectSettings/Packages/com.unity.polybrush/Settings.json
/ProjectSettings/Packages/com.unity.progrids/Settings.json
Assets/Polybrush Data*
Assets/PolybrushData*

28
UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable


m_BlendOutDuration: -1
m_MixInCurve:
serializedVersion: 2
m_Curve: []
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4

m_Children: []
m_Clips:
- m_Version: 1
m_Start: 0
m_Start: 1.9166666666666667
m_Duration: 2.6666666666666656
m_Duration: 0.8666666666666667
m_TimeScale: 1
m_ParentTrack: {fileID: 1900134804166205457}
m_EaseInDuration: 0

m_PreExtrapolationTime: 0
m_DisplayName: FirstLine
- m_Version: 1
m_Start: 4.2333333333333325
m_Start: 3.8
m_Duration: 0.8333333333333339
m_Duration: 1.033333333333334
m_TimeScale: 1
m_ParentTrack: {fileID: 1900134804166205457}
m_EaseInDuration: 0

4
UOP1_Project/Assets/Materials/Debug_Semitransparent.mat


m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1
version: 2
--- !u!21 &2100000
Material:
serializedVersion: 6

m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3050
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:

870
UOP1_Project/Assets/Prefabs/GameplayEssentials/CameraSystem.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8745341639985019979
--- !u!1 &510375644232442715
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 8745341639985019973}
- component: {fileID: 8745341639985019972}
- component: {fileID: 5397738593588287248}
- component: {fileID: 3115086838016952958}
- component: {fileID: 463132372906762298}
- component: {fileID: 596878045262618406}
m_Name: BottomRig
m_Name: cm
--- !u!4 &8745341639985019973
--- !u!4 &5397738593588287248
m_GameObject: {fileID: 8745341639985019979}
m_LocalRotation: {x: 0.18994758, y: -0.2052703, z: 0.040647592, w: 0.959235}
m_GameObject: {fileID: 510375644232442715}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2955398947125553842}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3115086838016952958
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 510375644232442715}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &463132372906762298
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 510375644232442715}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BindingMode: 5
m_FollowOffset: {x: 0, y: 6, z: -10}
m_XDamping: 1
m_YDamping: 1
m_ZDamping: 1
m_AngularDampingMode: 0
m_PitchDamping: 0
m_YawDamping: 0
m_RollDamping: 0
m_AngularDamping: 0
m_Heading:
m_Definition: 2
m_VelocityFilterStrength: 4
m_Bias: 0
m_RecenterToTargetHeading:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_XAxis:
Value: 0
m_SpeedMode: 0
m_MaxSpeed: 300
m_AccelTime: 0.1
m_DecelTime: 0.1
m_InputAxisName:
m_InputAxisValue: 0
m_InvertInput: 1
m_MinValue: -180
m_MaxValue: 180
m_Wrap: 1
m_Recentering:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_LegacyRadius: 3.4028235e+38
m_LegacyHeightOffset: 3.4028235e+38
m_LegacyHeadingBias: 3.4028235e+38
m_HeadingIsSlave: 1
--- !u!114 &596878045262618406
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 510375644232442715}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 1, z: 0}
m_LookaheadTime: 0.5
m_LookaheadSmoothing: 15
m_LookaheadIgnoreY: 1
m_HorizontalDamping: 1
m_VerticalDamping: 3
m_ScreenX: 0.5
m_ScreenY: 0.5
m_DeadZoneWidth: 0
m_DeadZoneHeight: 0
m_SoftZoneWidth: 0.5
m_SoftZoneHeight: 0.5
m_BiasX: 0
m_BiasY: 0
m_CenterOnActivate: 1
--- !u!1 &1988373824387590796
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1657732992883833910}
- component: {fileID: 7381962042493973461}
m_Layer: 0
m_Name: MiddleRig
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1657732992883833910
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1988373824387590796}
m_LocalRotation: {x: 0.24919105, y: 0.035634924, z: -0.0091757765, w: 0.967755}
- {fileID: 8745341641936028227}
- {fileID: 5295279278144279827}
m_RootOrder: 2
m_RootOrder: 1
--- !u!114 &8745341639985019972
--- !u!114 &7381962042493973461
m_GameObject: {fileID: 8745341639985019979}
m_GameObject: {fileID: 1988373824387590796}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3}

m_PersistentCalls:
m_Calls: []
m_LegacyBlendHint: 0
m_ComponentOwner: {fileID: 8745341641936028227}
--- !u!1 &8745341640208226293
m_ComponentOwner: {fileID: 5295279278144279827}
--- !u!1 &2067492944214847481
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 8745341640208226295}
- component: {fileID: 8745341640208226294}
- component: {fileID: 7064259659686731889}
- component: {fileID: 1564116532682726491}
- component: {fileID: 2678045054851453813}
- component: {fileID: 7616610443686496241}
m_Name: CameraSystem
m_Name: cm
--- !u!4 &8745341640208226295
--- !u!4 &7064259659686731889
m_GameObject: {fileID: 8745341640208226293}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_GameObject: {fileID: 2067492944214847481}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_Children:
- {fileID: 8745341642014614482}
- {fileID: 8745341641394998850}
m_Father: {fileID: 0}
m_Children: []
m_Father: {fileID: 2808035858438402709}
--- !u!114 &8745341640208226294
--- !u!114 &1564116532682726491
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2067492944214847481}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2678045054851453813
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2067492944214847481}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BindingMode: 5
m_FollowOffset: {x: 0, y: 6, z: -10}
m_XDamping: 1
m_YDamping: 1
m_ZDamping: 1
m_AngularDampingMode: 0
m_PitchDamping: 0
m_YawDamping: 0
m_RollDamping: 0
m_AngularDamping: 0
m_Heading:
m_Definition: 2
m_VelocityFilterStrength: 4
m_Bias: 0
m_RecenterToTargetHeading:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_XAxis:
Value: 0
m_SpeedMode: 0
m_MaxSpeed: 300
m_AccelTime: 0.1
m_DecelTime: 0.1
m_InputAxisName:
m_InputAxisValue: 0
m_InvertInput: 1
m_MinValue: -180
m_MaxValue: 180
m_Wrap: 1
m_Recentering:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_LegacyRadius: 3.4028235e+38
m_LegacyHeightOffset: 3.4028235e+38
m_LegacyHeadingBias: 3.4028235e+38
m_HeadingIsSlave: 1
--- !u!114 &7616610443686496241
m_GameObject: {fileID: 8745341640208226293}
m_GameObject: {fileID: 2067492944214847481}
m_Script: {fileID: 11500000, guid: 085156cba0e34b540aeddafe12d1e2f1, type: 3}
m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2}
mainCamera: {fileID: 8745341642014614481}
freeLookVCam: {fileID: 8745341641394998849}
speed: 4
--- !u!1 &8745341640754005580
m_TrackedObjectOffset: {x: 0, y: 0, z: 0}
m_LookaheadTime: 0
m_LookaheadSmoothing: 0
m_LookaheadIgnoreY: 0
m_HorizontalDamping: 0
m_VerticalDamping: 0
m_ScreenX: 0.5
m_ScreenY: 0.6
m_DeadZoneWidth: 0
m_DeadZoneHeight: 0
m_SoftZoneWidth: 0.8
m_SoftZoneHeight: 0.8
m_BiasX: 0
m_BiasY: 0
m_CenterOnActivate: 1
--- !u!1 &5124716108385545706
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 8745341640754005582}
- component: {fileID: 8745341640754005581}
- component: {fileID: 4399786004726619809}
m_Name: TopRig
m_Name: EditModeDummy
--- !u!4 &8745341640754005582
--- !u!4 &4399786004726619809
m_GameObject: {fileID: 8745341640754005580}
m_LocalRotation: {x: 0.18492083, y: -0.20548035, z: 0.0395719, w: 0.96021676}
m_GameObject: {fileID: 5124716108385545706}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_Children:
- {fileID: 8745341641875435766}
m_Father: {fileID: 8745341641394998850}
m_RootOrder: 0
m_Children: []
m_Father: {fileID: 8745341640208226295}
m_RootOrder: 3
--- !u!114 &8745341640754005581
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341640754005580}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ExcludedPropertiesInInspector:
- m_Script
- Header
- Extensions
- m_Priority
- m_Transitions
- m_Follow
- m_StandbyUpdate
- m_Lens
m_LockStageInInspector: 00000000
m_StreamingVersion: 20170927
m_Priority: 10
m_StandbyUpdate: 2
m_LookAt: {fileID: 0}
m_Follow: {fileID: 0}
m_Lens:
FieldOfView: 40
OrthographicSize: 10
NearClipPlane: 0.1
FarClipPlane: 2000
Dutch: 0
LensShift: {x: 0, y: 0}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0
m_OnCameraLive:
m_PersistentCalls:
m_Calls: []
m_LegacyBlendHint: 0
m_ComponentOwner: {fileID: 8745341641875435766}
--- !u!1 &8745341641394998848
--- !u!1 &5457523176376150323
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 8745341641394998850}
- component: {fileID: 8745341641394998849}
- component: {fileID: 2955398947125553842}
- component: {fileID: 4595566115830073586}
m_Name: CM FreeLook1
m_Name: TopRig
--- !u!4 &8745341641394998850
--- !u!4 &2955398947125553842
m_GameObject: {fileID: 8745341641394998848}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 4.712467, y: 6.307, z: -24.900238}
m_GameObject: {fileID: 5457523176376150323}
m_LocalRotation: {x: 0.22959733, y: 0.03581292, z: -0.008454285, w: 0.97258985}
m_LocalPosition: {x: 0.00000017881393, y: 0, z: 0}
- {fileID: 8745341640754005582}
- {fileID: 8745341641909856137}
- {fileID: 8745341639985019973}
m_Father: {fileID: 8745341640208226295}
m_RootOrder: 1
- {fileID: 5397738593588287248}
m_Father: {fileID: 8745341641394998850}
m_RootOrder: 0
--- !u!114 &8745341641394998849
--- !u!114 &4595566115830073586
m_GameObject: {fileID: 8745341641394998848}
m_GameObject: {fileID: 5457523176376150323}
m_Script: {fileID: 11500000, guid: 319d2fe34a804e245819465c9505ea59, type: 3}
m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3}
m_LockStageInInspector:
- Header
- Extensions
- m_Priority
- m_Transitions
- m_Follow
- m_StandbyUpdate
- m_Lens
m_LockStageInInspector: 00000000
m_CommonLens: 1
m_Lens:
FieldOfView: 40
OrthographicSize: 10

m_PersistentCalls:
m_Calls: []
m_LegacyBlendHint: 0
m_YAxis:
Value: 0.5
m_SpeedMode: 0
m_MaxSpeed: 80
m_AccelTime: 0.5
m_DecelTime: 0.1
m_InputAxisName:
m_InputAxisValue: 0
m_InvertInput: 1
m_MinValue: 0
m_MaxValue: 1
m_Wrap: 0
m_Recentering:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_YAxisRecentering:
m_enabled: 1
m_WaitTime: 2
m_RecenteringTime: 3
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_XAxis:
Value: 0
m_SpeedMode: 0
m_MaxSpeed: 8000
m_AccelTime: 0.5
m_DecelTime: 0.1
m_InputAxisName:
m_InputAxisValue: 0
m_InvertInput: 0
m_MinValue: -180
m_MaxValue: 180
m_Wrap: 1
m_Recentering:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_Heading:
m_Definition: 2
m_VelocityFilterStrength: 4
m_Bias: 0
m_RecenterToTargetHeading:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_BindingMode: 5
m_SplineCurvature: 0.2
m_Orbits:
- m_Height: 10
m_Radius: 16.88
- m_Height: 6
m_Radius: 10
- m_Height: 1.5
m_Radius: 4.5
m_LegacyHeadingBias: 3.4028235e+38
m_Rigs:
- {fileID: 8745341640754005581}
- {fileID: 8745341641909856136}
- {fileID: 8745341639985019972}
--- !u!1 &8745341641875435765
m_ComponentOwner: {fileID: 5397738593588287248}
--- !u!1 &6107507855544157227
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 8745341641875435766}
- component: {fileID: 8745341641875435761}
- component: {fileID: 8745341641875435760}
- component: {fileID: 8745341641875435767}
- component: {fileID: 5295279278144279827}
- component: {fileID: 7895267959122054821}
- component: {fileID: 1210564933096074019}
- component: {fileID: 7984398578104313902}
m_Layer: 0
m_Name: cm
m_TagString: Untagged

m_IsActive: 1
--- !u!4 &8745341641875435766
--- !u!4 &5295279278144279827
m_GameObject: {fileID: 8745341641875435765}
m_GameObject: {fileID: 6107507855544157227}
m_Father: {fileID: 8745341640754005582}
m_Father: {fileID: 1657732992883833910}
--- !u!114 &8745341641875435761
--- !u!114 &7895267959122054821
m_GameObject: {fileID: 8745341641875435765}
m_GameObject: {fileID: 6107507855544157227}
--- !u!114 &8745341641875435760
--- !u!114 &1210564933096074019
m_GameObject: {fileID: 8745341641875435765}
m_GameObject: {fileID: 6107507855544157227}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3}

m_LegacyHeightOffset: 3.4028235e+38
m_LegacyHeadingBias: 3.4028235e+38
m_HeadingIsSlave: 1
--- !u!114 &8745341641875435767
--- !u!114 &7984398578104313902
m_GameObject: {fileID: 8745341641875435765}
m_GameObject: {fileID: 6107507855544157227}
m_TrackedObjectOffset: {x: 0, y: 2, z: 0}
m_TrackedObjectOffset: {x: 0, y: 0, z: 0}
m_LookaheadTime: 0
m_LookaheadSmoothing: 0
m_LookaheadIgnoreY: 0

m_ScreenY: 0.5
m_ScreenY: 0.55
m_DeadZoneWidth: 0
m_DeadZoneHeight: 0
m_SoftZoneWidth: 0.8

m_CenterOnActivate: 1
--- !u!1 &8745341641909856143
--- !u!1 &6333144650067166509
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 8745341641909856137}
- component: {fileID: 8745341641909856136}
- component: {fileID: 2808035858438402709}
- component: {fileID: 1990950152470473449}
m_Name: MiddleRig
m_Name: BottomRig
--- !u!4 &8745341641909856137
--- !u!4 &2808035858438402709
m_GameObject: {fileID: 8745341641909856143}
m_LocalRotation: {x: 0.18778461, y: -0.20536137, z: 0.040184718, w: 0.9596608}
m_GameObject: {fileID: 6333144650067166509}
m_LocalRotation: {x: 0.23159355, y: 0.03579549, z: -0.008527792, w: 0.9721165}
- {fileID: 8745341642084393594}
- {fileID: 7064259659686731889}
m_RootOrder: 1
m_RootOrder: 2
--- !u!114 &8745341641909856136
--- !u!114 &1990950152470473449
m_GameObject: {fileID: 8745341641909856143}
m_GameObject: {fileID: 6333144650067166509}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3}

m_PersistentCalls:
m_Calls: []
m_LegacyBlendHint: 0
m_ComponentOwner: {fileID: 8745341642084393594}
--- !u!1 &8745341641936028226
m_ComponentOwner: {fileID: 7064259659686731889}
--- !u!1 &6970628017789789606
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 8745341641936028227}
- component: {fileID: 8745341641936028254}
- component: {fileID: 8745341641936028253}
- component: {fileID: 8745341641936028252}
m_Layer: 0
m_Name: cm
- component: {fileID: 4952493914787100248}
- component: {fileID: 1512381518354955390}
m_Layer: 8
m_Name: PostProcessing_Global
--- !u!4 &8745341641936028227
--- !u!4 &4952493914787100248
m_GameObject: {fileID: 8745341641936028226}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_GameObject: {fileID: 6970628017789789606}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_Father: {fileID: 8745341639985019973}
m_Father: {fileID: 8745341640208226295}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1512381518354955390
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6970628017789789606}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
m_Name:
m_EditorClassIdentifier:
isGlobal: 1
priority: 0
blendDistance: 0
weight: 1
sharedProfile: {fileID: 11400000, guid: 6c4e008bb03b1164fa103682a8216050, type: 2}
--- !u!1 &8745341640208226293
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8745341640208226295}
- component: {fileID: 8745341640208226294}
m_Layer: 0
m_Name: CameraSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8745341640208226295
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341640208226293}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 8745341642014614482}
- {fileID: 4952493914787100248}
- {fileID: 8745341641394998850}
- {fileID: 4399786004726619809}
m_Father: {fileID: 0}
--- !u!114 &8745341641936028254
--- !u!114 &8745341640208226294
m_GameObject: {fileID: 8745341641936028226}
m_GameObject: {fileID: 8745341640208226293}
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Script: {fileID: 11500000, guid: 085156cba0e34b540aeddafe12d1e2f1, type: 3}
--- !u!114 &8745341641936028253
inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2}
mainCamera: {fileID: 8745341642014614481}
freeLookVCam: {fileID: 8745341641394998849}
speed: 2
_cameraTransformAnchor: {fileID: 11400000, guid: bc205269957643647a8b5f98f028f9fb,
type: 2}
_frameObjectChannel: {fileID: 11400000, guid: 2723b3f59f7ede3498fe7e385d2bb6ee,
type: 2}
--- !u!1 &8745341641394998848
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8745341641394998850}
- component: {fileID: 8745341641394998849}
m_Layer: 0
m_Name: FreeLook_VCam
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8745341641394998850
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341641394998848}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.73544794, y: 6, z: -9.972919}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2955398947125553842}
- {fileID: 1657732992883833910}
- {fileID: 2808035858438402709}
m_Father: {fileID: 8745341640208226295}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8745341641394998849
m_GameObject: {fileID: 8745341641936028226}
m_GameObject: {fileID: 8745341641394998848}
m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3}
m_Script: {fileID: 11500000, guid: 319d2fe34a804e245819465c9505ea59, type: 3}
m_BindingMode: 5
m_FollowOffset: {x: 0, y: 6, z: -10}
m_XDamping: 1
m_YDamping: 1
m_ZDamping: 1
m_AngularDampingMode: 0
m_PitchDamping: 0
m_YawDamping: 0
m_RollDamping: 0
m_AngularDamping: 0
m_Heading:
m_Definition: 2
m_VelocityFilterStrength: 4
m_Bias: 0
m_RecenterToTargetHeading:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_ExcludedPropertiesInInspector:
- m_Script
m_LockStageInInspector:
m_StreamingVersion: 20170927
m_Priority: 10
m_StandbyUpdate: 2
m_LookAt: {fileID: 4399786004726619809}
m_Follow: {fileID: 4399786004726619809}
m_CommonLens: 1
m_Lens:
FieldOfView: 40
OrthographicSize: 10
NearClipPlane: 0.1
FarClipPlane: 2000
Dutch: 0
LensShift: {x: 0, y: 0}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0
m_OnCameraLive:
m_PersistentCalls:
m_Calls: []
m_LegacyBlendHint: 0
m_YAxis:
Value: 0.5
m_SpeedMode: 0
m_MaxSpeed: 80
m_AccelTime: 0.5
m_DecelTime: 0.1
m_InputAxisName:
m_InputAxisValue: 0
m_InvertInput: 1
m_MinValue: 0
m_MaxValue: 1
m_Wrap: 0
m_Recentering:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_YAxisRecentering:
m_enabled: 1
m_WaitTime: 8
m_RecenteringTime: 4
m_MaxSpeed: 300
m_AccelTime: 0.1
m_MaxSpeed: 8000
m_AccelTime: 0.5
m_InvertInput: 1
m_InvertInput: 0
m_MinValue: -180
m_MaxValue: 180
m_Wrap: 1

m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_LegacyRadius: 3.4028235e+38
m_LegacyHeightOffset: 3.4028235e+38
m_Heading:
m_Definition: 2
m_VelocityFilterStrength: 4
m_Bias: 0
m_RecenterToTargetHeading:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_BindingMode: 5
m_SplineCurvature: 0.2
m_Orbits:
- m_Height: 10
m_Radius: 16.88
- m_Height: 6
m_Radius: 10
- m_Height: 1.5
m_Radius: 4.5
m_HeadingIsSlave: 1
--- !u!114 &8745341641936028252
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341641936028226}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 1, z: 0}
m_LookaheadTime: 0
m_LookaheadSmoothing: 0
m_LookaheadIgnoreY: 0
m_HorizontalDamping: 0
m_VerticalDamping: 0
m_ScreenX: 0.5
m_ScreenY: 0.6
m_DeadZoneWidth: 0
m_DeadZoneHeight: 0
m_SoftZoneWidth: 0.8
m_SoftZoneHeight: 0.8
m_BiasX: 0
m_BiasY: 0
m_CenterOnActivate: 1
m_Rigs:
- {fileID: 4595566115830073586}
- {fileID: 7381962042493973461}
- {fileID: 1990950152470473449}
--- !u!1 &8745341642014614487
GameObject:
m_ObjectHideFlags: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341642014614487}
m_LocalRotation: {x: 0.18778464, y: -0.20536137, z: 0.040184725, w: 0.9596608}
m_LocalPosition: {x: 4.712467, y: 6.307, z: -24.900238}
m_LocalRotation: {x: 0.24919103, y: 0.03563492, z: -0.009175778, w: 0.967755}
m_LocalPosition: {x: -0.73544794, y: 6, z: -9.972919}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8745341640208226295}

m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_Bits: 256
m_RenderPostProcessing: 0
m_RenderPostProcessing: 1
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0

m_RequiresColorTexture: 0
m_Version: 2
--- !u!1 &8745341642084393593
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8745341642084393594}
- component: {fileID: 8745341642084393589}
- component: {fileID: 8745341642084393588}
- component: {fileID: 8745341642084393595}
m_Layer: 0
m_Name: cm
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8745341642084393594
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341642084393593}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8745341641909856137}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8745341642084393589
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341642084393593}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8745341642084393588
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341642084393593}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BindingMode: 5
m_FollowOffset: {x: 0, y: 6, z: -10}
m_XDamping: 1
m_YDamping: 1
m_ZDamping: 1
m_AngularDampingMode: 0
m_PitchDamping: 0
m_YawDamping: 0
m_RollDamping: 0
m_AngularDamping: 0
m_Heading:
m_Definition: 2
m_VelocityFilterStrength: 4
m_Bias: 0
m_RecenterToTargetHeading:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_XAxis:
Value: 0
m_SpeedMode: 0
m_MaxSpeed: 300
m_AccelTime: 0.1
m_DecelTime: 0.1
m_InputAxisName:
m_InputAxisValue: 0
m_InvertInput: 1
m_MinValue: -180
m_MaxValue: 180
m_Wrap: 1
m_Recentering:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_LegacyHeadingDefinition: -1
m_LegacyVelocityFilterStrength: -1
m_LegacyRadius: 3.4028235e+38
m_LegacyHeightOffset: 3.4028235e+38
m_LegacyHeadingBias: 3.4028235e+38
m_HeadingIsSlave: 1
--- !u!114 &8745341642084393595
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341642084393593}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 1.5, z: 0}
m_LookaheadTime: 0
m_LookaheadSmoothing: 30
m_LookaheadIgnoreY: 1
m_HorizontalDamping: 0
m_VerticalDamping: 0
m_ScreenX: 0.5
m_ScreenY: 0.55
m_DeadZoneWidth: 0
m_DeadZoneHeight: 0
m_SoftZoneWidth: 0.8
m_SoftZoneHeight: 0.8
m_BiasX: 0
m_BiasY: 0
m_CenterOnActivate: 1

5
UOP1_Project/Assets/Prefabs/GameplayEssentials/SpawnSystem.prefab


m_Name:
m_EditorClassIdentifier:
_defaultSpawnIndex: 0
_playerPrefab: {fileID: 211818859182309264, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
_playerPrefab: {fileID: 5557640735889932260, guid: 062b3805bf6784e4d9c599ee60eaa002,
_cameraManager: {fileID: 0}
_playerInstantiatedChannel: {fileID: 11400000, guid: 2723b3f59f7ede3498fe7e385d2bb6ee,
type: 2}
_spawnLocations:
- {fileID: 2125786286893897154}
--- !u!1 &2125786286893897213

2
UOP1_Project/Assets/Scenes/Examples.meta


fileFormatVersion: 2
guid: 3b1d60b53a6707c4bbaafe50bb7669d9
guid: 80beaaa9a19039a47bb0535c60361b53
folderAsset: yes
DefaultImporter:
externalObjects: {}

874
UOP1_Project/Assets/Scenes/Examples/CutsceneExample.unity
文件差异内容过多而无法显示
查看文件

70
UOP1_Project/Assets/Scenes/Initialization.unity


m_Script: {fileID: 11500000, guid: 0ba826e9d52310a43b98dffc289c71b2, type: 3}
m_Name:
m_EditorClassIdentifier:
voidGameEvent: {fileID: 11400000, guid: c499d87f35465124f8fb2751b150430d, type: 2}
_channel: {fileID: 11400000, guid: c499d87f35465124f8fb2751b150430d, type: 2}
OnEventRaised:
m_PersistentCalls:
m_Calls:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &610459580
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 610459581}
- component: {fileID: 610459582}
m_Layer: 0
m_Name: AudioManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &610459581
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 610459580}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
--- !u!114 &610459582
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 610459580}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7dcf69f82f8783049ab749ba8f527f89, type: 3}
m_Name:
m_EditorClassIdentifier:
_factory: {fileID: 11400000, guid: 0f82d558a11c88d458625502b6708251, type: 2}
_pool: {fileID: 11400000, guid: 4b2ed98efabac4446a90c61932acf933, type: 2}
_initialSize: 10
_SFXEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e, type: 2}
_musicEventChannel: {fileID: 11400000, guid: 51854f522e1d88442a90b878b27ea839, type: 2}
audioMixer: {fileID: 24100000, guid: 548a7f001ca6d3d4cb67c8edf84f62a3, type: 2}
_masterVolume: 1
_musicVolume: 1
_sfxVolume: 1
--- !u!1 &841012433
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: b6b928d1d6f59854499ed82bdeef2305, type: 3}
m_Name:
m_EditorClassIdentifier:
initializationScene: {fileID: 11400000, guid: c2119785ce96367428081d6eee0d932b,
_initializationScene: {fileID: 11400000, guid: c2119785ce96367428081d6eee0d932b,
mainMenuScenes:
_mainMenuScenes:
loadingInterface: {fileID: 363619424}
loadingProgressBar: {fileID: 841012435}
_loadEvent: {fileID: 11400000, guid: 00e3063edc5902e40832ea618644c597, type: 2}
_loadingInterface: {fileID: 363619424}
_loadingProgressBar: {fileID: 841012435}
_loadEventChannel: {fileID: 11400000, guid: 00e3063edc5902e40832ea618644c597, type: 2}
--- !u!4 &1242953037
Transform:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_UiScaleMode: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ReferenceResolution: {x: 1920, y: 1080}
m_MatchWidthOrHeight: 0
m_MatchWidthOrHeight: 1
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96

988
UOP1_Project/Assets/Scenes/Locations/Beach.unity
文件差异内容过多而无法显示
查看文件

2
UOP1_Project/Assets/Scenes/Locations/Beach.unity.meta


fileFormatVersion: 2
guid: 1f93ce2ec2bb43b4ab2a18ad18a50967
guid: dfaf60263d5c5dc4e80e2793f4328b32
DefaultImporter:
externalObjects: {}
userData:

992
UOP1_Project/Assets/Scenes/Locations/Forest.unity
文件差异内容过多而无法显示
查看文件

7
UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/BardHare.asset


m_Script: {fileID: 11500000, guid: f991c0f5eb9677944ae00c1b61548e72, type: 3}
m_Name: BardHare
m_EditorClassIdentifier:
_actorName: Bard Hare
_actorName:
m_TableReference:
m_TableCollectionName: GUID:9c592d2d4c7fc459f94a645873569195
m_TableEntryReference:
m_KeyId: 1740769320960
m_Key:

7
UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Hamlet.asset


m_Script: {fileID: 11500000, guid: f991c0f5eb9677944ae00c1b61548e72, type: 3}
m_Name: Hamlet
m_EditorClassIdentifier:
_actorName: Hamlet
_actorName:
m_TableReference:
m_TableCollectionName: GUID:9c592d2d4c7fc459f94a645873569195
m_TableEntryReference:
m_KeyId: 2003462774784
m_Key:

8
UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Townsfolk.asset


m_Script: {fileID: 11500000, guid: f991c0f5eb9677944ae00c1b61548e72, type: 3}
m_Name: Townsfolk
m_EditorClassIdentifier:
_actorName: Townsfolk
_face: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
_actorName:
m_TableReference:
m_TableCollectionName: GUID:9c592d2d4c7fc459f94a645873569195
m_TableEntryReference:
m_KeyId: 60141068288
m_Key:

8
UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/HeadToCentre.asset


m_Name: HeadToCentre
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: 5e7bd0eed8324794fad1bc460c565ecb, type: 2}
_sentence: Now head to the town centre, where the legendary chef is waiting for
you.
_sentence:
m_TableReference:
m_TableCollectionName: GUID:3023456eb4be043f1a0c6ede7f88d892
m_TableEntryReference:
m_KeyId: 104386781184
m_Key:

7
UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/Welcome.asset


m_Name: Welcome
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: 5e7bd0eed8324794fad1bc460c565ecb, type: 2}
_sentence: Welcome to town!
_sentence:
m_TableReference:
m_TableCollectionName: GUID:3023456eb4be043f1a0c6ede7f88d892
m_TableEntryReference:
m_KeyId: 9306103808
m_Key:

7
UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/GenericOink.asset


m_Name: GenericOink
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: c7902af5c8e25244f94914ce51e7ea8a, type: 2}
_sentence: Oink oink!
_sentence:
m_TableReference:
m_TableCollectionName: GUID:3023456eb4be043f1a0c6ede7f88d892
m_TableEntryReference:
m_KeyId: 1927684284416
m_Key:

7
UOP1_Project/Assets/ScriptableObjects/SceneData/Locations/Forest.asset


sceneName: Forest
shortDescription: Find Y
music: {fileID: 0}
musicVolume: 0
locationName:
m_TableReference:
m_TableCollectionName: GUID:5f392fa78068846188a7ed5595276c8f
m_TableEntryReference:
m_KeyId: 51471441920
m_Key:
enemiesCount: 0

7
UOP1_Project/Assets/ScriptableObjects/SceneData/Locations/Beach.asset


sceneName: Beach
shortDescription: The level to find X
music: {fileID: 0}
musicVolume: 0
locationName:
m_TableReference:
m_TableCollectionName: GUID:5f392fa78068846188a7ed5595276c8f
m_TableEntryReference:
m_KeyId: 10467926016
m_Key:
enemiesCount: 0

34
UOP1_Project/Assets/Scripts/CameraManager.cs


using System;
using UnityEngine;
using Cinemachine;
using System.Collections;
public class CameraManager : MonoBehaviour
{

[SerializeField, Range(1f, 5f)]
private float speed = default;
[SerializeField] private TransformAnchor _cameraTransformAnchor = default;
[Header("Listening on channels")]
[Tooltip("The CameraManager listens to this event, fired by objects in any scene, to adapt camera position")]
[SerializeField] private TransformEventChannelSO _frameObjectChannel = default;
private bool cameraMovementLock = false;
public void SetupProtagonistVirtualCamera(Transform target)
{

inputReader.cameraMoveEvent += OnCameraMove;
inputReader.enableMouseControlCameraEvent += OnEnableMouseControlCamera;
inputReader.disableMouseControlCameraEvent += OnDisableMouseControlCamera;
if (_frameObjectChannel != null)
_frameObjectChannel.OnEventRaised += OnFrameObjectEvent;
_cameraTransformAnchor.Transform = mainCamera.transform;
}
private void OnDisable()

inputReader.disableMouseControlCameraEvent -= OnDisableMouseControlCamera;
if (_frameObjectChannel != null)
_frameObjectChannel.OnEventRaised -= OnFrameObjectEvent;
}
private void OnEnableMouseControlCamera()

Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
StartCoroutine(DisableMouseControlForFrame());
}
IEnumerator DisableMouseControlForFrame()
{
cameraMovementLock = true;
yield return new WaitForEndOfFrame();
cameraMovementLock = false;
}
private void OnDisableMouseControlCamera()

private void OnCameraMove(Vector2 cameraMovement, bool isDeviceMouse)
{
if (cameraMovementLock)
return;
}
private void OnFrameObjectEvent(Transform value)
{
SetupProtagonistVirtualCamera(value);
}
}

9
UOP1_Project/Assets/Scripts/CameraManager.cs.meta


MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
defaultReferences:
- inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2}
- mainCamera: {instanceID: 0}
- freeLookVCam: {instanceID: 0}
- _cameraTransformAnchor: {fileID: 11400000, guid: bc205269957643647a8b5f98f028f9fb,
type: 2}
- _frameObjectChannel: {fileID: 11400000, guid: 2723b3f59f7ede3498fe7e385d2bb6ee,
type: 2}
executionOrder: 0
icon: {instanceID: 0}
userData:

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


using UnityEngine;
using System;
using UnityEngine;
/// <para>This class listens to the input and it deposits it on the <c>Character</c> component, ready to be used by the <c>StateMachine</c></para>
/// <para>This component consumes input on the InputReader and stores its values. The input is then read, and manipulated, by the StateMachines's Actions.</para>
public Transform gameplayCamera;
public TransformAnchor gameplayCameraTransform;
private Character _charScript;
private void Awake()
//These fields are read and manipulated by the StateMachine actions
[HideInInspector] public bool jumpInput;
[HideInInspector] public bool extraActionInput;
[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;
private void OnControllerColliderHit(ControllerColliderHit hit)
_charScript = GetComponent<Character>();
lastHit = hit;
}
//Adds listeners for events being triggered in the InputReader script

_inputReader.jumpCanceledEvent += OnJumpCanceled;
_inputReader.moveEvent += OnMove;
_inputReader.extraActionEvent += OnExtraAction;
//...
}

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

private void RecalculateMovement()
{
//Get the two axes from the camera and flatten them on the XZ plane
Vector3 cameraForward = gameplayCamera.forward;
cameraForward.y = 0f;
Vector3 cameraRight = gameplayCamera.right;
cameraRight.y = 0f;
if (gameplayCameraTransform.isSet)
{
//Get the two axes from the camera and flatten them on the XZ plane
Vector3 cameraForward = gameplayCameraTransform.Transform.forward;
cameraForward.y = 0f;
Vector3 cameraRight = gameplayCameraTransform.Transform.right;
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;
//Use the two axes, modulated by the corresponding inputs, and construct the final vector
Vector3 adjustedMovement = cameraRight.normalized * _previousMovementInput.x +
cameraForward.normalized * _previousMovementInput.y;
_charScript.Move(Vector3.ClampMagnitude(adjustedMovement, 1f));
movementInput = Vector3.ClampMagnitude(adjustedMovement, 1f);
}
else
{
//No CameraManager exists in the scene, so the input is just used absolute in world-space
Debug.LogWarning("No gameplay camera in the scene. Movement orientation will not be correct.");
movementInput = new Vector3(_previousMovementInput.x, 0f, _previousMovementInput.y);
}
}
//---- EVENT LISTENERS ----

private void OnJumpInitiated()
{
_charScript.Jump();
jumpInput = true;
_charScript.CancelJump();
jumpInput = false;
}
// This handler is just used for debug, for now
private void OnExtraAction()
{
extraActionInput = true;
}
}

5
UOP1_Project/Assets/Scripts/Characters/Protagonist.cs.meta


MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
defaultReferences:
- _inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2}
- gameplayCameraTransform: {fileID: 11400000, guid: bc205269957643647a8b5f98f028f9fb,
type: 2}
executionOrder: 0
icon: {instanceID: 0}
userData:

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


public class ApplyMovementVectorAction : StateAction
{
//Component references
private Character _characterScript;
private Protagonist _protagonistScript;
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
_characterController.Move(_characterScript.movementVector * Time.deltaTime);
_characterController.Move(_protagonistScript.movementVector * Time.deltaTime);
}
}

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


using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "Ascend", menuName = "State Machines/Actions/Ascend")]
public class AscendActionSO : StateActionSO
public class AscendActionSO : StateActionSO<AscendAction>
[SerializeField] private float _initialJumpForce = 10f;
protected override StateAction CreateAction() => new AscendAction(_initialJumpForce);
public float initialJumpForce = 6f;
private Character _characterScript;
private Protagonist _protagonistScript;
private float _initialJumpForce;
private const float GRAVITY_COMEBACK_MULTIPLIER = 15f;
private const float GRAVITY_COMEBACK_MULTIPLIER = .03f;
private AscendActionSO _originSO => (AscendActionSO)base.OriginSO; // The SO this StateAction spawned from
_characterScript = stateMachine.GetComponent<Character>();
}
public AscendAction(float initialJumpForce)
{
_initialJumpForce = initialJumpForce;
_protagonistScript = stateMachine.GetComponent<Protagonist>();
_verticalMovement = _initialJumpForce;
_verticalMovement = _originSO.initialJumpForce;
_gravityContributionMultiplier += Time.deltaTime * GRAVITY_COMEBACK_MULTIPLIER;
_gravityContributionMultiplier += GRAVITY_COMEBACK_MULTIPLIER;
_characterScript.movementVector.y = _verticalMovement;
_protagonistScript.movementVector.y = _verticalMovement;
}
}

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


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();
}
[CreateAssetMenu(menuName = "State Machines/Actions/Descend")]
public class DescendActionSO : StateActionSO<DescendAction> { }
private Character _characterScript;
private Protagonist _protagonistScript;
private float _verticalMovement;
private const float GRAVITY_MULTIPLIER = 5f;

public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
_verticalMovement = _characterScript.movementVector.y;
_verticalMovement = _protagonistScript.movementVector.y;
_characterScript.jumpInput = false;
_protagonistScript.jumpInput = false;
}
public override void OnUpdate()

//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;
_protagonistScript.movementVector.y = _verticalMovement;
}
}

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


using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "GroundGravity", menuName = "State Machines/Actions/Ground Gravity")]
public class GroundGravityActionSO : StateActionSO
public class GroundGravityActionSO : StateActionSO<GroundGravityAction>
[SerializeField] private float _verticalPull = -5f;
protected override StateAction CreateAction() => new GroundGravityAction(_verticalPull);
public float verticalPull = -5f;
private Character _characterScript;
private Protagonist _protagonistScript;
private float _verticalPull;
public GroundGravityAction(float slideSpeed)
{
_verticalPull = slideSpeed;
}
private GroundGravityActionSO _originSO => (GroundGravityActionSO)base.OriginSO; // The SO this StateAction spawned from
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
_characterScript.movementVector.y = _verticalPull;
_protagonistScript.movementVector.y = _originSO.verticalPull;
}
}

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


using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "HorizontalMove", menuName = "State Machines/Actions/Horizontal Move")]
public class HorizontalMoveActionSO : StateActionSO
public class HorizontalMoveActionSO : StateActionSO<HorizontalMoveAction>
[Tooltip("Horizontal XZ plane speed multiplier")] [SerializeField] private float _speed = 8f;
protected override StateAction CreateAction() => new WalkAction(_speed);
[Tooltip("Horizontal XZ plane speed multiplier")]
public float speed = 8f;
public class WalkAction : StateAction
public class HorizontalMoveAction : StateAction
private Character _characterScript;
private float _speed;
public WalkAction(float speed)
{
_speed = speed;
}
private Protagonist _protagonistScript;
private HorizontalMoveActionSO _originSO => (HorizontalMoveActionSO)base.OriginSO; // The SO this StateAction spawned from
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
_characterScript.movementVector.x = _characterScript.movementInput.x * _speed;
_characterScript.movementVector.z = _characterScript.movementInput.z * _speed;
_protagonistScript.movementVector.x = _protagonistScript.movementInput.x * _originSO.speed;
_protagonistScript.movementVector.z = _protagonistScript.movementInput.z * _originSO.speed;
}
}

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


using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "RotateAction", menuName = "State Machines/Actions/Rotate")]
public class RotateActionSO : StateActionSO
public class RotateActionSO : StateActionSO<RotateAction>
[Tooltip("Smoothing for rotating the character to their movement direction")] [SerializeField] private float _turnSmoothTime = 0.2f;
protected override StateAction CreateAction() => new RotateAction(_turnSmoothTime);
[Tooltip("Smoothing for rotating the character to their movement direction")]
public float turnSmoothTime = 0.2f;
private Character _characterScript;
private Protagonist _protagonistScript;
private float _turnSmoothTime;
public RotateAction(float turnSmoothTime)
{
_turnSmoothTime = turnSmoothTime;
}
private RotateActionSO _originSO => (RotateActionSO)base.OriginSO; // The SO this StateAction spawned from
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
Vector3 horizontalMovement = _characterScript.movementVector;
Vector3 horizontalMovement = _protagonistScript.movementVector;
float targetRotation = Mathf.Atan2(_characterScript.movementVector.x, _characterScript.movementVector.z) * Mathf.Rad2Deg;
float targetRotation = Mathf.Atan2(_protagonistScript.movementVector.x, _protagonistScript.movementVector.z) * Mathf.Rad2Deg;
_turnSmoothTime);
_originSO.turnSmoothTime);
}
}
}

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


using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "SlideAction", menuName = "State Machines/Actions/Slide")]
public class SlideActionSO : StateActionSO
public class SlideActionSO : StateActionSO<SlideAction>
[SerializeField] private float _slideSpeed = 6f;
protected override StateAction CreateAction() => new SlideAction(_slideSpeed);
public float slideSpeed = 10f;
private Character _characterScript;
private float _slideSpeed;
public SlideAction(float slideSpeed)
{
_slideSpeed = slideSpeed;
}
private Protagonist _protagonistScript;
private SlideActionSO _originSO => (SlideActionSO)base.OriginSO; // The SO this StateAction spawned from
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
Vector3 hitNormal = _characterScript.lastHit.normal;
_characterScript.movementVector.x = (1f - hitNormal.y) * hitNormal.x * _slideSpeed;
_characterScript.movementVector.z = (1f - hitNormal.y) * hitNormal.z * _slideSpeed;
Vector3 hitNormal = _protagonistScript.lastHit.normal;
_protagonistScript.movementVector.x = (1f - hitNormal.y) * hitNormal.x * _originSO.slideSpeed;
_protagonistScript.movementVector.z = (1f - hitNormal.y) * hitNormal.z * _originSO.slideSpeed;
_characterScript.movementVector = Vector3.zero;
_protagonistScript.movementVector = Vector3.zero;
}
}

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


using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "HasHitHead", menuName = "State Machines/Conditions/Has Hit the Head")]
[CreateAssetMenu(menuName = "State Machines/Conditions/Has Hit the Head")]
private Character _characterScript;
private Protagonist _protagonistScript;
private CharacterController _characterController;
private Transform _transform;

_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
public override bool Statement()
protected override bool Statement()
bool isMovingUpwards = _characterScript.movementVector.y > 0f;
bool isMovingUpwards = _protagonistScript.movementVector.y > 0f;
float distance = Mathf.Abs(_characterScript.lastHit.point.y - topPositionY);
float distance = Mathf.Abs(_protagonistScript.lastHit.point.y - topPositionY);
_characterScript.jumpInput = false;
_characterScript.movementVector.y = 0f;
_protagonistScript.jumpInput = false;
_protagonistScript.movementVector.y = 0f;
return true;
}

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


using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "IsGrounded", menuName = "State Machines/Conditions/Is Character Controller Grounded")]
[CreateAssetMenu(menuName = "State Machines/Conditions/Is Character Controller Grounded")]
public class IsCharacterControllerGroundedConditionSO : StateConditionSO<IsCharacterControllerGroundedCondition> { }
public class IsCharacterControllerGroundedCondition : Condition

_characterController = stateMachine.GetComponent<CharacterController>();
}
public override bool Statement() => _characterController.isGrounded;
protected override bool Statement() => _characterController.isGrounded;
}

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


using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "IsHoldingJump", menuName = "State Machines/Conditions/Is Holding Jump")]
[CreateAssetMenu(menuName = "State Machines/Conditions/Is Holding Jump")]
private Character _characterScript;
private Protagonist _protagonistScript;
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
public override bool Statement() => _characterScript.jumpInput;
protected override bool Statement() => _protagonistScript.jumpInput;
}

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


using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "StartedMoving", menuName = "State Machines/Conditions/Started Moving")]
public class IsMovingConditionSO : StateConditionSO
[CreateAssetMenu(menuName = "State Machines/Conditions/Started Moving")]
public class IsMovingConditionSO : StateConditionSO<IsMovingCondition>
[SerializeField] private float _treshold = 0.02f;
protected override Condition CreateCondition() => new IsMovingCondition(_treshold);
public float treshold = 0.02f;
private float _treshold;
private Character _characterScript;
private Protagonist _protagonistScript;
private IsMovingConditionSO _originSO => (IsMovingConditionSO)base.OriginSO; // The SO this Condition spawned from
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
public IsMovingCondition(float treshold)
protected override bool Statement()
_treshold = treshold;
}
public override bool Statement()
{
Vector3 movementVector = _characterScript.movementInput;
Vector3 movementVector = _protagonistScript.movementInput;
return movementVector.sqrMagnitude > _treshold;
return movementVector.sqrMagnitude > _originSO.treshold;
_characterScript.movementVector = Vector3.zero;
_protagonistScript.movementVector = Vector3.zero;
}
}

10
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsSlidingConditionSO.cs


public class IsSlidingCondition : Condition
{
private CharacterController _characterController;
private Character _characterScript;
private Protagonist _protagonistScript;
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
public override bool Statement()
protected override bool Statement()
if (_characterScript.lastHit == null)
if (_protagonistScript.lastHit == null)
float currentSlope = Vector3.Angle(Vector3.up, _characterScript.lastHit.normal);
float currentSlope = Vector3.Angle(Vector3.up, _protagonistScript.lastHit.normal);
return (currentSlope >= _characterController.slopeLimit);
}
}

16
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/TimeElapsedConditionSO.cs


using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "TimeElapsed", menuName = "State Machines/Conditions/Time elapsed")]
public class TimeElapsedConditionSO : StateConditionSO
[CreateAssetMenu(menuName = "State Machines/Conditions/Time elapsed")]
public class TimeElapsedConditionSO : StateConditionSO<TimeElapsedCondition>
[SerializeField] float _timerLength = .5f;
protected override Condition CreateCondition() => new TimeElapsedCondition(_timerLength);
public float timerLength = .5f;
private float _timerLength;
private TimeElapsedConditionSO _originSO => (TimeElapsedConditionSO)base.OriginSO; // The SO this Condition spawned from
public override void OnStateEnter()
{

public TimeElapsedCondition(float timerLength)
{
_timerLength = timerLength;
}
public override bool Statement() => Time.time >= _startTime + _timerLength;
protected override bool Statement() => Time.time >= _startTime + _originSO.timerLength;
}

30
UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs


using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.Playables;
public class CutsceneManager : MonoBehaviour

private void OnEnable()
{
_inputReader.gameInput.Dialogues.AdvanceDialogue.performed += ctx => OnAdvance();
_inputReader.advanceDialogueEvent += OnAdvance;
_inputReader.gameInput.Dialogues.AdvanceDialogue.performed -= ctx => OnAdvance();
_inputReader.advanceDialogueEvent -= OnAdvance;
_inputReader.EnableDialogueInput();
_activePlayableDirector.stopped += ctx => CutsceneEnded();
EnableDialogueInput();
_activePlayableDirector.stopped += HandleDirectorStopped;
EnableGameplayInput();
if (_activePlayableDirector != null)
_activePlayableDirector.stopped -= HandleDirectorStopped;
_inputReader.EnableGameplayInput();
private void HandleDirectorStopped(PlayableDirector director) => CutsceneEnded();
public void PlayDialogueFromClip(DialogueLineSO dialogueLine)
{

{
_isPaused = false;
_activePlayableDirector.playableGraph.GetRootPlayable(0).SetSpeed(1);
}
private void EnableDialogueInput()
{
_inputReader.gameInput.Dialogues.Enable();
_inputReader.gameInput.Gameplay.Disable();
}
private void EnableGameplayInput()
{
_inputReader.gameInput.Gameplay.Enable();
_inputReader.gameInput.Dialogues.Disable();
}
}

30
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs


private bool _dialoguePlayed;
/// <summary>
/// Displays a line of dialogue on screen by interfacing with the <c>CutsceneManager</c>. This happens as soon as the playhead reaches the clip.
/// Displays a line of dialogue on screen by interfacing with the <c>CutsceneManager</c>.
public override void OnBehaviourPlay(Playable playable, FrameData info)
public override void ProcessFrame(Playable playable, FrameData info, object playerData)
// Need to ask the CutsceneManager if the cutscene is playing, since the graph is not actually stopped/paused: it's just going at speed 0
// This check is needed because when two clips are side by side and the first one stops the cutscene,
// the OnBehaviourPlay of the second clip is still called and thus its dialogueLine is played (prematurely). This check makes sure it's not.
if (playable.GetGraph().IsPlaying()
&& cutsceneManager.IsCutscenePlaying)
if (Application.isPlaying) //TODO: Find a way to "play" dialogue lines even when scrubbing the Timeline not in Play Mode
//TODO: Find a way to "play" dialogue lines even when scrubbing the Timeline not in Play Mode
if (_dialogueLine != null)
{
cutsceneManager.PlayDialogueFromClip(_dialogueLine);
_dialoguePlayed = true;
}
else
// Need to ask the CutsceneManager if the cutscene is playing, since the graph is not actually stopped/paused: it's just going at speed 0.
if (playable.GetGraph().IsPlaying()
&& cutsceneManager.IsCutscenePlaying)
Debug.LogWarning("This clip contains no DialogueLine");
if (_dialogueLine != null)
{
cutsceneManager.PlayDialogueFromClip(_dialogueLine);
_dialoguePlayed = true;
}
else
{
Debug.LogWarning("This clip contains no DialogueLine");
}
}
}
}

6
UOP1_Project/Assets/Scripts/Dialogues/ActorSO.cs


using UnityEngine;
using UnityEngine.Localization;
/// <summary>
/// Scriptable Object that represents an "Actor", that is the protagonist of a Dialogue
/// </summary>

{
public string ActorName { get => _actorName; }
public LocalizedString ActorName { get => _actorName; }
[SerializeField] private string _actorName = default;
[SerializeField] private LocalizedString _actorName = default;
}

5
UOP1_Project/Assets/Scripts/Dialogues/DialogueLineSO.cs


using System;
using UnityEngine;
using UnityEngine.Localization;
/// <summary>
/// DialogueLine is a Scriptable Object that represents one line of spoken dialogue.

public class DialogueLineSO : ScriptableObject
{
public ActorSO Actor { get => _actor; }
public string Sentence { get => _sentence; }
public LocalizedString Sentence { get => _sentence; }
[SerializeField] [TextArea(3, 3)] private string _sentence = default; //TODO: Connect this with localisation
[SerializeField] private LocalizedString _sentence = default; //TODO: Connect this with localisation
}

7
UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs


/// <param name="firstLine"></param>
public void BeginDialogue(DialogueLineSO firstLine)
{
_inputReader.gameInput.Dialogues.Enable();
_inputReader.EnableDialogueInput();
DisplayDialogueLine(firstLine);
}

public void DisplayDialogueLine(DialogueLineSO dialogueLine)
{
//TODO: Interface with a UIManager to allow displayal of the line of dialogue in the UI
Debug.Log("A line of dialogue has been spoken: \"" + dialogueLine.Sentence + "\" by " + dialogueLine.Actor.ActorName);
//Debug.Log("A line of dialogue has been spoken: \"" + dialogueLine.Sentence + "\" by " + dialogueLine.Actor.ActorName);
UIManager.Instance.OpenUIDialogue(dialogueLine);
}
}

39
UOP1_Project/Assets/Scripts/Editor/ClickToPlaceHelperEditor.cs


[CustomEditor(typeof(ClickToPlaceHelper))]
public class ClickToPlaceHelperEditor : Editor
{
private ClickToPlaceHelper _clickHelper => target as ClickToPlaceHelper;
ClickToPlaceHelper myTarget = target as ClickToPlaceHelper;
if (GUILayout.Button("Place at Mouse cursor") && !_clickHelper.IsTargeting)
{
_clickHelper.BeginTargeting();
SceneView.duringSceneGui += DuringSceneGui;
}
}
private void DuringSceneGui(SceneView sceneView)
{
Event currentGUIEvent = Event.current;
Vector3 mousePos = currentGUIEvent.mousePosition;
float pixelsPerPoint = EditorGUIUtility.pixelsPerPoint;
mousePos.y = sceneView.camera.pixelHeight - mousePos.y * pixelsPerPoint;
mousePos.x *= pixelsPerPoint;
Ray ray = sceneView.camera.ScreenPointToRay(mousePos);
if (Physics.Raycast(ray, out RaycastHit hit))
{
_clickHelper.UpdateTargeting(hit.point);
}
if (GUILayout.Button("Place at Mouse cursor"))
switch (currentGUIEvent.type)
myTarget.SetSpawnLocationAtCursor();
case EventType.MouseMove:
HandleUtility.Repaint();
break;
case EventType.MouseDown:
if (currentGUIEvent.button == 0) // Wait for Left mouse button down
{
_clickHelper.EndTargeting();
SceneView.duringSceneGui -= DuringSceneGui;
currentGUIEvent.Use(); // This consumes the event, so that other controls/buttons won't be able to use it
}
break;
}
}
}

32
UOP1_Project/Assets/Scripts/Events/IntEventListener.cs


using UnityEngine.Events;
/// <summary>
/// To use a generic UnityEvent type you must override the class type
/// To use a generic UnityEvent type you must override the generic type.
/// This class is listener for Int Events
/// A flexible handler for int events in the form of a MonoBehaviour. Responses can be connected directly from the Unity Inspector.
public IntGameEvent intGameEvent;
[SerializeField] private IntEventChannelSO _channel = default;
//Check if the event exists to avoid errors
if (intGameEvent == null)
{
return;
}
intGameEvent.eventRaised += Respond;
if (_channel != null)
_channel.OnEventRaised += Respond;
if (intGameEvent == null)
{
return;
}
intGameEvent.eventRaised -= Respond;
if (_channel != null)
_channel.OnEventRaised -= Respond;
public void Respond(int value)
private void Respond(int value)
if (OnEventRaised == null)
{
return;
}
OnEventRaised.Invoke(value);
if (OnEventRaised != null)
OnEventRaised.Invoke(value);
}
}

2
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/VoidEventChannelSO.cs.meta


fileFormatVersion: 2
guid: 04ea2f19feb15654cb31bb60f7f50855
guid: 7fafac715ff920c4383fed91a38a351e
MonoImporter:
externalObjects: {}
serializedVersion: 2

30
UOP1_Project/Assets/Scripts/Events/VoidEventListener.cs


using UnityEngine.Events;
/// <summary>
/// This class is listener for Void Events
/// A flexible handler for void events in the form of a MonoBehaviour. Responses can be connected directly from the Unity Inspector.
public VoidGameEvent voidGameEvent;
[SerializeField] private VoidEventChannelSO _channel = default;
//Check if the event exists to avoid errors
if (voidGameEvent == null)
{
return;
}
voidGameEvent.eventRaised += Respond;
if (_channel != null)
_channel.OnEventRaised += Respond;
if (voidGameEvent == null)
{
return;
}
voidGameEvent.eventRaised -= Respond;
if (_channel != null)
_channel.OnEventRaised -= Respond;
public void Respond()
private void Respond()
if (OnEventRaised == null)
{
return;
}
OnEventRaised.Invoke();
if (OnEventRaised != null)
OnEventRaised.Invoke();
}
}

7
UOP1_Project/Assets/Scripts/Factory/FactorySO.cs


/// Implements the IFactory interface for non-abstract types.
/// </summary>
/// <typeparam name="T">Specifies the non-abstract type to create.</typeparam>
public abstract class FactorySO<T> : ScriptableObject, IFactory<T> where T : new()
public abstract class FactorySO<T> : ScriptableObject, IFactory<T>
public virtual T Create()
{
return new T();
}
public abstract T Create();
}
}

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


using UnityEngine.Events;
[CreateAssetMenu(fileName = "InputReader", menuName = "Game/Input Reader")]
public class InputReader : ScriptableObject, GameInput.IGameplayActions
public class InputReader : ScriptableObject, GameInput.IGameplayActions, GameInput.IDialoguesActions
// Gameplay
public event UnityAction interactEvent;
public event UnityAction extraActionEvent;
public event UnityAction interactEvent; // Used to talk, pickup objects, interact with tools like the cooking cauldron
public event UnityAction extraActionEvent; // Used to bring up the inventory
public event UnityAction pauseEvent;
public event UnityAction<Vector2> moveEvent;
public event UnityAction<Vector2, bool> cameraMoveEvent;

public GameInput gameInput;
// Dialogue
public event UnityAction advanceDialogueEvent = delegate { };
public event UnityAction onMoveSelectionEvent = delegate { };
private GameInput gameInput;
private void OnEnable()
{

gameInput.Gameplay.SetCallbacks(this);
gameInput.Dialogues.SetCallbacks(this);
gameInput.Gameplay.Enable();
EnableGameplayInput();
gameInput.Gameplay.Disable();
DisableAllInput();
}
public void OnAttack(InputAction.CallbackContext context)

if (context.phase == InputActionPhase.Canceled)
disableMouseControlCameraEvent?.Invoke();
}
private bool IsDeviceMouse(InputAction.CallbackContext context) => context.control.device.name == "Mouse";
public void OnMoveSelection(InputAction.CallbackContext context)
{
if (context.phase == InputActionPhase.Performed)
onMoveSelectionEvent();
private bool IsDeviceMouse(InputAction.CallbackContext context) => context.control.device.name == "Mouse";
public void OnAdvanceDialogue(InputAction.CallbackContext context)
{
if (context.phase == InputActionPhase.Performed)
advanceDialogueEvent();
}
public void EnableDialogueInput()
{
gameInput.Dialogues.Enable();
gameInput.Gameplay.Disable();
}
public void EnableGameplayInput()
{
gameInput.Gameplay.Enable();
gameInput.Dialogues.Disable();
}
public void DisableAllInput()
{
gameInput.Gameplay.Disable();
gameInput.Dialogues.Disable();
}
}

59
UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs


using UnityEngine;
using UnityEngine;
namespace UOP1.Pool
{

/// <typeparam name="T">Specifies the component to pool.</typeparam>
public abstract class ComponentPoolSO<T> : PoolSO<T> where T : Component, IPoolable
public abstract class ComponentPoolSO<T> : PoolSO<T> where T : Component
public abstract int InitialPoolSize { get; set; }
private GameObject _poolRootObject;
private void InitializePool()
private Transform _poolRoot;
private Transform PoolRoot
_poolRootObject = new GameObject(name);
DontDestroyOnLoad(_poolRootObject);
for (int i = 0; i < InitialPoolSize; i++)
get
_available.Push(Create());
if (_poolRoot == null)
{
_poolRoot = new GameObject(name).transform;
_poolRoot.SetParent(_parent);
}
return _poolRoot;
private Transform _parent;
/// <summary>
/// Parents the pool root transform to <paramref name="t"/>.
/// </summary>
/// <param name="t">The Transform to which this pool should become a child.</param>
/// <remarks>NOTE: Setting the parent to an object marked DontDestroyOnLoad will effectively make this pool DontDestroyOnLoad.<br/>
/// This can only be circumvented by manually destroying the object or its parent or by setting the parent to an object not marked DontDestroyOnLoad.</remarks>
public void SetParent(Transform t)
{
_parent = t;
PoolRoot.SetParent(_parent);
}
if (_poolRootObject == null)
{
InitializePool();
}
return base.Request();
T member = base.Request();
member.gameObject.SetActive(true);
return member;
if (_poolRootObject == null)
{
InitializePool();
}
member.transform.SetParent(PoolRoot.transform);
member.gameObject.SetActive(false);
base.Return(member);
}

newMember.transform.SetParent(_poolRootObject.transform);
newMember.transform.SetParent(PoolRoot.transform);
newMember.gameObject.SetActive(false);
return newMember;
}

if (_poolRoot != null)
{
DestroyImmediate(_poolRootObject);
DestroyImmediate(_poolRoot.gameObject);
Destroy(_poolRootObject);
Destroy(_poolRoot.gameObject);
}
}
}
}

2
UOP1_Project/Assets/Scripts/Pool/Example/Assets/Example.unity


m_Script: {fileID: 11500000, guid: ff0fb790d778a05429eca3a001ab6be1, type: 3}
m_Name:
m_EditorClassIdentifier:
_prefab: {fileID: -6757246126632128155, guid: 13e8a2294914b7744a0b9fe47b807ead,
type: 3}
_initialPoolSize: 5
--- !u!4 &648587143
Transform:

34
UOP1_Project/Assets/Scripts/Pool/Example/LocalPoolTester.cs


public class LocalPoolTester : MonoBehaviour
{
[SerializeField]
private PoolableParticle _prefab = default;
[SerializeField]
private void Awake()
{
DontDestroyOnLoad(this.gameObject);
}
_factory.Prefab = _prefab;
_pool.InitialPoolSize = _initialPoolSize;
List<PoolableParticle> particles = _pool.Request(10) as List<PoolableParticle>;
foreach (PoolableParticle particle in particles)
_pool.SetParent(this.transform);
_pool.Prewarm(_initialPoolSize);
List<ParticleSystem> particles = _pool.Request(2) as List<ParticleSystem>;
foreach (ParticleSystem particle in particles)
particle.transform.position = Random.insideUnitSphere * 5f;
particle.Play();
StartCoroutine(DoParticleBehaviour(particle));
yield return new WaitForSecondsRealtime(5f);
_pool.Return(particles);
yield return new WaitForSeconds(2);
_pool.SetParent(null);
yield return new WaitForSeconds(2);
_pool.SetParent(this.transform);
}
private IEnumerator DoParticleBehaviour(ParticleSystem particle)
{
particle.transform.position = Random.insideUnitSphere * 5f;
particle.Play();
yield return new WaitForSeconds(particle.main.duration);
particle.Stop(true, ParticleSystemStopBehavior.StopEmitting);
yield return new WaitUntil(() => particle.particleCount == 0);
_pool.Return(particle);
}
}

16
UOP1_Project/Assets/Scripts/Pool/Example/ParticleFactorySO.cs


using UOP1.Factory;
[CreateAssetMenu(fileName = "NewParticleFactory", menuName = "Factory/Particle Factory")]
public class ParticleFactorySO : ComponentFactorySO<PoolableParticle>
public class ParticleFactorySO : FactorySO<ParticleSystem>
[SerializeField]
private PoolableParticle _prefab = default;
public override PoolableParticle Prefab
public override ParticleSystem Create()
get
{
return _prefab;
}
set
{
_prefab = value;
}
return new GameObject("ParticleSystem").AddComponent<ParticleSystem>();
}
}

18
UOP1_Project/Assets/Scripts/Pool/Example/ParticlePoolSO.cs


using UOP1.Factory;
[CreateAssetMenu(fileName = "NewParticlePool", menuName = "Pool/Particle Pool")]
public class ParticlePoolSO : ComponentPoolSO<PoolableParticle>
public class ParticlePoolSO : ComponentPoolSO<ParticleSystem>
[SerializeField]
private int _initialPoolSize;
public override IFactory<PoolableParticle> Factory
public override IFactory<ParticleSystem> Factory
{
get
{

{
_factory = value as ParticleFactorySO;
}
}
public override int InitialPoolSize
{
get
{
return _initialPoolSize;
}
set
{
_initialPoolSize = value;
}
}
}

21
UOP1_Project/Assets/Scripts/Pool/Example/PoolTester.cs


[SerializeField]
private ParticlePoolSO _pool = default;
private IEnumerator Start()
private void Start()
List<PoolableParticle> particles = _pool.Request(10) as List<PoolableParticle>;
foreach (PoolableParticle particle in particles)
List<ParticleSystem> particles = _pool.Request(10) as List<ParticleSystem>;
foreach (ParticleSystem particle in particles)
particle.transform.position = Random.insideUnitSphere * 5f;
particle.Play();
StartCoroutine(DoParticleBehaviour(particle));
yield return new WaitForSeconds(5f);
_pool.Return(particles);
}
private IEnumerator DoParticleBehaviour(ParticleSystem particle)
{
particle.transform.position = Random.insideUnitSphere * 5f;
particle.Play();
yield return new WaitForSeconds(particle.main.duration);
particle.Stop(true, ParticleSystemStopBehavior.StopEmitting);
yield return new WaitUntil(() => particle.particleCount == 0);
_pool.Return(particle);
}
}

1
UOP1_Project/Assets/Scripts/Pool/IPool.cs


/// <typeparam name="T">Specifies the type of elements in the pool.</typeparam>
public interface IPool<T>
{
void Prewarm(int num);
T Request();
void Return(T member);
}

55
UOP1_Project/Assets/Scripts/Pool/PoolSO.cs


/// A generic pool that generates members of type T on-demand via a factory.
/// </summary>
/// <typeparam name="T">Specifies the type of elements to pool.</typeparam>
public abstract class PoolSO<T> : ScriptableObject, IPool<T> where T : IPoolable
public abstract class PoolSO<T> : ScriptableObject, IPool<T>
protected readonly Stack<T> _available = new Stack<T>();
protected readonly Stack<T> Available = new Stack<T>();
/// <summary>
/// The factory which will be used to create <typeparamref name="T"/> on demand.
/// </summary>
protected bool HasBeenPrewarmed { get; set; }
protected virtual T Create()
{

/// <summary>
/// Prewarms the pool with a <paramref name="num"/> of <typeparamref name="T"/>.
/// </summary>
/// <param name="num">The number of members to create as a part of this pool.</param>
/// <remarks>NOTE: This method can be called at any time, but only once for the lifetime of the pool.</remarks>
public virtual void Prewarm(int num)
{
if (HasBeenPrewarmed)
{
Debug.LogWarning($"Pool {name} has already been prewarmed.");
return;
}
for (int i = 0; i < num; i++)
{
Available.Push(Create());
}
HasBeenPrewarmed = true;
}
/// <summary>
/// Requests a <typeparamref name="T"/> from this pool.
/// </summary>
/// <returns>The requested <typeparamref name="T"/>.</returns>
T member = _available.Count > 0 ? _available.Pop() : Create();
member.OnRequest();
return member;
return Available.Count > 0 ? Available.Pop() : Create();
/// <summary>
/// Batch requests a <typeparamref name="T"/> collection from this pool.
/// </summary>
/// <returns>A <typeparamref name="T"/> collection.</returns>
public virtual IEnumerable<T> Request(int num = 1)
{
List<T> members = new List<T>(num);

return members;
}
/// <summary>
/// Returns a <typeparamref name="T"/> to the pool.
/// </summary>
/// <param name="member">The <typeparamref name="T"/> to return.</param>
member.OnReturn(() =>
{
_available.Push(member);
});
Available.Push(member);
/// <summary>
/// Returns a <typeparamref name="T"/> collection to the pool.
/// </summary>
/// <param name="members">The <typeparamref name="T"/> collection to return.</param>
public virtual void Return(IEnumerable<T> members)
{
foreach (T member in members)

public virtual void OnDisable()
{
_available.Clear();
Available.Clear();
HasBeenPrewarmed = false;
}
}
}

5
UOP1_Project/Assets/Scripts/SceneManagement/EditorInitialisationLoader.cs


{
#if UNITY_EDITOR
public GameSceneSO initializationScene;
public int targetFramerate = 0; // For debugging purposes
void Start()
private void Awake()
Application.targetFrameRate = targetFramerate; // For debugging purposes
for (int i = 0; i < SceneManager.sceneCount; ++i)
{
Scene scene = SceneManager.GetSceneAt(i);

2
UOP1_Project/Assets/Scripts/SceneManagement/EditorInitialisationLoader.cs.meta


externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
executionOrder: -1100
icon: {instanceID: 0}
userData:
assetBundleName:

11
UOP1_Project/Assets/Scripts/SceneManagement/LocationExit.cs


public class LocationExit : MonoBehaviour
{
public LoadEvent onLocationExit;
public GameSceneSO[] locationsToLoad;
public bool showLoadScreen;
[Header("Loading settings")]
[SerializeField] private GameSceneSO[] _locationsToLoad = default;
[SerializeField] private bool _showLoadScreen = default;
[Header("Broadcasting on")]
[SerializeField] private LoadEventChannelSO _locationExitLoadChannel = default;
onLocationExit.Raise(locationsToLoad, showLoadScreen);
_locationExitLoadChannel.RaiseEvent(_locationsToLoad, _showLoadScreen);
}
}
}

3
UOP1_Project/Assets/Scripts/SceneManagement/LocationExit.cs.meta


MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
defaultReferences:
- _onLocationExit: {fileID: 11400000, guid: 00e3063edc5902e40832ea618644c597, type: 2}
executionOrder: 0
icon: {instanceID: 0}
userData:

156
UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs


using UnityEngine.UI;
/// <summary>
/// This class manages the scenes loading and unloading
/// This class manages the scene loading and unloading.
/// Heavy on comments right now because it is still being worked on.
public GameSceneSO initializationScene;
[SerializeField] private GameSceneSO _initializationScene = default;
public GameSceneSO[] mainMenuScenes;
[SerializeField] private GameSceneSO[] _mainMenuScenes = default;
public GameObject loadingInterface;
public Image loadingProgressBar;
[SerializeField] private GameObject _loadingInterface = default;
[SerializeField] private Image _loadingProgressBar = default;
[SerializeField] private LoadEvent _loadEvent = default;
[SerializeField] private LoadEventChannelSO _loadEventChannel = default;
//List of the scenes to load and track progress
//List of scenes to unload
private List<Scene> _ScenesToUnload = new List<Scene>();
//Keep track of the scene we want to set as active (for lighting/skybox)
private GameSceneSO _activeScene;
private List<Scene> _scenesToUnload = new List<Scene>();
private GameSceneSO _activeScene; // The scene we want to set as active (for lighting/skybox)
private Coroutine runningLoader = null;
_loadEvent.loadEvent += LoadScenes;
_loadEventChannel.OnLoadingRequested += LoadScenes;
_loadEvent.loadEvent -= LoadScenes;
_loadEventChannel.OnLoadingRequested -= LoadScenes;
if (SceneManager.GetActiveScene().name == initializationScene.sceneName)
if (SceneManager.GetActiveScene().name == _initializationScene.sceneName)
{
LoadMainMenu();
}

{
LoadScenes(mainMenuScenes, false);
LoadScenes(_mainMenuScenes, false);
/// <summary> This function loads the scenes passed as array parameter </summary>
public void LoadScenes(GameSceneSO[] locationsToLoad, bool showLoadingScreen)
/// <summary>
/// This function loads the scenes passed as array parameter
/// </summary>
/// <param name="locationsToLoad"></param>
/// <param name="showLoadingScreen"></param>
private void LoadScenes(GameSceneSO[] locationsToLoad, bool showLoadingScreen)
//Add all current open scenes to unload list
AddScenesToUnload();
AddScenesToUnload();
UnloadScenes();
for (int i = 0; i < locationsToLoad.Length; ++i)
{
String currentSceneName = locationsToLoad[i].sceneName;
if (!CheckLoadState(currentSceneName))
{
//Add the scene to the list of scenes to load asynchronously in the background
_scenesToLoadAsyncOperations.Add(SceneManager.LoadSceneAsync(currentSceneName, LoadSceneMode.Additive));
}
}
_scenesToLoadAsyncOperations[0].completed += SetActiveScene;
//Show the progress bar and track progress if loadScreen is true
loadingInterface.SetActive(true);
StartCoroutine(TrackLoadingProgress());
_loadingInterface.SetActive(true);
else
if (_scenesToLoadAsyncOperations.Count == 0)
//Clear the scenes to load
_scenesToLoadAsyncOperations.Clear();
}
for (int i = 0; i < locationsToLoad.Length; i++)
{
string currentSceneName = locationsToLoad[i].sceneName;
if (IsSceneLoaded(currentSceneName) == false)
{
if (runningLoader == null)
{
_scenesToLoadAsyncOperations.Add(SceneManager.LoadSceneAsync(currentSceneName, LoadSceneMode.Additive));
_scenesToLoadAsyncOperations[i].completed += SetActiveScene;
// TODO: Run a coroutine for each scene loading that updates a combined value
// for the progress bar. This way, as each scene completes loading, we will
// know what scene it is. Then decide if it activates right away or not.
// runningLoader = StartCoroutine(TrackLoadingProgress(locationsToLoad[i]));
}
}
}
//Unload the scenes
UnloadScenes();
if (_scenesToLoadAsyncOperations.Count > 0)
{
// TODO: locationsToLoad[0] is a place holder right now.
runningLoader = StartCoroutine(TrackLoadingProgress(locationsToLoad[0]));
}
}
/// <summary>
/// SetActiveScene(AsyncOperation asyncOp) is called by AsyncOperation.complete event.
/// </summary>
/// <param name="asyncOp"></param>
// TODO: As each event completes, decide if it needs to activate right away.
public void AddScenesToUnload()
private void AddScenesToUnload()
for (int i = 0; i < SceneManager.sceneCount; ++i)
for (int i = 0; i < SceneManager.sceneCount; i++)
if (scene.name != initializationScene.sceneName)
if (scene.name != _initializationScene.sceneName && scene.name != _activeScene.name)
//Add the scene to the list of the scenes to unload
_ScenesToUnload.Add(scene);
_scenesToUnload.Add(scene);
public void UnloadScenes()
private void UnloadScenes()
if (_ScenesToUnload != null)
if (_scenesToUnload != null)
for (int i = 0; i < _ScenesToUnload.Count; ++i)
for (int i = 0; i < _scenesToUnload.Count; i++)
//Unload the scene asynchronously in the background
SceneManager.UnloadSceneAsync(_ScenesToUnload[i]);
SceneManager.UnloadSceneAsync(_scenesToUnload[i]);
_scenesToUnload.Clear();
_ScenesToUnload.Clear();
/// <summary> This function checks if a scene is already loaded </summary>
public bool CheckLoadState(String sceneName)
/// <summary>
/// This function checks if a scene is already loaded
/// </summary>
/// <param name="sceneName"></param>
/// <returns>bool</returns>
private bool IsSceneLoaded(string sceneName)
for (int i = 0; i < SceneManager.sceneCount; ++i)
for (int i = 0; i < SceneManager.sceneCount; i++)
{
Scene scene = SceneManager.GetSceneAt(i);
if (scene.name == sceneName)

return false;
}
/// <summary> This function updates the loading progress once per frame until loading is complete </summary>
IEnumerator TrackLoadingProgress()
/// <summary>
/// This function updates the loading progress once per frame until loading is complete
/// </summary>
/// <param name="sceneReference">This is a place holder for the moment</param>
/// <returns>IEnumerator</returns>
private IEnumerator TrackLoadingProgress(GameSceneSO sceneReference)
//When the scene reaches 0.9f, it means that it is loaded
//The remaining 0.1f are for the integration
// When the scene reaches 0.9f, it means that it is loaded
// The remaining 0.1f are for the integration
//Reset the progress for the new values
//Iterate through all the scenes to load
Debug.Log("Scene" + i + " :" + _scenesToLoadAsyncOperations[i].isDone + "progress = " + _scenesToLoadAsyncOperations[i].progress);
//Adding the scene progress to the total progress
Debug.Log("Scene " + i + " :" + _scenesToLoadAsyncOperations[i].isDone + " progress = " + _scenesToLoadAsyncOperations[i].progress);
//The fillAmount for all scenes, so we devide the progress by the number of scenes to load
loadingProgressBar.fillAmount = totalProgress / _scenesToLoadAsyncOperations.Count;
Debug.Log("progress bar" + loadingProgressBar.fillAmount + "and value =" + totalProgress / _scenesToLoadAsyncOperations.Count);
//The fillAmount is for all scenes, so we divide the progress by the number of scenes to load
_loadingProgressBar.fillAmount = totalProgress / _scenesToLoadAsyncOperations.Count;
Debug.Log("progress bar " + _loadingProgressBar.fillAmount + " and value = " + totalProgress / _scenesToLoadAsyncOperations.Count);
//Clear the scenes to load
runningLoader = null;
loadingInterface.SetActive(false);
_loadingInterface.SetActive(false);
public void ExitGame()
private void ExitGame()
{
Application.Quit();
Debug.Log("Exit!");

8
UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs.meta


MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
defaultReferences:
- _initializationScene: {fileID: 11400000, guid: c2119785ce96367428081d6eee0d932b,
type: 2}
- _loadingInterface: {instanceID: 0}
- _loadingProgressBar: {instanceID: 0}
- _loadEventChannel: {fileID: 11400000, guid: 00e3063edc5902e40832ea618644c597,
type: 2}
executionOrder: 0
icon: {instanceID: 0}
userData:

2
UOP1_Project/Assets/Scripts/SceneManagement/ScriptableObjects/GameSceneSO.cs


using UnityEngine;
/// <summary>
/// This class is a base class which contains what is commun for all game scenes (Locations or Menus)
/// This class is a base class which contains what is common to all game scenes (Locations or Menus)
/// </summary>
public class GameSceneSO : ScriptableObject

2
UOP1_Project/Assets/Scripts/SceneManagement/ScriptableObjects/LocationSO.cs


using UnityEngine;
using UnityEngine.Localization;
/// <summary>
/// This class contains Settings specific to Locations only
/// </summary>

{
[Header("Location specific")]
public LocalizedString locationName;
public int enemiesCount; //Example variable, will change later
}

4
UOP1_Project/Assets/Scripts/SceneManagement/StartGame.cs


public class StartGame : MonoBehaviour
{
public LoadEvent onPlayButtonPress;
public LoadEventChannelSO onPlayButtonPress;
onPlayButtonPress.Raise(locationsToLoad, showLoadScreen);
onPlayButtonPress.RaiseEvent(locationsToLoad, showLoadScreen);
}
}

32
UOP1_Project/Assets/Scripts/SpawnSystem.cs


using System;
using System.Linq;
using UnityEngine;
using UnityEngine.Serialization;
public class SpawnSystem : MonoBehaviour
{

[Header("Project References")]
[SerializeField] private Protagonist _playerPrefab = null;
[Header("Asset References")]
[SerializeField] private Protagonist _playerPrefab = default;
[SerializeField] private TransformEventChannelSO _playerInstantiatedChannel = default;
[SerializeField] private CameraManager _cameraManager;
try
{
Spawn(_defaultSpawnIndex);
}
catch (Exception e)
{
Debug.LogError($"[SpawnSystem] Failed to spawn player. {e.Message}");
}
Spawn(_defaultSpawnIndex);
}
void Reset()

[ContextMenu("Attempt Auto Fill")]
private void AutoFill()
{
if (_cameraManager == null)
_cameraManager = FindObjectOfType<CameraManager>();
if (_spawnLocations == null || _spawnLocations.Length == 0)
_spawnLocations = transform.GetComponentsInChildren<Transform>(true)
.Where(t => t != this.transform)

private void Spawn(int spawnIndex)
{
Transform spawnLocation = GetSpawnLocation(spawnIndex, _spawnLocations);
Protagonist playerInstance = InstantiatePlayer(_playerPrefab, spawnLocation, _cameraManager);
SetupCameras(playerInstance);
Protagonist playerInstance = InstantiatePlayer(_playerPrefab, spawnLocation);
_playerInstantiatedChannel.RaiseEvent(playerInstance.transform); // The CameraSystem will pick this up to frame the player
}
private Transform GetSpawnLocation(int index, Transform[] spawnLocations)

return spawnLocations[index];
}
private Protagonist InstantiatePlayer(Protagonist playerPrefab, Transform spawnLocation, CameraManager _cameraManager)
private Protagonist InstantiatePlayer(Protagonist playerPrefab, Transform spawnLocation)
{
if (playerPrefab == null)
throw new Exception("Player Prefab can't be null.");

return playerInstance;
}
private void SetupCameras(Protagonist player)
{
player.gameplayCamera = _cameraManager.mainCamera.transform;
_cameraManager.SetupProtagonistVirtualCamera(player.transform);
}
}

19
UOP1_Project/Assets/Scripts/StateMachine/Core/State.cs


namespace UOP1.StateMachine
using UOP1.StateMachine.ScriptableObjects;
namespace UOP1.StateMachine
public string Name { get; internal set; }
internal StateSO _originSO;
internal StateMachine _stateMachine;
internal StateTransition[] _transitions;
internal StateAction[] _actions;

public State(
StateSO originSO,
_originSO = originSO;
_stateMachine = stateMachine;
_transitions = transitions;
_actions = actions;

public bool TryGetTransition(out State state)
{
state = null;
return true;
break;
state = null;
return false;
for (int i = 0; i < _transitions.Length; i++)
_transitions[i].ClearConditionsCache();
return state != null;
}
}
}

16
UOP1_Project/Assets/Scripts/StateMachine/Core/StateAction.cs


namespace UOP1.StateMachine
using UOP1.StateMachine.ScriptableObjects;
namespace UOP1.StateMachine
{
/// <summary>
/// An object representing an action.

internal StateActionSO _originSO;
protected StateActionSO OriginSO => _originSO;
/// <summary>
/// Called every frame the <see cref="StateMachine"/> is in a <see cref="State"/> with this <see cref="StateAction"/>.
/// </summary>

public virtual void OnStateEnter() { }
public virtual void OnStateExit() { }
/// <summary>
/// This enum is used to create flexible <c>StateActions</c> which can execute in any of the 3 available "moments".
/// The StateAction in this case would have to implement all the relative functions, and use an if statement with this enum as a condition to decide whether to act or not in each moment.
/// </summary>
public enum SpecificMoment
{
OnStateEnter, OnStateExit, OnUpdate,
}
}
}

48
UOP1_Project/Assets/Scripts/StateMachine/Core/StateCondition.cs


namespace UOP1.StateMachine
using UOP1.StateMachine.ScriptableObjects;
namespace UOP1.StateMachine
{
/// <summary>
/// Class that represents a conditional statement.

private bool _isCached = false;
private bool _cachedStatement = default;
internal StateConditionSO _originSO;
protected StateConditionSO OriginSO => _originSO;
public abstract bool Statement();
protected abstract bool Statement();
/// <summary>
/// Wrap the <see cref="Statement"/> so it can be cached.
/// </summary>
internal bool GetStatement()
{
if (!_originSO.cacheResult)
return Statement();
if (!_isCached)
{
_isCached = true;
_cachedStatement = Statement();
}
return _cachedStatement;
}
internal void ClearStatementCache()
{
_isCached = false;
}
/// <summary>
/// Awake is called when creating a new instance. Use this method to cache the components needed for the condition.

/// </summary>
public readonly struct StateCondition
{
internal readonly StateMachine _stateMachine;
public StateCondition(Condition condition, bool expectedResult)
public StateCondition(StateMachine stateMachine, Condition condition, bool expectedResult)
_stateMachine = stateMachine;
public bool IsMet => _condition.Statement() == _expectedResult;
public bool IsMet()
{
bool statement = _condition.GetStatement();
bool isMet = statement == _expectedResult;
#if UNITY_EDITOR
_stateMachine._debugger.TransitionConditionResult(_condition._originSO.name, statement, isMet);
#endif
return isMet;
}
}
}

21
UOP1_Project/Assets/Scripts/StateMachine/Core/StateMachine.cs


{
public class StateMachine : MonoBehaviour
{
[Tooltip("Set the initial state of this StateMachine")]
[SerializeField] private ScriptableObjects.TransitionTableSO _transitionTableSO = default;
public string CurrentState;
public bool debug;
[Space]
[SerializeField]
internal Debugging.StateMachineDebugger _debugger = default;
[Tooltip("Set the initial state of this StateMachine")]
[SerializeField] private ScriptableObjects.StateSO _initialStateSO = null;
private State _currentState;
internal State _currentState;
_currentState = _initialStateSO.GetState(this);
_currentState = _transitionTableSO.GetInitialState(this);
CurrentState = _currentState.Name;
_debugger.Awake(this);
#endif
}

_currentState.OnStateExit();
_currentState = transitionState;
_currentState.OnStateEnter();
#if UNITY_EDITOR
if (debug)
Debug.Log($"{name} entering state {_currentState.Name}");
CurrentState = _currentState.Name;
#endif
}
}
}

32
UOP1_Project/Assets/Scripts/StateMachine/Core/StateTransition.cs


{
public class StateTransition : IStateComponent
{
private readonly State _targetState;
private readonly StateCondition[] _conditions;
private readonly int[] _resultGroups;
private readonly bool[] _results;
private State _targetState;
private StateCondition[] _conditions;
private int[] _resultGroups;
private bool[] _results;
internal StateTransition() { }
{
Init(targetState, conditions, resultGroups);
}
internal void Init(State targetState, StateCondition[] conditions, int[] resultGroups = null)
{
_targetState = targetState;
_conditions = conditions;

private bool ShouldTransition()
{
#if UNITY_EDITOR
_targetState._stateMachine._debugger.TransitionEvaluationBegin(_targetState._originSO.name);
#endif
_conditions[idx].IsMet :
_results[i] && _conditions[idx].IsMet;
_conditions[idx].IsMet() :
_results[i] && _conditions[idx].IsMet();
#if UNITY_EDITOR
_targetState._stateMachine._debugger.TransitionEvaluationEnd(ret, _targetState._actions);
#endif
}
internal void ClearConditionsCache()
{
for (int i = 0; i < _conditions.Length; i++)
_conditions[i]._condition.ClearStatementCache();
}
}
}

4
UOP1_Project/Assets/Scripts/StateMachine/ScriptableObjects/StateActionSO.cs


{
public abstract class StateActionSO : ScriptableObject
{
/// <summary>
/// Will create a new custom <see cref="StateAction"/> or return an existing one inside <paramref name="createdInstances"/>
/// </summary>
internal StateAction GetAction(StateMachine stateMachine, Dictionary<ScriptableObject, object> createdInstances)
{
if (createdInstances.TryGetValue(this, out var obj))

createdInstances.Add(this, action);
action._originSO = this;
action.Awake(stateMachine);
return action;
}

23
UOP1_Project/Assets/Scripts/StateMachine/ScriptableObjects/StateConditionSO.cs


{
public abstract class StateConditionSO : ScriptableObject
{
[SerializeField]
[Tooltip("The condition will only be evaluated once each frame, and cached for subsequent uses.\r\n\r\nThe caching is unique to each instance of the State Machine and of the Scriptable Object (i.e. Instances of the State Machine or Condition don't share results if they belong to different GameObjects).")]
internal bool cacheResult = true;
/// <summary>
/// Will create a new custom <see cref="Condition"/> or use an existing one inside <paramref name="createdInstances"/>.
/// </summary>
if (createdInstances.TryGetValue(this, out var cond))
return new StateCondition((Condition)cond, expectedResult);
if (!createdInstances.TryGetValue(this, out var obj))
{
var condition = CreateCondition();
condition._originSO = this;
createdInstances.Add(this, condition);
condition.Awake(stateMachine);
obj = condition;
}
var condition = new StateCondition(CreateCondition(), expectedResult);
createdInstances.Add(this, condition._condition);
condition._condition.Awake(stateMachine);
return condition;
return new StateCondition(stateMachine, (Condition)obj, expectedResult);
}
protected abstract Condition CreateCondition();
}

24
UOP1_Project/Assets/Scripts/StateMachine/ScriptableObjects/StateSO.cs


public class StateSO : ScriptableObject
{
[SerializeField] private StateActionSO[] _actions = null;
[SerializeField] private StateTransitionSO[] _transitions = null;
public State GetState(StateMachine stateMachine)
{
return GetState(stateMachine, new Dictionary<ScriptableObject, object>());
}
/// <summary>
/// Will create a new state or return an existing one inside <paramref name="createdInstances"/>.
/// </summary>
internal State GetState(StateMachine stateMachine, Dictionary<ScriptableObject, object> createdInstances)
{
if (createdInstances.TryGetValue(this, out var obj))

createdInstances.Add(this, state);
state.Name = name;
state._originSO = this;
state._transitions = GetTransitions(_transitions, stateMachine, createdInstances);
state._transitions = new StateTransition[0];
}
private static StateTransition[] GetTransitions(StateTransitionSO[] scriptableTransitions,
StateMachine stateMachine, Dictionary<ScriptableObject, object> createdInstances)
{
int count = scriptableTransitions.Length;
var transitions = new StateTransition[count];
for (int i = 0; i < count; i++)
transitions[i] = scriptableTransitions[i].GetTransition(stateMachine, createdInstances);
return transitions;
}
private static StateAction[] GetActions(StateActionSO[] scriptableActions,

23
UOP1_Project/Assets/Settings/Graphics/UniversalRP-HighQuality.asset


m_RendererType: 1
m_RendererData: {fileID: 0}
m_RendererDataList:
- {fileID: 11400000, guid: 4a8e21d5c33334b11b34a596161b9360, type: 2}
- {fileID: 11400000, guid: 92113202e873ee74fb693145552cf284, type: 2}
m_RequireDepthTexture: 0
m_RequireOpaqueTexture: 0
m_RequireDepthTexture: 1
m_RequireOpaqueTexture: 1
m_SupportsTerrainHoles: 1
m_SupportsTerrainHoles: 0
m_SupportsHDR: 1
m_MSAA: 2
m_RenderScale: 1

m_AdditionalLightsRenderingMode: 0
m_AdditionalLightsPerObjectLimit: 4
m_AdditionalLightShadowsSupported: 1
m_AdditionalLightsRenderingMode: 1
m_AdditionalLightsPerObjectLimit: 2
m_AdditionalLightShadowsSupported: 0
m_ShadowCascades: 2
m_Cascade2Split: 0.25
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
m_ShadowCascades: 1
m_Cascade2Split: 0.38180342
m_Cascade4Split: {x: 0.056472767, y: 0.24039239, z: 0.3653586}
m_ShadowDepthBias: 1
m_ShadowNormalBias: 1
m_SoftShadowsSupported: 1

m_DebugLevel: 0
m_UseAdaptivePerformance: 0
m_ColorGradingMode: 1
m_ColorGradingMode: 0
m_ColorGradingLutSize: 32
m_ShadowType: 1
m_LocalShadowsSupported: 0

9
UOP1_Project/Packages/manifest.json


{
"dependencies": {
"com.unity.addressables": "1.8.5",
"com.unity.animation.rigging": "0.2.7-preview",
"com.unity.ide.vscode": "1.2.2",
"com.unity.ide.vscode": "1.2.3",
"com.unity.localization": "0.9.0-preview",
"com.unity.render-pipelines.universal": "7.3.1",
"com.unity.recorder": "2.4.0-preview.1",
"com.unity.render-pipelines.universal": "7.5.1",
"com.unity.textmeshpro": "2.1.1",
"com.unity.textmeshpro": "2.1.3",
"com.unity.timeline": "1.2.17",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",

80
UOP1_Project/Packages/packages-lock.json


{
"dependencies": {
"com.unity.addressables": {
"version": "1.8.5",
"depth": 0,
"version": "1.16.6",
"depth": 1,
"com.unity.scriptablebuildpipeline": "1.7.3",
"com.unity.scriptablebuildpipeline": "1.13.1",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0"

"com.unity.animation.rigging": {
"version": "0.2.7-preview",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.burst": "1.1.1",
"com.unity.test-framework": "1.0.7"
},
"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.1.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.1.0"
},
"url": "https://packages.unity.com"
},
"com.unity.cinemachine": {
"version": "2.6.3",
"depth": 0,

"url": "https://packages.unity.com"
},
"com.unity.ide.vscode": {
"version": "1.2.2",
"version": "1.2.3",
"depth": 0,
"source": "registry",
"dependencies": {},

"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.localization": {
"version": "0.9.0-preview",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.addressables": "1.16.6",
"com.unity.nuget.newtonsoft-json": "2.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.mathematics": {
"version": "1.1.0",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "2.0.0",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.polybrush": {
"version": "1.0.2",
"depth": 0,

"source": "registry",
"dependencies": {
"com.unity.settings-manager": "1.0.2"
},
"url": "https://packages.unity.com"
},
"com.unity.recorder": {
"version": "2.4.0-preview.1",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.timeline": "1.0.0"
"version": "7.3.1",
"version": "7.5.1",
"depth": 1,
"source": "registry",
"dependencies": {

},
"com.unity.render-pipelines.universal": {
"version": "7.3.1",
"version": "7.5.1",
"com.unity.render-pipelines.core": "7.3.1",
"com.unity.shadergraph": "7.3.1"
"com.unity.render-pipelines.core": "7.5.1",
"com.unity.shadergraph": "7.5.1"
"version": "1.7.3",
"depth": 1,
"version": "1.13.1",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"

"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "7.3.1",
"version": "7.5.1",
"com.unity.render-pipelines.core": "7.3.1"
"com.unity.render-pipelines.core": "7.5.1"
"version": "1.1.16",
"version": "1.1.18",
"depth": 1,
"source": "registry",
"dependencies": {

"url": "https://packages.unity.com"
},
"com.unity.textmeshpro": {
"version": "2.1.1",
"version": "2.1.3",
"depth": 0,
"source": "registry",
"dependencies": {

26
UOP1_Project/ProjectSettings/EditorBuildSettings.asset


path: Assets/Scenes/Initialization.unity
guid: e8df4c5a458acc5489b2865e6b789224
- enabled: 1
path: Assets/Scenes/MainMenu.unity
path: Assets/Scenes/Menus/MainMenu.unity
path: Assets/Scenes/Locations/Forest.unity
guid: 3a816f06c17361b4398583570bcbf8eb
- enabled: 1
guid: 1f93ce2ec2bb43b4ab2a18ad18a50967
guid: dfaf60263d5c5dc4e80e2793f4328b32
- enabled: 1
path: Assets/Scenes/TestingGround.unity
guid: 1e57caa7d7ed5e24a88cb3b5c309cc65
path: Assets/Scenes/Locations/Forest.unity
guid: 3a816f06c17361b4398583570bcbf8eb
m_configObjects: {}
path: Assets/Scenes/MultiSceneLoader/TestScene_03.unity
guid: fab260a559ee34842814a2d13b1c1798
- enabled: 1
path: Assets/Scenes/MultiSceneLoader/TestScene_02.unity
guid: 63d182036357bd94fb0fffb5af3736c0
- enabled: 1
path: Assets/Scenes/MultiSceneLoader/TestScene_01.unity
guid: 9bea58aee7d47cd45b9cc32b07287fcb
m_configObjects:
com.unity.addressableassets: {fileID: 11400000, guid: 758daf1c1b96e4978a5b9b3f5815abf1,
type: 2}
com.unity.localization.settings: {fileID: 11400000, guid: 56b1c58ec65bd4151b3054a32d1f7b69,
type: 2}

26
UOP1_Project/ProjectSettings/PresetManager.asset


--- !u!1386491679 &1
PresetManager:
m_ObjectHideFlags: 0
m_DefaultList:
- type:
m_NativeTypeID: 108
m_ManagedTypePPtr: {fileID: 0}
m_ManagedTypeFallback:
defaultPresets:
- m_Preset: {fileID: 2655988077585873504, guid: 463065d4f17d1d94d848aa127b94dd43,
type: 2}
- type:
m_NativeTypeID: 1020
m_ManagedTypePPtr: {fileID: 0}
m_ManagedTypeFallback:
defaultPresets:
- m_Preset: {fileID: 2655988077585873504, guid: e7689051185d12f4298e1ebb2693a29f,
type: 2}
- type:
m_NativeTypeID: 1006
serializedVersion: 2
m_DefaultPresets:
- first:
m_NativeTypeID: 1041
defaultPresets:
- m_Preset: {fileID: 2655988077585873504, guid: e8537455c6c08bd4e8bf0be3707da685,
second:
- m_Preset: {fileID: 2655988077585873504, guid: 194b90afe7b8e634580fddba3061a135,
m_Filter:

7
UOP1_Project/ProjectSettings/ProjectSettings.asset


useOnDemandResources: 0
accelerometerFrequency: 60
companyName: UnityTechnologies
productName: Open Project 1
productName: Chop Chop
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}

16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.1
bundleVersion: 0.5
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0

metalEditorSupport: 1
metalAPIValidation: 1
iOSRenderExtraFrameOnPause: 0
iosCopyPluginsCodeInsteadOfSymlink: 0
appleDeveloperTeamID:
iOSManualSigningProvisioningProfileID:
tvOSManualSigningProvisioningProfileID:

apiCompatibilityLevel: 6
cloudProjectId: eadb991e-24e4-432a-9a06-35e20daca02b
framebufferDepthMemorylessMode: 0
projectName: Open Project 1
projectName: Chop Chop
organizationId: cirocontinisio
cloudEnabled: 0
enableNativePlatformBackendsForNewInputSystem: 1

4
UOP1_Project/ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2019.4.11f1
m_EditorVersionWithRevision: 2019.4.11f1 (2d9804dddde7)
m_EditorVersion: 2019.4.14f1
m_EditorVersionWithRevision: 2019.4.14f1 (4037e52648cd)

10
UOP1_Project/ProjectSettings/TagManager.asset


- UI
-
-
-
-
-
-
-
- PostProcessing
- Characters
- HideWaterMask
- OccludingObjects
- OccludedTransparents
-
-
-

2
UOP1_Project/ProjectSettings/URPProjectSettings.asset


m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3}
m_Name:
m_EditorClassIdentifier:
m_LastMaterialVersion: 1
m_LastMaterialVersion: 2

2
UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab.meta


fileFormatVersion: 2
guid: 0fa393e1e37bc9e4e829c25a9452bcd3
guid: 062b3805bf6784e4d9c599ee60eaa002
PrefabImporter:
externalObjects: {}
userData:

34
UOP1_Project/Assets/Scenes/Menus/MainMenu.unity


m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
m_UseShadowmask: 0
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -204.4}
m_SizeDelta: {x: 160, y: 65.18812}
m_AnchoredPosition: {x: 0, y: -323.2}
m_SizeDelta: {x: 337.9086, y: 144.69672}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &403475998
MonoBehaviour:

m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontSize: 60
m_MinSize: 10
m_MaxSize: 40
m_MinSize: 4
m_MaxSize: 60
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1

m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -39.3}
m_SizeDelta: {x: 0, y: 131.1564}
m_SizeDelta: {x: 0, y: 441.28995}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1228641981
MonoBehaviour:

m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9056604, g: 0.9056604, b: 0.9056604, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:

m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 49
m_FontSize: 120
m_MaxSize: 116
m_MaxSize: 120
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1

m_Text: 'Open Project #1:
Action Adventure'
Chop Chop'
--- !u!222 &1228641982
CanvasRenderer:
m_ObjectHideFlags: 0

m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontSize: 60
m_MinSize: 10
m_MaxSize: 40
m_MinSize: 4
m_MaxSize: 60
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1

m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -107}
m_SizeDelta: {x: 160, y: 65.18812}
m_SizeDelta: {x: 337.9086, y: 144.69672}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1967191112
MonoBehaviour:

m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_UiScaleMode: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3

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


m_Name: Walking
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 201885673bd707f4c9b5f3a92eca204f, 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}
- {fileID: 11400000, guid: fa0ce5b895dcf17499819f0d6f2dce96, type: 2}

4
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Sliding.asset


m_Name: Sliding
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 99b804881a9d5744fb4784c30000c0b5, type: 2}
- {fileID: 11400000, guid: c0d0573a78e4c6245ab9676e7af35880, type: 2}
_transitions:
- {fileID: 11400000, guid: d65431b4fa02b494ab91bafd68cb5a8f, type: 2}

5
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/JumpDescending.asset


- {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}
- {fileID: 11400000, guid: 99b804881a9d5744fb4784c30000c0b5, type: 2}
- {fileID: 11400000, guid: 49dad5a4b1fa43844ab26a848b9bcc18, type: 2}

6
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/JumpAscending.asset


m_Name: JumpAscending
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 4984500e131bbe34594c4ab0e2c409f3, type: 2}
- {fileID: 11400000, guid: 00abdcc5c2b7e3d4d8855f1a84801fae, type: 2}
_transitions:
- {fileID: 11400000, guid: 06d55bd43e60a1a469545b18bca1061c, type: 2}
- {fileID: 11400000, guid: d0d2423b580ea5a4789dcee21f62cba6, type: 2}
- {fileID: 11400000, guid: 94c42b885a988bf47a8af6a4887c88c1, type: 2}

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


m_Name: Idle
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: c0d0573a78e4c6245ab9676e7af35880, type: 2}
_transitions:
- {fileID: 11400000, guid: 15394873b380a284bbf425c98e1f7ff5, type: 2}
- {fileID: 11400000, guid: a397ed7ab7a1ef24082946a116ba98ed, type: 2}
- {fileID: 11400000, guid: 06d55bd43e60a1a469545b18bca1061c, type: 2}
- {fileID: 11400000, guid: 54b0ebefbe8767c41a7e981ea0857f68, type: 2}

5
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_JumpHoldButton.asset


m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8139f9f328ed1144690b7a9ffca2d5b4, type: 3}
m_Name: JumpHoldTimer
m_Name: Timer_JumpHoldButton
_timerLength: 0.4
cacheResult: 1
timerLength: 0.4

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsSliding.asset


m_Script: {fileID: 11500000, guid: 9352ebfadd39e754e86b2aa1daffdca0, type: 3}
m_Name: IsSliding
m_EditorClassIdentifier:
cacheResult: 1

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsMoving.asset


m_Script: {fileID: 11500000, guid: fc2d5ccac974a0d41a92a30245aa08eb, type: 3}
m_Name: IsMoving
m_EditorClassIdentifier: Assembly-CSharp::StartMovingConditionSO
cacheResult: 1
_treshold: 0.02

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsHoldingJump.asset


m_Script: {fileID: 11500000, guid: aea20a61197822e49aaa66318da39267, type: 3}
m_Name: IsHoldingJump
m_EditorClassIdentifier:
cacheResult: 1

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsGrounded.asset


m_Script: {fileID: 11500000, guid: 953dea50bde69be4fb0df0c3a49eef08, type: 3}
m_Name: IsGrounded
m_EditorClassIdentifier:
cacheResult: 1

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/HasHitHead.asset


m_Script: {fileID: 11500000, guid: 07e6889b70ab561458e46326d9c2a88b, type: 3}
m_Name: HasHitHead
m_EditorClassIdentifier:
cacheResult: 1

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


m_Script: {fileID: 11500000, guid: 3d6639e9199e4ec44852fe925b2dc470, type: 3}
m_Name: Slide
m_EditorClassIdentifier:
_slideSpeed: 10
slideSpeed: 10

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


m_Script: {fileID: 11500000, guid: 8c2b40ff7519a5e41a2dc48c2aca516c, type: 3}
m_Name: RotateFast
m_EditorClassIdentifier:
_turnSmoothTime: 0.1
turnSmoothTime: 0.1

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


m_Script: {fileID: 11500000, guid: 09fcb347b6cb3524c9f59fbde36ec7c7, type: 3}
m_Name: MoveInTheAir
m_EditorClassIdentifier:
_speed: 6
speed: 3.5

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/Ascend.asset


m_Script: {fileID: 11500000, guid: d102e2f241954884fba03c7553584369, type: 3}
m_Name: Ascend
m_EditorClassIdentifier:
_initialJumpForce: 6

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

正在加载...
取消
保存