优化回声描边逻辑
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user