浏览代码

Merge branch 'art-assets' into feature/art/pant_critter

/main
treivize 4 年前
当前提交
0728a4c6
共有 506 个文件被更改,包括 8562 次插入5872 次删除
  1. 4
      UOP1_Project/.gitignore
  2. 6
      UOP1_Project/Assets/Art/Characters/BardHare/BardHare.mat
  3. 31
      UOP1_Project/Assets/Art/Characters/PhoenixChick/Animation/Idle.fbx.meta
  4. 4
      UOP1_Project/Assets/Art/Characters/PhoenixChick/PhoenixChick.mat
  5. 964
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_CaneHit.fbx
  6. 964
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Idle.fbx
  7. 964
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Jump.fbx
  8. 964
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Surprised.fbx
  9. 964
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Talk.fbx
  10. 961
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Walk.fbx
  11. 62
      UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef.controller
  12. 2
      UOP1_Project/Assets/Art/Characters/RockCritter/RockCritter.mat
  13. 2
      UOP1_Project/Assets/Art/Characters/Townsfolk_F/Townsfolk_F.mat
  14. 2
      UOP1_Project/Assets/Art/Characters/Townsfolk_M/Townsfolk_M.mat
  15. 5
      UOP1_Project/Assets/Art/Materials/Glass.mat
  16. 94
      UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable
  17. 4
      UOP1_Project/Assets/Materials/Prototype_Grass.mat
  18. 970
      UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
  19. 2
      UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab.meta
  20. 2
      UOP1_Project/Assets/Prefabs/GameplayEssentials/SpawnSystem.prefab
  21. 6
      UOP1_Project/Assets/Prefabs/Items/Lantern.prefab
  22. 8
      UOP1_Project/Assets/Prefabs/Props/Pottery.prefab
  23. 964
      UOP1_Project/Assets/Scenes/ArtShowcase.unity
  24. 61
      UOP1_Project/Assets/Scenes/ArtShowcase/LightingData.asset
  25. 999
      UOP1_Project/Assets/Scenes/ArtShowcase/Lightmap-0_comp_dir.png
  26. 1001
      UOP1_Project/Assets/Scenes/ArtShowcase/Lightmap-0_comp_light.exr
  27. 999
      UOP1_Project/Assets/Scenes/ArtShowcase/Lightmap-1_comp_dir.png
  28. 1001
      UOP1_Project/Assets/Scenes/ArtShowcase/Lightmap-1_comp_light.exr
  29. 1001
      UOP1_Project/Assets/Scenes/ArtShowcase/ReflectionProbe-0.exr
  30. 70
      UOP1_Project/Assets/Scenes/Initialization.unity
  31. 250
      UOP1_Project/Assets/Scenes/Locations/Beach.unity
  32. 110
      UOP1_Project/Assets/Scenes/Locations/Forest.unity
  33. 34
      UOP1_Project/Assets/Scenes/Menus/MainMenu.unity
  34. 66
      UOP1_Project/Assets/Scenes/TestingGround.unity
  35. 4
      UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX_4_Mechanisms.asset
  36. 4
      UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX_4_Mechanisms_Magic.asset
  37. 2
      UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX_Fire_looping.asset
  38. 7
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/BardHare.asset
  39. 7
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Hamlet.asset
  40. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Townsfolk.asset
  41. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/HeadToCentre.asset
  42. 7
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/Welcome.asset
  43. 7
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/GenericOink.asset
  44. 7
      UOP1_Project/Assets/ScriptableObjects/SceneData/Locations/Forest.asset
  45. 7
      UOP1_Project/Assets/ScriptableObjects/SceneData/Locations/Beach.asset
  46. 4
      UOP1_Project/Assets/ScriptableObjects/EventChannels/MusicEvent_Channel.asset
  47. 2
      UOP1_Project/Assets/ScriptableObjects/EventChannels/LoadLocationEvent_Channel.asset
  48. 4
      UOP1_Project/Assets/ScriptableObjects/EventChannels/ExitGameEvent_Channel.asset
  49. 67
      UOP1_Project/Assets/Scripts/Audio/AudioData/AudioConfigurationSO.cs
  50. 3
      UOP1_Project/Assets/Scripts/Audio/AudioData/AudioConfigurationSO.cs.meta
  51. 2
      UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs
  52. 92
      UOP1_Project/Assets/Scripts/Audio/AudioManager.cs
  53. 8
      UOP1_Project/Assets/Scripts/Audio/AudioManager.cs.meta
  54. 61
      UOP1_Project/Assets/Scripts/Audio/SoundEmitters/SoundEmitter.cs
  55. 16
      UOP1_Project/Assets/Scripts/Audio/SoundEmitters/SoundEmitterFactorySO.cs
  56. 14
      UOP1_Project/Assets/Scripts/Audio/SoundEmitters/SoundEmitterPoolSO.cs
  57. 31
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
  58. 4
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs.meta
  59. 6
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ApplyMovementVectorActionSO.cs
  60. 6
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/AscendActionSO.cs
  61. 10
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DescendActionSO.cs
  62. 6
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/GroundGravityActionSO.cs
  63. 8
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/HorizontalMoveActionSO.cs
  64. 8
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/RotateActionSO.cs
  65. 12
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/SlideActionSO.cs
  66. 14
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasHitHeadConditionSO.cs
  67. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsCharacterControllerGroundedConditionSO.cs
  68. 6
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingJumpConditionSO.cs
  69. 10
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsMovingConditionSO.cs
  70. 10
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsSlidingConditionSO.cs
  71. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/TimeElapsedConditionSO.cs
  72. 6
      UOP1_Project/Assets/Scripts/Dialogues/ActorSO.cs
  73. 5
      UOP1_Project/Assets/Scripts/Dialogues/DialogueLineSO.cs
  74. 5
      UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs
  75. 32
      UOP1_Project/Assets/Scripts/Events/IntEventListener.cs
  76. 2
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/VoidEventChannelSO.cs.meta
  77. 2
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/AudioCueEventChannelSO.cs.meta
  78. 30
      UOP1_Project/Assets/Scripts/Events/VoidEventListener.cs
  79. 7
      UOP1_Project/Assets/Scripts/Factory/FactorySO.cs
  80. 6
      UOP1_Project/Assets/Scripts/Input/InputReader.cs
  81. 42
      UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs
  82. 2
      UOP1_Project/Assets/Scripts/Pool/Example/Assets/Example.unity
  83. 26
      UOP1_Project/Assets/Scripts/Pool/Example/LocalPoolTester.cs
  84. 16
      UOP1_Project/Assets/Scripts/Pool/Example/ParticleFactorySO.cs
  85. 18
      UOP1_Project/Assets/Scripts/Pool/Example/ParticlePoolSO.cs
  86. 21
      UOP1_Project/Assets/Scripts/Pool/Example/PoolTester.cs
  87. 1
      UOP1_Project/Assets/Scripts/Pool/IPool.cs
  88. 30
      UOP1_Project/Assets/Scripts/Pool/PoolSO.cs
  89. 2
      UOP1_Project/Assets/Scripts/SceneManagement/EditorInitialisationLoader.cs
  90. 2
      UOP1_Project/Assets/Scripts/SceneManagement/EditorInitialisationLoader.cs.meta
  91. 11
      UOP1_Project/Assets/Scripts/SceneManagement/LocationExit.cs
  92. 3
      UOP1_Project/Assets/Scripts/SceneManagement/LocationExit.cs.meta
  93. 41
      UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs
  94. 8
      UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs.meta
  95. 2
      UOP1_Project/Assets/Scripts/SceneManagement/ScriptableObjects/GameSceneSO.cs
  96. 2
      UOP1_Project/Assets/Scripts/SceneManagement/ScriptableObjects/LocationSO.cs
  97. 4
      UOP1_Project/Assets/Scripts/SceneManagement/StartGame.cs
  98. 19
      UOP1_Project/Assets/Scripts/StateMachine/Core/State.cs
  99. 15
      UOP1_Project/Assets/Scripts/StateMachine/Core/StateAction.cs
  100. 57
      UOP1_Project/Assets/Scripts/StateMachine/Core/StateCondition.cs

