浏览代码

Fix Dialogue branching and add UI

/main
uChema 4 年前
当前提交
c128feff
共有 46 个文件被更改,包括 1370 次插入44 次删除
  1. 10
      UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable
  2. 16
      UOP1_Project/Assets/Localization Files/Asset Tables/Dialogue System/Dialogues/Dialogue Shared Data.asset
  3. 16
      UOP1_Project/Assets/Localization Files/Asset Tables/Dialogue System/Dialogues/Dialogue_en.asset
  4. 16
      UOP1_Project/Assets/Localization Files/Asset Tables/Dialogue System/Dialogues/Dialogue_fr.asset
  5. 399
      UOP1_Project/Assets/Prefabs/UI/DialoguePanel.prefab
  6. 53
      UOP1_Project/Assets/Scenes/Gameplay.unity
  7. 2
      UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs
  8. 1
      UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs
  9. 2
      UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs
  10. 32
      UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs
  11. 22
      UOP1_Project/Assets/Scripts/UI/UIManager.cs
  12. 464
      UOP1_Project/Assets/Prefabs/UI/ButtonChoice.prefab
  13. 7
      UOP1_Project/Assets/Prefabs/UI/ButtonChoice.prefab.meta
  14. 8
      UOP1_Project/Assets/ScriptableObjects/Dialogue.meta
  15. 8
      UOP1_Project/Assets/ScriptableObjects/Events/Cutscene.meta
  16. 19
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueActorChannelSo.cs
  17. 19
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueDataChannelSo.cs
  18. 11
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueDataChannelSo.cs.meta
  19. 26
      UOP1_Project/Assets/UIDialogueChoiceFiller.cs
  20. 11
      UOP1_Project/Assets/UIDialogueChoiceFiller.cs.meta
  21. 47
      UOP1_Project/Assets/UIDialogueChoicesManager.cs
  22. 11
      UOP1_Project/Assets/UIDialogueChoicesManager.cs.meta
  23. 20
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Choice No.asset
  24. 8
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Choice No.asset.meta
  25. 20
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Choice Yes.asset
  26. 8
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Choice Yes.asset.meta
  27. 23
      UOP1_Project/Assets/ScriptableObjects/Dialogue/DialogueTest.asset
  28. 8
      UOP1_Project/Assets/ScriptableObjects/Dialogue/DialogueTest.asset.meta
  29. 20
      UOP1_Project/Assets/ScriptableObjects/Dialogue/LineTestNo.asset
  30. 8
      UOP1_Project/Assets/ScriptableObjects/Dialogue/LineTestNo.asset.meta
  31. 20
      UOP1_Project/Assets/ScriptableObjects/Dialogue/LineTestYes.asset
  32. 8
      UOP1_Project/Assets/ScriptableObjects/Dialogue/LineTestYes.asset.meta
  33. 18
      UOP1_Project/Assets/ScriptableObjects/Dialogue/SecondaryDialogueNo.asset
  34. 8
      UOP1_Project/Assets/ScriptableObjects/Dialogue/SecondaryDialogueNo.asset.meta
  35. 18
      UOP1_Project/Assets/ScriptableObjects/Dialogue/SecondaryDialogueYes.asset
  36. 8
      UOP1_Project/Assets/ScriptableObjects/Dialogue/SecondaryDialogueYes.asset.meta
  37. 19
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueEventChannelSo.cs
  38. 0
      /UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueActorChannelSo.cs.meta
  39. 0
      /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PauseTimelineEvent.asset
  40. 0
      /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PauseTimelineEvent.asset.meta
  41. 0
      /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PlayCutsceneEvent.asset
  42. 0
      /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PlayCutsceneEvent.asset.meta
  43. 0
      /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PlayDialogueEvent.asset
  44. 0
      /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PlayDialogueEvent.asset.meta

10
UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable


