public void Confirm(bool isConfirm) { if (signalInvokeConfirm) { signalInvokeConfirm.Invoke(isConfirm); } Close(); }
void OnInputSubmit() { //fail-safe, shouldn't be able to submit if (mOperation == null || mOperation.isAnyOperandEmpty || isBusy) { return; } var opAnswer = mOperation.Evaluate(); //NOTE: assume we can only input positives opAnswer.isNegative = false; bool isCorrect = answerInput.number.isValid && answerInput.number == opAnswer; if (isCorrect) { answerInput.CloseNumpad(); M8.SoundPlaylist.instance.Play(audioCorrect, false); } else { M8.SoundPlaylist.instance.Play(audioWrong, false); if (animator && !string.IsNullOrEmpty(takeWrong)) { animator.Play(takeWrong); } } //end drag instruction if (isCorrect) { DragInstructEnd(); } signalAnswer.Invoke(isCorrect); }
public void Invoke() { signal.Invoke(invokeValue); }