浏览代码

Merge remote-tracking branch 'upstream/main' into main

/main
kgc00 4 年前
当前提交
8dfcd3e8
共有 87 个文件被更改,包括 4821 次插入78 次删除
  1. 2
      UOP1_Project/Assets/Materials/Obstacles_Blue.mat
  2. 1
      UOP1_Project/Assets/Prefabs/GameplayEssentials/CameraSystem.prefab
  3. 14
      UOP1_Project/Assets/Prefabs/GameplayEssentials/SpawnSystem.prefab
  4. 41
      UOP1_Project/Assets/Scripts/CameraManager.cs
  5. 740
      UOP1_Project/Assets/Scripts/Input/GameInput.cs
  6. 24
      UOP1_Project/Assets/Scripts/Input/InputReader.cs
  7. 2
      UOP1_Project/Assets/Scripts/Pool/Example/Assets/SharedGlobalParticlePool.asset
  8. 2
      UOP1_Project/Assets/Scripts/Pool/Example/ParticlePoolSO.cs
  9. 2
      UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs.meta
  10. 2
      UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs
  11. 650
      UOP1_Project/Assets/Settings/Input/GameInput.inputactions
  12. 2
      UOP1_Project/Assets/Scripts/Pool/Example/LocalPoolTester.cs
  13. 38
      .editorconfig
  14. 8
      UOP1_Project/Assets/Cutscenes.meta
  15. 8
      UOP1_Project/Assets/Scenes/Examples.meta
  16. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative.meta
  17. 69
      UOP1_Project/Assets/Scripts/ClickToPlaceHelper.cs
  18. 11
      UOP1_Project/Assets/Scripts/ClickToPlaceHelper.cs.meta
  19. 8
      UOP1_Project/Assets/Scripts/Cutscenes.meta
  20. 8
      UOP1_Project/Assets/Scripts/Dialogues.meta
  21. 1001
      UOP1_Project/Assets/Scripts/Editor/ReorderableList.cs
  22. 11
      UOP1_Project/Assets/Scripts/Editor/ReorderableList.cs.meta
  23. 18
      UOP1_Project/Assets/Scripts/Editor/SpawnLocationEditor.cs
  24. 11
      UOP1_Project/Assets/Scripts/Editor/SpawnLocationEditor.cs.meta
  25. 483
      UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable
  26. 8
      UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable.meta
  27. 1001
      UOP1_Project/Assets/Scenes/Examples/CutsceneExample.unity
  28. 7
      UOP1_Project/Assets/Scenes/Examples/CutsceneExample.unity.meta
  29. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors.meta
  30. 15
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/BardHare.asset
  31. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/BardHare.asset.meta
  32. 15
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Hamlet.asset
  33. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Hamlet.asset.meta
  34. 16
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Townsfolk.asset
  35. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Townsfolk.asset.meta
  36. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData.meta
  37. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown.meta
  38. 17
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/IntroDialogue.asset
  39. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/IntroDialogue.asset.meta
  40. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines.meta
  41. 17
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/HeadToCentre.asset
  42. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/HeadToCentre.asset.meta
  43. 16
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/Welcome.asset
  44. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/Welcome.asset.meta
  45. 16
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/GenericOink.asset
  46. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/GenericOink.asset.meta
  47. 81
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs
  48. 3
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs.meta
  49. 11
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs.meta
  50. 8
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack.meta
  51. 28
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs
  52. 11
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs.meta
  53. 11
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueClip.cs.meta
  54. 9
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueMixerBehaviour.cs
  55. 11
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueMixerBehaviour.cs.meta
  56. 21
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueTrack.cs
  57. 11
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueTrack.cs.meta
  58. 55
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs
  59. 23
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueClip.cs
  60. 13
      UOP1_Project/Assets/Scripts/Dialogues/ActorSO.cs
  61. 11
      UOP1_Project/Assets/Scripts/Dialogues/ActorSO.cs.meta
  62. 17
      UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs
  63. 11
      UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs.meta
  64. 16
      UOP1_Project/Assets/Scripts/Dialogues/DialogueLineSO.cs
  65. 11
      UOP1_Project/Assets/Scripts/Dialogues/DialogueLineSO.cs.meta
  66. 11
      UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs.meta
  67. 8
      UOP1_Project/Assets/Scripts/Dialogues/Editor.meta
  68. 93
      UOP1_Project/Assets/Scripts/Dialogues/Editor/DialogueDataEditor.cs
  69. 11
      UOP1_Project/Assets/Scripts/Dialogues/Editor/DialogueDataEditor.cs.meta
  70. 34
      UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs
  71. 0
      /UOP1_Project/Assets/Scripts/Pool/Example/Assets/SharedGlobalParticlePool.asset.meta
  72. 0
      /UOP1_Project/Assets/Scripts/Pool/Example/Assets/SharedGlobalParticlePool.asset
  73. 0
      /UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs.meta
  74. 0
      /UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs
  75. 0
      /UOP1_Project/Assets/Scripts/Pool/Example/LocalPoolTester.cs
  76. 0
      /UOP1_Project/Assets/Scripts/Pool/Example/LocalPoolTester.cs.meta

2
UOP1_Project/Assets/Materials/Obstacles_Blue.mat


m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1
version: 2

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


inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2}
mainCamera: {fileID: 8745341642014614481}
freeLookVCam: {fileID: 8745341641394998849}
speed: 4
--- !u!1 &8745341640754005580
GameObject:
m_ObjectHideFlags: 0

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


serializedVersion: 6
m_Component:
- component: {fileID: 2125786286893897154}
- component: {fileID: 4671891876261113940}
m_Layer: 0
m_Name: Location 01
m_TagString: Untagged

m_Father: {fileID: 2125786285293829335}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4671891876261113940
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2125786286893897213}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 14441bd075da9464e9c254e66e1849e3, type: 3}
m_Name:
m_EditorClassIdentifier:
_verticalOffset: 0.1

41
UOP1_Project/Assets/Scripts/CameraManager.cs


using UnityEngine;
using System;
using UnityEngine;
using Cinemachine;
public class CameraManager : MonoBehaviour