_dialogueLine: {fileID: 11400000, guid: fda69b0faa3f28b4a87ba294f83eedea, type: 2}
_actor: {fileID: 11400000, guid: 027d026cf519df04eb8b7bf251472e13, type: 2}
_pauseWhenClipEnds: 1
PlayDialogueEvent: {fileID: 11400000, guid: f235c0e2f24681044aa448291b13aaac,
PlayDialogueEvent: {fileID: 11400000, guid: d987db4881d794f2da0013a89588d890,
PlayDialogueEvent: {fileID: 11400000, guid: d987db4881d794f2da0013a89588d890, type: 2}
PauseTimelineEvent: {fileID: 11400000, guid: 9b0fb5f181adc6b4ca020743fed6c020, type: 2}
--- !u!114 &-8992890383746913626
MonoBehaviour:
m_ObjectHideFlags: 1

m_DisplayName: SecondLine
m_Markers:
m_Objects: []
PlayDialogueEvent: {fileID: 11400000, guid: d987db4881d794f2da0013a89588d890, type: 2}
PauseTimelineEvent: {fileID: 11400000, guid: 9b0fb5f181adc6b4ca020743fed6c020, type: 2}
--- !u!114 &4587721134825755193
MonoBehaviour:
m_ObjectHideFlags: 1

_dialogueLine: {fileID: 11400000, guid: 9542270160df90441b23f4575fecee78, type: 2}
_actor: {fileID: 11400000, guid: 027d026cf519df04eb8b7bf251472e13, type: 2}
_pauseWhenClipEnds: 1
PlayDialogueEvent: {fileID: 11400000, guid: f235c0e2f24681044aa448291b13aaac,
PlayDialogueEvent: {fileID: 11400000, guid: d987db4881d794f2da0013a89588d890,
PlayDialogueEvent: {fileID: 11400000, guid: d987db4881d794f2da0013a89588d890, type: 2}
PauseTimelineEvent: {fileID: 11400000, guid: 9b0fb5f181adc6b4ca020743fed6c020, type: 2}
--- !u!114 &5472072730035891554
MonoBehaviour:
m_ObjectHideFlags: 1

16
UOP1_Project/Assets/Localization Files/Asset Tables/Dialogue System/Dialogues/Dialogue Shared Data.asset


m_Key: Oink
m_Metadata:
m_Items: []
- m_Id: 20322714321281024
m_Key: Line
m_Metadata:
m_Items: []
- m_Id: 20322813445267456
m_Key: No
m_Metadata:
m_Items: []
- m_Id: 20323438161682432
m_Key: LineTestYes
m_Metadata:
m_Items: []
- m_Id: 20323667103571968
m_Key: LineTestNo
m_Metadata:
m_Items: []
m_Metadata:
m_Items: []
m_KeyGenerator:

16
UOP1_Project/Assets/Localization Files/Asset Tables/Dialogue System/Dialogues/Dialogue_en.asset


m_Localized: Oink-oink
m_Metadata:
m_Items: []
- m_Id: 20322714321281024
m_Localized: Yes
m_Metadata:
m_Items: []
- m_Id: 20322813445267456
m_Localized: No
m_Metadata:
m_Items: []
- m_Id: 20323438161682432
m_Localized: Awesome ! See you there !
m_Metadata:
m_Items: []
- m_Id: 20323667103571968
m_Localized: Ok ! Go there when you feel like it !
m_Metadata:
m_Items: []
references:
version: 1

16
UOP1_Project/Assets/Localization Files/Asset Tables/Dialogue System/Dialogues/Dialogue_fr.asset


m_Localized: Groin-groin
m_Metadata:
m_Items: []
- m_Id: 20322714321281024
m_Localized: Oui
m_Metadata:
m_Items: []
- m_Id: 20322813445267456
m_Localized: Non
m_Metadata:
m_Items: []
- m_Id: 20323438161682432
m_Localized: Parfait ! On se voit labas
m_Metadata:
m_Items: []
- m_Id: 20323667103571968
m_Localized: 'Ok ! Vas y quand tu veux ! '
m_Metadata:
m_Items: []
references:
version: 1

399
UOP1_Project/Assets/Prefabs/UI/DialoguePanel.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1284969401
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1284969402}
- component: {fileID: 1284969404}
- component: {fileID: 1284969403}
- component: {fileID: 1284969405}
m_Layer: 5
m_Name: Panel Choices
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1284969402
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1284969401}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 3687453176493695291}
- {fileID: 3787434768372665207}
m_Father: {fileID: 3687453176568796422}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.8, y: 0.1}
m_AnchorMax: {x: 0.98, y: 0.9}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1284969404
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1284969401}
m_CullTransparentMesh: 0
--- !u!114 &1284969403
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1284969401}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 10
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
--- !u!114 &1284969405
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1284969401}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74cb0cc9b1a79dd42ade609d494b44cb, type: 3}
m_Name:
m_EditorClassIdentifier:
listChoiceButtons:
- {fileID: 3787434768243464469}
- {fileID: 3687453176631817049}
--- !u!1 &3687453176568796421
GameObject:
m_ObjectHideFlags: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3687453176568796421}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.84375, y: 0.84375, z: 0.84375}
m_Children:

