fix popup item menu and refactor ui system
This commit is contained in:
@@ -42,22 +42,22 @@ public class RadialMenuItem : MonoBehaviour
|
||||
{
|
||||
b.onClick.AddListener(() =>
|
||||
{
|
||||
CloseDialog();
|
||||
Hide();
|
||||
Close();
|
||||
_menuButtonClick?.Invoke(_actions.ElementAt(buttonNumber).Key);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void CloseDialog()
|
||||
public void CancelAndClose()
|
||||
{
|
||||
UIManager.Instance.Unfreeze();
|
||||
Destroy(_popupMenu);
|
||||
Destroy(this);
|
||||
Close();
|
||||
_menuButtonClick?.Invoke(RadialMenuActions.Cancel);
|
||||
}
|
||||
|
||||
private void Hide()
|
||||
private void Close()
|
||||
{
|
||||
GameManager.Instance.UI.Unfreeze();
|
||||
Destroy(this);
|
||||
gameObject.SetActive(false);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user