4
UOP1_Project/.gitignore


# Crashlytics generated file
crashlytics-build.properties
# Any image or video created by the Recorder package
/Recordings/
/ProjectSettings/Packages/com.unity.progrids/Settings.json
Assets/Polybrush Data*
Assets/PolybrushData*

6
UOP1_Project/Assets/Art/Characters/BardHare/BardHare.mat


- _LightProbeContribution: 3.5
- _Metallic: 0
- _OcclusionStrength: 1
- _OutlineDepthSensitivity: 0.7
- _OutlineNormalsSensitivity: 0.7
- _OutlineThickness: 2
- _OutlineDepthSensitivity: 0.3
- _OutlineNormalsSensitivity: 0.5
- _OutlineThickness: 3
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5

31
UOP1_Project/Assets/Art/Characters/PhoenixChick/Animation/Idle.fbx.meta


animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
clipAnimations:
- serializedVersion: 16
name: Idle
takeName: Idle
internalID: 0
firstFrame: 1
lastFrame: 900
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 1
loopBlend: 1
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 1
isReadable: 0
meshes:
lODScreenPercentages: []

4
UOP1_Project/Assets/Art/Characters/PhoenixChick/PhoenixChick.mat


- _LightProbeContribution: 5
- _Metallic: 0
- _OcclusionStrength: 1
- _OutlineDepthSensitivity: 0.3
- _OutlineDepthSensitivity: 0.1
- _OutlineThickness: 2
- _OutlineThickness: 3
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5

964
UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_CaneHit.fbx
文件差异内容过多而无法显示
查看文件

964
UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Idle.fbx
文件差异内容过多而无法显示
查看文件

964
UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Jump.fbx
文件差异内容过多而无法显示
查看文件

964
UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Surprised.fbx
文件差异内容过多而无法显示
查看文件

964
UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Talk.fbx
文件差异内容过多而无法显示
查看文件

961
UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Walk.fbx
文件差异内容过多而无法显示
查看文件

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


m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_HasExitTime: 1
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.7580645
m_HasExitTime: 1

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.96575344
m_HasExitTime: 0

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.9050633
m_HasExitTime: 1

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0