- {fileID: 1284969402}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_Script: {fileID: 11500000, guid: 6868cb6f048b549b3b137c5989933a22, type: 3}
m_Name:
m_EditorClassIdentifier:
lineText: {fileID: 3687453177589032020}
actorNameText: {fileID: 3687453177247957428}
_lineText: {fileID: 3687453177589032020}
_actorNameText: {fileID: 3687453177247957428}
_choicesManager: {fileID: 1284969405}
ShowChoicesEvent: {fileID: 11400000, guid: a4e5e48a0f3430c4197b317e650727c6, type: 2}
--- !u!1 &3687453177247957432
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 3687453176568796422}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.1, y: 0.3}
m_AnchorMax: {x: 0.9, y: 0.7}
m_AnchorMin: {x: 0.02, y: 0.3}
m_AnchorMax: {x: 0.8, y: 0.7}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}

m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1001 &3687453177878818849
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1284969402}
m_Modifications:
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 199.80005
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -156.09999
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_SizeDelta.x
value: 399.6001
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_SizeDelta.y
value: 97.399994
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 550526546634029911, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_Name
value: ButtonChoice2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bde732562bbef3c4785f9ce7c0af8047, type: 3}
--- !u!224 &3787434768372665207 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
m_PrefabInstance: {fileID: 3687453177878818849}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3687453176631817049 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1448887160, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
m_PrefabInstance: {fileID: 3687453177878818849}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b29347f90d2dc4d44a9f055fd9e1bf64, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &3787434767474088557
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1284969402}
m_Modifications:
- target: {fileID: 20254461, guid: bde732562bbef3c4785f9ce7c0af8047, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 20254461, guid: bde732562bbef3c4785f9ce7c0af8047, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 3787434768243464469}
- target: {fileID: 20254461, guid: bde732562bbef3c4785f9ce7c0af8047, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: ButtonClicked
objectReference: {fileID: 0}
- target: {fileID: 20254461, guid: bde732562bbef3c4785f9ce7c0af8047, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 20254461, guid: bde732562bbef3c4785f9ce7c0af8047, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 20254461, guid: bde732562bbef3c4785f9ce7c0af8047, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 199.80005
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -48.699997
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_SizeDelta.x
value: 399.6001
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_SizeDelta.y
value: 97.399994
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 550526546634029911, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
propertyPath: m_Name
value: ButtonChoice1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bde732562bbef3c4785f9ce7c0af8047, type: 3}
--- !u!224 &3687453176493695291 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 550526546634029910, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
m_PrefabInstance: {fileID: 3787434767474088557}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3787434768243464469 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1448887160, guid: bde732562bbef3c4785f9ce7c0af8047,
type: 3}
m_PrefabInstance: {fileID: 3787434767474088557}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b29347f90d2dc4d44a9f055fd9e1bf64, type: 3}
m_Name:
m_EditorClassIdentifier:

53
UOP1_Project/Assets/Scenes/Gameplay.unity


