private void Hide() { if (UILogic.Name.Equals(typeof(AddValueUILogic).Name)) { if (ValueValidator.ValidateQuantities(RecordManager.tempRecord.quantities)) { HideEntity(); } } else if (UILogic.Name.Equals(typeof(EnterExpressionUILogic).Name)) { Main.m_UI.GetOpenedUI <EnterExpressionUILogic>().UIEntity.GetComponent <EnterExpression>().Validate((res, message) => { if (res) { HideEntity(); } else { UIAPI.Instance.ShowModel(new SimpleModel() { ShowCancel = false, Title = "错误", Message = $"{message},请检查输入。" }); } }); } else { HideEntity(); } }
private void Start() { GetComponent <Button>().onClick.AddListener(() => { if (ValueValidator.ValidateQuantities(RecordManager.tempRecord.quantities)) { GameManager.Instance.SwitchProcedure <EnterExpressionProcedure>(); } }); }