diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..5741bae3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,7 @@ +[submodule "SilkyUIFramework"] + path = SilkyUIFramework + url = https://github.com/487666123/SilkyUIFramework.git + branch = preview +[submodule "SilkyUIAnalyzer"] + path = SilkyUIAnalyzer + url = https://github.com/487666123/SilkyUIAnalyzer.git diff --git a/CreateLinks.bat b/CreateLinks.bat new file mode 100644 index 00000000..617b0243 --- /dev/null +++ b/CreateLinks.bat @@ -0,0 +1,16 @@ +@echo off +REM 获取当前脚本所在目录 +set "CURRENT_DIR=%~dp0" + +REM 获取ImproveGame的父目录 +for %%I in ("%CURRENT_DIR%..") do set "PARENT_DIR=%%~fI" + +REM 创建符号链接 +echo 创建 SilkyUIAnalyzer 符号链接... +mklink /D "%PARENT_DIR%\SilkyUIAnalyzer" "%CURRENT_DIR%SilkyUIAnalyzer" + +echo 创建 SilkyUIFramework 符号链接... +mklink /D "%PARENT_DIR%\SilkyUIFramework" "%CURRENT_DIR%SilkyUIFramework" + +echo 符号链接创建完成 +pause diff --git a/ImproveGame.csproj b/ImproveGame.csproj index afffdc17..5f5402c9 100644 --- a/ImproveGame.csproj +++ b/ImproveGame.csproj @@ -31,6 +31,8 @@ false + + @@ -43,5 +45,25 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README-en.md b/README-en.md index 549f356a..4d368486 100644 --- a/README-en.md +++ b/README-en.md @@ -57,6 +57,20 @@ You can subscribe and download it via steam workshop: 鎺ㄨ崘 **IDE**锛歊ider銆乂isual Studio 2022銆乂isual Studio Code +### 鍏嬮殕椤圭洰 + +鐢变簬鏈」鐩娇鐢ㄤ簡 **Git 瀛愭ā鍧**锛屽洜姝ら渶瑕佷娇鐢 `--recurse-submodules` 鍙傛暟鍏嬮殕椤圭洰銆備笖鐢变簬瑙e喅鏂规寮曠敤鐨勯」鐩簲涓嶪mproveGame鏂囦欢澶瑰钩琛岋紝鍏嬮殕鍚庨渶瑕佽繍琛 `CreateLinks.bat` 鑴氭湰鍒涘缓绗﹀彿閾炬帴銆傦紙鎴栨墜鍔ㄥ湪ImproveGame鐖剁洰褰曚笅鍒嗗埆鍏嬮殕杩欎袱涓粨搴擄級 + +鍦℅it Bash鎴栫粓绔腑杩愯浠ヤ笅鍛戒护锛 + +```cmd +git clone --recurse-submodules https://github.com/ForOne-Club/ImproveGame.git +cd ImproveGame +.\CreateLinks.bat +``` + +### 缂栬瘧椤圭洰 + 1. 浣跨敤 **IDE** 鎵撳紑椤圭洰 2. 浣跨敤 **IDE** 缂栬瘧椤圭洰锛堥氬父浣跨敤蹇嵎閿 `F5` 鍙揩閫熷惎鍔級 @@ -80,4 +94,4 @@ WMITF寮婧愰摼鎺: \ ChevyRay鐨勫崗绋嬬被: \ ProjectStarlight.Interchange: \ Auto Piggy Bank寮婧愰摼鎺: \ -Magic Storage寮婧愰摼鎺: \ No newline at end of file +Magic Storage寮婧愰摼鎺: diff --git a/SilkyUIAnalyzer b/SilkyUIAnalyzer new file mode 160000 index 00000000..660ac5bc --- /dev/null +++ b/SilkyUIAnalyzer @@ -0,0 +1 @@ +Subproject commit 660ac5bcee47c8b2120c97f8be50856fbdc1d927 diff --git a/SilkyUIFramework b/SilkyUIFramework new file mode 160000 index 00000000..d35a648d --- /dev/null +++ b/SilkyUIFramework @@ -0,0 +1 @@ +Subproject commit d35a648d8553f0e4fd2e1af0a630589a5db411e9 diff --git a/UIFramework/BlurHelper.cs b/UIFramework/BlurHelper.cs index 5d43cb33..9528b5e1 100644 --- a/UIFramework/BlurHelper.cs +++ b/UIFramework/BlurHelper.cs @@ -51,7 +51,7 @@ public static void KawaseBlur(RenderTarget2D renderTarget, { if (offsets.Length == 0) return; - var effect = ModAsset.BlurEffect.Value; + var effect = ModAsset.Effect_BlurEffect.Value; if (effect == null) return; var device = Main.graphics.GraphicsDevice; @@ -61,7 +61,7 @@ public static void KawaseBlur(RenderTarget2D renderTarget, var renderTargetSwap = RenderTargetPool.Instance.Rent(renderTarget.Width, renderTarget.Height); - ModAsset.BlurEffect.Value.Parameters["uPixelSize"].SetValue(Vector2.One / new Vector2(renderTarget.Width, renderTarget.Height)); + ModAsset.Effect_BlurEffect.Value.Parameters["uPixelSize"].SetValue(Vector2.One / new Vector2(renderTarget.Width, renderTarget.Height)); SelectBlurEffectPasses(blurType, out var blurX, out var blurY); @@ -89,7 +89,7 @@ public static void KawaseBlur(RenderTarget2D renderTarget, public static void SelectBlurEffectPasses(BlurMixingNumber blurType, out EffectPass blurX, out EffectPass blurY) { - var effect = ModAsset.BlurEffect.Value; + var effect = ModAsset.Effect_BlurEffect.Value; switch (blurType) { default: diff --git a/UIFramework/Graphics2D/SDFGraphics.Utils.cs b/UIFramework/Graphics2D/SDFGraphics.Utils.cs index 543e0d1e..83923b9f 100644 --- a/UIFramework/Graphics2D/SDFGraphics.Utils.cs +++ b/UIFramework/Graphics2D/SDFGraphics.Utils.cs @@ -4,7 +4,7 @@ namespace ImproveGame.UIFramework.Graphics2D; partial class SDFGraphics { const float root2Over2 = 1.414213562373f / 2f; - static Effect SDF_Effect => ModAsset.SDFGraphics.Value; + static Effect SDF_Effect => ModAsset.UIFramework_SDFRectangle.Value; static bool DrawFrame => false; private struct VertexPosCoord(Vector2 pos, Vector2 coord) : IVertexType diff --git a/UIFramework/Graphics2D/SDFRectangle.cs b/UIFramework/Graphics2D/SDFRectangle.cs index 496e8f25..f4dfca76 100644 --- a/UIFramework/Graphics2D/SDFRectangle.cs +++ b/UIFramework/Graphics2D/SDFRectangle.cs @@ -5,7 +5,7 @@ public static class SDFRectangle public static bool DontDrawShadow { get; set; } public static EffectPass SpriteEffectPass => Main.spriteBatch.spriteEffectPass; public static GraphicsDevice GraphicsDevice => Main.graphics.GraphicsDevice; - private static Effect Effect => ModAsset.SDFRectangle.Value; + private static Effect Effect => ModAsset.UIFramework_SDFRectangle.Value; private static void Transform2SDFMatrix(ref Matrix matrix) { var device = Main.graphics.GraphicsDevice;