public CinemachineFreeLook freeLookVCam;
private bool _isRMBPressed;
[SerializeField, Range(1f, 5f)]
private float speed = default;
public void SetupProtagonistVirtualCamera(Transform target)
{

private void OnEnable()
{
inputReader.cameraMoveEvent += OnCameraMove;
inputReader.enableMouseControlCameraEvent += OnEnableMouseControlCamera;
inputReader.disableMouseControlCameraEvent += OnDisableMouseControlCamera;
inputReader.enableMouseControlCameraEvent -= OnEnableMouseControlCamera;
inputReader.disableMouseControlCameraEvent -= OnDisableMouseControlCamera;
private void OnCameraMove(Vector2 cameraMovement)
private void OnEnableMouseControlCamera()
{
_isRMBPressed = true;
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
private void OnDisableMouseControlCamera()
{
_isRMBPressed = false;
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
// when mouse control is disabled, the input needs to be cleared
// or the last frame's input will 'stick' until the action is invoked again
freeLookVCam.m_XAxis.m_InputAxisValue = 0;
freeLookVCam.m_YAxis.m_InputAxisValue = 0;
}
private void OnCameraMove(Vector2 cameraMovement, bool isDeviceMouse)
freeLookVCam.m_XAxis.m_InputAxisValue = cameraMovement.x * Time.smoothDeltaTime;
freeLookVCam.m_YAxis.m_InputAxisValue = cameraMovement.y * Time.smoothDeltaTime;
if (isDeviceMouse && !_isRMBPressed)
return;
freeLookVCam.m_XAxis.m_InputAxisValue = cameraMovement.x * Time.smoothDeltaTime * speed;
freeLookVCam.m_YAxis.m_InputAxisValue = cameraMovement.y * Time.smoothDeltaTime * speed;
}
}

740
UOP1_Project/Assets/Scripts/Input/GameInput.cs


""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""MouseControlCamera"",
""type"": ""Button"",
""id"": ""3172ea7f-84a3-4236-b03d-2beae11fa2e0"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
}
],
""bindings"": [

""isPartOfComposite"": false
},
{
""name"": ""Gamepad Right Stick"",
""id"": ""e79b614b-8728-470d-91bc-53102c8434f5"",
""path"": ""2DVector(mode=2)"",
""name"": """",
""id"": ""2b832572-50ef-4dba-aaeb-964ed1c854bb"",
""path"": ""<Gamepad>/rightStick"",
""interactions"": """",
""processors"": ""ScaleVector2(x=2,y=2)"",
""groups"": ""KeyboardOrGamepad"",
""action"": ""RotateCamera"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": ""Keyboard TFGH"",
""id"": ""8e17360e-f036-4963-93f6-05d14787dfb5"",
""path"": ""2DVector"",
""processors"": """",
""processors"": ""ScaleVector2(x=2,y=2)"",
""groups"": """",
""action"": ""RotateCamera"",
""isComposite"": true,

""name"": ""up"",
""id"": ""4e483eb2-4460-4dc1-af9f-9bcb31ebe837"",
""path"": ""<Gamepad>/rightStick/up"",
""id"": ""9a4ec3f5-78bf-4f42-b7d7-f1edd7ce12dc"",
""path"": ""<Keyboard>/t"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",

},
{
""name"": ""down"",
""id"": ""edb40e4a-ef86-4338-904b-522590bc3cb0"",
""path"": ""<Gamepad>/rightStick/down"",
""id"": ""5d82874e-55d8-4d54-84f5-c4d59dc3b39c"",
""path"": ""<Keyboard>/g"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",

},
{
""name"": ""left"",
""id"": ""398710b9-e1a8-4e26-8651-8e3ae6eb3b6e"",
""path"": ""<Gamepad>/rightStick/left"",
""id"": ""13a13bd5-f4ec-4f5b-9a8e-ef1165cc9f5f"",
""path"": ""<Keyboard>/f"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",

},
{
""name"": ""right"",
""id"": ""597d020e-c169-4232-a603-7e5e35ce0c55"",
""path"": ""<Gamepad>/rightStick/right"",
""id"": ""78626b57-196b-4f24-9a3f-af2477d3633b"",
""path"": ""<Keyboard>/h"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""RotateCamera"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""up"",
""id"": ""4e483eb2-4460-4dc1-af9f-9bcb31ebe837"",
""path"": ""<Gamepad>/rightStick/up"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",

},
{
""name"": ""Keyboard TFGH"",
""id"": ""8e17360e-f036-4963-93f6-05d14787dfb5"",
""path"": ""2DVector"",
""name"": """",
""id"": ""88e5a69d-cf1d-43ce-b5ab-9db67f819255"",
""path"": ""<Mouse>/delta"",
""interactions"": """",
""processors"": ""ScaleVector2"",
""groups"": ""KeyboardOrGamepad"",
""action"": ""RotateCamera"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""55713f13-8452-439f-b87e-76d9f2839d7e"",
""path"": ""<Mouse>/rightButton"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MouseControlCamera"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Menus"",
""id"": ""a6b0dc37-2ef3-420d-990a-eef5df26ae21"",
""actions"": [
{
""name"": ""MoveSelection"",
""type"": ""Value"",
""id"": ""ca8fee63-58a3-49c0-9b34-e74351e25113"",
""expectedControlType"": ""Vector2"",
""processors"": ""StickDeadzone"",
""interactions"": """"
},
{
""name"": ""Confirm"",
""type"": ""Button"",
""id"": ""96e1d616-4de6-46d2-9e46-9ba5a4430ff2"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Cancel"",
""type"": ""Button"",
""id"": ""c0e250d4-50a1-4b32-a5e6-f4d8a75bdcd7"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
}
],
""bindings"": [
{
""name"": """",
""id"": ""66fe9f25-70cd-4276-8872-73b4d1e1a823"",
""path"": ""<Keyboard>/space"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Confirm"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""8fee561c-d3a4-460f-98fa-b3c1844f1245"",
""path"": ""<Gamepad>/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""9efd6cbf-28cf-4873-accc-59f81c4d8704"",
""path"": ""<Gamepad>/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Confirm"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""77bc3cae-36d6-4cda-bbf3-5f245a50eca2"",
""path"": ""<Keyboard>/enter"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Confirm"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": ""Gamepad Left Stick"",
""id"": ""abfca31e-4360-48f9-89ac-897570e32b3c"",
""path"": ""2DVector(mode=1)"",
""action"": ""RotateCamera"",
""action"": ""MoveSelection"",
""id"": ""9a4ec3f5-78bf-4f42-b7d7-f1edd7ce12dc"",
""path"": ""<Keyboard>/t"",
""id"": ""9911cc1d-66fd-4d0c-8c17-bffa1050d574"",
""path"": ""<Gamepad>/leftStick/up"",
""action"": ""RotateCamera"",
""action"": ""MoveSelection"",
""id"": ""5d82874e-55d8-4d54-84f5-c4d59dc3b39c"",
""path"": ""<Keyboard>/g"",
""id"": ""4ac5ac47-6988-4dfd-87d2-8da3f9879982"",
""path"": ""<Gamepad>/leftStick/down"",
""action"": ""RotateCamera"",
""action"": ""MoveSelection"",
""id"": ""13a13bd5-f4ec-4f5b-9a8e-ef1165cc9f5f"",
""path"": ""<Keyboard>/f"",
""id"": ""d07aa007-804a-421e-b73d-90d6f4c352d5"",
""path"": ""<Gamepad>/leftStick/left"",
""action"": ""RotateCamera"",
""action"": ""MoveSelection"",
""id"": ""78626b57-196b-4f24-9a3f-af2477d3633b"",
""path"": ""<Keyboard>/h"",
""id"": ""eb46138f-9efd-4063-85f9-1f63a70e7d13"",
""path"": ""<Gamepad>/leftStick/right"",
""action"": ""RotateCamera"",
""action"": ""MoveSelection"",
},
{
""name"": ""Keyboard WASD"",
""id"": ""3d7e43b9-64e0-4b6a-b82e-6eb504598a57"",
""path"": ""2DVector(mode=1)"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""MoveSelection"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""d351c5e4-c757-4781-af1d-ee5173546559"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""91ab3aad-c9f9-4d1c-be6f-6c4703800e3e"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""c037d50f-2813-4060-850d-da9525809452"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""e95b9649-71dc-4d05-8634-388360c5aee8"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Keyboard Arrows"",
""id"": ""502d18cb-7ec6-408f-94c2-51c48f26b95e"",
""path"": ""2DVector(mode=1)"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""MoveSelection"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""f2cd0574-12ba-4c7d-80ec-94d9646a00e4"",
""path"": ""<Keyboard>/upArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""65171f67-9d60-4a1b-9b0a-0e0db39f1dad"",
""path"": ""<Keyboard>/downArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""57f0f1a3-e2b7-4649-92d0-6336f20b6904"",
""path"": ""<Keyboard>/leftArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""a3ea2f5c-5bbb-4819-b9e0-64176a9e24fe"",
""path"": ""<Keyboard>/rightArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Gamepad Dpad"",
""id"": ""7c942501-2d6d-4784-9939-abbe53f3baf9"",
""path"": ""2DVector(mode=1)"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""MoveSelection"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""b8e01aae-a9c3-4ea9-9ade-8923eca414ff"",
""path"": ""<Gamepad>/dpad/down"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""7e359d14-3b28-4ec9-836a-d64662f05a0e"",
""path"": ""<Gamepad>/dpad/down"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""ac3f7d0f-447d-4f07-8b43-5799a109f525"",
""path"": ""<Gamepad>/dpad/left"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""a4179b2d-1260-409a-97bc-8179322d1f79"",
""path"": ""<Gamepad>/dpad/right"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""9041691b-5024-463a-b032-59d7f10c38b3"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Cancel"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""1decef6d-d60a-486d-a7da-b0d20e2b18b3"",
""path"": ""<Gamepad>/buttonEast"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Cancel"",
""isComposite"": false,
""isPartOfComposite"": false
""name"": ""Menus"",
""id"": ""a6b0dc37-2ef3-420d-990a-eef5df26ae21"",
""actions"": [],
""bindings"": []
""name"": ""Dialogues"",
""id"": ""53768bd8-c94e-4805-abee-e6c15ca1fa64"",
""actions"": [
{
""name"": ""MoveSelection"",
""type"": ""Value"",
""id"": ""321a676a-1117-48f9-87de-5137dbc7ff36"",
""expectedControlType"": ""Vector2"",
""processors"": ""StickDeadzone"",
""interactions"": """"
},
{
""name"": ""AdvanceDialogue"",
""type"": ""Button"",
""id"": ""9ace3f39-c79b-4bbc-ac18-26cafae1f479"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
}
],
""bindings"": [
{
""name"": """",
""id"": ""7fdec36e-9182-4c02-b692-3025d78c8431"",
""path"": ""<Keyboard>/space"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""AdvanceDialogue"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""08979c15-12c2-4736-962a-03eec0bff52f"",
""path"": ""<Gamepad>/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""79fef163-a828-41ee-a93a-f048723efc24"",
""path"": ""<Gamepad>/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""AdvanceDialogue"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": ""Gamepad Left Stick"",
""id"": ""e394ce70-6a98-45cb-98ee-3b20d27a398a"",
""path"": ""2DVector(mode=1)"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""MoveSelection"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""8bc6adce-3a54-42ce-8517-eece88cb661f"",
""path"": ""<Gamepad>/leftStick/up"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""5aff7603-0943-4b26-b8cc-d6eac659e263"",
""path"": ""<Gamepad>/leftStick/down"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Gamepad Dpad"",
""id"": ""acc1b4ce-fbf1-42e8-b5bc-adbd2d6683e7"",
""path"": ""2DVector(mode=1)"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""e3bf74b2-d43d-4388-9799-ea5cfb9a5f0e"",
""path"": ""<Gamepad>/dpad/down"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""3feb6021-6cda-4c4c-8c3a-5759797818b7"",
""path"": ""<Gamepad>/dpad/down"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""ff186dd7-80dc-45d5-abed-2a1508fdea05"",
""path"": ""<Gamepad>/dpad/left"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""ccaa05f6-5ae3-415e-8aca-2979f97ed110"",
""path"": ""<Gamepad>/dpad/right"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""434b8802-4e6f-4fd8-b9a3-29259beb030e"",
""path"": ""<Gamepad>/leftStick/left"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""c3b4dc99-5a17-4abf-bd3b-0dff6bee59e5"",
""path"": ""<Gamepad>/leftStick/right"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Keyboard WASD"",
""id"": ""eb995151-9fec-4a96-982d-35630997a2db"",
""path"": ""2DVector(mode=1)"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""MoveSelection"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""e7ae5426-fddc-4538-8b11-02f3775e8a94"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""67eae0cd-5651-4dd3-ae9a-d77e8b6ccfc0"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""42a182be-4f7a-4b9e-b71f-e40bbfda9d65"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""86e17316-e711-4701-946b-a1dfbccae2dc"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Keyboard Arrows"",
""id"": ""96e37e7c-b10b-4cd5-bf7e-fde7c8245ecb"",
""path"": ""2DVector(mode=1)"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""MoveSelection"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""8fe5410a-1366-4abc-98fd-0eb547c66d6c"",
""path"": ""<Keyboard>/upArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""38e85ec9-d601-4e86-acbe-6f61ff72476a"",
""path"": ""<Keyboard>/downArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""46038b59-6fc5-4cad-b0c3-78728baa916b"",
""path"": ""<Keyboard>/leftArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""26ea8a5e-e77d-416c-aa81-28deef164ae9"",
""path"": ""<Keyboard>/rightArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""MoveSelection"",
""isComposite"": false,
""isPartOfComposite"": true
}
]
}
],
""controlSchemes"": [

m_Gameplay_Pause = m_Gameplay.FindAction("Pause", throwIfNotFound: true);
m_Gameplay_ExtraAction = m_Gameplay.FindAction("ExtraAction", throwIfNotFound: true);
m_Gameplay_RotateCamera = m_Gameplay.FindAction("RotateCamera", throwIfNotFound: true);
m_Gameplay_MouseControlCamera = m_Gameplay.FindAction("MouseControlCamera", throwIfNotFound: true);
m_Menus_MoveSelection = m_Menus.FindAction("MoveSelection", throwIfNotFound: true);
m_Menus_Confirm = m_Menus.FindAction("Confirm", throwIfNotFound: true);
m_Menus_Cancel = m_Menus.FindAction("Cancel", throwIfNotFound: true);
// Dialogues
m_Dialogues = asset.FindActionMap("Dialogues", throwIfNotFound: true);
m_Dialogues_MoveSelection = m_Dialogues.FindAction("MoveSelection", throwIfNotFound: true);
m_Dialogues_AdvanceDialogue = m_Dialogues.FindAction("AdvanceDialogue", throwIfNotFound: true);
}
public void Dispose()

private readonly InputAction m_Gameplay_Pause;
private readonly InputAction m_Gameplay_ExtraAction;
private readonly InputAction m_Gameplay_RotateCamera;
private readonly InputAction m_Gameplay_MouseControlCamera;
public struct GameplayActions
{
private @GameInput m_Wrapper;

public InputAction @Pause => m_Wrapper.m_Gameplay_Pause;
public InputAction @ExtraAction => m_Wrapper.m_Gameplay_ExtraAction;
public InputAction @RotateCamera => m_Wrapper.m_Gameplay_RotateCamera;
public InputAction @MouseControlCamera => m_Wrapper.m_Gameplay_MouseControlCamera;
public InputActionMap Get() { return m_Wrapper.m_Gameplay; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }

@RotateCamera.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera;
@RotateCamera.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera;
@RotateCamera.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera;
@MouseControlCamera.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMouseControlCamera;
@MouseControlCamera.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMouseControlCamera;
@MouseControlCamera.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMouseControlCamera;
}
m_Wrapper.m_GameplayActionsCallbackInterface = instance;
if (instance != null)

@RotateCamera.started += instance.OnRotateCamera;
@RotateCamera.performed += instance.OnRotateCamera;
@RotateCamera.canceled += instance.OnRotateCamera;
@MouseControlCamera.started += instance.OnMouseControlCamera;
@MouseControlCamera.performed += instance.OnMouseControlCamera;
@MouseControlCamera.canceled += instance.OnMouseControlCamera;
}
}
}

