改动与优化
This commit is contained in:
@@ -38,7 +38,7 @@ class UI_Panel_Level : MonoBehaviour
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
ClosePanel();
|
||||
}
|
||||
}
|
||||
void Start()
|
||||
@@ -60,4 +60,15 @@ class UI_Panel_Level : MonoBehaviour
|
||||
//obj++;
|
||||
//Text_Level.text = obj.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void ClosePanel()
|
||||
{
|
||||
UI_PanelExitUtility.PlayExitThen(gameObject, () =>
|
||||
{
|
||||
if (gameObject != null)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user