public void CheckCondition() { if (onCondition != null && onCondition.Invoke()) { if (onAction != null) { onAction.Invoke(); } } }