m_Modification:
m_TransformParent: {fileID: 1869732381}
m_Modifications:
- target: {fileID: 1284969401, guid: 0ac9fcac72b964a9181545df5e543b03, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3687453176493695291, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3687453176493695291, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3687453176493695291, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 199.80005
objectReference: {fileID: 0}
- target: {fileID: 3687453176493695291, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -48.699997
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3687453176568796421, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3687453176568796422, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}

type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3787434768372665207, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3787434768372665207, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3787434768372665207, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 199.80005
objectReference: {fileID: 0}
- target: {fileID: 3787434768372665207, guid: 0ac9fcac72b964a9181545df5e543b03,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -156.09999
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0ac9fcac72b964a9181545df5e543b03, type: 3}

m_Modification:
m_TransformParent: {fileID: 1869732381}
m_Modifications:
- target: {fileID: 1711649698, guid: 42ed5ae1f90714c4488cfabda2298591, type: 3}
propertyPath: m_AnchoredPosition.y
value: -20
objectReference: {fileID: 0}
- target: {fileID: 9125883718042355530, guid: 42ed5ae1f90714c4488cfabda2298591,
type: 3}
propertyPath: m_LocalPosition.x

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


/// 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")]
[CreateAssetMenu(fileName = "newDialogue", menuName = "Dialogues/Dialogue Data")]
public class DialogueDataSO : ScriptableObject
{

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


public DialogueChoiceChannelSO MakeDialogueChoiceEvent;
public VoidEventChannelSO CloseUIDialogueEvent;
private DialogueDataSO _currentDialogueDataSO;
private int _counter;
private bool _reachedEndOfDialogue { get => _counter >= _currentDialogueDataSO.DialogueLines.Count; }

2
UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs


[Header("Broadcasting on")]
[SerializeField] private ItemEventChannelSo _onObjectPickUp = default;
[SerializeField] private VoidEventChannelSO _onCookingStart = default;
[SerializeField] private DialogueEventChannelSo _startTalking = default;
[SerializeField] private DialogueDataChannelSo _startTalking = default;
//UI event
[SerializeField] private InteractionUIEventChannelSO _toggleInteractionUI = default;
[Header("Listening to")]

32
UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs


using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.Serialization;
[SerializeField] LocalizeStringEvent lineText = default;
[SerializeField] LocalizeStringEvent actorNameText = default;
[SerializeField] private LocalizeStringEvent _lineText = default;
[SerializeField] private LocalizeStringEvent _actorNameText = default;
[SerializeField] private UIDialogueChoicesManager _choicesManager = default;
[SerializeField] private DialogueChoicesChannelSO ShowChoicesEvent;
private void Start()
{
if (ShowChoicesEvent != null)
{
ShowChoicesEvent.OnEventRaised += ShowChoices;
}
}
lineText.StringReference = dialogueLine.Sentence;
actorNameText.StringReference = actor.ActorName;
_choicesManager.gameObject.SetActive(false);
_lineText.StringReference = dialogueLine.Sentence;
_actorNameText.StringReference = actor.ActorName;
}
void ShowChoices(List<Choice> choices) {
_choicesManager.FillChoices(choices);
_choicesManager.gameObject.SetActive(true);
}
void HideChoices()
{
_choicesManager.gameObject.SetActive(false);
}
}

22
UOP1_Project/Assets/Scripts/UI/UIManager.cs