private readonly InputActionMap m_Menus;
private IMenusActions m_MenusActionsCallbackInterface;
private readonly InputAction m_Menus_MoveSelection;
private readonly InputAction m_Menus_Confirm;
private readonly InputAction m_Menus_Cancel;
public InputAction @MoveSelection => m_Wrapper.m_Menus_MoveSelection;
public InputAction @Confirm => m_Wrapper.m_Menus_Confirm;
public InputAction @Cancel => m_Wrapper.m_Menus_Cancel;
public InputActionMap Get() { return m_Wrapper.m_Menus; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }

{
if (m_Wrapper.m_MenusActionsCallbackInterface != null)
{
@MoveSelection.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnMoveSelection;
@MoveSelection.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnMoveSelection;
@MoveSelection.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnMoveSelection;
@Confirm.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnConfirm;
@Confirm.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnConfirm;
@Confirm.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnConfirm;
@Cancel.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnCancel;
@Cancel.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnCancel;
@Cancel.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnCancel;
@MoveSelection.started += instance.OnMoveSelection;
@MoveSelection.performed += instance.OnMoveSelection;
@MoveSelection.canceled += instance.OnMoveSelection;
@Confirm.started += instance.OnConfirm;
@Confirm.performed += instance.OnConfirm;
@Confirm.canceled += instance.OnConfirm;
@Cancel.started += instance.OnCancel;
@Cancel.performed += instance.OnCancel;
@Cancel.canceled += instance.OnCancel;
// Dialogues
private readonly InputActionMap m_Dialogues;
private IDialoguesActions m_DialoguesActionsCallbackInterface;
private readonly InputAction m_Dialogues_MoveSelection;
private readonly InputAction m_Dialogues_AdvanceDialogue;
public struct DialoguesActions
{
private @GameInput m_Wrapper;
public DialoguesActions(@GameInput wrapper) { m_Wrapper = wrapper; }
public InputAction @MoveSelection => m_Wrapper.m_Dialogues_MoveSelection;
public InputAction @AdvanceDialogue => m_Wrapper.m_Dialogues_AdvanceDialogue;
public InputActionMap Get() { return m_Wrapper.m_Dialogues; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(DialoguesActions set) { return set.Get(); }
public void SetCallbacks(IDialoguesActions instance)
{
if (m_Wrapper.m_DialoguesActionsCallbackInterface != null)
{
@MoveSelection.started -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnMoveSelection;
@MoveSelection.performed -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnMoveSelection;
@MoveSelection.canceled -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnMoveSelection;
@AdvanceDialogue.started -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnAdvanceDialogue;
@AdvanceDialogue.performed -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnAdvanceDialogue;
@AdvanceDialogue.canceled -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnAdvanceDialogue;
}
m_Wrapper.m_DialoguesActionsCallbackInterface = instance;
if (instance != null)
{
@MoveSelection.started += instance.OnMoveSelection;
@MoveSelection.performed += instance.OnMoveSelection;
@MoveSelection.canceled += instance.OnMoveSelection;
@AdvanceDialogue.started += instance.OnAdvanceDialogue;
@AdvanceDialogue.performed += instance.OnAdvanceDialogue;
@AdvanceDialogue.canceled += instance.OnAdvanceDialogue;
}
}
}
public DialoguesActions @Dialogues => new DialoguesActions(this);
private int m_KeyboardOrGamepadSchemeIndex = -1;
public InputControlScheme KeyboardOrGamepadScheme
{

void OnPause(InputAction.CallbackContext context);
void OnExtraAction(InputAction.CallbackContext context);
void OnRotateCamera(InputAction.CallbackContext context);
void OnMouseControlCamera(InputAction.CallbackContext context);
void OnMoveSelection(InputAction.CallbackContext context);
void OnConfirm(InputAction.CallbackContext context);
void OnCancel(InputAction.CallbackContext context);
}
public interface IDialoguesActions
{
void OnMoveSelection(InputAction.CallbackContext context);
void OnAdvanceDialogue(InputAction.CallbackContext context);
}
}

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


using UnityEngine.InputSystem;
using UnityEngine.Events;
[CreateAssetMenu(fileName = "Input Reader", menuName = "Game/Input Reader")]
[CreateAssetMenu(fileName = "InputReader", menuName = "Game/Input Reader")]
public class InputReader : ScriptableObject, GameInput.IGameplayActions
{
public event UnityAction jumpEvent;

public event UnityAction extraActionEvent;
public event UnityAction pauseEvent;
public event UnityAction<Vector2> moveEvent;
public event UnityAction<Vector2> cameraMoveEvent;
public event UnityAction<Vector2, bool> cameraMoveEvent;
public event UnityAction enableMouseControlCameraEvent;
public event UnityAction disableMouseControlCameraEvent;
GameInput gameInput;
public GameInput gameInput;
private void OnEnable()
{

gameInput.Gameplay.SetCallbacks(this);
}
gameInput.Gameplay.Enable();
}

{
if (cameraMoveEvent != null)
{
cameraMoveEvent.Invoke(context.ReadValue<Vector2>());
cameraMoveEvent.Invoke(context.ReadValue<Vector2>(), IsDeviceMouse(context));
public void OnMouseControlCamera(InputAction.CallbackContext context)
{
if (context.phase == InputActionPhase.Performed)
enableMouseControlCameraEvent?.Invoke();
if (context.phase == InputActionPhase.Canceled)
disableMouseControlCameraEvent?.Invoke();
}
private bool IsDeviceMouse(InputAction.CallbackContext context) => context.control.device.name == "Mouse";
}

2
UOP1_Project/Assets/Scripts/Pool/Example/Assets/SharedGlobalParticlePool.asset


m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 485377a59a3f4fc4b9618f557ab57b6f, type: 3}
m_Name: Shared GlobalParticlePool
m_Name: SharedGlobalParticlePool
m_EditorClassIdentifier:
_factory: {fileID: 11400000, guid: ca185e564147672458eeabb1f9080925, type: 2}
_initialPoolSize: 5

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


using UOP1.Factory;
[CreateAssetMenu(fileName = "NewParticlePool", menuName = "Pool/Particle Pool")]
public class ParticlePoolSO : ComponentPool<PoolableParticle>
public class ParticlePoolSO : ComponentPoolSO<PoolableParticle>
{
[SerializeField]
private ParticleFactorySO _factory;

2
UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs.meta


fileFormatVersion: 2
guid: cf67ce39a704c6842aa23316769815b9
guid: f70709d2336a8d0408dc6b0d703f9639
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
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 ComponentPool<T> : PoolSO<T> where T : Component, IPoolable
public abstract class ComponentPoolSO<T> : PoolSO<T> where T : Component, IPoolable
{
public abstract int InitialPoolSize { get; set; }
private GameObject _poolRootObject;

650
UOP1_Project/Assets/Settings/Input/GameInput.inputactions


"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "MouseControlCamera",
"type": "Button",
"id": "3172ea7f-84a3-4236-b03d-2beae11fa2e0",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
}
],
"bindings": [

"isPartOfComposite": false
},
{
"name": "Gamepad Right Stick",
"id": "e79b614b-8728-470d-91bc-53102c8434f5",
"path": "2DVector(mode=2)",
"name": "",
"id": "2b832572-50ef-4dba-aaeb-964ed1c854bb",
"path": "<Gamepad>/rightStick",
"processors": "",
"processors": "ScaleVector2(x=2,y=2)",
"groups": "KeyboardOrGamepad",
"action": "RotateCamera",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "Keyboard TFGH",
"id": "8e17360e-f036-4963-93f6-05d14787dfb5",
"path": "2DVector",
"interactions": "",
"processors": "ScaleVector2(x=2,y=2)",
"groups": "",
"action": "RotateCamera",
"isComposite": true,

"name": "up",
"id": "4e483eb2-4460-4dc1-af9f-9bcb31ebe837",
"path": "<Gamepad>/rightStick/up",
"id": "9a4ec3f5-78bf-4f42-b7d7-f1edd7ce12dc",
"path": "<Keyboard>/t",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",

},
{
"name": "down",
"id": "edb40e4a-ef86-4338-904b-522590bc3cb0",
"path": "<Gamepad>/rightStick/down",
"id": "5d82874e-55d8-4d54-84f5-c4d59dc3b39c",
"path": "<Keyboard>/g",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",

},
{
"name": "left",
"id": "398710b9-e1a8-4e26-8651-8e3ae6eb3b6e",
"path": "<Gamepad>/rightStick/left",
"id": "13a13bd5-f4ec-4f5b-9a8e-ef1165cc9f5f",
"path": "<Keyboard>/f",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",

},
{
"name": "right",
"id": "597d020e-c169-4232-a603-7e5e35ce0c55",
"path": "<Gamepad>/rightStick/right",
"id": "78626b57-196b-4f24-9a3f-af2477d3633b",
"path": "<Keyboard>/h",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",

},
{
"name": "Keyboard TFGH",
"id": "8e17360e-f036-4963-93f6-05d14787dfb5",
"path": "2DVector",
"name": "up",
"id": "4e483eb2-4460-4dc1-af9f-9bcb31ebe837",
"path": "<Gamepad>/rightStick/up",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "RotateCamera",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "88e5a69d-cf1d-43ce-b5ab-9db67f819255",
"path": "<Mouse>/delta",
"interactions": "",
"processors": "ScaleVector2",
"groups": "KeyboardOrGamepad",
"action": "RotateCamera",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "55713f13-8452-439f-b87e-76d9f2839d7e",
"path": "<Mouse>/rightButton",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MouseControlCamera",
"isComposite": false,
"isPartOfComposite": false
}
]
},
{
"name": "Menus",
"id": "a6b0dc37-2ef3-420d-990a-eef5df26ae21",
"actions": [
{
"name": "MoveSelection",
"type": "Value",
"id": "ca8fee63-58a3-49c0-9b34-e74351e25113",
"expectedControlType": "Vector2",
"processors": "StickDeadzone",
"interactions": ""
},
{
"name": "Confirm",
"type": "Button",
"id": "96e1d616-4de6-46d2-9e46-9ba5a4430ff2",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Cancel",
"type": "Button",
"id": "c0e250d4-50a1-4b32-a5e6-f4d8a75bdcd7",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"name": "",
"id": "66fe9f25-70cd-4276-8872-73b4d1e1a823",
"path": "<Keyboard>/space",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Confirm",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8fee561c-d3a4-460f-98fa-b3c1844f1245",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "9efd6cbf-28cf-4873-accc-59f81c4d8704",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Confirm",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "77bc3cae-36d6-4cda-bbf3-5f245a50eca2",
"path": "<Keyboard>/enter",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Confirm",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "Gamepad Left Stick",
"id": "abfca31e-4360-48f9-89ac-897570e32b3c",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "9911cc1d-66fd-4d0c-8c17-bffa1050d574",
"path": "<Gamepad>/leftStick/up",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "4ac5ac47-6988-4dfd-87d2-8da3f9879982",
"path": "<Gamepad>/leftStick/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "d07aa007-804a-421e-b73d-90d6f4c352d5",
"path": "<Gamepad>/leftStick/left",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "eb46138f-9efd-4063-85f9-1f63a70e7d13",
"path": "<Gamepad>/leftStick/right",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard WASD",
"id": "3d7e43b9-64e0-4b6a-b82e-6eb504598a57",
"path": "2DVector(mode=1)",
"action": "RotateCamera",
"action": "MoveSelection",
"id": "9a4ec3f5-78bf-4f42-b7d7-f1edd7ce12dc",
"path": "<Keyboard>/t",
"id": "d351c5e4-c757-4781-af1d-ee5173546559",
"path": "<Keyboard>/w",
"action": "RotateCamera",
"action": "MoveSelection",
"id": "5d82874e-55d8-4d54-84f5-c4d59dc3b39c",
"path": "<Keyboard>/g",
"id": "91ab3aad-c9f9-4d1c-be6f-6c4703800e3e",
"path": "<Keyboard>/s",
"action": "RotateCamera",
"action": "MoveSelection",
"id": "13a13bd5-f4ec-4f5b-9a8e-ef1165cc9f5f",
"path": "<Keyboard>/f",
"id": "c037d50f-2813-4060-850d-da9525809452",
"path": "<Keyboard>/a",
"action": "RotateCamera",
"action": "MoveSelection",
"id": "78626b57-196b-4f24-9a3f-af2477d3633b",
"path": "<Keyboard>/h",
"id": "e95b9649-71dc-4d05-8634-388360c5aee8",
"path": "<Keyboard>/d",
"action": "RotateCamera",
"action": "MoveSelection",
},
{
"name": "Keyboard Arrows",
"id": "502d18cb-7ec6-408f-94c2-51c48f26b95e",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "f2cd0574-12ba-4c7d-80ec-94d9646a00e4",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "65171f67-9d60-4a1b-9b0a-0e0db39f1dad",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "57f0f1a3-e2b7-4649-92d0-6336f20b6904",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "a3ea2f5c-5bbb-4819-b9e0-64176a9e24fe",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Gamepad Dpad",
"id": "7c942501-2d6d-4784-9939-abbe53f3baf9",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "b8e01aae-a9c3-4ea9-9ade-8923eca414ff",
"path": "<Gamepad>/dpad/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "7e359d14-3b28-4ec9-836a-d64662f05a0e",
"path": "<Gamepad>/dpad/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "ac3f7d0f-447d-4f07-8b43-5799a109f525",
"path": "<Gamepad>/dpad/left",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "a4179b2d-1260-409a-97bc-8179322d1f79",
"path": "<Gamepad>/dpad/right",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "9041691b-5024-463a-b032-59d7f10c38b3",
"path": "<Keyboard>/escape",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Cancel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1decef6d-d60a-486d-a7da-b0d20e2b18b3",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Cancel",
"isComposite": false,
"isPartOfComposite": false
"name": "Menus",
"id": "a6b0dc37-2ef3-420d-990a-eef5df26ae21",
"actions": [],
"bindings": []
"name": "Dialogues",
"id": "53768bd8-c94e-4805-abee-e6c15ca1fa64",
"actions": [
{
"name": "MoveSelection",
"type": "Value",
"id": "321a676a-1117-48f9-87de-5137dbc7ff36",
"expectedControlType": "Vector2",
"processors": "StickDeadzone",
"interactions": ""
},
{
"name": "AdvanceDialogue",
"type": "Button",
"id": "9ace3f39-c79b-4bbc-ac18-26cafae1f479",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"name": "",
"id": "7fdec36e-9182-4c02-b692-3025d78c8431",
"path": "<Keyboard>/space",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "AdvanceDialogue",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "08979c15-12c2-4736-962a-03eec0bff52f",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "79fef163-a828-41ee-a93a-f048723efc24",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "AdvanceDialogue",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "Gamepad Left Stick",
"id": "e394ce70-6a98-45cb-98ee-3b20d27a398a",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "8bc6adce-3a54-42ce-8517-eece88cb661f",
"path": "<Gamepad>/leftStick/up",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "5aff7603-0943-4b26-b8cc-d6eac659e263",
"path": "<Gamepad>/leftStick/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Gamepad Dpad",
"id": "acc1b4ce-fbf1-42e8-b5bc-adbd2d6683e7",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "e3bf74b2-d43d-4388-9799-ea5cfb9a5f0e",
"path": "<Gamepad>/dpad/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "3feb6021-6cda-4c4c-8c3a-5759797818b7",
"path": "<Gamepad>/dpad/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "ff186dd7-80dc-45d5-abed-2a1508fdea05",
"path": "<Gamepad>/dpad/left",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "ccaa05f6-5ae3-415e-8aca-2979f97ed110",
"path": "<Gamepad>/dpad/right",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "434b8802-4e6f-4fd8-b9a3-29259beb030e",
"path": "<Gamepad>/leftStick/left",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "c3b4dc99-5a17-4abf-bd3b-0dff6bee59e5",
"path": "<Gamepad>/leftStick/right",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard WASD",
"id": "eb995151-9fec-4a96-982d-35630997a2db",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "e7ae5426-fddc-4538-8b11-02f3775e8a94",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "67eae0cd-5651-4dd3-ae9a-d77e8b6ccfc0",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "42a182be-4f7a-4b9e-b71f-e40bbfda9d65",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "86e17316-e711-4701-946b-a1dfbccae2dc",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard Arrows",
"id": "96e37e7c-b10b-4cd5-bf7e-fde7c8245ecb",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "8fe5410a-1366-4abc-98fd-0eb547c66d6c",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "38e85ec9-d601-4e86-acbe-6f61ff72476a",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "46038b59-6fc5-4cad-b0c3-78728baa916b",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "26ea8a5e-e77d-416c-aa81-28deef164ae9",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
}
]
}
],
"controlSchemes": [

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


private ParticleFactorySO _factory;
private IEnumerator Start()
{
{
_factory = ScriptableObject.CreateInstance<ParticleFactorySO>();
_factory.Prefab = _prefab;
_pool = ScriptableObject.CreateInstance<ParticlePoolSO>();

38
.editorconfig


[*.cs]
indent_style = tab
indent_size = tab
indent_with_tabs = 2
align_with_tabs = true
align_keep_tabs = true
insert_final_newline = true
trim_trailing_whitespace = true
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_between_query_expression_clauses = true
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_case_contents_when_block = false
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_after_cast = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_after_comma = true
csharp_space_before_comma = false
csharp_space_after_dot = false
csharp_space_before_dot = false
csharp_space_after_semicolon_in_for_statement = true
csharp_space_before_semicolon_in_for_statement = false
csharp_space_around_declaration_statements = false
csharp_space_before_open_square_brackets = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_square_brackets = false
csharp_preserve_single_line_statements = false
csharp_preserve_single_line_blocks = true
csharp_using_directive_placement = outside_namespace

8
UOP1_Project/Assets/Cutscenes.meta


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

8
UOP1_Project/Assets/Scenes/Examples.meta


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

8
UOP1_Project/Assets/ScriptableObjects/Narrative.meta


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

69
UOP1_Project/Assets/Scripts/ClickToPlaceHelper.cs


using UnityEditor;
using UnityEngine;
[ExecuteInEditMode]
[AddComponentMenu("UOP1/Tools/Click to Place")]
public class ClickToPlaceHelper : MonoBehaviour
{
[Tooltip("Vertical offset above the clicked point. Useful to avoid spawn points to be directly ON the geometry which might cause issues.")]
[SerializeField] float _verticalOffset = 0.1f;
private Vector3 _spawnPosition;
private bool _displaySpawnPosition = false;
private delegate void ButtonAction();
private ButtonAction myButtonAction;
private void OnDrawGizmos()
{
if (_displaySpawnPosition)
{
Gizmos.color = Color.green;
Gizmos.DrawCube(_spawnPosition, Vector3.one * 0.3f);
}
}
void OnMouseClick(SceneView scene)
{
Event currentGUIEvent = Event.current;
Vector3 mousePos = currentGUIEvent.mousePosition;
float pixelsPerPoint = EditorGUIUtility.pixelsPerPoint;
mousePos.y = scene.camera.pixelHeight - mousePos.y * pixelsPerPoint;
mousePos.x *= pixelsPerPoint;
Ray ray = scene.camera.ScreenPointToRay(mousePos);
if (Physics.Raycast(ray, out RaycastHit hit))
{
_spawnPosition = hit.point + Vector3.up * _verticalOffset;
if (currentGUIEvent.type == EventType.MouseDown
&& currentGUIEvent.button == 0) // Wait for Left mouse button down
{
myButtonAction();
SceneView.duringSceneGui -= OnMouseClick;
_displaySpawnPosition = false;
currentGUIEvent.Use(); // This consumes the event, so that other controls/buttons won't be able to use it
}
}
}
public void SetSpawnLocationAtCursor()
{
Debug.Log("Use the LMB to position this object");
myButtonAction = SetTransform;
_displaySpawnPosition = true;
SceneView.duringSceneGui += OnMouseClick;
}
/// <summary>
/// The delegate called when the mouse is clicked in the viewport
/// </summary>
private void SetTransform()
{
transform.position = _spawnPosition;
Debug.Log("Object moved to " + _spawnPosition);
}
}

11
UOP1_Project/Assets/Scripts/ClickToPlaceHelper.cs.meta


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

8
UOP1_Project/Assets/Scripts/Cutscenes.meta


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

8
UOP1_Project/Assets/Scripts/Dialogues.meta


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

1001
UOP1_Project/Assets/Scripts/Editor/ReorderableList.cs
文件差异内容过多而无法显示
查看文件

11
UOP1_Project/Assets/Scripts/Editor/ReorderableList.cs.meta


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

18
UOP1_Project/Assets/Scripts/Editor/SpawnLocationEditor.cs


using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(ClickToPlaceHelper))]
public class ClickToPlaceHelperEditor : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
ClickToPlaceHelper myTarget = target as ClickToPlaceHelper;
if (GUILayout.Button("Place at Mouse cursor"))
{
myTarget.SetSpawnLocationAtCursor();
}
}
}

