diff --git a/Assets/Plugins/CleanFlatUI/Scripts/Slider/SliderTransition.cs b/Assets/Plugins/CleanFlatUI/Scripts/Slider/SliderTransition.cs index e604d76f2..f05f81207 100644 --- a/Assets/Plugins/CleanFlatUI/Scripts/Slider/SliderTransition.cs +++ b/Assets/Plugins/CleanFlatUI/Scripts/Slider/SliderTransition.cs @@ -47,6 +47,14 @@ namespace RainbowArt.CleanFlatUI text.text = useValue + ""; } } + public void EnableSliderInteraction() + { + slider.interactable = true; + } + public void DisableSliderInteraction() + { + slider.interactable = false; + } void Start () { diff --git a/Assets/Plugins/Febucci/Text Animator/Integrations/Visual Scripting - Integration.unitypackage.meta b/Assets/Plugins/Febucci/Text Animator/Integrations/Visual Scripting - Integration.unitypackage.meta deleted file mode 100644 index 05e590027..000000000 --- a/Assets/Plugins/Febucci/Text Animator/Integrations/Visual Scripting - Integration.unitypackage.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 117dcc671050f5247bd8743b91ecaab7 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Render/Renderer2Dtest.asset b/Assets/Render/Renderer2Dtest.asset index ca0f21b2e..c70aafbd7 100644 --- a/Assets/Render/Renderer2Dtest.asset +++ b/Assets/Render/Renderer2Dtest.asset @@ -477,19 +477,15 @@ MonoBehaviour: m_PostInfinity: 2 m_RotationOrder: 4 _filter: - - 0.0048309183 - - 0.016401261 - - 0.04532712 - - 0.08293076 - - 0.12053438 - - 0.14946026 - - 0.1610306 - - 0.14946026 - - 0.12053438 - - 0.08293076 - - 0.04532712 - - 0.016401261 - - 0.0048309183 + - 0.007228916 + - 0.043749984 + - 0.12409639 + - 0.20444278 + - 0.24096388 + - 0.20444278 + - 0.12409639 + - 0.043749984 + - 0.007228916 --- !u!114 &-6101378415725230565 MonoBehaviour: m_ObjectHideFlags: 3 @@ -616,7 +612,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9c53165b379c3d94ca34b12cb8eb10f1, type: 3} m_Name: VolFx m_EditorClassIdentifier: - m_Active: 1 + m_Active: 0 _event: 550 _format: enabled: 1 @@ -1444,7 +1440,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9c53165b379c3d94ca34b12cb8eb10f1, type: 3} m_Name: VolFx m_EditorClassIdentifier: - m_Active: 0 + m_Active: 1 _event: 550 _format: enabled: 1 diff --git a/Assets/Render/维修屏幕自发光.mat b/Assets/Render/维修屏幕自发光.mat new file mode 100644 index 000000000..9083b7989 --- /dev/null +++ b/Assets/Render/维修屏幕自发光.mat @@ -0,0 +1,630 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: "\u7EF4\u4FEE\u5C4F\u5E55\u81EA\u53D1\u5149" + m_Shader: {fileID: 4800000, guid: da8efd605fdd20949a21be6242000625, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _ENABLEBRIGHTNESS_ON + - _SHADERFADING_NONE + - _SHADERSPACE_UV + - _TEXTURELAYER1SHEETTOGGLE_ON + - _TEXTURELAYER2SHEETTOGGLE_ON + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AddColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AddHueMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CustomFadeFadeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _InnerOutlineTintTexture: + m_Texture: {fileID: 2800000, guid: 5af9a397a8643994c829e696a24a7845, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OuterOutlineTintTexture: + m_Texture: {fileID: 2800000, guid: 5af9a397a8643994c829e696a24a7845, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PixelOutlineTintTexture: + m_Texture: {fileID: 2800000, guid: 5af9a397a8643994c829e696a24a7845, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RecolorRGBTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RecolorRGBYCPTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ShineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SineGlowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _StrongTintMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextureLayer1Texture: + m_Texture: {fileID: 2800000, guid: 9685c3a024e22a946a7e8c2ce3542300, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextureLayer2Texture: + m_Texture: {fileID: 2800000, guid: 9685c3a024e22a946a7e8c2ce3542300, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UVDistortMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UberNoiseTexture: + m_Texture: {fileID: 2800000, guid: b8d18cd117976254d94a812a0bfc336e, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _texcoord: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddColorContrast: 0.5 + - _AddColorContrastToggle: 0 + - _AddColorFade: 1 + - _AddColorMaskToggle: 0 + - _AddHueBrightness: 2 + - _AddHueContrast: 0.5 + - _AddHueFade: 1 + - _AddHueMaskToggle: 0 + - _AddHueSaturation: 1 + - _AddHueSpeed: 1 + - _AlphaCutoff: 0.5 + - _AlphaTintFade: 1 + - _AlphaTintMinAlpha: 0.02 + - _BakedMaterial: 0 + - _BlackTintFade: 1 + - _BlackTintPower: 4 + - _Brightness: 2.5 + - _BurnEdgeNoiseFactor: 0.5 + - _BurnFade: 1 + - _BurnInsideContrast: 2 + - _BurnInsideNoiseFactor: 0.2 + - _BurnRadius: 5 + - _BurnSwirlFactor: 1 + - _BurnWidth: 0.1 + - _CamouflageAnimationToggle: 0 + - _CamouflageContrast: 1 + - _CamouflageDensityA: 0.4 + - _CamouflageDensityB: 0.4 + - _CamouflageFade: 1 + - _CamouflageSmoothnessA: 0.2 + - _CamouflageSmoothnessB: 0.2 + - _CheckerboardDarken: 0.5 + - _CheckerboardTiling: 1 + - _ColorReplaceContrast: 1 + - _ColorReplaceFade: 1 + - _ColorReplaceRange: 0.05 + - _ColorReplaceSmoothness: 0.1 + - _Contrast: 1 + - _CustomFadeAlpha: 1 + - _CustomFadeNoiseFactor: 0 + - _CustomFadeSmoothness: 2 + - _DirectionalAlphaFadeFade: 0 + - _DirectionalAlphaFadeInvert: 0 + - _DirectionalAlphaFadeNoiseFactor: 0.2 + - _DirectionalAlphaFadeRotation: 0 + - _DirectionalAlphaFadeWidth: 0.2 + - _DirectionalDistortionFade: 0 + - _DirectionalDistortionInvert: 0 + - _DirectionalDistortionNoiseFactor: 0.2 + - _DirectionalDistortionRandomDirection: 0.1 + - _DirectionalDistortionRotation: 0 + - _DirectionalDistortionWidth: 0.5 + - _DirectionalGlowFadeFade: 0 + - _DirectionalGlowFadeInvert: 0 + - _DirectionalGlowFadeNoiseFactor: 0.2 + - _DirectionalGlowFadeRotation: 0 + - _DirectionalGlowFadeWidth: 0.1 + - _EnableAddColor: 0 + - _EnableAddHue: 0 + - _EnableAlphaTint: 0 + - _EnableBlackTint: 0 + - _EnableBrightness: 1 + - _EnableBurn: 0 + - _EnableCamouflage: 0 + - _EnableCheckerboard: 0 + - _EnableColorReplace: 0 + - _EnableContrast: 0 + - _EnableCustomFade: 0 + - _EnableDirectionalAlphaFade: 0 + - _EnableDirectionalDistortion: 0 + - _EnableDirectionalGlowFade: 0 + - _EnableEnchanted: 0 + - _EnableExternalAlpha: 0 + - _EnableFlame: 0 + - _EnableFrozen: 0 + - _EnableFullAlphaDissolve: 0 + - _EnableFullDistortion: 0 + - _EnableFullGlowDissolve: 0 + - _EnableGaussianBlur: 0 + - _EnableGlitch: 0 + - _EnableHalftone: 0 + - _EnableHologram: 0 + - _EnableHue: 0 + - _EnableInkSpread: 0 + - _EnableInnerOutline: 0 + - _EnableMetal: 0 + - _EnableNegative: 0 + - _EnableOuterOutline: 0 + - _EnablePingPongGlow: 0 + - _EnablePixelOutline: 0 + - _EnablePixelate: 0 + - _EnablePoison: 0 + - _EnableRainbow: 0 + - _EnableRecolorRGB: 0 + - _EnableRecolorRGBYCP: 0 + - _EnableSaturation: 0 + - _EnableScreenTiling: 0 + - _EnableShadow: 0 + - _EnableSharpen: 0 + - _EnableShiftHue: 0 + - _EnableShifting: 0 + - _EnableShine: 0 + - _EnableSineGlow: 0 + - _EnableSineMove: 0 + - _EnableSineRotate: 0 + - _EnableSineScale: 0 + - _EnableSmoke: 0 + - _EnableSmoothPixelArt: 0 + - _EnableSourceAlphaDissolve: 0 + - _EnableSourceGlowDissolve: 0 + - _EnableSplitToning: 0 + - _EnableSqueeze: 0 + - _EnableSquish: 0 + - _EnableStrongTint: 0 + - _EnableTextureLayer1: 0 + - _EnableTextureLayer2: 0 + - _EnableUVDistort: 0 + - _EnableUVRotate: 0 + - _EnableUVScale: 0 + - _EnableUVScroll: 0 + - _EnableVibrate: 0 + - _EnableWiggle: 0 + - _EnableWind: 0 + - _EnableWorldTiling: 0 + - _EnchantedBrightness: 1 + - _EnchantedContrast: 0.5 + - _EnchantedFade: 1 + - _EnchantedLerpToggle: 0 + - _EnchantedRainbowDensity: 0.5 + - _EnchantedRainbowSaturation: 0.8 + - _EnchantedRainbowSpeed: 0.5 + - _EnchantedRainbowToggle: 0 + - _EnchantedReduce: 0 + - _FadingFade: 1 + - _FadingNoiseFactor: 0.2 + - _FadingWidth: 0.3 + - _FlameBrightness: 10 + - _FlameNoiseFactor: 2.5 + - _FlameNoiseHeightFactor: 1.5 + - _FlameRadius: 0.2 + - _FlameSmooth: 2 + - _FrozenContrast: 2 + - _FrozenFade: 1 + - _FrozenHighlightContrast: 2 + - _FrozenHighlightDensity: 1 + - _FrozenSnowContrast: 1 + - _FrozenSnowDensity: 0.25 + - _FullAlphaDissolveFade: 0.5 + - _FullAlphaDissolveWidth: 0.5 + - _FullDistortionFade: 1 + - _FullGlowDissolveFade: 0.5 + - _FullGlowDissolveWidth: 0.5 + - _GaussianBlurFade: 1 + - _GaussianBlurOffset: 0.5 + - _GlitchBrightness: 4 + - _GlitchFade: 1 + - _GlitchHueSpeed: 1 + - _GlitchMaskMin: 0.4 + - _HalftoneFade: 1 + - _HalftoneFadeWidth: 1.5 + - _HalftoneInvert: 0 + - _HalftoneTiling: 4 + - _HologramContrast: 1 + - _HologramDistortionDensity: 0.5 + - _HologramDistortionOffset: 0.5 + - _HologramDistortionScale: 10 + - _HologramDistortionSpeed: 2 + - _HologramFade: 1 + - _HologramLineFrequency: 500 + - _HologramLineGap: 3 + - _HologramLineSpeed: 0.01 + - _HologramMinAlpha: 0.2 + - _Hue: 0 + - _InkSpreadContrast: 2 + - _InkSpreadDistance: 3 + - _InkSpreadFade: 1 + - _InkSpreadNoiseFactor: 0.5 + - _InkSpreadWidth: 0.2 + - _InnerOutlineDistortionToggle: 0 + - _InnerOutlineFade: 1 + - _InnerOutlineOutlineOnlyToggle: 0 + - _InnerOutlineTextureToggle: 0 + - _InnerOutlineWidth: 0.02 + - _MetalContrast: 2 + - _MetalFade: 1 + - _MetalHighlightContrast: 2 + - _MetalHighlightDensity: 1 + - _MetalMaskToggle: 0 + - _NegativeFade: 1 + - _NormalIntensity: 1 + - _OuterOutlineDistortionToggle: 0 + - _OuterOutlineFade: 1 + - _OuterOutlineOutlineOnlyToggle: 0 + - _OuterOutlineTextureToggle: 0 + - _OuterOutlineWidth: 0.04 + - _PingPongGlowContrast: 1 + - _PingPongGlowFade: 1 + - _PingPongGlowFrequency: 3 + - _PixelOutlineFade: 1 + - _PixelOutlineOutlineOnlyToggle: 0 + - _PixelOutlineTextureToggle: 0 + - _PixelOutlineWidth: 1 + - _PixelPerfectSpace: 0 + - _PixelPerfectUV: 0 + - _PixelateFade: 1 + - _PixelatePixelDensity: 16 + - _PixelatePixelsPerUnit: 100 + - _PixelsPerUnit: 100 + - _PoisonDensity: 3 + - _PoisonFade: 1 + - _PoisonNoiseBrightness: 2 + - _PoisonRecolorFactor: 0.5 + - _PoisonShiftSpeed: 0.2 + - _RainbowBrightness: 2 + - _RainbowContrast: 1 + - _RainbowDensity: 0.5 + - _RainbowFade: 1 + - _RainbowNoiseFactor: 0.2 + - _RainbowSaturation: 1 + - _RainbowSpeed: 1 + - _RecolorRGBFade: 1 + - _RecolorRGBTextureToggle: 0 + - _RecolorRGBYCPFade: 1 + - _RecolorRGBYCPTextureToggle: 0 + - _RectHeight: 100 + - _RectWidth: 100 + - _Saturation: 1 + - _ScreenTilingPixelsPerUnit: 100 + - _ScreenWidthUnits: 10 + - _ShaderFading: 0 + - _ShaderSpace: 0 + - _ShadowFade: 1 + - _SharpenFactor: 4 + - _SharpenFade: 1 + - _SharpenOffset: 2 + - _ShiftHueSpeed: 0.5 + - _ShiftingBrightness: 1 + - _ShiftingContrast: 0.5 + - _ShiftingDensity: 1.5 + - _ShiftingFade: 1 + - _ShiftingRainbowToggle: 0 + - _ShiftingSaturation: 0.8 + - _ShiftingSpeed: 0.5 + - _ShineContrast: 2 + - _ShineFade: 1 + - _ShineFrequency: 0.3 + - _ShineMaskToggle: 0 + - _ShineRotation: 30 + - _ShineSaturation: 0.5 + - _ShineSmooth: 1 + - _ShineSpeed: 5 + - _ShineWidth: 0.1 + - _SineGlowContrast: 1 + - _SineGlowFade: 1 + - _SineGlowFrequency: 4 + - _SineGlowMaskToggle: 0 + - _SineGlowMax: 1 + - _SineGlowMin: 0 + - _SineMoveFade: 1 + - _SineRotateAngle: 15 + - _SineRotateFade: 1 + - _SineRotateFrequency: 1 + - _SineScaleFrequency: 2 + - _SmokeAlpha: 1 + - _SmokeDarkEdge: 1 + - _SmokeNoiseFactor: 0.4 + - _SmokeNoiseScale: 0.5 + - _SmokeSmoothness: 1 + - _SmokeVertexSeed: 0 + - _SourceAlphaDissolveFade: 1 + - _SourceAlphaDissolveInvert: 0 + - _SourceAlphaDissolveNoiseFactor: 0.2 + - _SourceAlphaDissolveWidth: 0.2 + - _SourceGlowDissolveFade: 1 + - _SourceGlowDissolveInvert: 0 + - _SourceGlowDissolveNoiseFactor: 0.2 + - _SourceGlowDissolveWidth: 0.1 + - _SplitToningBalance: 1 + - _SplitToningContrast: 1 + - _SplitToningFade: 1 + - _SplitToningShift: 0 + - _SpriteSheetFix: 0 + - _SqueezeFade: 1 + - _SqueezePower: 1 + - _SquishFade: 1 + - _SquishFlip: 0 + - _SquishSquish: 0.1 + - _SquishStretch: 0.1 + - _StrongTintContrast: 0 + - _StrongTintContrastToggle: 0 + - _StrongTintFade: 1 + - _StrongTintMaskToggle: 0 + - _TextureLayer1Columns: 3 + - _TextureLayer1Contrast: 1 + - _TextureLayer1ContrastToggle: 0 + - _TextureLayer1EdgeClip: 0.005 + - _TextureLayer1Fade: 1 + - _TextureLayer1Rows: 3 + - _TextureLayer1ScrollToggle: 0 + - _TextureLayer1SheetToggle: 1 + - _TextureLayer1Speed: 20 + - _TextureLayer1StartFrame: 0 + - _TextureLayer2Columns: 3 + - _TextureLayer2Contrast: 1 + - _TextureLayer2ContrastToggle: 0 + - _TextureLayer2EdgeClip: 0.005 + - _TextureLayer2Fade: 1 + - _TextureLayer2Rows: 3 + - _TextureLayer2ScrollToggle: 0 + - _TextureLayer2SheetToggle: 1 + - _TextureLayer2Speed: 20 + - _TextureLayer2StartFrame: 0 + - _TilingFix: 0 + - _TimeFPS: 5 + - _TimeFrequency: 2 + - _TimeRange: 0.5 + - _TimeSpeed: 1 + - _TimeValue: 0 + - _ToggleCustomTime: 0 + - _ToggleTimeFPS: 0 + - _ToggleTimeFrequency: 0 + - _ToggleTimeSpeed: 0 + - _ToggleUnscaledTime: 0 + - _UVDistortFade: 1 + - _UVDistortMaskToggle: 0 + - _UVRotateSpeed: 1 + - _VertexTintFirst: 0 + - _VibrateFade: 1 + - _VibrateFrequency: 100 + - _VibrateOffset: 0.04 + - _VibrateRotation: 4 + - _WiggleFade: 1 + - _WiggleFixedGroundToggle: 0 + - _WiggleFrequency: 2 + - _WiggleOffset: 0.02 + - _WiggleSpeed: 2 + - _WindFlip: 0 + - _WindHighQualityNoise: 0 + - _WindIsParallax: 0 + - _WindLocalWind: 0 + - _WindMaxIntensity: 0.4 + - _WindMaxRotation: 2 + - _WindMinIntensity: -0.4 + - _WindNoiseScale: 0.1 + - _WindNoiseSpeed: 1 + - _WindRotation: 0 + - _WindRotationWindFactor: 1 + - _WindSquishFactor: 0.3 + - _WindSquishWindFactor: 0 + - _WindXPosition: 0 + - _WorldTilingPixelsPerUnit: 100 + m_Colors: + - _AddColorColor: {r: 2.996078, g: 0, b: 0, a: 0} + - _AlphaTintColor: {r: 95.87451, g: 5.019608, b: 95.87451, a: 0} + - _BlackTintColor: {r: 0, g: 0, b: 1, a: 0} + - _BurnEdgeColor: {r: 11.98431, g: 1.129412, b: 0.1254902, a: 0} + - _BurnEdgeNoiseScale: {r: 0.3, g: 0.3, b: 0, a: 0} + - _BurnInsideColor: {r: 0.75, g: 0.5625, b: 0.525, a: 0} + - _BurnInsideNoiseColor: {r: 3084.047, g: 257.0039, b: 0, a: 0} + - _BurnInsideNoiseScale: {r: 0.5, g: 0.5, b: 0, a: 0} + - _BurnPosition: {r: 0, g: 5, b: 0, a: 0} + - _BurnSwirlNoiseScale: {r: 0.1, g: 0.1, b: 0, a: 0} + - _CamouflageBaseColor: {r: 0.7450981, g: 0.7254902, b: 0.5686274, a: 0} + - _CamouflageColorA: {r: 0.62745106, g: 0.5882353, b: 0.43137258, a: 0} + - _CamouflageColorB: {r: 0.47058815, g: 0.43137258, b: 0.31372547, a: 0} + - _CamouflageDistortionIntensity: {r: 0.1, g: 0.1, b: 0, a: 0} + - _CamouflageDistortionScale: {r: 0.5, g: 0.5, b: 0, a: 0} + - _CamouflageDistortionSpeed: {r: 0.1, g: 0.1, b: 0, a: 0} + - _CamouflageNoiseScaleA: {r: 0.25, g: 0.25, b: 0, a: 0} + - _CamouflageNoiseScaleB: {r: 0.25, g: 0.25, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _ColorReplaceFromColor: {r: 0, g: 0, b: 0, a: 0} + - _ColorReplaceToColor: {r: 0, g: 0, b: 0.2, a: 0} + - _CustomFadeNoiseScale: {r: 1, g: 1, b: 0, a: 0} + - _DirectionalAlphaFadeNoiseScale: {r: 0.3, g: 0.3, b: 0, a: 0} + - _DirectionalDistortionDistortion: {r: 0, g: 0.1, b: 0, a: 0} + - _DirectionalDistortionDistortionScale: {r: 1, g: 1, b: 0, a: 0} + - _DirectionalDistortionNoiseScale: {r: 0.4, g: 0.4, b: 0, a: 0} + - _DirectionalGlowFadeEdgeColor: {r: 11.98431, g: 0.6901961, b: 0.6901961, a: 0} + - _DirectionalGlowFadeNoiseScale: {r: 0.4, g: 0.4, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EnchantedHighColor: {r: 0, g: 0.7098798, b: 4.237095, a: 0} + - _EnchantedLowColor: {r: 2.996078, g: 0, b: 0, a: 0} + - _EnchantedScale: {r: 0.1, g: 0.1, b: 0, a: 0} + - _EnchantedSpeed: {r: 0, g: 1, b: 0, a: 0} + - _FadingNoiseScale: {r: 0.2, g: 0.2, b: 0, a: 0} + - _FadingPosition: {r: 0, g: 0, b: 0, a: 0} + - _FlameNoiseScale: {r: 1.2, g: 0.8, b: 0, a: 0} + - _FlameSpeed: {r: 0, g: -0.5, b: 0, a: 0} + - _Flip: {r: 1, g: 1, b: 1, a: 1} + - _FrozenHighlightColor: {r: 1.797647, g: 4.604501, b: 5.992157, a: 1} + - _FrozenHighlightDistortion: {r: 0.5, g: 0.5, b: 0, a: 0} + - _FrozenHighlightDistortionScale: {r: 0.2, g: 0.2, b: 0, a: 0} + - _FrozenHighlightDistortionSpeed: {r: -0.05, g: -0.05, b: 0, a: 0} + - _FrozenHighlightScale: {r: 0.2, g: 0.2, b: 0, a: 0} + - _FrozenHighlightSpeed: {r: 0.1, g: 0.1, b: 0, a: 0} + - _FrozenSnowColor: {r: 1.123529, g: 1.373203, b: 1.498039, a: 0} + - _FrozenSnowScale: {r: 0.1, g: 0.1, b: 0, a: 0} + - _FrozenTint: {r: 1.819608, g: 4.611765, b: 5.992157, a: 0} + - _FullAlphaDissolveNoiseScale: {r: 0.1, g: 0.1, b: 0, a: 0} + - _FullDistortionDistortion: {r: 0.2, g: 0.2, b: 0, a: 0} + - _FullDistortionNoiseScale: {r: 0.5, g: 0.5, b: 0, a: 0} + - _FullGlowDissolveEdgeColor: {r: 11.98431, g: 0.627451, b: 0.627451, a: 0} + - _FullGlowDissolveNoiseScale: {r: 0.1, g: 0.1, b: 0, a: 0} + - _GlitchDistortion: {r: 0.1, g: 0, b: 0, a: 0} + - _GlitchDistortionScale: {r: 0, g: 3, b: 0, a: 0} + - _GlitchDistortionSpeed: {r: 0, g: 1, b: 0, a: 0} + - _GlitchMaskScale: {r: 0, g: 0.2, b: 0, a: 0} + - _GlitchMaskSpeed: {r: 0, g: 4, b: 0, a: 0} + - _GlitchNoiseScale: {r: 0, g: 3, b: 0, a: 0} + - _GlitchNoiseSpeed: {r: 0, g: 1, b: 0, a: 0} + - _HalftonePosition: {r: 0, g: 0, b: 0, a: 0} + - _HologramTint: {r: 0.3137255, g: 1.662745, b: 2.996078, a: 1} + - _InkSpreadColor: {r: 8.47419, g: 5.013525, b: 0.08873497, a: 0} + - _InkSpreadNoiseScale: {r: 0.4, g: 0.4, b: 0, a: 0} + - _InkSpreadPosition: {r: 0.5, g: -1, b: 0, a: 0} + - _InnerOutlineColor: {r: 11.98431, g: 1.254902, b: 1.254902, a: 1} + - _InnerOutlineDistortionIntensity: {r: 0.01, g: 0.01, b: 0, a: 0} + - _InnerOutlineNoiseScale: {r: 4, g: 4, b: 0, a: 0} + - _InnerOutlineNoiseSpeed: {r: 0, g: 0.1, b: 0, a: 0} + - _InnerOutlineTextureSpeed: {r: 0.5, g: 0, b: 0, a: 0} + - _MetalColor: {r: 5.992157, g: 3.639216, b: 0.3137255, a: 1} + - _MetalHighlightColor: {r: 5.992157, g: 3.796078, b: 0.6588235, a: 1} + - _MetalNoiseDistortion: {r: 0.5, g: 0.5, b: 0, a: 0} + - _MetalNoiseDistortionScale: {r: 0.2, g: 0.2, b: 0, a: 0} + - _MetalNoiseDistortionSpeed: {r: -0.05, g: -0.05, b: 0, a: 0} + - _MetalNoiseScale: {r: 0.25, g: 0.25, b: 0, a: 0} + - _MetalNoiseSpeed: {r: 0.05, g: 0.05, b: 0, a: 0} + - _OuterOutlineColor: {r: 0, g: 0, b: 0, a: 1} + - _OuterOutlineDistortionIntensity: {r: 0.01, g: 0.01, b: 0, a: 0} + - _OuterOutlineNoiseScale: {r: 4, g: 4, b: 0, a: 0} + - _OuterOutlineNoiseSpeed: {r: 0, g: 0.1, b: 0, a: 0} + - _OuterOutlineTextureSpeed: {r: 0.5, g: 0, b: 0, a: 0} + - _PingPongGlowFrom: {r: 5.992157, g: 0.1882353, b: 0.1882353, a: 0} + - _PingPongGlowTo: {r: 0.1882353, g: 0.1882353, b: 5.992157, a: 0} + - _PixelOutlineColor: {r: 0, g: 0, b: 0, a: 1} + - _PixelOutlineTextureSpeed: {r: 0.5, g: 0, b: 0, a: 0} + - _PoisonColor: {r: 0.3137255, g: 2.996078, b: 0.3137255, a: 0} + - _PoisonNoiseScale: {r: 0.2, g: 0.2, b: 0, a: 0} + - _PoisonNoiseSpeed: {r: 0, g: -0.2, b: 0, a: 0} + - _RainbowCenter: {r: 0, g: 0, b: 0, a: 0} + - _RainbowNoiseScale: {r: 0.2, g: 0.2, b: 0, a: 0} + - _RecolorRGBBlueTint: {r: 1, g: 1, b: 1, a: 0.5019608} + - _RecolorRGBGreenTint: {r: 1, g: 1, b: 1, a: 0.5019608} + - _RecolorRGBRedTint: {r: 1, g: 1, b: 1, a: 0.5019608} + - _RecolorRGBYCPBlueTint: {r: 1, g: 1, b: 1, a: 0.5019608} + - _RecolorRGBYCPCyanTint: {r: 1, g: 1, b: 1, a: 0.5019608} + - _RecolorRGBYCPGreenTint: {r: 1, g: 1, b: 1, a: 0.5019608} + - _RecolorRGBYCPPurpleTint: {r: 1, g: 1, b: 1, a: 0.5019608} + - _RecolorRGBYCPRedTint: {r: 1, g: 1, b: 1, a: 0.5019608} + - _RecolorRGBYCPYellowTint: {r: 1, g: 1, b: 1, a: 0.5019608} + - _RendererColor: {r: 1, g: 1, b: 1, a: 1} + - _ScreenTilingOffset: {r: 0, g: 0, b: 0, a: 0} + - _ScreenTilingScale: {r: 1, g: 1, b: 0, a: 0} + - _ShadowColor: {r: 0, g: 0, b: 0, a: 0} + - _ShadowOffset: {r: 0.05, g: -0.05, b: 0, a: 0} + - _ShiftingColorA: {r: 1.498039, g: 0, b: 0, a: 0} + - _ShiftingColorB: {r: 1.498039, g: 0.7490196, b: 0, a: 0} + - _ShineColor: {r: 11.98431, g: 11.98431, b: 11.98431, a: 0} + - _SineGlowColor: {r: 0, g: 2.007843, b: 2.996078, a: 0} + - _SineMoveFrequency: {r: 1, g: 1, b: 0, a: 0} + - _SineMoveOffset: {r: 0, g: 0.5, b: 0, a: 0} + - _SineRotatePivot: {r: 0.5, g: 0.5, b: 0, a: 0} + - _SineScaleFactor: {r: 0.2, g: 0.2, b: 0, a: 0} + - _SourceAlphaDissolveNoiseScale: {r: 0.3, g: 0.3, b: 0, a: 0} + - _SourceAlphaDissolvePosition: {r: 0, g: 0, b: 0, a: 0} + - _SourceGlowDissolveEdgeColor: {r: 11.98431, g: 0.627451, b: 0.627451, a: 0} + - _SourceGlowDissolveNoiseScale: {r: 0.3, g: 0.3, b: 0, a: 0} + - _SourceGlowDissolvePosition: {r: 0, g: 0, b: 0, a: 0} + - _SplitToningHighlightsColor: {r: 1, g: 0.1, b: 0.1, a: 0} + - _SplitToningShadowsColor: {r: 0.1, g: 0.4000002, b: 1, a: 0} + - _SpriteSheetRect: {r: 0, g: 0, b: 1, a: 1} + - _SqueezeCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _SqueezeScale: {r: 2, g: 0, b: 0, a: 0} + - _StrongTintTint: {r: 1, g: 1, b: 1, a: 1} + - _TextureLayer1Color: {r: 0.4494117, g: 1.298301, b: 2.996079, a: 1} + - _TextureLayer1Offset: {r: 0, g: 0, b: 0, a: 0} + - _TextureLayer1Scale: {r: 1, g: 1, b: 0, a: 0} + - _TextureLayer1ScrollSpeed: {r: 0, g: 1, b: 0, a: 0} + - _TextureLayer2Color: {r: 0.4494117, g: 1.298301, b: 2.996079, a: 1} + - _TextureLayer2Offset: {r: 0, g: 0, b: 0, a: 0} + - _TextureLayer2Scale: {r: 1, g: 1, b: 0, a: 0} + - _TextureLayer2ScrollSpeed: {r: 0, g: 1, b: 0, a: 0} + - _UVDistortFrom: {r: -0.02, g: -0.02, b: 0, a: 0} + - _UVDistortNoiseScale: {r: 0.1, g: 0.1, b: 0, a: 0} + - _UVDistortSpeed: {r: 2, g: 2, b: 0, a: 0} + - _UVDistortTo: {r: 0.02, g: 0.02, b: 0, a: 0} + - _UVRotatePivot: {r: 0.5, g: 0.5, b: 0, a: 0} + - _UVScalePivot: {r: 0.5, g: 0.5, b: 0, a: 0} + - _UVScaleScale: {r: 1, g: 1, b: 0, a: 0} + - _UVScrollSpeed: {r: 0.2, g: 0, b: 0, a: 0} + - _WorldTilingOffset: {r: 0, g: 0, b: 0, a: 0} + - _WorldTilingScale: {r: 1, g: 1, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/Assets/Plugins/Febucci/Text Animator/Integrations/PlayMaker - Integration.unitypackage.meta b/Assets/Render/维修屏幕自发光.mat.meta similarity index 52% rename from Assets/Plugins/Febucci/Text Animator/Integrations/PlayMaker - Integration.unitypackage.meta rename to Assets/Render/维修屏幕自发光.mat.meta index 77d64a86c..9e7838845 100644 --- a/Assets/Plugins/Febucci/Text Animator/Integrations/PlayMaker - Integration.unitypackage.meta +++ b/Assets/Render/维修屏幕自发光.mat.meta @@ -1,7 +1,8 @@ fileFormatVersion: 2 -guid: fb01be13d6e88ca488dda82150319bfc -DefaultImporter: +guid: d0db0a66c7ed71842bfd57ed3b4b7fce +NativeFormatImporter: externalObjects: {} + mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Plugins/Febucci/Text Animator/Extra/Typewriter Sound - Package.unitypackage.meta b/Assets/Resources/Art/CG.meta similarity index 67% rename from Assets/Plugins/Febucci/Text Animator/Extra/Typewriter Sound - Package.unitypackage.meta rename to Assets/Resources/Art/CG.meta index 4801b3793..8605d402d 100644 --- a/Assets/Plugins/Febucci/Text Animator/Extra/Typewriter Sound - Package.unitypackage.meta +++ b/Assets/Resources/Art/CG.meta @@ -1,5 +1,6 @@ fileFormatVersion: 2 -guid: 560a88da2bbc70140bed167f0ba7fe37 +guid: fb704edc34c39d04bbfb5eb5f0bae693 +folderAsset: yes DefaultImporter: externalObjects: {} userData: diff --git a/Assets/RawResources/Art/开场1.png b/Assets/Resources/Art/CG/开场1.png similarity index 100% rename from Assets/RawResources/Art/开场1.png rename to Assets/Resources/Art/CG/开场1.png diff --git a/Assets/RawResources/Art/开场1.png.meta b/Assets/Resources/Art/CG/开场1.png.meta similarity index 100% rename from Assets/RawResources/Art/开场1.png.meta rename to Assets/Resources/Art/CG/开场1.png.meta diff --git a/Assets/RawResources/Art/开场10.png b/Assets/Resources/Art/CG/开场10.png similarity index 100% rename from Assets/RawResources/Art/开场10.png rename to Assets/Resources/Art/CG/开场10.png diff --git a/Assets/RawResources/Art/开场10.png.meta b/Assets/Resources/Art/CG/开场10.png.meta similarity index 100% rename from Assets/RawResources/Art/开场10.png.meta rename to Assets/Resources/Art/CG/开场10.png.meta diff --git a/Assets/RawResources/Art/开场11.png b/Assets/Resources/Art/CG/开场11.png similarity index 100% rename from Assets/RawResources/Art/开场11.png rename to Assets/Resources/Art/CG/开场11.png diff --git a/Assets/RawResources/Art/开场11.png.meta b/Assets/Resources/Art/CG/开场11.png.meta similarity index 100% rename from Assets/RawResources/Art/开场11.png.meta rename to Assets/Resources/Art/CG/开场11.png.meta diff --git a/Assets/RawResources/Art/开场12.png b/Assets/Resources/Art/CG/开场12.png similarity index 100% rename from Assets/RawResources/Art/开场12.png rename to Assets/Resources/Art/CG/开场12.png diff --git a/Assets/RawResources/Art/开场12.png.meta b/Assets/Resources/Art/CG/开场12.png.meta similarity index 100% rename from Assets/RawResources/Art/开场12.png.meta rename to Assets/Resources/Art/CG/开场12.png.meta diff --git a/Assets/RawResources/Art/开场13.png b/Assets/Resources/Art/CG/开场13.png similarity index 100% rename from Assets/RawResources/Art/开场13.png rename to Assets/Resources/Art/CG/开场13.png diff --git a/Assets/RawResources/Art/开场13.png.meta b/Assets/Resources/Art/CG/开场13.png.meta similarity index 100% rename from Assets/RawResources/Art/开场13.png.meta rename to Assets/Resources/Art/CG/开场13.png.meta diff --git a/Assets/RawResources/Art/开场2.png b/Assets/Resources/Art/CG/开场2.png similarity index 100% rename from Assets/RawResources/Art/开场2.png rename to Assets/Resources/Art/CG/开场2.png diff --git a/Assets/RawResources/Art/开场2.png.meta b/Assets/Resources/Art/CG/开场2.png.meta similarity index 100% rename from Assets/RawResources/Art/开场2.png.meta rename to Assets/Resources/Art/CG/开场2.png.meta diff --git a/Assets/RawResources/Art/开场3.png b/Assets/Resources/Art/CG/开场3.png similarity index 100% rename from Assets/RawResources/Art/开场3.png rename to Assets/Resources/Art/CG/开场3.png diff --git a/Assets/RawResources/Art/开场3.png.meta b/Assets/Resources/Art/CG/开场3.png.meta similarity index 100% rename from Assets/RawResources/Art/开场3.png.meta rename to Assets/Resources/Art/CG/开场3.png.meta diff --git a/Assets/RawResources/Art/开场4.png b/Assets/Resources/Art/CG/开场4.png similarity index 100% rename from Assets/RawResources/Art/开场4.png rename to Assets/Resources/Art/CG/开场4.png diff --git a/Assets/RawResources/Art/开场4.png.meta b/Assets/Resources/Art/CG/开场4.png.meta similarity index 100% rename from Assets/RawResources/Art/开场4.png.meta rename to Assets/Resources/Art/CG/开场4.png.meta diff --git a/Assets/RawResources/Art/开场5.png b/Assets/Resources/Art/CG/开场5.png similarity index 100% rename from Assets/RawResources/Art/开场5.png rename to Assets/Resources/Art/CG/开场5.png diff --git a/Assets/RawResources/Art/开场5.png.meta b/Assets/Resources/Art/CG/开场5.png.meta similarity index 100% rename from Assets/RawResources/Art/开场5.png.meta rename to Assets/Resources/Art/CG/开场5.png.meta diff --git a/Assets/RawResources/Art/开场6.png b/Assets/Resources/Art/CG/开场6.png similarity index 100% rename from Assets/RawResources/Art/开场6.png rename to Assets/Resources/Art/CG/开场6.png diff --git a/Assets/RawResources/Art/开场6.png.meta b/Assets/Resources/Art/CG/开场6.png.meta similarity index 100% rename from Assets/RawResources/Art/开场6.png.meta rename to Assets/Resources/Art/CG/开场6.png.meta diff --git a/Assets/RawResources/Art/开场7.png b/Assets/Resources/Art/CG/开场7.png similarity index 100% rename from Assets/RawResources/Art/开场7.png rename to Assets/Resources/Art/CG/开场7.png diff --git a/Assets/RawResources/Art/开场7.png.meta b/Assets/Resources/Art/CG/开场7.png.meta similarity index 100% rename from Assets/RawResources/Art/开场7.png.meta rename to Assets/Resources/Art/CG/开场7.png.meta diff --git a/Assets/RawResources/Art/开场8.png b/Assets/Resources/Art/CG/开场8.png similarity index 100% rename from Assets/RawResources/Art/开场8.png rename to Assets/Resources/Art/CG/开场8.png diff --git a/Assets/RawResources/Art/开场8.png.meta b/Assets/Resources/Art/CG/开场8.png.meta similarity index 100% rename from Assets/RawResources/Art/开场8.png.meta rename to Assets/Resources/Art/CG/开场8.png.meta diff --git a/Assets/RawResources/Art/开场9.png b/Assets/Resources/Art/CG/开场9.png similarity index 100% rename from Assets/RawResources/Art/开场9.png rename to Assets/Resources/Art/CG/开场9.png diff --git a/Assets/RawResources/Art/开场9.png.meta b/Assets/Resources/Art/CG/开场9.png.meta similarity index 100% rename from Assets/RawResources/Art/开场9.png.meta rename to Assets/Resources/Art/CG/开场9.png.meta diff --git a/Assets/Resources/Yarn/FP_Prologue/EventNode.yarn b/Assets/Resources/Yarn/FP_Prologue/EventNode.yarn index f6e1fac98..12034d341 100644 --- a/Assets/Resources/Yarn/FP_Prologue/EventNode.yarn +++ b/Assets/Resources/Yarn/FP_Prologue/EventNode.yarn @@ -127,4 +127,10 @@ title: 拿起插头 <> <> <> -=== \ No newline at end of file +=== +title: ShockEffect +--- +//<> +<> +=== + diff --git a/Assets/Resources/Yarn/FP_Prologue/Stage2-5_切割.yarn b/Assets/Resources/Yarn/FP_Prologue/Stage2-5_切割.yarn index 942b6c911..5a2d3d5b6 100644 --- a/Assets/Resources/Yarn/FP_Prologue/Stage2-5_切割.yarn +++ b/Assets/Resources/Yarn/FP_Prologue/Stage2-5_切割.yarn @@ -6,7 +6,10 @@ position: 250,-2612 //患者正在发生“原型排异溃解”,表现为患者持续听到一个不存在的声音在说话,同时伴随部分模块的“递归性坏死”——高热且核心完整度不断下降,影响机体的运行体征 //医生要处理这些坏死,防止机体整体溃解关机 ////需要用两种跳字效果来区分两个人格 -<> +//<> +<> +->开始电击 + <> // <> // <> // <> diff --git a/Assets/Scenes/OpenFixScene.unity b/Assets/Scenes/OpenFixScene.unity index 36ea9e318..92dab870c 100644 --- a/Assets/Scenes/OpenFixScene.unity +++ b/Assets/Scenes/OpenFixScene.unity @@ -2627,12 +2627,12 @@ GameObject: - component: {fileID: 397085927} - component: {fileID: 397085926} m_Layer: 0 - m_Name: Body Module Camera (1) + m_Name: capturecamera m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &397085925 Transform: m_ObjectHideFlags: 0 @@ -5600,6 +5600,7 @@ GameObject: m_Component: - component: {fileID: 772885936} - component: {fileID: 772885935} + - component: {fileID: 772885937} m_Layer: 0 m_Name: ECT System m_TagString: Untagged @@ -5631,6 +5632,7 @@ MonoBehaviour: - {fileID: 21300000, guid: ec352317d5419ee46bcd238c319ac018, type: 3} - {fileID: 21300000, guid: 79aa88d0c51f4034d8366baa2ca3ee18, type: 3} - {fileID: 21300000, guid: abf3d660f8e0cb14395c6a334574331e, type: 3} + spriteFlashSystem: {fileID: 0} shockDeviceTargetPos: {x: 0, y: 4.85, z: 0} operationPanelTargetPos: {x: 0, y: -3.37, z: 0} moveDuration: 1 @@ -5638,6 +5640,7 @@ MonoBehaviour: progressIncreaseSpeed: 8 maxSliderValue: 1 progressDecreaseDuration: 1 + shockEffectNode: ShockEffect flashDuration: 0.08 flashInterval: 0.08 flashCount: 3 @@ -5648,6 +5651,8 @@ MonoBehaviour: vibrateInterval: 0.1 deviceShakeAmount: 0.1 deviceShakeSpeed: 10 + autoChargeSpeed: 5 + autoChargeDuration: 1 --- !u!4 &772885936 Transform: m_ObjectHideFlags: 0 @@ -5664,6 +5669,21 @@ Transform: - {fileID: 535543740} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &772885937 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 772885934} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e4e574bae7168264e891b7d56657ffcd, type: 3} + m_Name: + m_EditorClassIdentifier: + targetSpriteRenderer: {fileID: 780210808} + backupSpriteRenderer: {fileID: 1250150727} + volume1: {fileID: 618178171} --- !u!1 &780210807 GameObject: m_ObjectHideFlags: 0 @@ -7065,14 +7085,25 @@ PrefabInstance: propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} + - target: {fileID: 7116129559997451062, guid: 7c9077b0433a4cf45812d3d82e129d9d, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7116129559997451062, guid: 7c9077b0433a4cf45812d3d82e129d9d, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 4603709260742992854, guid: 7c9077b0433a4cf45812d3d82e129d9d, type: 3} + - targetCorrespondingSourceObject: {fileID: 4948098436771859786, guid: 7c9077b0433a4cf45812d3d82e129d9d, type: 3} insertIndex: -1 addedObject: {fileID: 0} - - targetCorrespondingSourceObject: {fileID: 6547948142324226539, guid: 7c9077b0433a4cf45812d3d82e129d9d, type: 3} + - targetCorrespondingSourceObject: {fileID: 121900714768848222, guid: 7c9077b0433a4cf45812d3d82e129d9d, type: 3} + insertIndex: -1 + addedObject: {fileID: 0} + - targetCorrespondingSourceObject: {fileID: 4865623556374582975, guid: 7c9077b0433a4cf45812d3d82e129d9d, type: 3} insertIndex: -1 addedObject: {fileID: 0} m_SourcePrefab: {fileID: 100100000, guid: 7c9077b0433a4cf45812d3d82e129d9d, type: 3} @@ -10006,7 +10037,7 @@ Transform: m_GameObject: {fileID: 1332835982} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: 0.38268343, w: 0.92387956} - m_LocalPosition: {x: -6.620001, y: -5.3715854, z: 0} + m_LocalPosition: {x: -7.58, y: -5.3715854, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -12263,7 +12294,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1800817883 MonoBehaviour: m_ObjectHideFlags: 0 @@ -12276,33 +12307,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e4e574bae7168264e891b7d56657ffcd, type: 3} m_Name: m_EditorClassIdentifier: - spriteList: - - {fileID: 21300000, guid: 77d8a89005a96784ba8eb8924c4466e6, type: 3} - - {fileID: 21300000, guid: 2e403966a482d4a4c8a545dcd909efd6, type: 3} - - {fileID: 21300000, guid: 77d8a89005a96784ba8eb8924c4466e6, type: 3} - - {fileID: 21300000, guid: 441bc569aab15334e92b2a3232d9093c, type: 3} - - {fileID: 21300000, guid: 77d8a89005a96784ba8eb8924c4466e6, type: 3} - - {fileID: 21300000, guid: 77d8a89005a96784ba8eb8924c4466e6, type: 3} - - {fileID: 21300000, guid: 0a812c3a88fae694fad267bc8e51194f, type: 3} - - {fileID: 21300000, guid: d57cdb41ad6f98c4aacf27eb1f3669d1, type: 3} - - {fileID: 21300000, guid: 2e403966a482d4a4c8a545dcd909efd6, type: 3} - - {fileID: 21300000, guid: d57cdb41ad6f98c4aacf27eb1f3669d1, type: 3} - - {fileID: 21300000, guid: 2e403966a482d4a4c8a545dcd909efd6, type: 3} - - {fileID: 21300000, guid: 441bc569aab15334e92b2a3232d9093c, type: 3} - - {fileID: 21300000, guid: 467ca6472bd01724c8546cec9cc079d7, type: 3} - - {fileID: 21300000, guid: 441bc569aab15334e92b2a3232d9093c, type: 3} - - {fileID: 21300000, guid: 467ca6472bd01724c8546cec9cc079d7, type: 3} - - {fileID: 21300000, guid: 0a812c3a88fae694fad267bc8e51194f, type: 3} - endingSpriteList: - - {fileID: 21300000, guid: 7cc44505666b77e4f9b5ea55761f0031, type: 3} - - {fileID: 21300000, guid: 9afe4524e3d14c741bf7742e6d9852fc, type: 3} - - {fileID: 21300000, guid: ba06e0cd0d0c2c442bb201ecfed521cc, type: 3} - - {fileID: 21300000, guid: 04846883ff6329044bcfc33a53421046, type: 3} - - {fileID: 21300000, guid: 74d04ce5d006d1243ba6cf93d75bae43, type: 3} targetSpriteRenderer: {fileID: 780210808} backupSpriteRenderer: {fileID: 1250150727} - fadeDuration: 0.1 - crossFadeDuration: 3 volume1: {fileID: 618178171} --- !u!4 &1800817884 Transform: diff --git a/Assets/Scripts/FixSystemNew/FixSystemYarnCommand.cs b/Assets/Scripts/FixSystemNew/FixSystemYarnCommand.cs index 571d4de31..dd8bfb4ea 100644 --- a/Assets/Scripts/FixSystemNew/FixSystemYarnCommand.cs +++ b/Assets/Scripts/FixSystemNew/FixSystemYarnCommand.cs @@ -5,8 +5,11 @@ using Yarn.Unity; namespace AibisDream.FixSystem { + public static class FixSystemYarnCommand { + private static ShockSystem ShockSystem => FixSystemCenter.SystemDic.Get(); + [YarnCommand("switch_fix_system_to")] public static IEnumerator SwitchFixSystemTo(string targetStateStr, string extraArg = "") { diff --git a/Assets/Scripts/FixSystemNew/Open/OpenYarnCommand.cs b/Assets/Scripts/FixSystemNew/Open/OpenYarnCommand.cs new file mode 100644 index 000000000..953e9e637 --- /dev/null +++ b/Assets/Scripts/FixSystemNew/Open/OpenYarnCommand.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections; +using UnityEngine; +using Yarn.Unity; + +namespace AibisDream.FixSystem +{ + public static class OpenYarnCommand + { + private static ShockSystem ShockSystem => FixSystemCenter.SystemDic.Get(); + + [YarnCommand("play_shock_flash")] + public static IEnumerator PlayShockFlash() + { + yield return ShockSystem.PlayFlashEffect(); + } + + [YarnCommand("play_shock_flashback")] + public static IEnumerator PlayShockFlashback(string imagePath) + { + var spriteFlashSystem = ShockSystem.GetComponent(); + if (spriteFlashSystem != null) + { + yield return spriteFlashSystem.TriggerFlash(imagePath); + } + } + + [YarnCommand("start_shock")] + public static IEnumerator StartShock() + { + yield return ShockSystem.StartShock(); + } + + [YarnCommand("auto_charge_and_release")] + public static IEnumerator AutoChargeAndRelease() + { + yield return ShockSystem.AutoChargeAndRelease(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/FixSystemNew/Open/OpenYarnCommand.cs.meta b/Assets/Scripts/FixSystemNew/Open/OpenYarnCommand.cs.meta new file mode 100644 index 000000000..addf31bd7 --- /dev/null +++ b/Assets/Scripts/FixSystemNew/Open/OpenYarnCommand.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 447ac65a1c0c7fe4d9138158d0605067 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/FixSystemNew/Open/ShockSystem.cs b/Assets/Scripts/FixSystemNew/Open/ShockSystem.cs index d9bce2643..07e498e1a 100644 --- a/Assets/Scripts/FixSystemNew/Open/ShockSystem.cs +++ b/Assets/Scripts/FixSystemNew/Open/ShockSystem.cs @@ -6,6 +6,9 @@ using RainbowArt.CleanFlatUI; using System.Collections.Generic; using AibisDream.Framework; using UnityEngine.EventSystems; +using AibisDream.FixSystem; +using System.Collections; +using AibisDream; // 添加 SpriteFlashSystem 的命名空间 public class ShockSystem : MonoBehaviour { @@ -19,6 +22,7 @@ public class ShockSystem : MonoBehaviour [SerializeField] private SpriteRenderer flashBackgroundSpriteRenderer; // 背景闪烁精灵渲染器 [SerializeField] private SpriteRenderer flashSpriteRenderer; [SerializeField] private List flashHeadSprites; // 头部闪烁精灵列表 + [SerializeField] private SpriteFlashSystem spriteFlashSystem; // Sprite闪烁系统 [Header("Settings")] [SerializeField] private Vector3 shockDeviceTargetPos; // 电击器目标位置 [SerializeField] private Vector3 operationPanelTargetPos; // 操作面板目标位置 @@ -27,6 +31,7 @@ public class ShockSystem : MonoBehaviour [SerializeField] private float progressIncreaseSpeed = 1f; // 进度增加基础速度 [SerializeField] private float maxSliderValue = 3f; // 滑块最大值 [SerializeField] private float progressDecreaseDuration = 1f; // 进度下降持续时间 + [SerializeField] private string shockEffectNode = "ShockEffect"; // 电击效果节点名称 [Header("Shock Effects")] [SerializeField] private float flashDuration = 0.1f; // 每次闪烁持续时间 @@ -40,6 +45,10 @@ public class ShockSystem : MonoBehaviour [SerializeField] private float deviceShakeAmount = 0.1f; // 电击器震动幅度 [SerializeField] private float deviceShakeSpeed = 10f; // 电击器震动速度 + [Header("Auto Charge Settings")] + [SerializeField] private float autoChargeSpeed = 5f; // 自动充能速度 + [SerializeField] private float autoChargeDuration = 1f; // 自动充能持续时间 + private bool isCharging = false; private float currentProgress = 0f; private Slider baseSlider; // 基础Slider组件 @@ -51,6 +60,18 @@ public class ShockSystem : MonoBehaviour private Vector3 deviceOriginalPos; // 电击器原始位置 private Tweener deviceShakeTweener; // 电击器震动动画 + // 公共访问器 + public float FlashDuration => flashDuration; + public float FlashInterval => flashInterval; + public int FlashCount => flashCount; + + private void Awake() + { + // 注册 + FixSystemCenter.SystemDic.Register(this); + } + + private void Start() { // 保存电击器原始位置 @@ -98,14 +119,41 @@ public class ShockSystem : MonoBehaviour } - InitializeShock(); + //InitializeShock(); } - public void InitializeShock() + // public void InitializeShock() + // { + // // 移动电击器和操作面板到指定位置 + // shockDevice.DOLocalMove(shockDeviceTargetPos, moveDuration); + // operationPanel.DOLocalMove(operationPanelTargetPos, moveDuration); + // powerSlider.EnableSliderInteraction(); + // } + + // public void SetFlashBack(bool useFlashback,) + // { + // this.useFlashback = useFlashback; + // } + + public IEnumerator StartShock() { // 移动电击器和操作面板到指定位置 - shockDevice.DOLocalMove(shockDeviceTargetPos, moveDuration); - operationPanel.DOLocalMove(operationPanelTargetPos, moveDuration); + var move1 = shockDevice.DOLocalMove(shockDeviceTargetPos, moveDuration); + var move2 = operationPanel.DOLocalMove(operationPanelTargetPos, moveDuration); + powerSlider.EnableSliderInteraction(); + + yield return move1.WaitForCompletion(); + yield return move2.WaitForCompletion(); + } + + public IEnumerator StopShock() + { + var move1 = shockDevice.DOLocalMove(deviceOriginalPos, moveDuration); + var move2 = operationPanel.DOLocalMove(operationPanelTargetPos, moveDuration); + powerSlider.DisableSliderInteraction(); + + yield return move1.WaitForCompletion(); + yield return move2.WaitForCompletion(); } private void OnSliderValueChanged(float value) @@ -123,11 +171,6 @@ public class ShockSystem : MonoBehaviour deviceShakeTweener.Kill(); deviceShakeTweener = null; } - // 重置电击器位置 - // if (shockDevice != null) - // { - // shockDevice.localPosition = deviceOriginalPos; - // } } // 如果滑块值大于0,取消回弹动画 if (value > 0 && sliderReturnTweener != null) @@ -137,10 +180,6 @@ public class ShockSystem : MonoBehaviour sliderBar.localPosition = new Vector3(0, -89, 0); } - // 更新推杆的缩放 - // float t = value / maxSliderValue; - // sliderBar.localScale = Vector3.Lerp(sliderBarStartScale, sliderBarEndScale, t); - if (value > 0) { if (!isCharging) @@ -157,7 +196,8 @@ public class ShockSystem : MonoBehaviour // 只有在进度条满时才触发闪烁效果 if (currentProgress >= progressBar.MaxValue) { - PlayFlashEffect(); + // 触发 Yarn 节点来决定使用哪种效果 + DialogController.Instance.StartDialogNode(shockEffectNode); } // 重置进度条 ResetProgress(); @@ -267,7 +307,7 @@ public class ShockSystem : MonoBehaviour } } - private void PlayFlashEffect() + public IEnumerator PlayFlashEffect() { if (flashSequence != null) { @@ -289,17 +329,6 @@ public class ShockSystem : MonoBehaviour flashBackgroundSpriteRenderer.color = new Color(0, 0, 0, 1f); // 确保初始alpha为0 } - // // 首先整体淡入 - // if (flashHeadSpriteRenderer != null) - // { - // flashSequence.Join(flashHeadSpriteRenderer.DOFade(1f, flashDuration)); - // } - // if (flashBackgroundSpriteRenderer != null) - // { - // flashSequence.Join(flashBackgroundSpriteRenderer.DOFade(1f, flashDuration)); - // } - // flashHeadSpriteRenderer - // 创建指定次数的闪烁 for (int i = 0; i < flashCount; i++) { @@ -310,12 +339,10 @@ public class ShockSystem : MonoBehaviour if (currentFlashHeadIndex == 1) { flashBackgroundSpriteRenderer.color = Color.white; - //flashSpriteRenderer.gameObject.SetActive(true); } else { flashBackgroundSpriteRenderer.color = Color.black; - //flashSpriteRenderer.gameObject.SetActive(false); } // 切换头部图片 @@ -334,7 +361,6 @@ public class ShockSystem : MonoBehaviour } } - // 最后整体淡出 if (flashHeadSpriteRenderer != null) { @@ -345,21 +371,55 @@ public class ShockSystem : MonoBehaviour flashSequence.Join(flashBackgroundSpriteRenderer.DOFade(0f, flashDuration)); } + // 等待序列完成 + yield return flashSequence.WaitForCompletion(); + // 闪烁结束后禁用所有精灵并重置状态 - flashSequence.OnComplete(() => + if (flashHeadSpriteRenderer != null) { - if (flashHeadSpriteRenderer != null) - { - flashHeadSpriteRenderer.gameObject.SetActive(false); - flashHeadSpriteRenderer.color = new Color(1, 1, 1, 0); - flashHeadSpriteRenderer.sprite = flashHeadSprites[0]; - } - if (flashBackgroundSpriteRenderer != null) - { - flashBackgroundSpriteRenderer.gameObject.SetActive(false); - flashBackgroundSpriteRenderer.color = new Color(0, 0, 0, 0); - } - }); + flashHeadSpriteRenderer.gameObject.SetActive(false); + flashHeadSpriteRenderer.color = new Color(1, 1, 1, 0); + flashHeadSpriteRenderer.sprite = flashHeadSprites[0]; + } + if (flashBackgroundSpriteRenderer != null) + { + flashBackgroundSpriteRenderer.gameObject.SetActive(false); + flashBackgroundSpriteRenderer.color = new Color(0, 0, 0, 0); + } + } + + // 自动充能并释放 + public IEnumerator AutoChargeAndRelease(float chargeSpeed = 5f, float duration = 1f) + { + // 设置滑块值 + baseSlider.value = maxSliderValue; + + // 等待充能完成 + float startTime = Time.time; + while (Time.time - startTime < duration) + { + // 使用指定的充能速度 + currentProgress += chargeSpeed * Time.deltaTime; + progressBar.CurrentValue = Mathf.FloorToInt(currentProgress); + yield return null; + } + + // 确保进度达到最大值 + currentProgress = progressBar.MaxValue; + progressBar.CurrentValue = Mathf.FloorToInt(currentProgress); + + // 触发 Yarn 节点来决定使用哪种效果 + DialogController.Instance.StartDialogNode(shockEffectNode); + + // 重置滑块 + baseSlider.value = 0; + ResetProgress(); + } + + // 使用默认参数的自动充能方法 + public IEnumerator AutoChargeAndRelease() + { + yield return AutoChargeAndRelease(autoChargeSpeed, autoChargeDuration); } private void OnDestroy() diff --git a/Assets/Scripts/FixSystemNew/Open/SpriteFlashSystem.cs b/Assets/Scripts/FixSystemNew/Open/SpriteFlashSystem.cs index 57c911e07..1201abd73 100644 --- a/Assets/Scripts/FixSystemNew/Open/SpriteFlashSystem.cs +++ b/Assets/Scripts/FixSystemNew/Open/SpriteFlashSystem.cs @@ -2,22 +2,19 @@ using UnityEngine; using System.Collections.Generic; using DG.Tweening; using UnityEngine.Rendering; +using System.Collections; namespace AibisDream { public class SpriteFlashSystem : MonoBehaviour { - [Header("Sprite Flash Settings")] - [SerializeField] private List spriteList = new List(); - [SerializeField] private List endingSpriteList = new List(); - [SerializeField] private SpriteRenderer targetSpriteRenderer; - [SerializeField] private SpriteRenderer backupSpriteRenderer; - [SerializeField] private float fadeDuration = 0.5f; - [SerializeField] private float crossFadeDuration = 2f; + [Header("References")] + [SerializeField] private SpriteRenderer targetSpriteRenderer; + [SerializeField] private SpriteRenderer backupSpriteRenderer; + // [SerializeField] private float fadeDuration = 0.5f; + // [SerializeField] private float crossFadeDuration = 2f; [SerializeField] private UnityEngine.Rendering.Volume volume1; - private Stack spriteStack; - private Stack endingSpriteStack; private bool isFading = false; private bool isEndingMode = false; private DG.Tweening.Sequence currentSequence; @@ -25,29 +22,6 @@ namespace AibisDream private void Awake() { - Debug.Log("SpriteFlashSystem Awake"); - // 初始化Sprite栈 - if (spriteList != null && spriteList.Count > 0) - { - spriteStack = new Stack(spriteList); - Debug.Log($"初始化Sprite栈,共有{spriteStack.Count}个Sprite"); - } - else - { - Debug.LogWarning("Sprite列表为空!"); - } - - // 初始化Ending Sprite栈 - if (endingSpriteList != null && endingSpriteList.Count > 0) - { - endingSpriteStack = new Stack(endingSpriteList); - Debug.Log($"初始化Ending Sprite栈,共有{endingSpriteStack.Count}个Sprite"); - } - else - { - Debug.LogWarning("Ending Sprite列表为空!"); - } - // 确保SpriteRenderer初始状态正确 if (targetSpriteRenderer != null) { @@ -68,116 +42,141 @@ namespace AibisDream } } - private void Update() + public IEnumerator TriggerFlash(string imagePath, float fadeDuration = 0.5f) { - if (Input.GetKeyDown(KeyCode.Space)) + if (!isFading) { - Debug.Log("按下空格键"); - if (!isFading) + string fullPath = $"Assets/Resources/Art/CG/{imagePath}"; + Sprite flashSprite = Resources.Load($"Art/CG/{imagePath}"); + if (flashSprite != null) { - if (!isEndingMode && spriteStack != null && spriteStack.Count > 0) - { - StartSpriteFlash(); - } - else if (isEndingMode && endingSpriteStack != null && endingSpriteStack.Count > 0) - { - StartEndingCrossFade(); - } + yield return StartFlash(flashSprite, fadeDuration); } else { - Debug.Log($"无法开始闪烁:isFading={isFading}, spriteStack.Count={spriteStack?.Count ?? 0}"); + Debug.LogError($"无法加载闪回图片: {fullPath}"); } } + else + { + Debug.Log($"无法开始闪烁:isFading={isFading}"); + } } - private void StartSpriteFlash() + public void TriggerEnding(string imagePath,float fadeDuration=2f) + { + if (!isFading) + { + string fullPath = $"Assets/Resources/Art/CG/{imagePath}"; + Sprite endingSprite = Resources.Load($"Art/CG/{imagePath}"); + if (endingSprite != null) + { + if (currentEndingIndex == 0) + { + // 第一张图片使用淡入效果 + StartEndingFadeIn(endingSprite,fadeDuration); + } + else + { + // 后续图片使用交叉淡入淡出效果 + StartEndingCrossFade(endingSprite,fadeDuration); + } + currentEndingIndex++; + } + else + { + Debug.LogError($"无法加载结局图片: {fullPath}"); + } + } + else + { + Debug.Log($"无法开始闪烁:isFading={isFading}"); + } + } + + private IEnumerator StartFlash(Sprite flashSprite, float fadeDuration = 0.5f) { Debug.Log("开始Sprite闪烁"); - if (spriteStack.Count > 0) - { - isFading = true; - var nextSprite = spriteStack.Pop(); - Debug.Log($"设置下一个Sprite: {nextSprite.name}"); - targetSpriteRenderer.sprite = nextSprite; - targetSpriteRenderer.color = new Color(1f, 1f, 1f, 0f); + isFading = true; + targetSpriteRenderer.sprite = flashSprite; + targetSpriteRenderer.color = new Color(1f, 1f, 1f, 0f); - // 创建新的序列 - currentSequence?.Kill(); - currentSequence = DOTween.Sequence(); + // 创建新的序列 + currentSequence?.Kill(); + currentSequence = DOTween.Sequence(); - // 添加淡入效果 - currentSequence.Append(targetSpriteRenderer.DOFade(1f, fadeDuration).SetEase(Ease.InOutSine)); - if (volume1 != null) - currentSequence.Join(DOTween.To(() => volume1.weight, x => volume1.weight = x, 1f, fadeDuration).SetEase(Ease.InOutSine)); + // 添加淡入效果 + currentSequence.Append(targetSpriteRenderer.DOFade(1f, fadeDuration).SetEase(Ease.InOutSine)); + if (volume1 != null) + currentSequence.Join(DOTween.To(() => volume1.weight, x => volume1.weight = x, 1f, fadeDuration).SetEase(Ease.InOutSine)); - // 添加淡出效果 - currentSequence.Append(targetSpriteRenderer.DOFade(0f, fadeDuration).SetEase(Ease.InOutSine)); - if (volume1 != null) - currentSequence.Join(DOTween.To(() => volume1.weight, x => volume1.weight = x, 0f, fadeDuration).SetEase(Ease.InOutSine)); + // 添加淡出效果 + currentSequence.Append(targetSpriteRenderer.DOFade(0f, fadeDuration).SetEase(Ease.InOutSine)); + if (volume1 != null) + currentSequence.Join(DOTween.To(() => volume1.weight, x => volume1.weight = x, 0f, fadeDuration).SetEase(Ease.InOutSine)); - // 完成后重置状态 - currentSequence.OnComplete(() => { - Debug.Log("闪烁效果完成"); - isFading = false; - currentSequence = null; + // 等待序列完成 + yield return currentSequence.WaitForCompletion(); - // 检查是否需要切换到ending模式 - if (spriteStack.Count == 0 && endingSpriteStack != null && endingSpriteStack.Count > 0) - { - isEndingMode = true; - Debug.Log("切换到Ending模式"); - // 显示第一张ending sprite - ShowNextEndingSprite(); - } - }); - } + // 完成后重置状态 + Debug.Log("闪烁效果完成"); + isFading = false; + currentSequence = null; + DialogController.Instance.StartDialogNode("闪回完成"); } - private void ShowNextEndingSprite() + private void StartEndingFadeIn(Sprite endingSprite,float fadeDuration=2f) { - if (endingSpriteStack.Count > 0) - { - var nextSprite = endingSpriteStack.Pop(); - targetSpriteRenderer.sprite = nextSprite; + isFading = true; + targetSpriteRenderer.sprite = endingSprite; + targetSpriteRenderer.color = new Color(1f, 1f, 1f, 0f); + + // 创建新的序列 + currentSequence?.Kill(); + currentSequence = DOTween.Sequence(); + + // 添加淡入效果 + currentSequence.Append(targetSpriteRenderer.DOFade(1f, fadeDuration).SetEase(Ease.InOutSine)); + if (volume1 != null) + currentSequence.Join(DOTween.To(() => volume1.weight, x => volume1.weight = x, 1f, fadeDuration).SetEase(Ease.InOutSine)); + + // 完成后重置状态 + currentSequence.OnComplete(() => { + isFading = false; + currentSequence = null; + }); + } + + private void StartEndingCrossFade(Sprite endingSprite,float crossFadeDuration=2f) + { + isFading = true; + + // 设置备用渲染器的sprite + backupSpriteRenderer.sprite = endingSprite; + backupSpriteRenderer.color = new Color(1f, 1f, 1f, 0f); + + // 创建新的序列 + currentSequence?.Kill(); + currentSequence = DOTween.Sequence(); + + // 当前sprite淡出,同时备用sprite淡入 + currentSequence.Join(targetSpriteRenderer.DOFade(0f, crossFadeDuration).SetEase(Ease.InOutSine)); + currentSequence.Join(backupSpriteRenderer.DOFade(1f, crossFadeDuration).SetEase(Ease.InOutSine)); + + // 完成后交换两个渲染器的角色 + currentSequence.OnComplete(() => { + // 交换sprite + var tempSprite = targetSpriteRenderer.sprite; + targetSpriteRenderer.sprite = backupSpriteRenderer.sprite; + backupSpriteRenderer.sprite = tempSprite; + + // 重置透明度 targetSpriteRenderer.color = new Color(1f, 1f, 1f, 1f); - } - } - - private void StartEndingCrossFade() - { - if (endingSpriteStack.Count > 0) - { - isFading = true; - var nextSprite = endingSpriteStack.Pop(); - - // 设置备用渲染器的sprite - backupSpriteRenderer.sprite = nextSprite; backupSpriteRenderer.color = new Color(1f, 1f, 1f, 0f); - // 创建新的序列 - currentSequence?.Kill(); - currentSequence = DOTween.Sequence(); - - // 当前sprite淡出,同时备用sprite淡入 - currentSequence.Join(targetSpriteRenderer.DOFade(0f, crossFadeDuration).SetEase(Ease.InOutSine)); - currentSequence.Join(backupSpriteRenderer.DOFade(1f, crossFadeDuration).SetEase(Ease.InOutSine)); - - // 完成后交换两个渲染器的角色 - currentSequence.OnComplete(() => { - // 交换sprite - var tempSprite = targetSpriteRenderer.sprite; - targetSpriteRenderer.sprite = backupSpriteRenderer.sprite; - backupSpriteRenderer.sprite = tempSprite; - - // 重置透明度 - targetSpriteRenderer.color = new Color(1f, 1f, 1f, 1f); - backupSpriteRenderer.color = new Color(1f, 1f, 1f, 0f); - - isFading = false; - currentSequence = null; - }); - } + isFading = false; + currentSequence = null; + }); } private void OnDestroy()