public class UIManager : MonoBehaviour
{
public DialogueLineChannelSO OpenUIDialogueEvent;
public VoidEventChannelSO CloseUIDialogueEvent;
public DialogueChoicesChannelSO ShowChoicesUIEvent;
[SerializeField] private DialogueLineChannelSO OpenUIDialogueEvent= default;
[SerializeField] private VoidEventChannelSO CloseUIDialogueEvent = default;
[SerializeField] private DialogueChoicesChannelSO ShowChoicesUIEvent = default;
public VoidEventChannelSO OpenInventoryScreenEvent;
public VoidEventChannelSO OpenInventoryScreenForCookingEvent;
public VoidEventChannelSO CloseInventoryScreenEvent;
[SerializeField] private VoidEventChannelSO OpenInventoryScreenEvent = default;
[SerializeField] private VoidEventChannelSO OpenInventoryScreenForCookingEvent = default;
[SerializeField] private VoidEventChannelSO CloseInventoryScreenEvent = default;
public VoidEventChannelSO OnInteractionEndedEvent;
[SerializeField] private VoidEventChannelSO OnInteractionEndedEvent = default;
public InteractionUIEventChannelSO SetInteractionEvent;
[SerializeField] private InteractionUIEventChannelSO SetInteractionEvent = default;
private void OnEnable()
{

}
[SerializeField]
UIDialogueManager dialogueController = default;
private UIDialogueManager dialogueController = default;
UIInventoryManager inventoryPanel;
private UIInventoryManager inventoryPanel = default;
UIInteractionManager interactionPanel;
private UIInteractionManager interactionPanel = default;
public void OpenUIDialogue(DialogueLineSO dialogueLine, ActorSO actor)
{

464
UOP1_Project/Assets/Prefabs/UI/ButtonChoice.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &20254459
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 20254460}
- component: {fileID: 20254463}
- component: {fileID: 20254462}
- component: {fileID: 20254461}
m_Layer: 5
m_Name: ButtonToClick
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &20254460
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 20254459}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 550526546634029910}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &20254463
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 20254459}
m_CullTransparentMesh: 0
--- !u!114 &20254462
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 20254459}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &20254461
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 20254459}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 20254462}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1448887160}
m_MethodName: ButtonClicked
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &550526546634029911
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 550526546634029910}
- component: {fileID: 550526546634029912}
- component: {fileID: 550526546634029913}
- component: {fileID: 1448887160}
m_Layer: 5
m_Name: ButtonChoice
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &550526546634029910
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526546634029911}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 550526546945374984}
- {fileID: 550526547636381841}
- {fileID: 20254460}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 199.80005, y: -48.699997}
m_SizeDelta: {x: 399.6001, y: 97.399994}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &550526546634029912
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526546634029911}
m_CullTransparentMesh: 0
--- !u!114 &550526546634029913
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526546634029911}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1448887160
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526546634029911}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b29347f90d2dc4d44a9f055fd9e1bf64, type: 3}
m_Name:
m_EditorClassIdentifier:
choiceText: {fileID: 550526547636381840}
MakeAChoiceEvent: {fileID: 11400000, guid: f7b40077957f3834a8d5354c3e4ce759, type: 2}
--- !u!1 &550526546945374985
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 550526546945374984}
- component: {fileID: 550526546945374986}
- component: {fileID: 550526546945374987}
m_Layer: 5
m_Name: ImageBG
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &550526546945374984
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526546945374985}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 550526546634029910}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &550526546945374986
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526546945374985}
m_CullTransparentMesh: 0
--- !u!114 &550526546945374987
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526546945374985}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.6839622, g: 1, b: 0.9846935, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &550526547636381838
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 550526547636381841}
- component: {fileID: 550526547636381842}
- component: {fileID: 550526547636381843}
- component: {fileID: 550526547636381840}
m_Layer: 5
m_Name: TextChoice
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &550526547636381841
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526547636381838}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 550526546634029910}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -20, y: -20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &550526547636381842
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526547636381838}
m_CullTransparentMesh: 0
--- !u!114 &550526547636381843
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526547636381838}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 1
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &550526547636381840
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 550526547636381838}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3}
m_Name:
m_EditorClassIdentifier:
m_StringReference:
m_TableReference:
m_TableCollectionName: GUID:5f392fa78068846188a7ed5595276c8f
m_TableEntryReference:
m_KeyId: 214189465600
m_Key:
m_FormatArguments: []
m_UpdateString:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 550526547636381843}
m_MethodName: set_text
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName:
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2

7
UOP1_Project/Assets/Prefabs/UI/ButtonChoice.prefab.meta


fileFormatVersion: 2
guid: bde732562bbef3c4785f9ce7c0af8047
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/ScriptableObjects/Dialogue.meta


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

8
UOP1_Project/Assets/ScriptableObjects/Events/Cutscene.meta


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

19
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueActorChannelSo.cs