- serializedVersion: 1
m_State: {fileID: 3444333041856388052}
m_Position: {x: 450, y: 300, z: 0}
- serializedVersion: 1
m_State: {fileID: 2346626782594886847}
m_Position: {x: -250, y: 160, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions:
- {fileID: -5538795969231381003}

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.8943662
m_HasExitTime: 1

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.8943662
m_HasExitTime: 1

m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Pig
m_Name: PigChef
serializedVersion: 5
m_AnimatorParameters:
- m_Name: IsWalking

m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &2346626782594886847
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Collect
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -4014322488295996518, guid: 0525a7de5f7a42c49b7d217e507f15f6,
type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &3444333041856388052
AnimatorState:
serializedVersion: 5

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.7580645
m_HasExitTime: 0

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.98747915
m_HasExitTime: 0

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_HasExitTime: 1
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.98747915
m_HasExitTime: 0

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.98747915
m_HasExitTime: 0

m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.7580645
m_HasExitTime: 0

2
UOP1_Project/Assets/Art/Characters/RockCritter/RockCritter.mat


- _OcclusionStrength: 1
- _OutlineDepthSensitivity: 0.4
- _OutlineNormalsSensitivity: 0.5
- _OutlineThickness: 2
- _OutlineThickness: 3
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5

2
UOP1_Project/Assets/Art/Characters/Townsfolk_F/Townsfolk_F.mat


- _OcclusionStrength: 1
- _OutlineDepthSensitivity: 0.3
- _OutlineNormalsSensitivity: 0.4
- _OutlineThickness: 2
- _OutlineThickness: 3
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5

2
UOP1_Project/Assets/Art/Characters/Townsfolk_M/Townsfolk_M.mat


- _OcclusionStrength: 1
- _OutlineDepthSensitivity: 0.3
- _OutlineNormalsSensitivity: 0.4
- _OutlineThickness: 2
- _OutlineThickness: 3
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5

5
UOP1_Project/Assets/Art/Materials/Glass.mat


- _Cutoff: 0.5
- _DstBlend: 10
- _EnvironmentReflections: 1
- _Fresnel_Power: 7
- _FresnelOpacity: 0.2
- _Fresnel_Power: 1.21
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0

- _WorkflowMode: 1
- _ZWrite: 0
m_Colors:
- Color_9BF846A1: {r: 0.3443396, g: 1, b: 0.9162987, a: 0.13725491}
- Color_9BF846A1: {r: 0.5896226, g: 1, b: 0.9483956, a: 0.09803922}
- _BaseColor: {r: 0.41509432, g: 0.41509432, b: 0.41509432, a: 0.38039216}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

94
UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable


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

m_BlendOutDuration: 0.5333333333333332
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_Curve: []
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4

m_PreExtrapolationMode: 0
m_PostExtrapolationTime: 0
m_PreExtrapolationTime: 0
m_DisplayName: CM vcam1
m_DisplayName: CM vcam1 (1)
m_Duration: 1.7999999999999998
m_Duration: 1.8000000000000003
m_TimeScale: 1
m_ParentTrack: {fileID: -7243414920591819180}
m_EaseInDuration: 0

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_PreExtrapolationMode: 0
m_PostExtrapolationTime: 0
m_PreExtrapolationTime: 0
m_DisplayName: CM vcam1 (1)
m_DisplayName: CM vcam1
m_Markers:
m_Objects: []
--- !u!114 &-7104271872717664822

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: 2.6666666666666656
m_Start: 3.8
m_Duration: 2.400000000000001
m_Duration: 1.033333333333334
m_TimeScale: 1
m_ParentTrack: {fileID: 1900134804166205457}
m_EaseInDuration: 0

4
UOP1_Project/Assets/Materials/Prototype_Grass.mat


- _OutlineThickness: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _Smoothness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1

- _MainColor: {r: 0.2488875, g: 0.4433962, b: 0.2773522, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 0}
- _SpecularColor: {r: 0, g: 0, b: 0, a: 0}
- _Tiling: {r: 1, g: 1, b: 0, a: 0}

970
UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
文件差异内容过多而无法显示
查看文件

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


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

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


m_Name:
m_EditorClassIdentifier:
_defaultSpawnIndex: 0
_playerPrefab: {fileID: 5557640735889932260, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
_playerPrefab: {fileID: 5557640735889932260, guid: 062b3805bf6784e4d9c599ee60eaa002,
type: 3}
_cameraManager: {fileID: 0}
_spawnLocations:

6
UOP1_Project/Assets/Prefabs/Items/Lantern.prefab


propertyPath: m_Materials.Array.data[1]
value:
objectReference: {fileID: 2100000, guid: 55084a24f97724403abfc74195309116, type: 2}
- target: {fileID: -5754084199372789682, guid: cd3d0e790af8145ffa8e792f36262794,
type: 3}
propertyPath: m_Mesh
value:
objectReference: {fileID: 2966622709835800175, guid: 1632c812c8ac74949a4c6cd4398cc8a3,
type: 3}
- target: {fileID: 919132149155446097, guid: cd3d0e790af8145ffa8e792f36262794,
type: 3}
propertyPath: m_Name

8
UOP1_Project/Assets/Prefabs/Props/Pottery.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!135 &3643492659455997558
SphereCollider:
--- !u!65 &6161935898026677332
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}

m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.25
m_Center: {x: 0.000032931566, y: 0.19022962, z: 0.00025852025}
m_Size: {x: 0.45636025, y: 0.38045925, z: 0.4567869}
m_Center: {x: 0, y: 0.19, z: 0}
--- !u!1001 &1827721930691369115
PrefabInstance:
m_ObjectHideFlags: 0

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

61
UOP1_Project/Assets/Scenes/ArtShowcase/LightingData.asset
文件差异内容过多而无法显示
查看文件

999
UOP1_Project/Assets/Scenes/ArtShowcase/Lightmap-0_comp_dir.png
文件差异内容过多而无法显示
查看文件

1001
UOP1_Project/Assets/Scenes/ArtShowcase/Lightmap-0_comp_light.exr
文件差异内容过多而无法显示
查看文件

999
UOP1_Project/Assets/Scenes/ArtShowcase/Lightmap-1_comp_dir.png
文件差异内容过多而无法显示
查看文件

1001
UOP1_Project/Assets/Scenes/ArtShowcase/Lightmap-1_comp_light.exr
文件差异内容过多而无法显示
查看文件

1001
UOP1_Project/Assets/Scenes/ArtShowcase/ReflectionProbe-0.exr
文件差异内容过多而无法显示
查看文件

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

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

110
UOP1_Project/Assets/Scenes/Locations/Forest.unity


- component: {fileID: 1406036543}
- component: {fileID: 1406036542}
- component: {fileID: 1406036541}
- component: {fileID: 1406036546}
m_Layer: 0
m_Name: ExitToBeach
m_TagString: Untagged

m_Script: {fileID: 11500000, guid: 02e6b73898a4a52438d630a7ba29da77, type: 3}
m_Name:
m_EditorClassIdentifier:
onLocationExit: {fileID: 11400000, guid: 00e3063edc5902e40832ea618644c597, type: 2}
locationsToLoad:
_locationsToLoad:
showLoadScreen: 0
_showLoadScreen: 0
_locationExitLoadChannel: {fileID: 11400000, guid: 00e3063edc5902e40832ea618644c597,
type: 2}
--- !u!65 &1406036542
BoxCollider:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1406036546
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1406036540}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 54f92f965dbe44449b252b814ddc7137, type: 3}
m_Name:
m_EditorClassIdentifier:
_audioCue: {fileID: 11400000, guid: cd2aedc39ac8b734bb291c84c3d68a97, type: 2}
_playOnStart: 0
_audioCueEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e,
type: 2}
_audioConfiguration: {fileID: 11400000, guid: 8d4217c8fabf9824490196f34baf326a,
type: 2}
--- !u!1001 &1521534075
PrefabInstance:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1657732992883833910, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.03563515
objectReference: {fileID: 0}
- target: {fileID: 1657732992883833910, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.009175836
objectReference: {fileID: 0}
- target: {fileID: 1657732992883833910, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.24919106
objectReference: {fileID: 0}
- target: {fileID: 2808035858438402709, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.035795752
objectReference: {fileID: 0}
- target: {fileID: 2808035858438402709, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.0085278535
objectReference: {fileID: 0}
- target: {fileID: 2808035858438402709, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.23159355
objectReference: {fileID: 0}
- target: {fileID: 2955398947125553842, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.2295973
objectReference: {fileID: 0}
- target: {fileID: 2955398947125553842, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.03581321
objectReference: {fileID: 0}
- target: {fileID: 2955398947125553842, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2955398947125553842, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.00845435
objectReference: {fileID: 0}
- target: {fileID: 2955398947125553842, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.97258985
objectReference: {fileID: 0}
- target: {fileID: 2955398947125553842, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8745341640208226293, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_Name

propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8745341641394998850, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.73545265
objectReference: {fileID: 0}
- target: {fileID: 8745341641394998850, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalPosition.z
value: -9.9729185
objectReference: {fileID: 0}
- target: {fileID: 8745341642014614481, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: near clip plane

- target: {fileID: 8745341642014614482, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.18778464
value: 0.24919108
value: -0.20536137
value: 0.03563516
value: 0.040184725
value: -0.009175838
value: 0.9596608
value: 0.967755
value: 4.712467
value: -0.73545265
value: 6.307
value: 6
value: -24.900238
value: -9.9729185
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 45632f0a227c860489bcba0eb1f4ec3e, type: 3}

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

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

4
UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX_4_Mechanisms.asset


m_Script: {fileID: 11500000, guid: 08e854ccd8588da4694c3ae040c10c5e, type: 3}
m_Name: SFX_4_Mechanisms
m_EditorClassIdentifier:
_looping: 0
looping: 0
- sequenceMode: 1
- sequenceMode: 2
audioClips:
- {fileID: 8300000, guid: 60c2068e770cc2049ae9e26f1b010743, type: 3}
- {fileID: 8300000, guid: 57fe0a526d29da941965b75399970e2c, type: 3}

4
UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX_4_Mechanisms_Magic.asset


m_Script: {fileID: 11500000, guid: 08e854ccd8588da4694c3ae040c10c5e, type: 3}
m_Name: SFX_4_Mechanisms_Magic
m_EditorClassIdentifier:
_looping: 0
looping: 0
_audioClipGroups:
- sequenceMode: 1
audioClips:

- {fileID: 8300000, guid: 0ef6ad8b7422bb84090b2494e510a968, type: 3}
- sequenceMode: 0
- sequenceMode: 2
audioClips:
- {fileID: 8300000, guid: 203476aa43e456e48a9d4b8a17f72f58, type: 3}

2
UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX_Fire_looping.asset


m_Script: {fileID: 11500000, guid: 08e854ccd8588da4694c3ae040c10c5e, type: 3}
m_Name: SFX_Fire_looping
m_EditorClassIdentifier:
_looping: 1
looping: 1
_audioClipGroups:
- sequenceMode: 0
audioClips:

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

4
UOP1_Project/Assets/ScriptableObjects/EventChannels/MusicEvent_Channel.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7847b6caa8e5464c80cd90a8cc33a19, type: 3}
m_Name: RegularSFX
m_Script: {fileID: 11500000, guid: 273f9313082320e41a484f6faf242dab, type: 3}
m_Name: MusicEvent_Channel
m_EditorClassIdentifier:

2
UOP1_Project/Assets/ScriptableObjects/EventChannels/LoadLocationEvent_Channel.asset


m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 82df99cd4c7564d4ca44d50a1dce516b, type: 3}
m_Name: LoadLocationEvent
m_Name: LoadLocationEvent_Channel
m_EditorClassIdentifier:

4
UOP1_Project/Assets/ScriptableObjects/EventChannels/ExitGameEvent_Channel.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 04ea2f19feb15654cb31bb60f7f50855, type: 3}
m_Name: ExitGame
m_Script: {fileID: 11500000, guid: 7fafac715ff920c4383fed91a38a351e, type: 3}
m_Name: ExitGameEvent_Channel
m_EditorClassIdentifier:

67
UOP1_Project/Assets/Scripts/Audio/AudioData/AudioConfigurationSO.cs


public class AudioConfigurationSO : ScriptableObject
{
public AudioMixerGroup OutputAudioMixerGroup = null;
// Simplified management of priority levels (values are counterintuitive, see enum below)
[SerializeField] private PriorityLevel _priorityLevel = PriorityLevel.Standard;
[HideInInspector]
public int Priority
{
get { return (int)_priorityLevel; }
set { _priorityLevel = (PriorityLevel)value; }
}
[Header("Sound properties")]
[Range(0f, 1f)] public float Volume = 1f;
[Range(-3f, 3f)] public float Pitch = 1f;
[Range(-1f, 1f)] public float PanStereo = 0f;
[Range(0f, 1.1f)] public float ReverbZoneMix = 1f;
[Header("Spatialisation")]
[Range(0f, 1f)] public float SpatialBlend = 1f;
public AudioRolloffMode RolloffMode = AudioRolloffMode.Logarithmic;
[Range(0.1f, 5f)] public float MinDistance = 0.1f;
[Range(5f, 100f)] public float MaxDistance = 50f;
[Range(0, 360)] public int Spread = 0;
[Range(0f, 5f)] public float DopplerLevel = 1f;
[Header("Ignores")]
public int Priority = 128;
public float Volume = 1f;
public float Pitch = 1f;
public float PanStereo = 0f;
public float SpatialBlend = 0f;
public float ReverbZoneMix = 1f;
public float DopplerLevel = 1f;
public float Spread = 0f;
public AudioRolloffMode RolloffMode = AudioRolloffMode.Logarithmic;
public float MinDistance = 1f;
public float MaxDistance = 500f;
private enum PriorityLevel
{
Highest = 0,
High = 64,
Standard = 128,
Low = 194,
VeryLow = 256,
}
public void ApplyTo(AudioSource audioSource)
{
audioSource.outputAudioMixerGroup = this.OutputAudioMixerGroup;
audioSource.mute = this.Mute;
audioSource.bypassEffects = this.BypassEffects;
audioSource.bypassListenerEffects = this.BypassListenerEffects;
audioSource.bypassReverbZones = this.BypassReverbZones;
audioSource.priority = this.Priority;
audioSource.volume = this.Volume;
audioSource.pitch = this.Pitch;
audioSource.panStereo = this.PanStereo;
audioSource.spatialBlend = this.SpatialBlend;
audioSource.reverbZoneMix = this.ReverbZoneMix;
audioSource.dopplerLevel = this.DopplerLevel;
audioSource.spread = this.Spread;
audioSource.rolloffMode = this.RolloffMode;
audioSource.minDistance = this.MinDistance;
audioSource.maxDistance = this.MaxDistance;
audioSource.ignoreListenerVolume = this.IgnoreListenerVolume;
audioSource.ignoreListenerPause = this.IgnoreListenerPause;
}
}

3
UOP1_Project/Assets/Scripts/Audio/AudioData/AudioConfigurationSO.cs.meta


MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
defaultReferences:
- OutputAudioMixerGroup: {instanceID: 0}
executionOrder: 0
icon: {instanceID: 0}
userData:

2
UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs


break;
case SequenceMode.Sequential:
_nextClipToPlay = (int)Mathf.Repeat(_nextClipToPlay++, audioClips.Length);
_nextClipToPlay = (int)Mathf.Repeat(++_nextClipToPlay, audioClips.Length);
break;
}
}

92
UOP1_Project/Assets/Scripts/Audio/AudioManager.cs


public class AudioManager : MonoBehaviour
{
[Tooltip("Amount of sound emitters created on Start")]
[SerializeField] private int _initialPoolSize = 1;
[SerializeField] private SoundEmitter _soundEmitterPrefab = default;
[Header("SoundEmitters pool")]
[SerializeField] private SoundEmitterFactorySO _factory;
[SerializeField] private SoundEmitterPoolSO _pool;
[SerializeField] private int _initialSize = 10;
[Header("Listening on channels")]
[SerializeField] private AudioCueEventSO _SFXEvent = default;
[SerializeField] private AudioCueEventChannelSO _SFXEventChannel = default;
[SerializeField] private AudioCueEventSO _musicEvent = default;
[SerializeField] private AudioCueEventChannelSO _musicEventChannel = default;
private SoundEmitterFactorySO _factory;
private SoundEmitterPoolSO _pool;
public SoundEmitterPoolSO Pool { get { return _pool; } }
[Header("Audio control")]
[SerializeField] private AudioMixer audioMixer;
[Range(0f, 1f)]
[SerializeField] private float _masterVolume = 1f;
[Range(0f, 1f)]
[SerializeField] private float _musicVolume = 1f;
[Range(0f, 1f)]
[SerializeField] private float _sfxVolume = 1f;
InitPool();
//TODO: Get the initial volume levels from the settings
_SFXEvent.eventRaised += PlayAudioCue;
_SFXEventChannel.OnAudioCueRequested += PlayAudioCue;
_musicEventChannel.OnAudioCueRequested += PlayAudioCue; //TODO: Treat music requests differently?
_pool.Prewarm(_initialSize);
private void InitPool()
/// <summary>
/// This is only used in the Editor, to debug volumes.
/// It is called when any of the variables is changed, and will directly change the value of the volumes on the AudioMixer.
/// </summary>
void OnValidate()
_factory = ScriptableObject.CreateInstance<SoundEmitterFactorySO>();
_factory.Prefab = _soundEmitterPrefab;
_factory.Prefab.name = "SoundEmitter Factory";
_pool = ScriptableObject.CreateInstance<SoundEmitterPoolSO>();
_pool.name = "SoundEmitter Pool";
_pool.Factory = _factory;
_pool.InitialPoolSize = _initialPoolSize;
if (Application.isPlaying)
{
SetGroupVolume("MasterVolume", _masterVolume);
SetGroupVolume("MusicVolume", _musicVolume);
SetGroupVolume("SFXVolume", _sfxVolume);
}
public static bool SetGroupVolume(AudioMixerGroup group, float volume)
public void SetGroupVolume(string parameterName, float normalizedVolume)
return group.audioMixer.SetFloat("Volume", NormalizedToMixerValue(volume));
bool volumeSet = audioMixer.SetFloat(parameterName, NormalizedToMixerValue(normalizedVolume));
if (!volumeSet)
Debug.LogError("The AudioMixer parameter was not found");
public static bool GetGroupVolume(AudioMixerGroup group, out float volume)
public float GetGroupVolume(string parameterName)
if (group.audioMixer.GetFloat("Volume", out float rawVolume))
if (audioMixer.GetFloat(parameterName, out float rawVolume))
volume = MixerValueNormalized(rawVolume);
return true;
return MixerValueToNormalized(rawVolume);
volume = default;
return false;
else
{
Debug.LogError("The AudioMixer parameter was not found");
return 0f;
}
// Both MixerValueNormalized and NormalizedToMixerValue functions are used for easier transformations when using UI sliders normalized format
private static float MixerValueNormalized(float value)
// Both MixerValueNormalized and NormalizedToMixerValue functions are used for easier transformations
/// when using UI sliders normalized format
private float MixerValueToNormalized(float mixerValue)
return (-(value - 80) / 80) - 1;
// We're assuming the range [-80dB to 0dB] becomes [0 to 1]
return 1f + (mixerValue / 80f);
private static float NormalizedToMixerValue(float normalizedValue)
private float NormalizedToMixerValue(float normalizedValue)
return -80 + (normalizedValue * 80);
// We're assuming the range [0 to 1] becomes [-80dB to 0dB]
// This doesn't allow values over 0dB
return (normalizedValue - 1f) * 80f;
}
/// <summary>

SoundEmitter soundEmitter = _pool.Request();
if (soundEmitter != null)
{
soundEmitter.PlaySound(clipsToPlay[i], settings, audioCue.looping, position);
if (audioCue.looping)
soundEmitter.PlayAudioClip(clipsToPlay[i], settings, audioCue.looping, position);
if (!audioCue.looping)
soundEmitter.OnSoundFinishedPlaying += OnSoundEmitterFinishedPlaying;
}
}

private void OnSoundEmitterFinishedPlaying(SoundEmitter soundEmitter)
{
soundEmitter.OnSoundFinishedPlaying -= OnSoundEmitterFinishedPlaying;
Pool.Return(soundEmitter);
soundEmitter.Stop();
_pool.Return(soundEmitter);
}
//TODO: Add methods to play and cross-fade music, or to play individual sounds?

8
UOP1_Project/Assets/Scripts/Audio/AudioManager.cs.meta


MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
defaultReferences:
- _factory: {fileID: 11400000, guid: 0f82d558a11c88d458625502b6708251, type: 2}
- _pool: {fileID: 11400000, guid: 4b2ed98efabac4446a90c61932acf933, type: 2}
- _SFXEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e, type: 2}
- _musicEventChannel: {fileID: 11400000, guid: 51854f522e1d88442a90b878b27ea839,
type: 2}
- audioMixer: {fileID: 24100000, guid: 548a7f001ca6d3d4cb67c8edf84f62a3, type: 2}
executionOrder: 0
icon: {instanceID: 0}
userData:

61
UOP1_Project/Assets/Scripts/Audio/SoundEmitters/SoundEmitter.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine.Audio;
using UOP1.Pool;
using System;
public class SoundEmitter : MonoBehaviour, IPoolable
public class SoundEmitter : MonoBehaviour
private float _lastUseTimestamp = 0;
public event UnityAction<SoundEmitter> OnSoundFinishedPlaying;

_audioSource.playOnAwake = false;
}
public void OnRequest() { }
public void OnReturn(Action onReturned)
{
StopSound();
}
/// <summary>
/// Instructs the AudioSource to play a single clip, with optional looping, in a position in 3D space.
/// </summary>

/// <param name="position"></param>
public void PlaySound(AudioClip clip, AudioConfigurationSO settings, bool hasToLoop, Vector3 position = default)
public void PlayAudioClip(AudioClip clip, AudioConfigurationSO settings, bool hasToLoop, Vector3 position = default)
ApplySettings(_audioSource, settings);
settings.ApplyTo(_audioSource);
_audioSource.transform.position = position;
_audioSource.loop = hasToLoop;
_audioSource.Play();

}
}
private void ApplySettings(AudioSource source, AudioConfigurationSO settings)
/// <summary>
/// Used when the game is unpaused, to pick up SFX from where they left.
/// </summary>
public void Resume()
{
_audioSource.Play();
}
/// <summary>
/// Used when the game is paused.
/// </summary>
public void Pause()
source.outputAudioMixerGroup = settings.OutputAudioMixerGroup;
source.mute = settings.Mute;
source.bypassEffects = settings.BypassEffects;
source.bypassListenerEffects = settings.BypassListenerEffects;
source.bypassReverbZones = settings.BypassReverbZones;
source.priority = settings.Priority;
source.volume = settings.Volume;
source.pitch = settings.Pitch;
source.panStereo = settings.PanStereo;
source.spatialBlend = settings.SpatialBlend;
source.reverbZoneMix = settings.ReverbZoneMix;
source.dopplerLevel = settings.DopplerLevel;
source.spread = settings.Spread;
source.rolloffMode = settings.RolloffMode;
source.minDistance = settings.MinDistance;
source.maxDistance = settings.MaxDistance;
source.ignoreListenerVolume = settings.IgnoreListenerVolume;
source.ignoreListenerPause = settings.IgnoreListenerPause;
_audioSource.Pause();
public void StopSound()
/// <summary>
/// Used when the SFX finished playing. Called by the <c>AudioManager</c>.
/// </summary>
public void Stop() // Redundant?
_lastUseTimestamp = Time.realtimeSinceStartup;
_audioSource.Stop();
}

public bool IsLooping()
{
return _audioSource.loop;
}
public float LastUseTimestamp()
{
return _lastUseTimestamp;
}
IEnumerator FinishedPlaying(float clipLength)

16
UOP1_Project/Assets/Scripts/Audio/SoundEmitters/SoundEmitterFactorySO.cs


using UOP1.Factory;
[CreateAssetMenu(fileName = "NewSoundEmitterFactory", menuName = "Factory/SoundEmitter Factory")]
public class SoundEmitterFactorySO : ComponentFactorySO<SoundEmitter>
public class SoundEmitterFactorySO : FactorySO<SoundEmitter>
[SerializeField]
private SoundEmitter _prefab = default;
public SoundEmitter prefab = default;
public override SoundEmitter Prefab
public override SoundEmitter Create()
get
{
return _prefab;
}
set
{
_prefab = value;
}
return Instantiate(prefab);
}
}

