浏览代码

Working dialogue and cutscene system. (#135)

* Add Dialogue Track base implementation

* Custom timeline track and clip for dialog

- Can at any time call for a line of dialogue.
- Each clip binds line of dialogue to be later displayed on screen.
- Depending on the options of this clip, the Timeline might pause.

* Made adjustments based on HyagoOliveiran's suggestions

Tried to add more variables to increase legibility.
Added UpdateSlide function.
Deleted some empty lines.

* Update Character.cs

* Update Character.cs

* Update Character.cs

* Update Character.cs

* Update Character.cs

* Update Character.cs

* Update UOP1_Project/Assets/Scripts/Characters/Character.cs

I deleted unnecessary spacing by following atb-brown suggestion.

Co-authored-by: Austin Brown <atb.austin@gmail.com>

* Deleted unnecessary spacing

* Fixed bouncing issue when player hit under floating platform

* My take on a simple Player Spawn System

* Renamed SetRequestS...
/main
GitHub 4 年前
当前提交
ffe1b8b8
共有 71 个文件被更改,包括 4699 次插入197 次删除
  1. 2
      UOP1_Project/Assets/Materials/Obstacles_Blue.mat
  2. 2
      UOP1_Project/Assets/Prefabs/GameplayEssentials/CameraSystem.prefab
  3. 2
      UOP1_Project/Assets/Scripts/CameraManager.cs
  4. 986
      UOP1_Project/Assets/Scripts/Input/GameInput.cs
  5. 4
      UOP1_Project/Assets/Scripts/Input/InputReader.cs
  6. 593
      UOP1_Project/Assets/Settings/Input/GameInput.inputactions
  7. 38
      .editorconfig
  8. 8
      UOP1_Project/Assets/Cutscenes.meta
  9. 8
      UOP1_Project/Assets/Scenes/Examples.meta
  10. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative.meta
  11. 8
      UOP1_Project/Assets/Scripts/Cutscenes.meta
  12. 8
      UOP1_Project/Assets/Scripts/Dialogues.meta
  13. 1001
      UOP1_Project/Assets/Scripts/Editor/ReorderableList.cs
  14. 11
      UOP1_Project/Assets/Scripts/Editor/ReorderableList.cs.meta
  15. 483
      UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable
  16. 8
      UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable.meta
  17. 1001
      UOP1_Project/Assets/Scenes/Examples/CutsceneExample.unity
  18. 7
      UOP1_Project/Assets/Scenes/Examples/CutsceneExample.unity.meta
  19. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors.meta
  20. 15
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/BardHare.asset
  21. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/BardHare.asset.meta
  22. 15
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Hamlet.asset
  23. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Hamlet.asset.meta
  24. 16
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Townsfolk.asset
  25. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Townsfolk.asset.meta
  26. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData.meta
  27. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown.meta
  28. 17
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/IntroDialogue.asset
  29. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/IntroDialogue.asset.meta
  30. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines.meta
  31. 17
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/HeadToCentre.asset
  32. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/HeadToCentre.asset.meta
  33. 16
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/Welcome.asset
  34. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/1.IntroToTown/Lines/Welcome.asset.meta
  35. 16
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/GenericOink.asset
  36. 8
      UOP1_Project/Assets/ScriptableObjects/Narrative/DialogueData/GenericOink.asset.meta
  37. 81
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs
  38. 3
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs.meta
  39. 28
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs
  40. 11
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs.meta
  41. 8
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack.meta
  42. 54
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs
  43. 11
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs.meta
  44. 23
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueClip.cs
  45. 11
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueClip.cs.meta
  46. 9
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueMixerBehaviour.cs
  47. 11
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueMixerBehaviour.cs.meta
  48. 21
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueTrack.cs
  49. 11
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueTrack.cs.meta
  50. 13
      UOP1_Project/Assets/Scripts/Dialogues/ActorSO.cs
  51. 11
      UOP1_Project/Assets/Scripts/Dialogues/ActorSO.cs.meta
  52. 17
      UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs
  53. 11
      UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs.meta
  54. 16
      UOP1_Project/Assets/Scripts/Dialogues/DialogueLineSO.cs
  55. 11
      UOP1_Project/Assets/Scripts/Dialogues/DialogueLineSO.cs.meta
  56. 34
      UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs
  57. 11
      UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs.meta
  58. 8
      UOP1_Project/Assets/Scripts/Dialogues/Editor.meta
  59. 93
      UOP1_Project/Assets/Scripts/Dialogues/Editor/DialogueDataEditor.cs
  60. 11
      UOP1_Project/Assets/Scripts/Dialogues/Editor/DialogueDataEditor.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

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


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

2
UOP1_Project/Assets/Scripts/CameraManager.cs


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

986
UOP1_Project/Assets/Scripts/Input/GameInput.cs
文件差异内容过多而无法显示
查看文件

4
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 enableMouseControlCameraEvent;
public event UnityAction disableMouseControlCameraEvent;
GameInput gameInput;
public GameInput gameInput;
private void OnEnable()
{

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


{
"name": "Menus",
"id": "a6b0dc37-2ef3-420d-990a-eef5df26ae21",
"actions": [],
"bindings": []
"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)",
"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": "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": [

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:

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:

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

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/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:

54
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();
}
}
}

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:

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

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:

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:

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

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:
正在加载...
取消
保存