diff --git a/Assets/Resources/Prefabs/UI/Bubble Left Bottom.prefab b/Assets/Resources/Prefabs/UI/Bubble Left Bottom.prefab new file mode 100644 index 000000000..0752e7150 --- /dev/null +++ b/Assets/Resources/Prefabs/UI/Bubble Left Bottom.prefab @@ -0,0 +1,347 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4266339626480639172 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4336017121026145511} + - component: {fileID: 4416548178251148154} + - component: {fileID: 5476282360557458710} + - component: {fileID: 4483543465212823168} + - component: {fileID: 7894693401603114512} + - component: {fileID: 8749375209308270703} + m_Layer: 0 + m_Name: Bubble Left Bottom + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4336017121026145511 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266339626480639172} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5946440465696624735} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0.000038146973, y: -0.0000076293945} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 1, y: 0} +--- !u!222 &4416548178251148154 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266339626480639172} + m_CullTransparentMesh: 1 +--- !u!114 &5476282360557458710 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266339626480639172} + 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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 79e04f9b22fb71d4c8009e561c6e2849, type: 3} + 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 &4483543465212823168 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266339626480639172} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 30 + m_Right: 45 + m_Top: 30 + m_Bottom: 50 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &7894693401603114512 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266339626480639172} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 2 + m_VerticalFit: 2 +--- !u!114 &8749375209308270703 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266339626480639172} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d97efe2567012354e9482f0774e66b76, type: 3} + m_Name: + m_EditorClassIdentifier: + role: 2 + maxCharNum: 14 +--- !u!1 &6816142221905378472 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5946440465696624735} + - component: {fileID: 8342286320321982617} + - component: {fileID: 7169781614477738915} + - component: {fileID: 7510624018743839707} + - component: {fileID: 2267608901098016527} + m_Layer: 0 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5946440465696624735 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6816142221905378472} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4336017121026145511} + 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: 1.0000002, y: 0.5} +--- !u!222 &8342286320321982617 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6816142221905378472} + m_CullTransparentMesh: 1 +--- !u!114 &7169781614477738915 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6816142221905378472} + 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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\u793A\u4F8B\u6587\u5B57" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: f242fb3dde1933640859f1c54591c9c8, type: 2} + m_sharedMaterial: {fileID: -6659093157667844055, guid: f242fb3dde1933640859f1c54591c9c8, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, 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: 30 + m_fontSizeBase: 30 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 5 + m_wordSpacing: 0 + m_lineSpacing: 10 + 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: 0 + 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 &7510624018743839707 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6816142221905378472} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8ace8ced0e81c847968cdca0aeda757, type: 3} + m_Name: + m_EditorClassIdentifier: + typewriterStartsAutomatically: 0 + animationLoop: 0 + timeScale: 0 + _text: "\u793A\u4F8B\u6587\u5B57\u793A\u4F8B\u6587\u5B57\u793A\u4F8B\u6587\u5B57\n\u793A\u4F8B\u6587\u5B57\u793A\u4F8B\u6587\u5B57\u793A\u4F8B\u6587\u5B57" + useDynamicScaling: 1 + referenceFontSize: 10 + isResettingTimeOnNewText: 1 + useDefaultDatabases: 1 + databaseBehaviors: {fileID: 11400000, guid: ab7e07cba198f4345b19d351e6a3034f, type: 2} + databaseAppearances: {fileID: 11400000, guid: 71ecf6147756deb4ca20570628f94f96, type: 2} + useDefaultStyleSheet: 1 + styleSheet: {fileID: 0} + databaseActions: {fileID: 11400000, guid: de78232a60d74f6459e57e5606304209, type: 2} + defaultAppearancesTags: + - fade + defaultDisappearancesTags: + - fade + defaultBehaviorsTags: [] + defaultTagsMode: 0 +--- !u!114 &2267608901098016527 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6816142221905378472} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 57a6945b90dcd0c4b81619c0d8b5c283, type: 3} + m_Name: + m_EditorClassIdentifier: + useTypeWriter: 1 + startTypewriterMode: 3 + hideAppearancesOnSkip: 0 + hideDisappearancesOnSkip: 0 + triggerEventsOnSkip: 0 + resetTypingSpeedAtStartup: 1 + disappearanceOrientation: 0 + triggerShowedAfterEffectsEnd: 0 + triggerDisappearedAfterEffectsEnd: 0 + onTextShowed: + m_PersistentCalls: + m_Calls: [] + onTypewriterStart: + m_PersistentCalls: + m_Calls: [] + onTextDisappeared: + m_PersistentCalls: + m_Calls: [] + onCharacterVisible: + m_PersistentCalls: + m_Calls: [] + onMessage: + m_PersistentCalls: + m_Calls: [] + waitForNormalChars: 0.03 + waitLong: 0.6 + waitMiddle: 0.2 + avoidMultiplePunctuationWait: 0 + waitForNewLines: 1 + waitForLastCharacter: 1 + useTypewriterWaitForDisappearances: 1 + disappearanceWaitTime: 0.015 + disappearanceSpeedMultiplier: 1 diff --git a/Assets/Resources/Prefabs/UI/Bubble Left Bottom.prefab.meta b/Assets/Resources/Prefabs/UI/Bubble Left Bottom.prefab.meta new file mode 100644 index 000000000..c98989d79 --- /dev/null +++ b/Assets/Resources/Prefabs/UI/Bubble Left Bottom.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2eb6486cf0eb58e4fa958cc9ef6aeab3 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Prefabs/UI/Bubble Right Bottom.prefab b/Assets/Resources/Prefabs/UI/Bubble Right Bottom.prefab new file mode 100644 index 000000000..0d2bb5d99 --- /dev/null +++ b/Assets/Resources/Prefabs/UI/Bubble Right Bottom.prefab @@ -0,0 +1,347 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &919715082008267532 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3600946623263556837} + - component: {fileID: 1823907582874377734} + - component: {fileID: 346924832956287327} + - component: {fileID: 5703038747030166026} + - component: {fileID: 4712901011866528258} + m_Layer: 0 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3600946623263556837 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919715082008267532} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8301362509965583806} + 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: 1.0000002, y: 0.5} +--- !u!222 &1823907582874377734 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919715082008267532} + m_CullTransparentMesh: 1 +--- !u!114 &346924832956287327 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919715082008267532} + 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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\u793A\u4F8B\u6587\u5B57" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: f242fb3dde1933640859f1c54591c9c8, type: 2} + m_sharedMaterial: {fileID: -6659093157667844055, guid: f242fb3dde1933640859f1c54591c9c8, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, 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: 30 + m_fontSizeBase: 30 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 5 + m_wordSpacing: 0 + m_lineSpacing: 10 + 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: 0 + 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 &5703038747030166026 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919715082008267532} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8ace8ced0e81c847968cdca0aeda757, type: 3} + m_Name: + m_EditorClassIdentifier: + typewriterStartsAutomatically: 0 + animationLoop: 0 + timeScale: 0 + _text: "\u793A\u4F8B\u6587\u5B57\u793A\u4F8B\u6587\u5B57\u793A\u4F8B\u6587\u5B57\n\u793A\u4F8B\u6587\u5B57\u793A\u4F8B\u6587\u5B57\u793A\u4F8B\u6587\u5B57" + useDynamicScaling: 1 + referenceFontSize: 10 + isResettingTimeOnNewText: 1 + useDefaultDatabases: 1 + databaseBehaviors: {fileID: 11400000, guid: ab7e07cba198f4345b19d351e6a3034f, type: 2} + databaseAppearances: {fileID: 11400000, guid: 71ecf6147756deb4ca20570628f94f96, type: 2} + useDefaultStyleSheet: 1 + styleSheet: {fileID: 0} + databaseActions: {fileID: 11400000, guid: de78232a60d74f6459e57e5606304209, type: 2} + defaultAppearancesTags: + - fade + defaultDisappearancesTags: + - fade + defaultBehaviorsTags: [] + defaultTagsMode: 0 +--- !u!114 &4712901011866528258 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919715082008267532} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 57a6945b90dcd0c4b81619c0d8b5c283, type: 3} + m_Name: + m_EditorClassIdentifier: + useTypeWriter: 1 + startTypewriterMode: 3 + hideAppearancesOnSkip: 0 + hideDisappearancesOnSkip: 0 + triggerEventsOnSkip: 0 + resetTypingSpeedAtStartup: 1 + disappearanceOrientation: 0 + triggerShowedAfterEffectsEnd: 0 + triggerDisappearedAfterEffectsEnd: 0 + onTextShowed: + m_PersistentCalls: + m_Calls: [] + onTypewriterStart: + m_PersistentCalls: + m_Calls: [] + onTextDisappeared: + m_PersistentCalls: + m_Calls: [] + onCharacterVisible: + m_PersistentCalls: + m_Calls: [] + onMessage: + m_PersistentCalls: + m_Calls: [] + waitForNormalChars: 0.03 + waitLong: 0.6 + waitMiddle: 0.2 + avoidMultiplePunctuationWait: 0 + waitForNewLines: 1 + waitForLastCharacter: 1 + useTypewriterWaitForDisappearances: 1 + disappearanceWaitTime: 0.015 + disappearanceSpeedMultiplier: 1 +--- !u!1 &3878580226911155808 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8301362509965583806} + - component: {fileID: 5197848310989299629} + - component: {fileID: 1003674434464858882} + - component: {fileID: 4875506132961310160} + - component: {fileID: 8128744769141486596} + - component: {fileID: 3191636764436914976} + m_Layer: 0 + m_Name: Bubble Right Bottom + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8301362509965583806 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3878580226911155808} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3600946623263556837} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0.000038146973, y: -0.0000076293945} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!222 &5197848310989299629 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3878580226911155808} + m_CullTransparentMesh: 1 +--- !u!114 &1003674434464858882 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3878580226911155808} + 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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 10d4856e2d2a65f449e90197f502ca30, type: 3} + 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 &4875506132961310160 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3878580226911155808} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 45 + m_Right: 30 + m_Top: 30 + m_Bottom: 50 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &8128744769141486596 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3878580226911155808} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 2 + m_VerticalFit: 2 +--- !u!114 &3191636764436914976 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3878580226911155808} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d97efe2567012354e9482f0774e66b76, type: 3} + m_Name: + m_EditorClassIdentifier: + role: 1 + maxCharNum: 14 diff --git a/Assets/Resources/Prefabs/UI/Bubble Right Bottom.prefab.meta b/Assets/Resources/Prefabs/UI/Bubble Right Bottom.prefab.meta new file mode 100644 index 000000000..9d09e27fd --- /dev/null +++ b/Assets/Resources/Prefabs/UI/Bubble Right Bottom.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 87dedca8d12d32444afa03c9ddbd7753 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/ClinicOut.unity b/Assets/Scenes/ClinicOut.unity index 81c304e4f..374b4f759 100644 --- a/Assets/Scenes/ClinicOut.unity +++ b/Assets/Scenes/ClinicOut.unity @@ -10687,7 +10687,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &519420030 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Framework/Config/Character.cs b/Assets/Scripts/Framework/Config/Character.cs index 4ad47925c..ce1b9b7d8 100644 --- a/Assets/Scripts/Framework/Config/Character.cs +++ b/Assets/Scripts/Framework/Config/Character.cs @@ -7,6 +7,7 @@ namespace AibisDream.Kit public string NameColor { get; set; } public string HeadPicPath { get; set; } public string VoicePath { get; set; } + public int BubbleIdx { get; set; } public ActorRole Role { get; set; } public DialogViewType DialogViewType { get; set; } @@ -22,6 +23,7 @@ namespace AibisDream.Kit vo.nameColor = NameColor; vo.headPicPath = HeadPicPath; vo.voicePath = VoicePath; + vo.bubbleIdx = BubbleIdx; vo.role = Role; vo.dialogViewType = DialogViewType; return vo; @@ -35,6 +37,7 @@ namespace AibisDream.Kit public string nameColor; public string headPicPath; public string voicePath; + public int bubbleIdx; public ActorRole role; public DialogViewType dialogViewType; diff --git a/Assets/Scripts/UI/DialogUI/TextBubble.cs b/Assets/Scripts/UI/DialogUI/TextBubble.cs index a5c365dac..59664134e 100644 --- a/Assets/Scripts/UI/DialogUI/TextBubble.cs +++ b/Assets/Scripts/UI/DialogUI/TextBubble.cs @@ -13,6 +13,7 @@ namespace AibisDream.Framework #region 参数 [SerializeField] public ActorRole role; + [SerializeField] public int idx; [SerializeField] private int maxCharNum; #endregion diff --git a/Assets/Scripts/UI/DialogUI/TextBubbleGroup.cs b/Assets/Scripts/UI/DialogUI/TextBubbleGroup.cs index bb5a026fb..1809642cf 100644 --- a/Assets/Scripts/UI/DialogUI/TextBubbleGroup.cs +++ b/Assets/Scripts/UI/DialogUI/TextBubbleGroup.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using AibisDream.Framework; using AibisDream.Kit; using AibisDream.Utility; @@ -9,14 +10,15 @@ namespace AibisDream { public class TextBubbleGroup : MonoBehaviour, IDialogView { - private readonly Dictionary _bubbleDict = new(); + private Dictionary _bubbleDict; #region 一些索引 private bool _skipLineDelay; private Action _nextStep; private bool _isAutoSkip; - private ActorRole _curRole; + + private TextBubble _curBubble; [Header("跳过阻塞延迟时间/ms")] [SerializeField] private int delayTime = 300; @@ -46,10 +48,8 @@ namespace AibisDream private void InitBubbles() { - foreach (var bubble in GetComponentsInChildren(true)) - { - _bubbleDict[bubble.role] = bubble; - } + _bubbleDict = GetComponentsInChildren().GroupBy(item => item.role) + .ToDictionary(group => group.Key, group => group.ToArray()); } #endregion @@ -57,18 +57,15 @@ namespace AibisDream public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false) { gameObject.SetActive(true); - - if (_curRole != character.role) - { - _bubbleDict[_curRole].Hide(); - } - - if (_bubbleDict.TryGetValue(character.role, out var bubble)) + + if (TryGetBubble(character.role, character.bubbleIdx ,out var bubble)) { bubble.ShowLine(dialogLine, OnTextShowed); // 设置延时 _skipLineDelay = true; _ = CommonUtil.Delay(delayTime, () => { _skipLineDelay = false; }); + // 将非选定的Bubble隐藏 + HideDialog(bubble); } else { @@ -79,7 +76,7 @@ namespace AibisDream // 保留信息 _nextStep = nextStep; _isAutoSkip = isAutoSkip; - _curRole = character.role; + _curBubble = bubble; } public void ShowOptions(DialogOption[] dialogueOptions) @@ -89,9 +86,20 @@ namespace AibisDream public void HideDialog() { - foreach (var bubble in _bubbleDict.Values) + foreach (var textBubble in _bubbleDict.Values.SelectMany(inner => inner)) { - bubble.Hide(); + textBubble.Hide(); + } + } + + public void HideDialog(TextBubble activeBubble) + { + foreach (var textBubble in _bubbleDict.Values.SelectMany(inner => inner)) + { + if (activeBubble != textBubble) + { + textBubble.Hide(); + } } } @@ -102,9 +110,9 @@ namespace AibisDream return true; } - if (_bubbleDict.TryGetValue(_curRole, out var bubble) && bubble.IsShowingText) + if (_curBubble.IsShowingText) { - bubble.SkipLine(); + _curBubble.SkipLine(); return true; } @@ -119,9 +127,9 @@ namespace AibisDream var next = _nextStep; _nextStep = null; - _bubbleDict[_curRole].Hide(); + _curBubble?.Hide(); - next.Invoke(); + next?.Invoke(); } private void OnTextShowed() @@ -136,5 +144,17 @@ namespace AibisDream _isAutoSkip = false; } } + + private bool TryGetBubble(ActorRole role, int idx, out TextBubble textBubble) + { + if (_bubbleDict.TryGetValue(role, out var bubbles)) + { + textBubble = bubbles.FirstOrDefault(item => item.idx == idx); + return textBubble != null; + } + + textBubble = null; + return false; + } } } \ No newline at end of file diff --git a/Assets/Scripts/Utility/YarnUtil.cs b/Assets/Scripts/Utility/YarnUtil.cs index b74245e53..4a6a3ea13 100644 --- a/Assets/Scripts/Utility/YarnUtil.cs +++ b/Assets/Scripts/Utility/YarnUtil.cs @@ -85,6 +85,9 @@ namespace AibisDream.Utility case "headPicPath": vo.headPicPath = pair.Value.StringValue; break; + case "bubbleIdx": + vo.bubbleIdx = pair.Value.IntegerValue; + break; case "voicePath": vo.voicePath = pair.Value.StringValue; break;