14
UOP1_Project/Assets/Scripts/Audio/SoundEmitters/SoundEmitterPoolSO.cs


{
[SerializeField]
private SoundEmitterFactorySO _factory;
[SerializeField]
private int _initialPoolSize;
public override IFactory<SoundEmitter> Factory
{

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

31
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>
/// </summary>
public class Protagonist : MonoBehaviour
{

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;
//...
}

Vector3 adjustedMovement = cameraRight.normalized * _previousMovementInput.x +
cameraForward.normalized * _previousMovementInput.y;
_charScript.Move(Vector3.ClampMagnitude(adjustedMovement, 1f));
movementInput = Vector3.ClampMagnitude(adjustedMovement, 1f);
}
//---- 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;
}
}

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


MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
defaultReferences:
- _inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2}
- gameplayCamera: {instanceID: 0}
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);
}
}

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


public class AscendAction : StateAction
{
//Component references
private Character _characterScript;
private Protagonist _protagonistScript;
private float _verticalMovement;
private float _gravityContributionMultiplier;

public override void Awake(StateMachine stateMachine)
{
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
}
public AscendAction(float initialJumpForce)

_verticalMovement += Physics.gravity.y * GRAVITY_MULTIPLIER * Time.deltaTime * _gravityContributionMultiplier;
//Note that even if it's added, the above value is negative due to Physics.gravity.y
_characterScript.movementVector.y = _verticalMovement;
_protagonistScript.movementVector.y = _verticalMovement;
}
}

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