using UnityEngine.Events;
using UnityEngine;
/// <summary>
/// This class is used for talk interaction events.
/// Example: start talking to an actor passed as paramater
/// </summary>
[CreateAssetMenu(menuName = "Events/Dialogue Actor Channel")]
public class DialogueActorChannelSo : ScriptableObject
{
public UnityAction<ActorSO> OnEventRaised;
public void RaiseEvent(ActorSO actor)
{
if (OnEventRaised != null)
OnEventRaised.Invoke(actor);
}
}

19
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueDataChannelSo.cs


using UnityEngine.Events;
using UnityEngine;
/// <summary>
/// This class is used for talk interaction events.
/// Example: start talking to an actor passed as paramater
/// </summary>
[CreateAssetMenu(menuName = "Events/Dialogue Data Channel")]
public class DialogueDataChannelSo : ScriptableObject
{
public UnityAction<DialogueDataSO> OnEventRaised;
public void RaiseEvent(DialogueDataSO dialogue)
{
if (OnEventRaised != null)
OnEventRaised.Invoke(dialogue);
}
}

11
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueDataChannelSo.cs.meta


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

26
UOP1_Project/Assets/UIDialogueChoiceFiller.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.Localization.Components;
public class UIDialogueChoiceFiller : MonoBehaviour
{
[SerializeField]
LocalizeStringEvent choiceText;
[SerializeField]
DialogueChoiceChannelSO MakeAChoiceEvent;
Choice currentChoice;
public void FillChoice(Choice choiceToFill)
{
currentChoice = choiceToFill;
choiceText.StringReference = choiceToFill.Response.Sentence;
}
public void ButtonClicked()
{
if(MakeAChoiceEvent!=null)
MakeAChoiceEvent.RaiseEvent(currentChoice);
}
}

11
UOP1_Project/Assets/UIDialogueChoiceFiller.cs.meta


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

47
UOP1_Project/Assets/UIDialogueChoicesManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIDialogueChoicesManager : MonoBehaviour
{
public UIDialogueChoiceFiller[] listChoiceButtons;
public void FillChoices(List<Choice> choices)
{
if(choices !=null)
{
int maxCount = Mathf.Max(choices.Count, listChoiceButtons.Length);
for (int i = 0; i < maxCount; i++)
{
if (i < listChoiceButtons.Length)
{
if (i < choices.Count)
{
listChoiceButtons[i].FillChoice(choices[i]);
listChoiceButtons[i].gameObject.SetActive(true);
}
else
{
listChoiceButtons[i].gameObject.SetActive(false);
}
}
else
{
Debug.LogError("There are more choices than buttons");
}
}
}
}
}

11
UOP1_Project/Assets/UIDialogueChoicesManager.cs.meta


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

20
UOP1_Project/Assets/ScriptableObjects/Dialogue/Choice No.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: Choice No
m_EditorClassIdentifier:
_sentence:
m_TableReference:
m_TableCollectionName: GUID:3023456eb4be043f1a0c6ede7f88d892
m_TableEntryReference:
m_KeyId: 20322813445267456
m_Key:

8
UOP1_Project/Assets/ScriptableObjects/Dialogue/Choice No.asset.meta


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

20
UOP1_Project/Assets/ScriptableObjects/Dialogue/Choice Yes.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: Choice Yes
m_EditorClassIdentifier:
_sentence:
m_TableReference:
m_TableCollectionName: GUID:3023456eb4be043f1a0c6ede7f88d892
m_TableEntryReference:
m_KeyId: 20322714321281024
m_Key:

8
UOP1_Project/Assets/ScriptableObjects/Dialogue/Choice Yes.asset.meta


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

23
UOP1_Project/Assets/ScriptableObjects/Dialogue/DialogueTest.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: DialogueTest
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: 027d026cf519df04eb8b7bf251472e13, type: 2}
_dialogueLines:
- {fileID: 11400000, guid: 9542270160df90441b23f4575fecee78, type: 2}
- {fileID: 11400000, guid: fda69b0faa3f28b4a87ba294f83eedea, type: 2}
_choices:
- _response: {fileID: 11400000, guid: 41b89c0c93e7af1439d29abc8362b4ec, type: 2}
_nextDialogue: {fileID: 11400000, guid: b8ad0645e93d81649a75db29f35f55b2, type: 2}
- _response: {fileID: 11400000, guid: 1ce42aa13e24e4f478da0c2a348c3ad9, type: 2}
_nextDialogue: {fileID: 11400000, guid: dd77cbf6291c70a46bb389e15a2f8bcd, type: 2}

