From f9a751e06032e0fccc032ec1f450a99c5822e615 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Thu, 5 May 2022 21:01:06 +0800 Subject: [PATCH] Adjust the default shadow size. --- .../Converters/ShaderConvertorTest.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/ShaderConvertorTest.cs b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/ShaderConvertorTest.cs index 9bbdadc24..68f09ade5 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/ShaderConvertorTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/ShaderConvertorTest.cs @@ -25,11 +25,11 @@ public void TestSerializer() { var shader = new ShadowShader { - ShadowOffset = new Vector2(10), + ShadowOffset = new Vector2(3), ShadowColour = new Color4(0.5f, 0.5f, 0.5f, 0.5f), }; - const string expected = "{\"$type\":\"ShadowShader\",\"shadow_colour\":\"#7F7F7F7F\",\"shadow_offset\":{\"x\":10.0,\"y\":10.0}}"; + const string expected = "{\"$type\":\"ShadowShader\",\"shadow_colour\":\"#7F7F7F7F\",\"shadow_offset\":{\"x\":3.0,\"y\":3.0}}"; string result = JsonConvert.SerializeObject(shader, CreateSettings()); Assert.AreEqual(expected, result); } @@ -37,11 +37,11 @@ public void TestSerializer() [Test] public void TestDeserialize() { - const string json = "{\"$type\":\"ShadowShader\",\"shadow_colour\":\"#7F7F7F7F\",\"shadow_offset\":{\"x\":10.0,\"y\":10.0}}"; + const string json = "{\"$type\":\"ShadowShader\",\"shadow_colour\":\"#7F7F7F7F\",\"shadow_offset\":{\"x\":3.0,\"y\":3.0}}"; var expected = new ShadowShader { - ShadowOffset = new Vector2(10), + ShadowOffset = new Vector2(3), ShadowColour = new Color4(0.5f, 0.5f, 0.5f, 0.5f), }; var actual = JsonConvert.DeserializeObject(json, CreateSettings()) as ShadowShader; @@ -60,14 +60,14 @@ public void TestSerializerListItems() { new ShadowShader { - ShadowOffset = new Vector2(10), + ShadowOffset = new Vector2(3), ShadowColour = new Color4(0.5f, 0.5f, 0.5f, 0.5f), } } }; const string expected = - "{\"$type\":\"StepShader\",\"name\":\"HelloShader\",\"draw\":true,\"step_shaders\":[{\"$type\":\"ShadowShader\",\"shadow_colour\":\"#7F7F7F7F\",\"shadow_offset\":{\"x\":10.0,\"y\":10.0}}]}"; + "{\"$type\":\"StepShader\",\"name\":\"HelloShader\",\"draw\":true,\"step_shaders\":[{\"$type\":\"ShadowShader\",\"shadow_colour\":\"#7F7F7F7F\",\"shadow_offset\":{\"x\":3.0,\"y\":3.0}}]}"; string actual = JsonConvert.SerializeObject(shader, CreateSettings()); Assert.AreEqual(expected, actual); } @@ -76,7 +76,7 @@ public void TestSerializerListItems() public void TestDeserializeListItems() { const string json = - "{\"$type\":\"StepShader\",\"name\":\"HelloShader\",\"draw\":true,\"step_shaders\":[{\"$type\":\"ShadowShader\",\"shadow_colour\":\"#7F7F7F7F\",\"shadow_offset\":{\"x\":10.0,\"y\":10.0}}]}"; + "{\"$type\":\"StepShader\",\"name\":\"HelloShader\",\"draw\":true,\"step_shaders\":[{\"$type\":\"ShadowShader\",\"shadow_colour\":\"#7F7F7F7F\",\"shadow_offset\":{\"x\":3.0,\"y\":3.0}}]}"; var expected = new StepShader { @@ -85,7 +85,7 @@ public void TestDeserializeListItems() { new ShadowShader { - ShadowOffset = new Vector2(10), + ShadowOffset = new Vector2(3), ShadowColour = new Color4(0.5f, 0.5f, 0.5f, 0.5f), } }