public class DescendAction : StateAction
{
//Component references
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;
}
}

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


public class GroundGravityAction : StateAction
{
//Component references
private Character _characterScript;
private Protagonist _protagonistScript;
private float _verticalPull;

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

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


public class WalkAction : StateAction
{
//Component references
private Character _characterScript;
private Protagonist _protagonistScript;
private float _speed;

public override void Awake(StateMachine stateMachine)
{
_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 * _speed;
_protagonistScript.movementVector.z = _protagonistScript.movementInput.z * _speed;
}
}

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


public class RotateAction : StateAction
{
//Component references
private Character _characterScript;
private Protagonist _protagonistScript;
private Transform _transform;
private float _turnSmoothTime;

public override void Awake(StateMachine stateMachine)
{
_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;
_transform.eulerAngles = Vector3.up * Mathf.SmoothDampAngle(
_transform.eulerAngles.y,
targetRotation,

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


public class SlideAction : StateAction
{
//Component references
private Character _characterScript;
private Protagonist _protagonistScript;
private float _slideSpeed;

public override void Awake(StateMachine stateMachine)
{
_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 * _slideSpeed;
_protagonistScript.movementVector.z = (1f - hitNormal.y) * hitNormal.z * _slideSpeed;
_characterScript.movementVector = Vector3.zero;
_protagonistScript.movementVector = Vector3.zero;
}
}

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


public class HasHitHeadCondition : Condition
{
//Component references
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;
}

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


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

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


public class IsHoldingJumpCondition : Condition
{
//Component references
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;
}

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


public class IsMovingCondition : Condition
{
private float _treshold;
private Character _characterScript;
private Protagonist _protagonistScript;
_characterScript = stateMachine.GetComponent<Character>();
_protagonistScript = stateMachine.GetComponent<Protagonist>();
}
public IsMovingCondition(float treshold)

public override bool Statement()
protected override bool Statement()
Vector3 movementVector = _characterScript.movementInput;
Vector3 movementVector = _protagonistScript.movementInput;
movementVector.y = 0f;
return movementVector.sqrMagnitude > _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);
}
}

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


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

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
}

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


