diff --git a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset index 1c7bf0aca..ff990bc6b 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset @@ -28,7 +28,7 @@ MonoBehaviour: m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - m_GUID: 8c9cfa26abfee488c85f1582747f6a02 - m_Address: SampleScene + m_Address: Persistence m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 diff --git a/Assets/Resources/Art/Background/新闻.png b/Assets/Resources/Art/Background/新闻.png new file mode 100644 index 000000000..9bb8dfa70 Binary files /dev/null and b/Assets/Resources/Art/Background/新闻.png differ diff --git a/Assets/Resources/Art/Background/新闻.png.meta b/Assets/Resources/Art/Background/新闻.png.meta new file mode 100644 index 000000000..0b86a9f58 --- /dev/null +++ b/Assets/Resources/Art/Background/新闻.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: db068ffac8fab8d489792e707c364532 +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: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Art/Background/销售冠军.png b/Assets/Resources/Art/Background/销售冠军.png new file mode 100644 index 000000000..ca3b64649 Binary files /dev/null and b/Assets/Resources/Art/Background/销售冠军.png differ diff --git a/Assets/Resources/Art/Background/销售冠军.png.meta b/Assets/Resources/Art/Background/销售冠军.png.meta new file mode 100644 index 000000000..a48f7be99 --- /dev/null +++ b/Assets/Resources/Art/Background/销售冠军.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: c2b4b6ec28a305c4eb330ff20a6ad69f +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: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Art/Background/黑屏.png b/Assets/Resources/Art/Background/黑屏.png new file mode 100644 index 000000000..d5a27a9cd Binary files /dev/null and b/Assets/Resources/Art/Background/黑屏.png differ diff --git a/Assets/Resources/Art/Background/黑屏.png.meta b/Assets/Resources/Art/Background/黑屏.png.meta new file mode 100644 index 000000000..bcd7334e9 --- /dev/null +++ b/Assets/Resources/Art/Background/黑屏.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 2ab1f55d94841874dbef1c2f4f46791e +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: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Art/Obj/BlackSquare.png b/Assets/Resources/Art/Obj/BlackSquare.png new file mode 100644 index 000000000..67bd87e42 Binary files /dev/null and b/Assets/Resources/Art/Obj/BlackSquare.png differ diff --git a/Assets/Resources/Art/Obj/BlackSquare.png.meta b/Assets/Resources/Art/Obj/BlackSquare.png.meta new file mode 100644 index 000000000..5aa6a844a --- /dev/null +++ b/Assets/Resources/Art/Obj/BlackSquare.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 4e8ff686733cdb447a8183bf8d060e6b +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: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Yarn/ExpressTalk/ExpressTalk1.yarn b/Assets/Resources/Yarn/ExpressTalk/ExpressTalk1.yarn index 2f5a2d4db..09b55bc36 100644 --- a/Assets/Resources/Yarn/ExpressTalk/ExpressTalk1.yarn +++ b/Assets/Resources/Yarn/ExpressTalk/ExpressTalk1.yarn @@ -1,7 +1,7 @@ title: Start position: -118,-175 --- -<> +<> TV: 大家好,这里是幸福罐头产业园区,下面是今天的园区新闻: #line:0918e0d TV: 销售大赛是园区一年一度的盛举,旨在通过销售,促进幸福罐头公司员工进一步提高生产、销售效率,扩大产业规模。 #line:05de3d2 TV: 我宣布,幸福罐头产业园区第1011届销售大赛正式开幕! #line:0add1f9 diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/Persistence.unity similarity index 91% rename from Assets/Scenes/SampleScene.unity rename to Assets/Scenes/Persistence.unity index 31676b56c..2e0b5fe1f 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/Persistence.unity @@ -155,8 +155,8 @@ Transform: m_Children: - {fileID: 1584263514} - {fileID: 973075153} - - {fileID: 1936621685} - {fileID: 494300779} + - {fileID: 1936621685} m_Father: {fileID: 1009826577} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &72512887 @@ -171,6 +171,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8912c53f0d9943940a6bb7e59888ada8, type: 3} m_Name: m_EditorClassIdentifier: + quickRunMode: 0 --- !u!1 &237392154 GameObject: m_ObjectHideFlags: 0 @@ -643,6 +644,81 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &614046221 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 614046222} + - component: {fileID: 614046224} + - component: {fileID: 614046223} + m_Layer: 5 + m_Name: News + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &614046222 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 614046221} + 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: 984233631} + 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!114 &614046223 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 614046221} + 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: 2ab1f55d94841874dbef1c2f4f46791e, 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!222 &614046224 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 614046221} + m_CullTransparentMesh: 1 --- !u!1 &619394800 GameObject: m_ObjectHideFlags: 0 @@ -1086,7 +1162,7 @@ MonoBehaviour: m_EditorClassIdentifier: useTypeWriter: 1 startTypewriterMode: 2 - hideAppearancesOnSkip: 0 + hideAppearancesOnSkip: 1 hideDisappearancesOnSkip: 0 triggerEventsOnSkip: 0 resetTypingSpeedAtStartup: 1 @@ -1106,7 +1182,7 @@ MonoBehaviour: onMessage: m_PersistentCalls: m_Calls: [] - waitForNormalChars: 0.03 + waitForNormalChars: 0.1 waitLong: 0.6 waitMiddle: 0.2 avoidMultiplePunctuactionWait: 0 @@ -1268,7 +1344,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &761395783 RectTransform: m_ObjectHideFlags: 0 @@ -1301,14 +1377,14 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} + 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: 21300000, guid: fab06e0be9375cc4d823efa71629885c, type: 3} + m_Sprite: {fileID: 21300000, guid: 4e8ff686733cdb447a8183bf8d060e6b, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -1466,6 +1542,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 731599308} + - {fileID: 614046222} - {fileID: 761395783} m_Father: {fileID: 1343879457} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1519,6 +1596,55 @@ Transform: - {fileID: 719228339} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1095691305 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1095691306} + - component: {fileID: 1095691307} + m_Layer: 0 + m_Name: Advance Input + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1095691306 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1095691305} + serializedVersion: 2 + 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: 1936621685} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1095691307 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1095691305} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 097b95c9f69f04f2d8c08a817e7786af, type: 3} + m_Name: + m_EditorClassIdentifier: + dialogueView: {fileID: 1584263515} + continueActionType: 1 + continueActionKeyCode: 32 + continueActionButtonName: Jump + continueActionOnButtonRelease: 0 --- !u!1 &1281848949 GameObject: m_ObjectHideFlags: 0 @@ -2474,6 +2600,7 @@ RectTransform: - {fileID: 711589654} - {fileID: 2056178949} - {fileID: 1281848950} + - {fileID: 1794129319} m_Father: {fileID: 1604842429} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -2754,6 +2881,126 @@ Canvas: m_SortingLayerID: 0 m_SortingOrder: 0 m_TargetDisplay: 0 +--- !u!1 &1794129318 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1794129319} + - component: {fileID: 1794129322} + - component: {fileID: 1794129321} + - component: {fileID: 1794129320} + m_Layer: 5 + m_Name: Quick Talk + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1794129319 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1794129318} + 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: 1624136270} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 1779, y: -11} + m_SizeDelta: {x: 64, y: 64} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1794129320 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1794129318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + 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: 1794129321} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1794129321 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1794129318} + 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: afdc34bd5087fee4bbe681c5ef818e20, 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!222 &1794129322 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1794129318} + m_CullTransparentMesh: 1 --- !u!1 &1936621684 GameObject: m_ObjectHideFlags: 0 @@ -2786,6 +3033,7 @@ Transform: m_Children: - {fileID: 331068879} - {fileID: 667130562} + - {fileID: 1095691306} m_Father: {fileID: 72512886} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1936621686 diff --git a/Assets/Scenes/SampleScene.unity.meta b/Assets/Scenes/Persistence.unity.meta similarity index 100% rename from Assets/Scenes/SampleScene.unity.meta rename to Assets/Scenes/Persistence.unity.meta diff --git a/Assets/Scripts/ClinicScene.meta b/Assets/Scripts/ClinicScene.meta new file mode 100644 index 000000000..54030dbc0 --- /dev/null +++ b/Assets/Scripts/ClinicScene.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c7516e8ccd4f6c049af6eb11081d524a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ClinicScene/RobotViewer.cs b/Assets/Scripts/ClinicScene/RobotViewer.cs new file mode 100644 index 000000000..8193e5499 --- /dev/null +++ b/Assets/Scripts/ClinicScene/RobotViewer.cs @@ -0,0 +1,13 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace AibisDream +{ + [RequireComponent(typeof(SpriteRenderer))] + public class RobotViewer : MonoBehaviour + { + + } +} + diff --git a/Assets/Scripts/ClinicScene/RobotViewer.cs.meta b/Assets/Scripts/ClinicScene/RobotViewer.cs.meta new file mode 100644 index 000000000..d3724c979 --- /dev/null +++ b/Assets/Scripts/ClinicScene/RobotViewer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 168910fac8a2da343a99ea692e130982 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Dialog System/DialogController.cs b/Assets/Scripts/Dialog System/DialogController.cs index e8f883f11..bce0294c9 100644 --- a/Assets/Scripts/Dialog System/DialogController.cs +++ b/Assets/Scripts/Dialog System/DialogController.cs @@ -1,9 +1,7 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.SceneManagement; using Yarn.Unity; namespace AibisDream @@ -14,15 +12,17 @@ namespace AibisDream private Dictionary> commandMap; + public bool quickRunMode; + private void Start() { dialogueRunner = GetComponentInChildren(); } /// - /// �����Ի� + /// 开启对话 /// - /// + /// Yarn组 public void StartDialog(YarnProject yarnProject) { dialogueRunner.SetProject(yarnProject); @@ -30,12 +30,17 @@ namespace AibisDream } /// - /// ִ��ָ�� + /// 调用命令 /// - /// ָ������ + /// 命令名 + /// 选项 public void InvokeOptionCommand(string commandName, YarnOption[] options) { - if (commandName == null) { } + if (commandName == null) + { + Debug.Log("命令名为空"); + return; + } if (commandMap.TryGetValue(commandName, out var action)) { @@ -43,29 +48,29 @@ namespace AibisDream } else { - Debug.LogWarning($"û���ҵ� {commandName} ����"); + Debug.LogWarning($"命令 {commandName} 不存在"); } } /// - /// ע���ѡ��ָ�� + /// 注册命令 /// - /// ָ������ - /// ָ��� + /// 命令名称 + /// 注册名称 public void RegisterOptionCommand(string commandName, Action commandAction) { if (commandMap.ContainsKey(commandName)) { - Debug.Log($"���� {commandName} ��δע�ᣬ����ע����滻��ָ��"); + Debug.Log($"命令 {commandName} 已经存在,将被替换"); } commandMap[commandName] = commandAction; } /// - /// ж��ָ�� + /// 移除命令 /// - /// ָ������ + /// 命令名称 public void RemoveOptionCommand(string commandName) { if (commandMap.ContainsKey(commandName)) @@ -74,21 +79,22 @@ namespace AibisDream } else { - Debug.Log($"���� {commandName} ��δע�ᣬ����ע����滻��ָ��"); + Debug.Log($"命令 {commandName} 不存在"); } } - #region �������� + #region 命令名 + [YarnCommand("switch_tv")] public static void SwitchTV(string picName) { - Debug.Log($"switch_tv {picName}"); + MainUIController.Instance.SwitchTV(picName); } [YarnCommand("indoor")] - public static void Indoor() + public static void Indoor(float duration = 1) { - MainUIController.Instance.HideMainUI(); + MainUIController.Instance.TVFadeOut(duration); } [YarnCommand("character_into")] @@ -110,21 +116,24 @@ namespace AibisDream } [YarnCommand("load_scene")] - public static IEnumerator LoadScene(string sceneName) + public static IEnumerator LoadScene(string sceneName, float duration = 1) { + HideDialog(); + yield return MainUIController.Instance.FadeInSync(duration); yield return SceneLoader.Instance.LoadSceneAsync(sceneName); + yield return MainUIController.Instance.FadeOutSync(duration); } + [YarnCommand("unload_scene")] public static IEnumerator UnloadScene(string sceneName) { yield return SceneLoader.Instance.UnloadSceneAsync(sceneName); } - - + [YarnCommand("init_fix")] public static void InitFix() { - + } [YarnCommand("hide_dialog")] @@ -132,7 +141,19 @@ namespace AibisDream { DialogUiViewer.Instance.HideDialog(); } + + [YarnCommand("fade_in")] + public static IEnumerator FadeIn(float duration = 1) + { + return MainUIController.Instance.FadeInSync(duration); + } + + [YarnCommand("fade_out")] + public static IEnumerator FadeOut(float duration = 1) + { + return MainUIController.Instance.FadeOutSync(duration); + } + #endregion } -} - +} \ No newline at end of file diff --git a/Assets/Scripts/Dialog System/LineView.cs b/Assets/Scripts/Dialog System/LineView.cs index 632d53792..cec44ca91 100644 --- a/Assets/Scripts/Dialog System/LineView.cs +++ b/Assets/Scripts/Dialog System/LineView.cs @@ -1,7 +1,4 @@ using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; using Yarn.Unity; namespace AibisDream @@ -9,13 +6,13 @@ namespace AibisDream public class LineView : DialogueViewBase { // 进入指令选项模式 - private bool isInCommand; + private bool _isInCommand; public override void RunLine(LocalizedLine dialogueLine, Action onDialogueLineFinished) { - isInCommand = dialogueLine.Text.HasCommandAttr(); + _isInCommand = dialogueLine.Text.HasCommandAttr(); - if (isInCommand) + if (_isInCommand) { DialogUiViewer.Instance.HideDialog(); base.RunLine(dialogueLine, onDialogueLineFinished); @@ -24,11 +21,16 @@ namespace AibisDream DialogUiViewer.Instance.ShowLine(dialogueLine.TextWithoutCharacterName.Text, dialogueLine.CharacterName, onDialogueLineFinished); + + if (DialogController.Instance.quickRunMode) + { + onDialogueLineFinished.Invoke(); + } } public override void RunOptions(DialogueOption[] dialogueOptions, Action onOptionSelected) { - if (isInCommand) + if (_isInCommand) { DialogUiViewer.Instance.HideDialog(); base.RunOptions(dialogueOptions, onOptionSelected); @@ -50,8 +52,16 @@ namespace AibisDream public override void UserRequestedViewAdvancement() { - Debug.Log("Break"); - requestInterrupt.Invoke(); + if (_isInCommand) + { + return; + } + + if (!DialogUiViewer.Instance.TrySkipLine()) + { + DialogUiViewer.Instance.AfterEndLine(); + requestInterrupt.Invoke(); + } } } } diff --git a/Assets/Scripts/Game Loop/GameLoopManager.cs b/Assets/Scripts/Game Loop/GameLoopManager.cs index 18518a3b2..b8cdb1256 100644 --- a/Assets/Scripts/Game Loop/GameLoopManager.cs +++ b/Assets/Scripts/Game Loop/GameLoopManager.cs @@ -1,20 +1,16 @@ using System.Collections; -using System.Collections.Generic; -using Unity.VisualScripting; using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.Rendering; using Yarn.Unity; namespace AibisDream { public class GameLoopManager : Singleton { - [Header("ģʽ")] + [Header("运行模式")] [SerializeField] private RunMode runMode; - [Header("ʽ")] + [Header("正式环境参数")] [SerializeField] private TalkSceneSO firstTalkSO; private TalkSceneSO currentTalkSceneSO; @@ -22,7 +18,7 @@ namespace AibisDream [SerializeField] private string clinicScene; - [Header("Ի")] + [Header("测试环境参数")] [SerializeField] private string testYarnProject; public void Start() diff --git a/Assets/Scripts/Game Loop/SceneLoader.cs b/Assets/Scripts/Game Loop/SceneLoader.cs index 73c15573e..85516e0d0 100644 --- a/Assets/Scripts/Game Loop/SceneLoader.cs +++ b/Assets/Scripts/Game Loop/SceneLoader.cs @@ -1,5 +1,4 @@ using System.Collections; -using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; @@ -8,7 +7,7 @@ namespace AibisDream { public class SceneLoader : Singleton { - #region ת + #region 场景转换参数 private string currentScene; private AsyncOperationHandle _loadHandle; private string sceneToLoad; @@ -16,18 +15,18 @@ namespace AibisDream #endregion /// - /// ͬת + /// 同步场景转换 /// - /// Ŀ곡 + /// 目标场景 public void LoadScene(string targetScene) { StartCoroutine(LoadSceneAsync(targetScene)); } /// - /// 첽ת + /// 异步场景转换 /// - /// Ŀ곡 + /// 目标场景 /// public IEnumerator LoadSceneAsync(string targetScene) { @@ -37,7 +36,7 @@ namespace AibisDream } else { - // ת + // 场景转换参数 isLoading = true; sceneToLoad = targetScene; if (currentScene != null) diff --git a/Assets/Scripts/Game Loop/StartMenu.cs b/Assets/Scripts/Game Loop/StartMenu.cs index dce1dc51b..e7a2f5d49 100644 --- a/Assets/Scripts/Game Loop/StartMenu.cs +++ b/Assets/Scripts/Game Loop/StartMenu.cs @@ -31,7 +31,7 @@ namespace AibisDream { public void ContinueGame() { - Debug.Log("Ϸδ"); + Debug.Log("继续游戏功能暂未开发"); } public void QuitGame() diff --git a/Assets/Scripts/MiniGame/Gear.cs b/Assets/Scripts/MiniGame/Gear.cs index 7cde0c841..f0b280f7f 100644 --- a/Assets/Scripts/MiniGame/Gear.cs +++ b/Assets/Scripts/MiniGame/Gear.cs @@ -34,7 +34,7 @@ namespace AibisDream circleCollider = GetComponent(); spriteRenderer = GetComponent(); - // ֵָ + // 给齿轮赋值 if (data != null) { InitGearModel(data); @@ -42,12 +42,12 @@ namespace AibisDream } /// - /// óϢ + /// 设置齿轮信息 /// - /// Ϣ + /// 齿轮信息 public void InitGearModel(GearModel gearModel) { - // ֵָ + // 给齿轮赋值 spriteRenderer.sprite = Resources.Load(gearModel.spriteName); circleCollider.radius = gearModel.radius; } diff --git a/Assets/Scripts/MiniGame/GearController.cs b/Assets/Scripts/MiniGame/GearController.cs index 4cc638558..c0ef9948f 100644 --- a/Assets/Scripts/MiniGame/GearController.cs +++ b/Assets/Scripts/MiniGame/GearController.cs @@ -14,7 +14,7 @@ namespace AibisDream private Shaft[] shafts; - private Vector3 offset; // λposƫ + private Vector3 offset; // 鼠标点击位置与物体pos偏移量 private Gear draggingGear; @@ -36,20 +36,20 @@ namespace AibisDream private void Update() { - // 갴 + // 鼠标按下 if (Input.GetMouseButtonDown(0)) { OnMouseClickDown(); } - // ϶ + // 鼠标拖动 if (Input.GetMouseButton(0) && draggingGear != null) { draggingGear.Move(GetMouseAsWorldPoint() + offset); } - // ͷ - if (Input.GetMouseButtonUp(0)) // ͷ + // 鼠标释放 + if (Input.GetMouseButtonUp(0)) // 检查鼠标左键释放 { draggingGear?.StopMove(); @@ -64,11 +64,11 @@ namespace AibisDream private void OnMouseClickDown() { - // ʱ + // 按下时发出检查射线 Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit2D hit = Physics2D.Raycast(ray.origin, ray.direction); - // е + // 检测命中的物体 if (hit.collider != null && hit.collider.CompareTag("Moveable")) { offset = hit.collider.transform.position - GetMouseAsWorldPoint(); @@ -78,11 +78,11 @@ namespace AibisDream } /// - /// жλ + /// 判断吸附位置 /// - /// ֵǰλ - /// ְ뾶 - /// ܹ + /// 齿轮当前位置 + /// 齿轮半径 + /// 能够被吸附的轴 public Shaft CheckClosestShaft(Vector3 pos, float gearRadius) { return shaftGraph.QuerySnapShaft(pos, gearRadius); @@ -96,12 +96,12 @@ namespace AibisDream } /// - /// ɳ + /// 生成齿轮 /// - /// λ - /// - /// ٶ - /// Obj + /// 位置 + /// 齿轮数据 + /// 速度 + /// 齿轮Obj public GameObject InitGear(Vector3 pos, GearModel gearModel, float speed) { GameObject gear = Instantiate(gearPrefab, pos, Quaternion.identity); diff --git a/Assets/Scripts/MiniGame/GearModel.cs b/Assets/Scripts/MiniGame/GearModel.cs index cd1975c69..fb1334c34 100644 --- a/Assets/Scripts/MiniGame/GearModel.cs +++ b/Assets/Scripts/MiniGame/GearModel.cs @@ -12,9 +12,9 @@ public class GearModel : ScriptableObject public string spriteName; /// - /// ȡͼƬ + /// 读取齿轮图片 /// - /// Sprite + /// 齿轮Sprite public Sprite getSprite() { return Resources.Load(spriteName); diff --git a/Assets/Scripts/MiniGame/Shaft.cs b/Assets/Scripts/MiniGame/Shaft.cs index 12a562c52..6622875b5 100644 --- a/Assets/Scripts/MiniGame/Shaft.cs +++ b/Assets/Scripts/MiniGame/Shaft.cs @@ -16,7 +16,7 @@ namespace AibisDream // 初始角速度 [SerializeField] - private float initialSpeed = 0; + private float initialSpeed; // 初始齿轮 [SerializeField] @@ -124,8 +124,6 @@ namespace AibisDream /// private void UpdateSpeedAnima() { - Debug.Log(Speed); - // 没有齿轮的不需要旋转 if (!HasChildGear()) { diff --git a/Assets/Scripts/MiniGame/ShaftGraph.cs b/Assets/Scripts/MiniGame/ShaftGraph.cs index e883076dd..de16b7788 100644 --- a/Assets/Scripts/MiniGame/ShaftGraph.cs +++ b/Assets/Scripts/MiniGame/ShaftGraph.cs @@ -7,24 +7,24 @@ namespace AibisDream { public class ShaftGraph { - // + // 顶点数量 int vertexSize; - // Map + // 顶点Map Shaft[] vertexArray; - // ڽӱ + // 邻接表 float[,] edgeTable; - // ¼ + // 遍历记录 bool[] vertexRecordArray; - // + // 动力轴序号 int rootIdx; public ShaftGraph(Shaft[] shafts) { - // Ϊḳֵ + // 为轴赋值 vertexSize = shafts.Length; vertexRecordArray = new bool[vertexSize]; vertexArray = shafts; @@ -33,10 +33,10 @@ namespace AibisDream shaft.InitShaft(); } - // ѰΨһ + // 寻找唯一的驱动轴序号 rootIdx = FindDriverIdx(); - // ɱڽӱ + // 生成边邻接表 GeneEdgeTable(); UpdateSpeed(); @@ -56,7 +56,7 @@ namespace AibisDream } /// - /// ɱڽӱ + /// 生成边邻接表 /// private void GeneEdgeTable() { @@ -66,7 +66,7 @@ namespace AibisDream { for (int j = i + 1; j < vertexSize; j++) { - // жShaftǷٽ + // 判断两个Shaft是否临接 if (Shaft.IsShaftConnected(vertexArray[i], vertexArray[j])) { edgeTable[i, j] = Shaft.CalcAngularVelocityRatio(vertexArray[i], vertexArray[j]); @@ -82,24 +82,24 @@ namespace AibisDream } /// - /// ijϳַ仯ʱٽӹϵ + /// 某个轴上齿轮发生变化时更新临接关系 /// - /// ID + /// 轴ID public void ChangeVertex(int instanceID) { - // ҵӦidx + // 找到对应idx int idx = TranInstanceIDToIdx(instanceID); - // ¸ýڵӦڽӱ + // 更新该节点对应的邻接表 for (int i = 0; i < vertexSize; i++) { - // + // 遇到自身跳过 if (i == idx) { continue; } - // жShaftǷٽ + // 判断两个Shaft是否临接 if (Shaft.IsShaftConnected(vertexArray[idx], vertexArray[i])) { edgeTable[idx, i] = Shaft.CalcAngularVelocityRatio(vertexArray[idx], vertexArray[i]); @@ -117,7 +117,7 @@ namespace AibisDream private int TranInstanceIDToIdx(int instanceID) { - // ҶӦ + // 查找对应的序号 int idx = -1; for (int i = 0; i < vertexSize; i++) { @@ -131,27 +131,27 @@ namespace AibisDream } /// - /// µǰٶ + /// 更新当前所有轴的速度 /// public void UpdateSpeed() { - // ¼ + // 清除遍历记录 Array.Clear(vertexRecordArray, 0, vertexSize); - // Ὺʼٶ + // 从驱动轴开始计算速度 UpdateShaftSpeedByIdx(rootIdx); } private void UpdateShaftSpeedByIdx(int idx) { - // ֪ǰٶ + // 已知当前齿轮速度 float currentSpeed = vertexArray[idx].Speed; for (int i = 0; i < vertexSize; i++) { - // ٽӳ + // 遍历临接齿轮 if (i != idx && edgeTable[idx, i] > 0) { - // ѱ + // 已遍历过就跳过 if (vertexRecordArray[idx]) { continue; @@ -159,22 +159,22 @@ namespace AibisDream Debug.Log(idx); - // ٶ + // 更新速度 vertexArray[i].Speed = currentSpeed * edgeTable[idx, i]; - // Ѱڳ + // 继续寻找相邻齿轮 //UpdateShaftSpeedByIdx(i); - // ѱϱ + // 已遍历的轴加上标记 vertexRecordArray[i] = true; } } } /// - /// ѯ + /// 查询可吸附的轴 /// - /// λ - /// ְ뾶 - /// + /// 齿轮位置 + /// 齿轮半径 + /// 吸附轴 public Shaft QuerySnapShaft(Vector3 pos, float gearRadius) { if (vertexArray == null || vertexArray.Length == 0) @@ -182,7 +182,7 @@ namespace AibisDream return null; } - // ѯģShaft + // 查询距离最近的,可吸附的Shaft Shaft closestShaft = null; float minDistence = -1; foreach (var vertex in vertexArray) @@ -198,10 +198,10 @@ namespace AibisDream } } - // û鵽ͷؿ + // 没查到就返回空 if (closestShaft == null) { return null; } - // 鵽˾ͷǷ + // 查到了就返回是否吸附 if (minDistence < gearRadius) { return closestShaft; diff --git a/Assets/Scripts/UI/DialogUiViewer.cs b/Assets/Scripts/UI/DialogUiViewer.cs index 454dc67fd..29fd707ba 100644 --- a/Assets/Scripts/UI/DialogUiViewer.cs +++ b/Assets/Scripts/UI/DialogUiViewer.cs @@ -10,20 +10,26 @@ namespace AibisDream public class DialogUiViewer : Singleton { #region 组件名称 + private const string DIALOG_BOX = "Dialog Box"; private const string ACTOR_NAME = "Actor Name"; private const string DIALOG_TEXT = "Dialog Text"; private const string NEXT_BUTTON = "Next Button"; private const string CHOICE_BUTTON = "Choice Button"; + private const string QUICK_TALK = "Quick Talk"; + #endregion #region 对话框UI + private GameObject dialogBox; private TypewriterByCharacter dialogText; private TextMeshProUGUI actorName; private Button nextButton; private GameObject choiceBox; private GameObject choiceButtonPrefab; + private GameObject quickTalkButton; + #endregion protected override void Awake() @@ -47,11 +53,12 @@ namespace AibisDream dialogBox.SetActive(true); dialogText.gameObject.SetActive(true); choiceBox.SetActive(false); - + actorName.text = actor; dialogText.ShowText(dialogLine); nextButton.onClick.RemoveAllListeners(); - nextButton.onClick.AddListener(() => { + nextButton.onClick.AddListener(() => + { nextStep.Invoke(); nextButton.gameObject.SetActive(false); }); @@ -77,12 +84,14 @@ namespace AibisDream // 生成新按钮 foreach (DialogueOption option in dialogueOptions) { - if (option.IsAvailable) + if (option.IsAvailable) { var choiceInstance = Instantiate(choiceButtonPrefab, Vector3.zero, Quaternion.identity); choiceInstance.transform.SetParent(choiceBox.transform); - choiceInstance.GetComponentInChildren().text = option.Line.TextWithoutCharacterName.Text; - choiceInstance.GetComponent