优化回声描边逻辑

This commit is contained in:
2026-06-28 21:44:33 +08:00
parent 02ac67d338
commit 5c7ffac1bd
12 changed files with 1257 additions and 1328 deletions

View File

@@ -110,7 +110,9 @@ namespace IndianOceanAssets.Engine2_5D
}
cr.sortingLayerID = parent.sortingLayerID;
cr.sortingOrder = parent.sortingOrder + 1;
// 描边需要在黑暗遮罩SortingOrder=9999之后渲染
// 所以设置一个很大的值,确保在黑暗遮罩之上
cr.sortingOrder = 10000 + parent.sortingOrder;
cr.enabled = false; // 默认关闭,回声激活时再开
_parentRenderers.Add(parent);
@@ -142,7 +144,9 @@ namespace IndianOceanAssets.Engine2_5D
if (cr.flipX != pr.flipX) cr.flipX = pr.flipX;
if (cr.flipY != pr.flipY) cr.flipY = pr.flipY;
if (cr.sortingLayerID != pr.sortingLayerID) cr.sortingLayerID = pr.sortingLayerID;
if (cr.sortingOrder != pr.sortingOrder + 1) cr.sortingOrder = pr.sortingOrder + 1;
// 描边需要在黑暗遮罩SortingOrder=9999之后渲染
if (cr.sortingOrder != 10000 + pr.sortingOrder)
cr.sortingOrder = 10000 + pr.sortingOrder;
}
}