protected virtual void OnClose() { IsHaveOpenedViewState.Push(false); if (IsBlockInput) { BaseInputMgr.PushPlayerInputState(true); } }
protected virtual void OnOpen() { IsHaveOpenedViewState.Push(true); if (IsBlockInput) { BaseInputMgr.PushPlayerInputState(false); } if (IsOptionView) { foreach (var item in AllOptionUI) { if (item != this) { item.Close(); } } } }
public static bool CheckUI() { if (!IsHaveOpenedViewState.IsIn()) { return(false); } foreach (var item in AllIMUI) { if (!item.IsShow) { continue; } if (!item.IsBlock) { continue; } if (item.mainRect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y))) { return(true); } } return(false); }