成就系统 巨大修改 新的ui 黑白效果 等一堆
This commit is contained in:
@@ -6,6 +6,10 @@ using System.Collections.Generic;
|
||||
|
||||
public class selectSettingsOptions : MonoBehaviour
|
||||
{
|
||||
[Header("esc")]
|
||||
public Button escButton;
|
||||
public GameObject selfGO;
|
||||
|
||||
[Header("用户")]
|
||||
public Button userSettingsButton;
|
||||
public GameObject userSettingsGameObject;
|
||||
@@ -76,6 +80,12 @@ public class selectSettingsOptions : MonoBehaviour
|
||||
// default select userSettings
|
||||
if (userSettingsButton != null)
|
||||
SelectOptionByButton(userSettingsButton);
|
||||
|
||||
// listen for esc to close this panel if active
|
||||
if (escButton != null && selfGO != null)
|
||||
{
|
||||
escButton.onClick.AddListener(OnEscButtonClicked);
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
@@ -86,6 +96,19 @@ public class selectSettingsOptions : MonoBehaviour
|
||||
opt.button.onClick.RemoveAllListeners();
|
||||
RemoveEventTrigger(opt.button);
|
||||
}
|
||||
|
||||
if (escButton != null && selfGO != null)
|
||||
{
|
||||
escButton.onClick.RemoveListener(OnEscButtonClicked);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEscButtonClicked()
|
||||
{
|
||||
if (selfGO != null && selfGO.activeSelf)
|
||||
{
|
||||
selfGO.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
void AddOption(Button btn, GameObject panel, Image mark)
|
||||
|
||||
Reference in New Issue
Block a user