11
UOP1_Project/Assets/Scripts/Editor/SpawnLocationEditor.cs.meta


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

483
UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-9073006965474109427
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 12176dee71327c74498b489e9029a0ee, type: 3}
m_Name: DialogueControlClip(Clone)
m_EditorClassIdentifier:
_template:
_dialogueLine: {fileID: 11400000, guid: fda69b0faa3f28b4a87ba294f83eedea, type: 2}
_pauseWhenClipEnds: 1
cutsceneManager: {fileID: 0}
cutsceneManager: {fileID: 0}
--- !u!114 &-8992890383746913626
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 90fb794a295e73545af71bcdb7375791, type: 3}
m_Name: CinemachineShot(Clone)(Clone)
m_EditorClassIdentifier:
DisplayName:
VirtualCamera:
exposedName: 1c8f1b80d9e25a64abea9e2d67cea3f3
defaultValue: {fileID: 0}
--- !u!114 &-7243414920591819180
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 05acc715f855ced458d76ee6f8ac6c61, type: 3}
m_Name: Cinemachine Track
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips:
- m_Version: 1
m_Start: 0
m_ClipIn: 0
m_Asset: {fileID: 9211983919050520405}
m_Duration: 1.1
m_TimeScale: 1
m_ParentTrack: {fileID: -7243414920591819180}
m_EaseInDuration: 0
m_EaseOutDuration: 0
m_BlendInDuration: -1
m_BlendOutDuration: 0.7333333333333334
m_MixInCurve:
serializedVersion: 2
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_MixOutCurve:
serializedVersion: 2
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_BlendInCurveMode: 0
m_BlendOutCurveMode: 0
m_ExposedParameterNames: []
m_AnimationCurves: {fileID: 0}
m_Recordable: 0
m_PostExtrapolationMode: 0
m_PreExtrapolationMode: 0
m_PostExtrapolationTime: 0
m_PreExtrapolationTime: 0
m_DisplayName: CM vcam1
- m_Version: 1
m_Start: 0.36666666666666664
m_ClipIn: 0
m_Asset: {fileID: -7104271872717664822}
m_Duration: 3.433333333333333
m_TimeScale: 1
m_ParentTrack: {fileID: -7243414920591819180}
m_EaseInDuration: 0
m_EaseOutDuration: 0
m_BlendInDuration: 0.7333333333333334
m_BlendOutDuration: 0.5333333333333332
m_MixInCurve:
serializedVersion: 2
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_MixOutCurve:
serializedVersion: 2
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_BlendInCurveMode: 0
m_BlendOutCurveMode: 0
m_ExposedParameterNames: []
m_AnimationCurves: {fileID: 0}
m_Recordable: 0
m_PostExtrapolationMode: 0
m_PreExtrapolationMode: 0
m_PostExtrapolationTime: 0
m_PreExtrapolationTime: 0
m_DisplayName: CM vcam1 (1)
- m_Version: 1
m_Start: 3.2666666666666666
m_ClipIn: 0
m_Asset: {fileID: -8992890383746913626}
m_Duration: 1.8000000000000003
m_TimeScale: 1
m_ParentTrack: {fileID: -7243414920591819180}
m_EaseInDuration: 0
m_EaseOutDuration: 0
m_BlendInDuration: 0.5333333333333332
m_BlendOutDuration: -1
m_MixInCurve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_MixOutCurve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_BlendInCurveMode: 0
m_BlendOutCurveMode: 0
m_ExposedParameterNames: []
m_AnimationCurves: {fileID: 0}
m_Recordable: 0
m_PostExtrapolationMode: 0
m_PreExtrapolationMode: 0
m_PostExtrapolationTime: 0
m_PreExtrapolationTime: 0
m_DisplayName: CM vcam1
m_Markers:
m_Objects: []
--- !u!114 &-7104271872717664822
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 90fb794a295e73545af71bcdb7375791, type: 3}
m_Name: CinemachineShot
m_EditorClassIdentifier:
DisplayName:
VirtualCamera:
exposedName: 9c910a5264e9c2a4493346b21c86a486
defaultValue: {fileID: 0}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bfda56da833e2384a9677cd3c976a436, type: 3}
m_Name: ExampleCutscene
m_EditorClassIdentifier:
m_Version: 0
m_Tracks:
- {fileID: -7243414920591819180}
- {fileID: 1900134804166205457}
m_FixedDuration: 0
m_EditorSettings:
m_Framerate: 60
m_DurationMode: 0
m_MarkerTrack: {fileID: 5472072730035891554}
--- !u!114 &1900134804166205457
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 88bc95ff4e1f12c43a4672c8a05feaf4, type: 3}
m_Name: Dialogue Control Track
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips:
- m_Version: 1
m_Start: 0
m_ClipIn: 0
m_Asset: {fileID: 4587721134825755193}
m_Duration: 2.6666666666666656
m_TimeScale: 1
m_ParentTrack: {fileID: 1900134804166205457}
m_EaseInDuration: 0
m_EaseOutDuration: 0
m_BlendInDuration: 0
m_BlendOutDuration: 0
m_MixInCurve:
serializedVersion: 2
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_MixOutCurve:
serializedVersion: 2
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_BlendInCurveMode: 0
m_BlendOutCurveMode: 0
m_ExposedParameterNames: []
m_AnimationCurves: {fileID: 0}
m_Recordable: 0
m_PostExtrapolationMode: 0
m_PreExtrapolationMode: 0
m_PostExtrapolationTime: 0
m_PreExtrapolationTime: 0
m_DisplayName: FirstLine
- m_Version: 1
m_Start: 4.2333333333333325
m_ClipIn: 0
m_Asset: {fileID: -9073006965474109427}
m_Duration: 0.8333333333333339
m_TimeScale: 1
m_ParentTrack: {fileID: 1900134804166205457}
m_EaseInDuration: 0
m_EaseOutDuration: 0
m_BlendInDuration: 0
m_BlendOutDuration: 0
m_MixInCurve:
serializedVersion: 2
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_MixOutCurve:
serializedVersion: 2
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_BlendInCurveMode: 0
m_BlendOutCurveMode: 0
m_ExposedParameterNames: []
m_AnimationCurves: {fileID: 0}
m_Recordable: 0
m_PostExtrapolationMode: 0
m_PreExtrapolationMode: 0
m_PostExtrapolationTime: 0
m_PreExtrapolationTime: 0
m_DisplayName: SecondLine
m_Markers:
m_Objects: []
--- !u!114 &4587721134825755193
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 12176dee71327c74498b489e9029a0ee, type: 3}
m_Name: DialogueControlClip
m_EditorClassIdentifier:
_template:
_dialogueLine: {fileID: 11400000, guid: 9542270160df90441b23f4575fecee78, type: 2}
_pauseWhenClipEnds: 1
cutsceneManager: {fileID: 0}
cutsceneManager: {fileID: 0}
--- !u!114 &5472072730035891554
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2a16748d9461eae46a725db9776d5390, type: 3}
m_Name: Markers
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips: []
m_Markers:
m_Objects: []
--- !u!114 &9211983919050520405
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 90fb794a295e73545af71bcdb7375791, type: 3}
m_Name: CinemachineShot
m_EditorClassIdentifier:
DisplayName:
VirtualCamera:
exposedName: 67a8876312de87a438022d114b2278b7
defaultValue: {fileID: 0}

