Exemplo n.º 1
0
    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();
        }
    }