public void BeginDialogue(DialogueLineSO firstLine)
{
_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);
}
}

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

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


fileFormatVersion: 2
guid: d7847b6caa8e5464c80cd90a8cc33a19
guid: 273f9313082320e41a484f6faf242dab
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();
}
}

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


[CreateAssetMenu(fileName = "InputReader", menuName = "Game/Input Reader")]
public class InputReader : ScriptableObject, GameInput.IGameplayActions, GameInput.IDialoguesActions
{
// gameplay
// 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;

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


/// Implements a Pool for Component types.
/// </summary>
/// <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 void InitializePool()
private GameObject PoolRootObject
_poolRootObject = new GameObject(name);
DontDestroyOnLoad(_poolRootObject);
for (int i = 0; i < InitialPoolSize; i++)
get
_available.Push(Create());
if (!Application.isPlaying)
{
return null;
}
if (_poolRootObject == null)
{
_poolRootObject = new GameObject(name);
//DontDestroyOnLoad(_poolRootObject);
}
return _poolRootObject;
if (_poolRootObject == null)
{
InitializePool();
}
return base.Request();
T member = base.Request();
member.gameObject.SetActive(true);
return member;
if (_poolRootObject == null)
{
InitializePool();
}
member.transform.SetParent(PoolRootObject.transform);
member.gameObject.SetActive(false);
base.Return(member);
}

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

