first commit
This commit is contained in:
@@ -0,0 +1,836 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &100000
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400000}
|
||||
- component: {fileID: 22200000}
|
||||
- component: {fileID: 11400000}
|
||||
m_Layer: 5
|
||||
m_Name: Portrait
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400000
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
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: 22400002}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 59.8, y: 58.326}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &22200000
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
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: 1}
|
||||
m_RaycastTarget: 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 &100002
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400002}
|
||||
- component: {fileID: 22200002}
|
||||
- component: {fileID: 11400002}
|
||||
m_Layer: 5
|
||||
m_Name: SubtitlesGroup
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400002
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
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: 224000012677293416}
|
||||
- {fileID: 22451302}
|
||||
- {fileID: 22400008}
|
||||
- {fileID: 22400006}
|
||||
- {fileID: 22400000}
|
||||
m_Father: {fileID: 22400010}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 6.5}
|
||||
m_SizeDelta: {x: -167, y: 69}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &22200002
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &11400002
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
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, g: 0, b: 0, a: 0.7607843}
|
||||
m_RaycastTarget: 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 &100004
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400004}
|
||||
- component: {fileID: 22200004}
|
||||
- component: {fileID: 11400004}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400004
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100004}
|
||||
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: 22400014}
|
||||
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 &22200004
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100004}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &11400004
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100004}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.196, g: 0.196, b: 0.196, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Choice
|
||||
--- !u!1 &100006
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400006}
|
||||
- component: {fileID: 22200006}
|
||||
- component: {fileID: 11400006}
|
||||
m_Layer: 5
|
||||
m_Name: Name
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400006
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100006}
|
||||
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: 22400002}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 14.7}
|
||||
m_SizeDelta: {x: 267, y: 29.4}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &22200006
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100006}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &11400006
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100006}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.8993915, g: 1, b: 0.5441177, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 18
|
||||
m_FontStyle: 1
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: Actor Name
|
||||
--- !u!1 &100008
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400008}
|
||||
- component: {fileID: 22200008}
|
||||
- component: {fileID: 11400008}
|
||||
m_Layer: 5
|
||||
m_Name: Speech
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400008
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100008}
|
||||
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: 22400002}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 74.8}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &22200008
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100008}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &11400008
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100008}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 16
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 'subtitles
|
||||
|
||||
subtitles'
|
||||
--- !u!1 &100010
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400010}
|
||||
- component: {fileID: 22300000}
|
||||
- component: {fileID: 11400012}
|
||||
- component: {fileID: 11400010}
|
||||
m_Layer: 5
|
||||
m_Name: '@DialogueUGUI'
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400010
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100010}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 22400002}
|
||||
- {fileID: 22400012}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!223 &22300000
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100010}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &11400012
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100010}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &11400010
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100010}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8a2b17e84c4df7d4c890f25c7c265c11, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skipOnInput: 0
|
||||
waitForInput: 1
|
||||
subtitlesGroup: {fileID: 22400002}
|
||||
actorSpeech: {fileID: 11400008}
|
||||
actorName: {fileID: 11400006}
|
||||
actorPortrait: {fileID: 11400000}
|
||||
waitInputIndicator: {fileID: 224000012677293416}
|
||||
subtitleDelays:
|
||||
characterDelay: 0.05
|
||||
sentenceDelay: 0.5
|
||||
commaDelay: 0.1
|
||||
finalDelay: 1.2
|
||||
typingSounds:
|
||||
- {fileID: 8300000, guid: a0d9ccf1ea0e87d4794965b3fa230c65, type: 3}
|
||||
- {fileID: 8300000, guid: 5e5452015663bd141a0af3ff478c7272, type: 3}
|
||||
- {fileID: 8300000, guid: 5d3613a99f5e0ac43a2acdfd87d61a4e, type: 3}
|
||||
optionsGroup: {fileID: 22400012}
|
||||
optionButton: {fileID: 11400016}
|
||||
--- !u!1 &100012
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400012}
|
||||
- component: {fileID: 22200012}
|
||||
- component: {fileID: 11400014}
|
||||
m_Layer: 5
|
||||
m_Name: DialogueOptionsGroup
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400012
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100012}
|
||||
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: 22400014}
|
||||
m_Father: {fileID: 22400010}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 6.5}
|
||||
m_SizeDelta: {x: -167, y: 47}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &22200012
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100012}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &11400014
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100012}
|
||||
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, g: 0, b: 0, a: 0.7607843}
|
||||
m_RaycastTarget: 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 &100014
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400014}
|
||||
- component: {fileID: 22200014}
|
||||
- component: {fileID: 11400018}
|
||||
- component: {fileID: 11400016}
|
||||
m_Layer: 5
|
||||
m_Name: Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400014
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100014}
|
||||
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: 22400004}
|
||||
m_Father: {fileID: 22400012}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0.000015258789, y: -23.35}
|
||||
m_SizeDelta: {x: -51.8, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &22200014
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100014}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &11400018
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100014}
|
||||
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.588}
|
||||
m_RaycastTarget: 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 &11400016
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100014}
|
||||
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: 0.5019608, g: 0.5019608, b: 0.5019608, a: 0.5019608}
|
||||
m_HighlightedColor: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 0.69803923}
|
||||
m_PressedColor: {r: 0.34509805, g: 0.34509805, b: 0.34509805, a: 0.69803923}
|
||||
m_SelectedColor: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 0.69803923}
|
||||
m_DisabledColor: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 0.5019608}
|
||||
m_ColorMultiplier: 2
|
||||
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: Highlighted
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 11400018}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &172602
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22451302}
|
||||
- component: {fileID: 22281560}
|
||||
- component: {fileID: 11429452}
|
||||
m_Layer: 5
|
||||
m_Name: NameBG
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22451302
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 172602}
|
||||
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: 22400002}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 16.763}
|
||||
m_SizeDelta: {x: 0, y: 34}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &22281560
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 172602}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &11429452
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 172602}
|
||||
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.16176468, g: 0.16176468, b: 0.16176468, a: 1}
|
||||
m_RaycastTarget: 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 &1000010693599660
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 224000012677293416}
|
||||
- component: {fileID: 222000010095227342}
|
||||
- component: {fileID: 114000011374680962}
|
||||
m_Layer: 5
|
||||
m_Name: WaitInput
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &224000012677293416
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1000010693599660}
|
||||
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: 22400002}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -19.549988, y: 15}
|
||||
m_SizeDelta: {x: 39.1, y: 29.9}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &222000010095227342
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1000010693599660}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &114000011374680962
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1000010693599660}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: '[...]'
|
||||
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea4f45f1433c2404197edc445210b679
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 14914
|
||||
packageName: NodeCanvas
|
||||
packageVersion: 3.3.1
|
||||
assetPath: Assets/ParadoxNotion/NodeCanvas/Modules/DialogueTrees/DialogueGUI/@DialogueUGUI.prefab
|
||||
uploadId: 704937
|
||||
@@ -0,0 +1,295 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace NodeCanvas.DialogueTrees.UI.Examples
|
||||
{
|
||||
|
||||
public class DialogueUGUI : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
|
||||
[System.Serializable]
|
||||
public class SubtitleDelays
|
||||
{
|
||||
public float characterDelay = 0.05f;
|
||||
public float sentenceDelay = 0.5f;
|
||||
public float commaDelay = 0.1f;
|
||||
public float finalDelay = 1.2f;
|
||||
}
|
||||
|
||||
//Options...
|
||||
[Header("Input Options")]
|
||||
public bool skipOnInput;
|
||||
public bool waitForInput;
|
||||
|
||||
//Group...
|
||||
[Header("Subtitles")]
|
||||
public RectTransform subtitlesGroup;
|
||||
public Text actorSpeech;
|
||||
public Text actorName;
|
||||
public Image actorPortrait;
|
||||
public RectTransform waitInputIndicator;
|
||||
public SubtitleDelays subtitleDelays = new SubtitleDelays();
|
||||
public List<AudioClip> typingSounds;
|
||||
private AudioSource playSource;
|
||||
|
||||
//Group...
|
||||
[Header("Multiple Choice")]
|
||||
public RectTransform optionsGroup;
|
||||
public Button optionButton;
|
||||
private Dictionary<Button, int> cachedButtons;
|
||||
private Vector2 originalSubsPosition;
|
||||
private bool isWaitingChoice;
|
||||
|
||||
private AudioSource _localSource;
|
||||
private AudioSource localSource {
|
||||
get { return _localSource != null ? _localSource : _localSource = gameObject.AddComponent<AudioSource>(); }
|
||||
}
|
||||
|
||||
|
||||
private bool anyKeyDown;
|
||||
public void OnPointerClick(PointerEventData eventData) => anyKeyDown = true;
|
||||
void LateUpdate() => anyKeyDown = false;
|
||||
|
||||
|
||||
void Awake() { Subscribe(); Hide(); }
|
||||
void OnEnable() { UnSubscribe(); Subscribe(); }
|
||||
void OnDisable() { UnSubscribe(); }
|
||||
|
||||
void Subscribe() {
|
||||
DialogueTree.OnDialogueStarted += OnDialogueStarted;
|
||||
DialogueTree.OnDialoguePaused += OnDialoguePaused;
|
||||
DialogueTree.OnDialogueFinished += OnDialogueFinished;
|
||||
DialogueTree.OnSubtitlesRequest += OnSubtitlesRequest;
|
||||
DialogueTree.OnMultipleChoiceRequest += OnMultipleChoiceRequest;
|
||||
}
|
||||
|
||||
void UnSubscribe() {
|
||||
DialogueTree.OnDialogueStarted -= OnDialogueStarted;
|
||||
DialogueTree.OnDialoguePaused -= OnDialoguePaused;
|
||||
DialogueTree.OnDialogueFinished -= OnDialogueFinished;
|
||||
DialogueTree.OnSubtitlesRequest -= OnSubtitlesRequest;
|
||||
DialogueTree.OnMultipleChoiceRequest -= OnMultipleChoiceRequest;
|
||||
}
|
||||
|
||||
void Hide() {
|
||||
subtitlesGroup.gameObject.SetActive(false);
|
||||
optionsGroup.gameObject.SetActive(false);
|
||||
optionButton.gameObject.SetActive(false);
|
||||
waitInputIndicator.gameObject.SetActive(false);
|
||||
originalSubsPosition = subtitlesGroup.transform.position;
|
||||
}
|
||||
|
||||
void OnDialogueStarted(DialogueTree dlg) {
|
||||
//nothing special...
|
||||
}
|
||||
|
||||
void OnDialoguePaused(DialogueTree dlg) {
|
||||
subtitlesGroup.gameObject.SetActive(false);
|
||||
optionsGroup.gameObject.SetActive(false);
|
||||
StopAllCoroutines();
|
||||
if ( playSource != null ) playSource.Stop();
|
||||
}
|
||||
|
||||
void OnDialogueFinished(DialogueTree dlg) {
|
||||
subtitlesGroup.gameObject.SetActive(false);
|
||||
optionsGroup.gameObject.SetActive(false);
|
||||
if ( cachedButtons != null ) {
|
||||
foreach ( var tempBtn in cachedButtons.Keys ) {
|
||||
if ( tempBtn != null ) {
|
||||
Destroy(tempBtn.gameObject);
|
||||
}
|
||||
}
|
||||
cachedButtons = null;
|
||||
}
|
||||
StopAllCoroutines();
|
||||
if ( playSource != null ) playSource.Stop();
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
|
||||
void OnSubtitlesRequest(SubtitlesRequestInfo info) {
|
||||
StartCoroutine(Internal_OnSubtitlesRequestInfo(info));
|
||||
}
|
||||
|
||||
IEnumerator Internal_OnSubtitlesRequestInfo(SubtitlesRequestInfo info) {
|
||||
|
||||
var text = info.statement.text;
|
||||
var audio = info.statement.audio;
|
||||
var actor = info.actor;
|
||||
|
||||
subtitlesGroup.gameObject.SetActive(true);
|
||||
subtitlesGroup.position = originalSubsPosition;
|
||||
actorSpeech.text = "";
|
||||
|
||||
actorName.text = actor.name;
|
||||
actorSpeech.color = actor.dialogueColor;
|
||||
|
||||
actorPortrait.gameObject.SetActive(actor.portraitSprite != null);
|
||||
actorPortrait.sprite = actor.portraitSprite;
|
||||
|
||||
if ( audio != null ) {
|
||||
var actorSource = actor.transform != null ? actor.transform.GetComponent<AudioSource>() : null;
|
||||
playSource = actorSource != null ? actorSource : localSource;
|
||||
playSource.clip = audio;
|
||||
playSource.Play();
|
||||
actorSpeech.text = text;
|
||||
var timer = 0f;
|
||||
while ( timer < audio.length ) {
|
||||
if ( skipOnInput && anyKeyDown ) {
|
||||
playSource.Stop();
|
||||
break;
|
||||
}
|
||||
timer += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
if ( audio == null ) {
|
||||
var tempText = "";
|
||||
var inputDown = false;
|
||||
if ( skipOnInput ) {
|
||||
StartCoroutine(CheckInput(() => { inputDown = true; }));
|
||||
}
|
||||
|
||||
for ( int i = 0; i < text.Length; i++ ) {
|
||||
|
||||
if ( skipOnInput && inputDown ) {
|
||||
actorSpeech.text = text;
|
||||
yield return null;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( subtitlesGroup.gameObject.activeSelf == false ) {
|
||||
yield break;
|
||||
}
|
||||
|
||||
char c = text[i];
|
||||
tempText += c;
|
||||
yield return StartCoroutine(DelayPrint(subtitleDelays.characterDelay));
|
||||
PlayTypeSound();
|
||||
if ( c == '.' || c == '!' || c == '?' ) {
|
||||
yield return StartCoroutine(DelayPrint(subtitleDelays.sentenceDelay));
|
||||
PlayTypeSound();
|
||||
}
|
||||
if ( c == ',' ) {
|
||||
yield return StartCoroutine(DelayPrint(subtitleDelays.commaDelay));
|
||||
PlayTypeSound();
|
||||
}
|
||||
|
||||
actorSpeech.text = tempText;
|
||||
}
|
||||
|
||||
if ( !waitForInput ) {
|
||||
yield return StartCoroutine(DelayPrint(subtitleDelays.finalDelay));
|
||||
}
|
||||
}
|
||||
|
||||
if ( waitForInput ) {
|
||||
waitInputIndicator.gameObject.SetActive(true);
|
||||
while ( !anyKeyDown ) {
|
||||
yield return null;
|
||||
}
|
||||
waitInputIndicator.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
yield return null;
|
||||
subtitlesGroup.gameObject.SetActive(false);
|
||||
info.Continue();
|
||||
}
|
||||
|
||||
void PlayTypeSound() {
|
||||
if ( typingSounds.Count > 0 ) {
|
||||
var sound = typingSounds[Random.Range(0, typingSounds.Count)];
|
||||
if ( sound != null ) {
|
||||
localSource.PlayOneShot(sound, Random.Range(0.6f, 1f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator CheckInput(System.Action Do) {
|
||||
while ( !anyKeyDown ) {
|
||||
yield return null;
|
||||
}
|
||||
Do();
|
||||
}
|
||||
|
||||
IEnumerator DelayPrint(float time) {
|
||||
var timer = 0f;
|
||||
while ( timer < time ) {
|
||||
timer += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
|
||||
void OnMultipleChoiceRequest(MultipleChoiceRequestInfo info) {
|
||||
|
||||
optionsGroup.gameObject.SetActive(true);
|
||||
var buttonHeight = optionButton.GetComponent<RectTransform>().rect.height;
|
||||
optionsGroup.sizeDelta = new Vector2(optionsGroup.sizeDelta.x, ( info.options.Values.Count * buttonHeight ) + 20);
|
||||
|
||||
cachedButtons = new Dictionary<Button, int>();
|
||||
int i = 0;
|
||||
|
||||
foreach ( KeyValuePair<IStatement, int> pair in info.options ) {
|
||||
var btn = (Button)Instantiate(optionButton);
|
||||
btn.gameObject.SetActive(true);
|
||||
btn.transform.SetParent(optionsGroup.transform, false);
|
||||
btn.transform.localPosition = (Vector3)optionButton.transform.localPosition - new Vector3(0, buttonHeight * i, 0);
|
||||
btn.GetComponentInChildren<Text>().text = pair.Key.text;
|
||||
cachedButtons.Add(btn, pair.Value);
|
||||
btn.onClick.AddListener(() => { Finalize(info, cachedButtons[btn]); });
|
||||
i++;
|
||||
}
|
||||
|
||||
if ( info.showLastStatement ) {
|
||||
subtitlesGroup.gameObject.SetActive(true);
|
||||
var newY = optionsGroup.position.y + optionsGroup.sizeDelta.y + 1;
|
||||
subtitlesGroup.position = new Vector3(subtitlesGroup.position.x, newY, subtitlesGroup.position.z);
|
||||
}
|
||||
|
||||
if ( info.availableTime > 0 ) {
|
||||
StartCoroutine(CountDown(info));
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator CountDown(MultipleChoiceRequestInfo info) {
|
||||
isWaitingChoice = true;
|
||||
var timer = 0f;
|
||||
while ( timer < info.availableTime ) {
|
||||
if ( isWaitingChoice == false ) {
|
||||
yield break;
|
||||
}
|
||||
timer += Time.deltaTime;
|
||||
SetMassAlpha(optionsGroup, Mathf.Lerp(1, 0, timer / info.availableTime));
|
||||
yield return null;
|
||||
}
|
||||
|
||||
if ( isWaitingChoice ) {
|
||||
Finalize(info, info.options.Values.Last());
|
||||
}
|
||||
}
|
||||
|
||||
void Finalize(MultipleChoiceRequestInfo info, int index) {
|
||||
isWaitingChoice = false;
|
||||
SetMassAlpha(optionsGroup, 1f);
|
||||
optionsGroup.gameObject.SetActive(false);
|
||||
subtitlesGroup.gameObject.SetActive(false);
|
||||
foreach ( var tempBtn in cachedButtons.Keys ) {
|
||||
Destroy(tempBtn.gameObject);
|
||||
}
|
||||
info.SelectOption(index);
|
||||
}
|
||||
|
||||
void SetMassAlpha(RectTransform root, float alpha) {
|
||||
foreach ( var graphic in root.GetComponentsInChildren<CanvasRenderer>() ) {
|
||||
graphic.SetAlpha(alpha);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a2b17e84c4df7d4c890f25c7c265c11
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: -50
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 14914
|
||||
packageName: NodeCanvas
|
||||
packageVersion: 3.3.1
|
||||
assetPath: Assets/ParadoxNotion/NodeCanvas/Modules/DialogueTrees/DialogueGUI/DialogueUGUI.cs
|
||||
uploadId: 704937
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 308fd16ad36adda41800985165b4ebf1
|
||||
folderAsset: yes
|
||||
timeCreated: 1485179025
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0d9ccf1ea0e87d4794965b3fa230c65
|
||||
timeCreated: 1485179020
|
||||
licenseType: Store
|
||||
AudioImporter:
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 14914
|
||||
packageName: NodeCanvas
|
||||
packageVersion: 3.3.1
|
||||
assetPath: Assets/ParadoxNotion/NodeCanvas/Modules/DialogueTrees/DialogueGUI/Sounds/Keyboard-1.wav
|
||||
uploadId: 704937
|
||||
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e5452015663bd141a0af3ff478c7272
|
||||
timeCreated: 1485179020
|
||||
licenseType: Store
|
||||
AudioImporter:
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 14914
|
||||
packageName: NodeCanvas
|
||||
packageVersion: 3.3.1
|
||||
assetPath: Assets/ParadoxNotion/NodeCanvas/Modules/DialogueTrees/DialogueGUI/Sounds/Keyboard-2.wav
|
||||
uploadId: 704937
|
||||
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d3613a99f5e0ac43a2acdfd87d61a4e
|
||||
timeCreated: 1485179019
|
||||
licenseType: Store
|
||||
AudioImporter:
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 14914
|
||||
packageName: NodeCanvas
|
||||
packageVersion: 3.3.1
|
||||
assetPath: Assets/ParadoxNotion/NodeCanvas/Modules/DialogueTrees/DialogueGUI/Sounds/Keyboard-3.wav
|
||||
uploadId: 704937
|
||||
Reference in New Issue
Block a user