mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
const 变量名
This commit is contained in:
@@ -18,10 +18,10 @@ namespace GameLogic
|
||||
|
||||
private readonly List<UIWindow> _uiStack = new List<UIWindow>(100);
|
||||
|
||||
public const int LayerDeep = 2000;
|
||||
public const int WindowDeep = 100;
|
||||
public const int WindowHideLayer = 2; // Ignore Raycast
|
||||
public const int WindowShowLayer = 5; // UI
|
||||
public const int LAYER_DEEP = 2000;
|
||||
public const int WINDOW_DEEP = 100;
|
||||
public const int WINDOW_HIDE_LAYER = 2; // Ignore Raycast
|
||||
public const int WINDOW_SHOW_LAYER = 5; // UI
|
||||
|
||||
public static IUIResourceLoader Resource;
|
||||
|
||||
@@ -445,13 +445,13 @@ namespace GameLogic
|
||||
|
||||
private void OnSortWindowDepth(int layer)
|
||||
{
|
||||
int depth = layer * LayerDeep;
|
||||
int depth = layer * LAYER_DEEP;
|
||||
for (int i = 0; i < _uiStack.Count; i++)
|
||||
{
|
||||
if (_uiStack[i].WindowLayer == layer)
|
||||
{
|
||||
_uiStack[i].Depth = depth;
|
||||
depth += WindowDeep;
|
||||
depth += WINDOW_DEEP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -265,7 +265,7 @@ namespace GameLogic
|
||||
for (var index = 0; index < listCanvas.Length; index++)
|
||||
{
|
||||
var childCanvas = listCanvas[index];
|
||||
childCanvas.sortingOrder = parentCanvas.sortingOrder + childCanvas.sortingOrder % UIModule.WindowDeep;
|
||||
childCanvas.sortingOrder = parentCanvas.sortingOrder + childCanvas.sortingOrder % UIModule.WINDOW_DEEP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -138,7 +138,7 @@ namespace GameLogic
|
||||
{
|
||||
if (_canvas != null)
|
||||
{
|
||||
return _canvas.gameObject.layer == UIModule.WindowShowLayer;
|
||||
return _canvas.gameObject.layer == UIModule.WINDOW_SHOW_LAYER;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -150,7 +150,7 @@ namespace GameLogic
|
||||
{
|
||||
if (_canvas != null)
|
||||
{
|
||||
int setLayer = value ? UIModule.WindowShowLayer : UIModule.WindowHideLayer;
|
||||
int setLayer = value ? UIModule.WINDOW_SHOW_LAYER : UIModule.WINDOW_HIDE_LAYER;
|
||||
if (_canvas.gameObject.layer == setLayer)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user