diff --git a/Assets/Resources/Art/UI/日常对话气泡.png b/Assets/Resources/Art/UI/日常对话气泡.png new file mode 100644 index 000000000..d5d52b5e0 --- /dev/null +++ b/Assets/Resources/Art/UI/日常对话气泡.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e028d97a3cc8c1a61a702b1b10b0cb1570dc325bceba2cf4362b9d9813aa60ee +size 19580 diff --git a/Assets/Resources/Art/UI/日常对话气泡.png.meta b/Assets/Resources/Art/UI/日常对话气泡.png.meta new file mode 100644 index 000000000..b96029c00 --- /dev/null +++ b/Assets/Resources/Art/UI/日常对话气泡.png.meta @@ -0,0 +1,250 @@ +fileFormatVersion: 2 +guid: c8409501d0e34af47b749d1d13131442 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_0" + rect: + serializedVersion: 2 + x: 0 + y: 749 + width: 582 + height: 331 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 255, y: 135, z: 38, w: 37} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 48e3b488053e63146a57b4fd428180c1 + internalID: -1260256082 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_1" + rect: + serializedVersion: 2 + x: 655 + y: 881 + width: 32 + height: 19 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 1b2e8d5be01cb5246a0ba623af815324 + internalID: -1371161529 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_2" + rect: + serializedVersion: 2 + x: 827 + y: 846 + width: 680 + height: 234 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 43, y: 40, z: 143, w: 87} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 6185f902935b46d4ea90a0d46e2d241f + internalID: -727467337 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_3" + rect: + serializedVersion: 2 + x: 0 + y: 620 + width: 826 + height: 66 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 75, y: 0, z: 36, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 44b07ce6b5bbe094aa8146eb0ec97263 + internalID: -1163943723 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_4" + rect: + serializedVersion: 2 + x: 0 + y: 306 + width: 583 + height: 234 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 39, y: 45, z: 41, w: 38} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 1b0c37f0c15cd304aaee524edaf946ef + internalID: -683341770 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: + "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_0": -1260256082 + "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_1": -1371161529 + "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_2": -727467337 + "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_3": -1163943723 + "\u65E5\u5E38\u5BF9\u8BDD\u6C14\u6CE1_4": -683341770 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Prefabs/UI/Box.prefab b/Assets/Resources/Prefabs/UI/Box.prefab index 146d393e0..ee7d36d75 100644 --- a/Assets/Resources/Prefabs/UI/Box.prefab +++ b/Assets/Resources/Prefabs/UI/Box.prefab @@ -137,7 +137,7 @@ RectTransform: m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: -142.28, y: 67.7} - m_SizeDelta: {x: 50, y: 50} + m_SizeDelta: {x: 32, y: 19} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5639890485129627689 CanvasRenderer: @@ -167,7 +167,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: afdc34bd5087fee4bbe681c5ef818e20, type: 3} + m_Sprite: {fileID: -1371161529, guid: c8409501d0e34af47b749d1d13131442, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -247,8 +247,8 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 0ea722d84b6dfe044ac7299862920024, type: 3} - m_Type: 0 + m_Sprite: {fileID: -683341770, guid: c8409501d0e34af47b749d1d13131442, type: 3} + m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 diff --git a/Assets/Resources/Prefabs/UI/Bubble.prefab b/Assets/Resources/Prefabs/UI/Bubble.prefab index 1489029ea..feaf94b31 100644 --- a/Assets/Resources/Prefabs/UI/Bubble.prefab +++ b/Assets/Resources/Prefabs/UI/Bubble.prefab @@ -32,10 +32,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 2114528386511579871} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -71.1, y: 104.9} - m_SizeDelta: {x: 36, y: 36} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 436.8, y: -243.8} + m_SizeDelta: {x: 32, y: 19} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6493937739013348050 CanvasRenderer: @@ -65,7 +65,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: afdc34bd5087fee4bbe681c5ef818e20, type: 3} + m_Sprite: {fileID: -1371161529, guid: c8409501d0e34af47b749d1d13131442, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -245,8 +245,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 236, y: -148} - m_SizeDelta: {x: 329.9832, y: 129.8956} + m_AnchoredPosition: {x: 254, y: -148} + m_SizeDelta: {x: 365.98, y: 129.8956} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &779459268729455718 CanvasRenderer: @@ -457,8 +457,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 894.2566, y: -446.05994} - m_SizeDelta: {x: 462.0198, y: 318.3407} + m_AnchoredPosition: {x: 822.0418, y: -438.1397} + m_SizeDelta: {x: 606.4493, y: 302.5002} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &9109024175080783090 CanvasRenderer: @@ -488,7 +488,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: -1799124147, guid: e18e3df2cf154be45bd08f82ab53036e, type: 3} + m_Sprite: {fileID: -727467337, guid: c8409501d0e34af47b749d1d13131442, type: 3} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/Assets/Resources/Prefabs/UI/Choice Button.prefab b/Assets/Resources/Prefabs/UI/Choice Button.prefab index 55d1c5abc..3159da13f 100644 --- a/Assets/Resources/Prefabs/UI/Choice Button.prefab +++ b/Assets/Resources/Prefabs/UI/Choice Button.prefab @@ -85,7 +85,6 @@ GameObject: m_Component: - component: {fileID: 5626037464443779153} - component: {fileID: 6721623070518421296} - - component: {fileID: 4289714847446315197} - component: {fileID: 1770042318800468889} m_Layer: 5 m_Name: Choice Button @@ -123,36 +122,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 659956759807646603} m_CullTransparentMesh: 1 ---- !u!114 &4289714847446315197 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 659956759807646603} - 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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3} - 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!114 &1770042318800468889 MonoBehaviour: m_ObjectHideFlags: 0 @@ -193,7 +162,7 @@ MonoBehaviour: m_SelectedTrigger: Selected m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 4289714847446315197} + m_TargetGraphic: {fileID: 8862670299603789525} m_OnClick: m_PersistentCalls: m_Calls: [] @@ -231,8 +200,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 450, y: 0} - m_SizeDelta: {x: 800, y: 48} + m_AnchoredPosition: {x: 434.55133, y: 0} + m_SizeDelta: {x: 769.1027, y: 48} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6660134571396433606 CanvasRenderer: diff --git a/Assets/Resources/Prefabs/UI/Player Bubble.prefab b/Assets/Resources/Prefabs/UI/Player Bubble.prefab index 8950b6829..ab423e81c 100644 --- a/Assets/Resources/Prefabs/UI/Player Bubble.prefab +++ b/Assets/Resources/Prefabs/UI/Player Bubble.prefab @@ -32,10 +32,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 2114528386511579871} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -64.9, y: 69.8} - m_SizeDelta: {x: 36, y: 36} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 424, y: -193} + m_SizeDelta: {x: 32, y: 19} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6493937739013348050 CanvasRenderer: @@ -65,7 +65,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: afdc34bd5087fee4bbe681c5ef818e20, type: 3} + m_Sprite: {fileID: -1371161529, guid: c8409501d0e34af47b749d1d13131442, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -245,8 +245,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 236, y: -136.5614} - m_SizeDelta: {x: 329.9832, y: 107.0183} + m_AnchoredPosition: {x: 252.75842, y: -136.5614} + m_SizeDelta: {x: 363.5, y: 107.0183} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &779459268729455718 CanvasRenderer: @@ -457,8 +457,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 894.2566, y: -459.18506} - m_SizeDelta: {x: 462.0198, y: 292.0905} + m_AnchoredPosition: {x: 903.6518, y: -437.09412} + m_SizeDelta: {x: 480.8103, y: 336.2723} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &9109024175080783090 CanvasRenderer: @@ -488,7 +488,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 659638050, guid: e18e3df2cf154be45bd08f82ab53036e, type: 3} + m_Sprite: {fileID: -1260256082, guid: c8409501d0e34af47b749d1d13131442, type: 3} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/Assets/Scenes/Persistence.unity b/Assets/Scenes/Persistence.unity index 26a45dd82..25204d1de 100644 --- a/Assets/Scenes/Persistence.unity +++ b/Assets/Scenes/Persistence.unity @@ -390,11 +390,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: c6c82e5d3b6ca4c4f902f55c8c0f4a6a, type: 3} propertyPath: m_SizeDelta.x - value: 462.0198 + value: 501.2254 objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: c6c82e5d3b6ca4c4f902f55c8c0f4a6a, type: 3} propertyPath: m_SizeDelta.y - value: 318.3407 + value: 329.3753 objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: c6c82e5d3b6ca4c4f902f55c8c0f4a6a, type: 3} propertyPath: m_LocalPosition.x @@ -426,11 +426,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: c6c82e5d3b6ca4c4f902f55c8c0f4a6a, type: 3} propertyPath: m_AnchoredPosition.x - value: 679 + value: 624.3 objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: c6c82e5d3b6ca4c4f902f55c8c0f4a6a, type: 3} propertyPath: m_AnchoredPosition.y - value: -771 + value: -797.5 objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: c6c82e5d3b6ca4c4f902f55c8c0f4a6a, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -4600,7 +4600,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1794129319 RectTransform: m_ObjectHideFlags: 0 @@ -5107,11 +5107,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: 4d6fa45bd310bc946b5628e62986e494, type: 3} propertyPath: m_SizeDelta.x - value: 462.0198 + value: 586.1448 objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: 4d6fa45bd310bc946b5628e62986e494, type: 3} propertyPath: m_SizeDelta.y - value: 318.3407 + value: 293.1278 objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: 4d6fa45bd310bc946b5628e62986e494, type: 3} propertyPath: m_LocalPosition.x @@ -5143,11 +5143,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: 4d6fa45bd310bc946b5628e62986e494, type: 3} propertyPath: m_AnchoredPosition.x - value: 929 + value: 913 objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: 4d6fa45bd310bc946b5628e62986e494, type: 3} propertyPath: m_AnchoredPosition.y - value: -297 + value: -299 objectReference: {fileID: 0} - target: {fileID: 2114528386511579871, guid: 4d6fa45bd310bc946b5628e62986e494, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -5165,10 +5165,6 @@ PrefabInstance: propertyPath: m_Name value: Actor Bubble objectReference: {fileID: 0} - - target: {fileID: 8518890624210964847, guid: 4d6fa45bd310bc946b5628e62986e494, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] diff --git a/Assets/Scripts/UI/DialogUI/DialogBubbleViewer.cs b/Assets/Scripts/UI/DialogUI/DialogBubbleViewer.cs index b7dc60b86..cc8e79df9 100644 --- a/Assets/Scripts/UI/DialogUI/DialogBubbleViewer.cs +++ b/Assets/Scripts/UI/DialogUI/DialogBubbleViewer.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using AibisDream.Kit; using UnityEngine; using Yarn.Unity; @@ -77,13 +78,20 @@ namespace AibisDream private IDialogView SelectBubbleByCharacter(CharacterVo characterVo) { - return characterVo.role switch + var targetBubble = characterVo.role switch { ActorRole.Player => _playerBubble, ActorRole.MainActor => _actorBubble, ActorRole.Aside => _normalBox, _ => _normalBox }; + + foreach (var bubble in _dialogViews.Where(bubble => bubble != targetBubble)) + { + bubble.HideDialog(); + } + + return targetBubble; } private void ProcessOtherBox()