8
UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable.meta


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

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

7
UOP1_Project/Assets/Scenes/Examples/CutsceneExample.unity.meta


fileFormatVersion: 2
guid: 54b0379f81d0e8b479ad9405fe862f25
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/ScriptableObjects/Narrative/Actors.meta


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

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f991c0f5eb9677944ae00c1b61548e72, type: 3}
m_Name: BardHare
m_EditorClassIdentifier:
_actorName: Bard Hare

8
UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/BardHare.asset.meta


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

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f991c0f5eb9677944ae00c1b61548e72, type: 3}
m_Name: Hamlet
m_EditorClassIdentifier:
_actorName: Hamlet

8
UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Hamlet.asset.meta


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

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f991c0f5eb9677944ae00c1b61548e72, type: 3}
m_Name: Townsfolk
m_EditorClassIdentifier:
_actorName: Townsfolk
_face: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}

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


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

8
UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData.meta


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

8
UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown.meta


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

17
UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/IntroDialogue.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a0c0171b565b4074a9462307824be26c, type: 3}
m_Name: IntroDialogue
m_EditorClassIdentifier:
dialogueLines:
- {fileID: 11400000, guid: 9542270160df90441b23f4575fecee78, type: 2}
- {fileID: 11400000, guid: fda69b0faa3f28b4a87ba294f83eedea, type: 2}