8
UOP1_Project/Assets/ScriptableObjects/Dialogue/DialogueTest.asset.meta


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

20
UOP1_Project/Assets/ScriptableObjects/Dialogue/LineTestNo.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: LineTestNo
m_EditorClassIdentifier:
_sentence:
m_TableReference:
m_TableCollectionName: GUID:3023456eb4be043f1a0c6ede7f88d892
m_TableEntryReference:
m_KeyId: 20323667103571968
m_Key:

8
UOP1_Project/Assets/ScriptableObjects/Dialogue/LineTestNo.asset.meta


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

20
UOP1_Project/Assets/ScriptableObjects/Dialogue/LineTestYes.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: LineTestYes
m_EditorClassIdentifier:
_sentence:
m_TableReference:
m_TableCollectionName: GUID:3023456eb4be043f1a0c6ede7f88d892
m_TableEntryReference:
m_KeyId: 20323438161682432
m_Key:

8
UOP1_Project/Assets/ScriptableObjects/Dialogue/LineTestYes.asset.meta


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

18
UOP1_Project/Assets/ScriptableObjects/Dialogue/SecondaryDialogueNo.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: SecondaryDialogueNo
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: 027d026cf519df04eb8b7bf251472e13, type: 2}
_dialogueLines:
- {fileID: 11400000, guid: 81d91624bc4391546b14207f909c5651, type: 2}
_choices: []

8
UOP1_Project/Assets/ScriptableObjects/Dialogue/SecondaryDialogueNo.asset.meta


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

18
UOP1_Project/Assets/ScriptableObjects/Dialogue/SecondaryDialogueYes.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: SecondaryDialogueYes
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: 027d026cf519df04eb8b7bf251472e13, type: 2}
_dialogueLines:
- {fileID: 11400000, guid: ad4cc1cd5fab9c94e95b17d9c5698102, type: 2}
_choices: []

8
UOP1_Project/Assets/ScriptableObjects/Dialogue/SecondaryDialogueYes.asset.meta


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

19
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueEventChannelSo.cs


using UnityEngine.Events;
using UnityEngine;
/// <summary>
/// This class is used for talk interaction events.
/// Example: start talking to an actor passed as paramater
/// </summary>
[CreateAssetMenu(menuName = "Events/Dialogue Event Channel")]
public class DialogueEventChannelSo : ScriptableObject
{
public UnityAction<ActorSO> OnEventRaised;
public void RaiseEvent(ActorSO actor)
{
if (OnEventRaised != null)
OnEventRaised.Invoke(actor);
}
}

/UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueEventChannelSo.cs.meta → /UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueActorChannelSo.cs.meta

/UOP1_Project/Assets/ScriptableObjects/Events/UI/PauseTimelineEvent.asset → /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PauseTimelineEvent.asset

/UOP1_Project/Assets/ScriptableObjects/Events/UI/PauseTimelineEvent.asset.meta → /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PauseTimelineEvent.asset.meta

/UOP1_Project/Assets/ScriptableObjects/Events/UI/PlayCutsceneEvent.asset → /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PlayCutsceneEvent.asset

/UOP1_Project/Assets/ScriptableObjects/Events/UI/PlayCutsceneEvent.asset.meta → /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PlayCutsceneEvent.asset.meta

/UOP1_Project/Assets/ScriptableObjects/Events/UI/PlayDialogueEvent.asset → /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PlayDialogueEvent.asset

/UOP1_Project/Assets/ScriptableObjects/Events/UI/PlayDialogueEvent.asset.meta → /UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/PlayDialogueEvent.asset.meta

正在加载...
取消
保存