#if UNITY_EDITOR
DestroyImmediate(_poolRootObject);
DestroyImmediate(PoolRootObject);
Destroy(_poolRootObject);
Destroy(PoolRootObject);
#endif
}
}

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:

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


public class LocalPoolTester : MonoBehaviour
{
[SerializeField]
private PoolableParticle _prefab = default;
[SerializeField]
private IEnumerator Start()
private void Start()
_factory.Prefab = _prefab;
_pool.InitialPoolSize = _initialPoolSize;
List<PoolableParticle> particles = _pool.Request(10) as List<PoolableParticle>;
foreach (PoolableParticle particle in particles)
_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);
}
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);
}

30
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>();
protected bool HasBeenPrewarmed { get; set; }
protected virtual T Create()
{

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;
}
T member = _available.Count > 0 ? _available.Pop() : Create();
member.OnRequest();
return member;
return Available.Count > 0 ? Available.Pop() : Create();
}
public virtual IEnumerable<T> Request(int num = 1)

public virtual void Return(T member)
{
member.OnReturn(() =>
{
_available.Push(member);
});
Available.Push(member);
}
public virtual void Return(IEnumerable<T> members)

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

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


#if UNITY_EDITOR
public GameSceneSO initializationScene;
void Start()
private void Awake()
{
for (int i = 0; i < SceneManager.sceneCount; ++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:

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


/// <summary>
/// This class manages the scenes loading and unloading
/// </summary>
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
private List<AsyncOperation> _scenesToLoadAsyncOperations = new List<AsyncOperation>();

private void OnEnable()
{
_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);
public void LoadScenes(GameSceneSO[] locationsToLoad, bool showLoadingScreen)
private void LoadScenes(GameSceneSO[] locationsToLoad, bool showLoadingScreen)
{
//Add all current open scenes to unload list
AddScenesToUnload();

if (showLoadingScreen)
{
//Show the progress bar and track progress if loadScreen is true
loadingInterface.SetActive(true);
_loadingInterface.SetActive(true);
StartCoroutine(TrackLoadingProgress());
}
else

SceneManager.SetActiveScene(SceneManager.GetSceneByName(_activeScene.sceneName));
}
public void AddScenesToUnload()
private void AddScenesToUnload()
if (scene.name != initializationScene.sceneName)
if (scene.name != _initializationScene.sceneName)
{
Debug.Log("Added scene to unload = " + scene.name);
//Add the scene to the list of the scenes to unload

}
public void UnloadScenes()
private void UnloadScenes()
{
if (_ScenesToUnload != null)
{

}
/// <summary> This function checks if a scene is already loaded </summary>
public bool CheckLoadState(String sceneName)
private bool CheckLoadState(String sceneName)
{
for (int i = 0; i < SceneManager.sceneCount; ++i)
{

}
/// <summary> This function updates the loading progress once per frame until loading is complete </summary>
IEnumerator TrackLoadingProgress()
private IEnumerator TrackLoadingProgress()
{
float totalProgress = 0;
//When the scene reaches 0.9f, it means that it is loaded

totalProgress += _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);
_loadingProgressBar.fillAmount = totalProgress / _scenesToLoadAsyncOperations.Count;
Debug.Log("progress bar" + _loadingProgressBar.fillAmount + "and value =" + totalProgress / _scenesToLoadAsyncOperations.Count);
yield return null;
}

//Hide progress bar when loading is done
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);
}
}

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;
}
}
}

15
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;
/// <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,
}
}
}

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


namespace UOP1.StateMachine
using UnityEngine;
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;
public abstract bool Statement();
protected abstract bool Statement();
/// <summary>
/// Wrap the <see cref="Statement"/> so it can be cached.
/// </summary>
internal bool GetStatement()
{
bool returnValue;
if (_originSO.cacheResult && _isCached)
returnValue = _cachedStatement;
else
{
returnValue = Statement();
if (_originSO.cacheResult)
{
_isCached = true;
_cachedStatement = returnValue;
}
}
return returnValue;
}
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 StateConditionSO _originSO;
internal readonly StateMachine _stateMachine;
public StateCondition(Condition condition, bool expectedResult)
public StateCondition(StateConditionSO originSO, StateMachine stateMachine, Condition condition, bool expectedResult)
_originSO = originSO;
_stateMachine = stateMachine;
_condition._originSO = originSO;
public bool IsMet => _condition.Statement() == _expectedResult;
public bool IsMet()
{
bool statement = _condition.GetStatement();
bool isMet = statement == _expectedResult;
#if UNITY_EDITOR
_stateMachine._debugger.TransitionConditionResult(_originSO.name, statement, isMet);
#endif
return isMet;
}
}
}

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

正在加载...
取消
保存