8
UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/IntroDialogue.asset.meta


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

8
UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines.meta


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

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e49a73eb0802e10429213abfb59e46e1, type: 3}
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.

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


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

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e49a73eb0802e10429213abfb59e46e1, type: 3}
m_Name: Welcome
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: 5e7bd0eed8324794fad1bc460c565ecb, type: 2}
_sentence: Welcome to town!

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


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

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e49a73eb0802e10429213abfb59e46e1, type: 3}
m_Name: GenericOink
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: c7902af5c8e25244f94914ce51e7ea8a, type: 2}
_sentence: Oink oink!

8
UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/GenericOink.asset.meta


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

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


using UnityEngine;
using UnityEngine.Playables;
public class CutsceneManager : MonoBehaviour
{
[SerializeField] private InputReader _inputReader = default;
[SerializeField] private DialogueManager _dialogueManager = default;
private PlayableDirector _activePlayableDirector;
private bool _isPaused;
public bool IsCutscenePlaying => _activePlayableDirector.playableGraph.GetRootPlayable(0).GetSpeed() != 0d;
private void OnEnable()
{
_inputReader.gameInput.Dialogues.AdvanceDialogue.performed += ctx => OnAdvance();
}
private void OnDisable()
{
_inputReader.gameInput.Dialogues.AdvanceDialogue.performed -= ctx => OnAdvance();
}
public void PlayCutscene(PlayableDirector activePlayableDirector)
{
_activePlayableDirector = activePlayableDirector;
_isPaused = false;
_activePlayableDirector.Play();
_activePlayableDirector.stopped += ctx => CutsceneEnded();
EnableDialogueInput();
}
public void CutsceneEnded()
{
EnableGameplayInput();
}
public void PlayDialogueFromClip(DialogueLineSO dialogueLine)
{
_dialogueManager.DisplayDialogueLine(dialogueLine);
}
/// <summary>
/// This callback is executed when the player presses the button to advance dialogues. If the Timeline is currently paused due to a <c>DialogueControlClip</c>, it will resume its playback.
/// </summary>
private void OnAdvance()
{
if (_isPaused)
ResumeTimeline();
}
/// <summary>
/// Called by <c>DialogueControlClip</c> on the Timeline.
/// </summary>
public void PauseTimeline()
{
_isPaused = true;
_activePlayableDirector.playableGraph.GetRootPlayable(0).SetSpeed(0);
}
public void ResumeTimeline()
{
_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();
}
}

