public void Init(PopupType type, string msg, string titleText = null, PopupQuestionCompleteDelegate _onCompleteCallBack = null) { SetupTitle(type, titleText); message.text = msg; onCompleteCallBack = _onCompleteCallBack; }
public PopupQuestionCommand(PopupQuestion instance, PopupType _type, string _message, string _title, PopupQuestionCompleteDelegate[] completeCallbacks) { popupQuestion = instance; type = _type; message = _message; title = _title; foreach (PopupQuestionCompleteDelegate callback in completeCallbacks) { completeCallback += callback; } }
public void NewQuestion(PopupType type, string title, string message, PopupQuestionCompleteDelegate onQuestionPopupCompeted) { PopupQuestionCompleteDelegate[] completeCallbacks = { OnQuestionPopupCompeted, onQuestionPopupCompeted }; PopupQuestionCommand questionCommand = new PopupQuestionCommand(PopupQuestionInstance, type, message, title, completeCallbacks); commandQueue.AddLast(questionCommand); onQuestionPopupCompeted = OnQuestionPopupCompeted; // If there is only one command in queue, then execute it. if (commandQueue.Count == 1) { questionCommand.Execute(); } }