3
UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs.meta


fileFormatVersion: 2
guid: 51755885c3e549b6b9c0a42acba7a0e8
timeCreated: 1601935207

11
UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs.meta


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

8
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack.meta


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

28
UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs


using UnityEngine;
using UnityEngine.Playables;
/// <summary>
/// Class to trigger a cutscene.
/// </summary>
public class CutsceneTrigger : MonoBehaviour
{
[SerializeField] private CutsceneManager _cutsceneManager = default;
[SerializeField] private PlayableDirector _playableDirector = default;
[SerializeField] private bool _playOnStart = default;
[SerializeField] private bool _playOnce = default;
private void Start()
{
if (_playOnStart)
_cutsceneManager.PlayCutscene(_playableDirector);
}
private void OnTriggerEnter(Collider other)
{
_cutsceneManager.PlayCutscene(_playableDirector);
if (_playOnce)
Destroy(this);
}
}

11
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs.meta


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

11
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueClip.cs.meta


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

9
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueMixerBehaviour.cs


using UnityEngine.Playables;
/// <summary>
/// This <c>MixerBehaviour</c> is actually unused by the track for now, since <c>DialogueClip</c> don't need mixing.
/// </summary>
public class DialogueMixerBehaviour : PlayableBehaviour
{
}

11
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueMixerBehaviour.cs.meta


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

21
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueTrack.cs


using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
[TrackBindingType(typeof(CutsceneManager))]
[TrackClipType(typeof(DialogueClip))]
public class DialogueTrack : PlayableTrack
{
public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
{
CutsceneManager cutsceneManagerRef = go.GetComponent<PlayableDirector>().GetGenericBinding(this) as CutsceneManager;
foreach (TimelineClip clip in GetClips())
{
DialogueClip dialogueControlClip = clip.asset as DialogueClip;
dialogueControlClip.cutsceneManager = cutsceneManagerRef;
}
return base.CreateTrackMixer(graph, go, inputCount);
}
}

11
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueTrack.cs.meta


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

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


using System;
using UnityEngine;
using UnityEngine.Playables;
[Serializable]
public class DialogueBehaviour : PlayableBehaviour
{
[SerializeField] private DialogueLineSO _dialogueLine = default;
[SerializeField] private bool _pauseWhenClipEnds = default; //This won't work if the clip ends on the very last frame of the Timeline
[HideInInspector] public CutsceneManager cutsceneManager;
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.
/// </summary>
public override void OnBehaviourPlay(Playable playable, FrameData info)
{
if (_dialoguePlayed)
return;
// 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)
{
//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
{
Debug.LogWarning("This clip contains no DialogueLine");
}
}
}
public override void OnBehaviourPause(Playable playable, FrameData info)
{
// The check on _dialoguePlayed is needed because OnBehaviourPause is called also at the beginning of the Timeline,
// so we need to make sure that the Timeline has actually gone through this clip (i.e. called OnBehaviourPlay) at least once before we stop it
if (Application.isPlaying
&& playable.GetGraph().IsPlaying()
&& !playable.GetGraph().GetRootPlayable(0).IsDone()
&& _dialoguePlayed)
{
if (_pauseWhenClipEnds)
cutsceneManager.PauseTimeline();
}
}
}

23
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueClip.cs


using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
public class DialogueClip : PlayableAsset, ITimelineClipAsset
{
[SerializeField] private DialogueBehaviour _template = default;
[HideInInspector] public CutsceneManager cutsceneManager;
// Having ClipCaps set to None makes sure that the clips can't be blended, extrapolated, looped, etc.
public ClipCaps clipCaps
{
get { return ClipCaps.None; }
}
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
{
_template.cutsceneManager = cutsceneManager;
ScriptPlayable<DialogueBehaviour> playable = ScriptPlayable<DialogueBehaviour>.Create(graph, _template);
return playable;
}
}

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


using UnityEngine;
/// <summary>
/// Scriptable Object that represents an "Actor", that is the protagonist of a Dialogue
/// </summary>
[CreateAssetMenu(fileName = "newActor", menuName = "Dialogues/Actor")]
public class ActorSO : ScriptableObject
{
public string ActorName { get => _actorName; }
[SerializeField] private string _actorName = default;
}

11
UOP1_Project/Assets/Scripts/Dialogues/ActorSO.cs.meta


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

17
UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs


using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Timeline;
/// <summary>
/// A Dialogue is a list of consecutive DialogueLines. They play in sequence using the input of the player to skip forward.
/// In future versions it might contain support for branching conversations.
/// </summary>
[CreateAssetMenu(fileName = "newDialogue", menuName = "CutsceneSystem/Dialogue Data")]
public class DialogueDataSO : ScriptableObject
{
public List<DialogueLineSO> dialogueLines;
//TODO: Add support for branching conversations
// Maybe add 2 (or more) special line slots which represent a choice in a conversation
// Each line would also have an event associated, or another Dialogue
}

11
UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs.meta


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

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


using System;
using UnityEngine;
/// <summary>
/// DialogueLine is a Scriptable Object that represents one line of spoken dialogue.
/// It references the Actor that speaks it.
/// </summary>
[CreateAssetMenu(fileName = "newLineOfDialogue", menuName = "Dialogues/Line of Dialogue")]
public class DialogueLineSO : ScriptableObject
{
public ActorSO Actor { get => _actor; }
public string Sentence { get => _sentence; }
[SerializeField] private ActorSO _actor = default;
[SerializeField] [TextArea(3, 3)] private string _sentence = default; //TODO: Connect this with localisation
}

11
UOP1_Project/Assets/Scripts/Dialogues/DialogueLineSO.cs.meta


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

11
UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs.meta


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

8
UOP1_Project/Assets/Scripts/Dialogues/Editor.meta


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

93
UOP1_Project/Assets/Scripts/Dialogues/Editor/DialogueDataEditor.cs


/*
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEditor;
using UnityEngine;
/// <summary>
/// <see cref="DialogueDataSO"/> editor that draw default inspector except:
/// <list type="bullet">
/// <item><see cref="DialogueDataSO.Conversation"/></item>.
/// </list>
/// </summary>
[CustomEditor(typeof(DialogueDataSO))]
public class DialogueDataEditor : Editor
{
private readonly Type _dialogueData = typeof(DialogueDataSO);
/// <summary>
/// All serialized fields in <see cref="DialogueDataSO"/>
/// </summary>
private readonly List<SerializedProperty> _serializedFields = new List<SerializedProperty>();
private ReorderableList _dialogueList;
private void OnEnable()
{
PrepareSerializedProperties();
}
public override void OnInspectorGUI()
{
DrawCustomInspector();
}
private void DrawCustomInspector()
{
// Make GUI not changeable.
GUI.enabled = false;
// Draw reference information about script being edited.
EditorGUILayout.ObjectField("Script", MonoScript.FromScriptableObject((DialogueDataSO)target), typeof(DialogueDataSO), false);
// Make GUI changeable
GUI.enabled = true;
serializedObject.Update();
// Draw field to display
foreach (SerializedProperty field in _serializedFields)
{
if (field != null)
{
if (field.name == nameof(DialogueDataSO.Conversation))
{
_dialogueList.DoLayoutList();
}
else // Draw Default property fields.
{
EditorGUILayout.PropertyField(field);
}
}
}
serializedObject.ApplyModifiedProperties();
}
/// <summary>
/// Identify all serialized property from selected <see cref="DialogueDataSO"/>
/// </summary>
private void PrepareSerializedProperties()
{
// Prepare serialized property.
FieldInfo[] fields = _dialogueData.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
foreach (FieldInfo field in fields)
{
SerializedProperty serializedProperty = serializedObject.FindProperty(field.Name);
_serializedFields.Add(serializedProperty);
if (field.Name == nameof(DialogueDataSO.Conversation))
{
_dialogueList = new ReorderableList(serializedProperty);
}
}
}
}
*/

11
UOP1_Project/Assets/Scripts/Dialogues/Editor/DialogueDataEditor.cs.meta


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

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


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Takes care of all things dialogue, whether they are coming from within a Timeline or just from the interaction with a character, or by any other mean.
/// Keeps track of choices in the dialogue (if any) and then gives back control to gameplay when appropriate.
/// </summary>
public class DialogueManager : MonoBehaviour
{
[SerializeField] private InputReader _inputReader = default;
/// <summary>
/// Called to begin a dialogue, i.e. a sequence of lines that require the player's input to move forward.
/// </summary>
/// <param name="firstLine"></param>
public void BeginDialogue(DialogueLineSO firstLine)
{
_inputReader.gameInput.Dialogues.Enable();
DisplayDialogueLine(firstLine);
}
/// <summary>
/// Displays a line of dialogue in the UI, by requesting it to the <c>DialogueManager</c>.
/// This function is also called by <c>DialogueBehaviour</c> from clips on Timeline during cutscenes.
/// </summary>
/// <param name="dialogueLine"></param>
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);
}
}

/UOP1_Project/Assets/Scripts/Pool/Example/Assets/Shared GlobalParticlePool.asset.meta → /UOP1_Project/Assets/Scripts/Pool/Example/Assets/SharedGlobalParticlePool.asset.meta

/UOP1_Project/Assets/Scripts/Pool/Example/Assets/Shared GlobalParticlePool.asset → /UOP1_Project/Assets/Scripts/Pool/Example/Assets/SharedGlobalParticlePool.asset

/UOP1_Project/Assets/Scripts/Pool/ComponentPool.cs.meta → /UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs.meta

/UOP1_Project/Assets/Scripts/Pool/ComponentPool.cs → /UOP1_Project/Assets/Scripts/Pool/ComponentPoolSO.cs

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

/UOP1_Project/Assets/LocalPoolTester.cs.meta → /UOP1_Project/Assets/Scripts/Pool/Example/LocalPoolTester.cs.meta

正在加载...
取消
保存