interface MAGES::SceneGraph::IQuestionBehavior

Overview

The Question Behavior interface. More…

interface IQuestionBehavior
{
    // properties

    string Question;
    GameObject AnswerElement;
    int NumberOfAnswers;
    List<QuestionActionAnswer> Answers;
    UnityEvent OnAnswered;
    bool RevealAnswers;
    GameObject SubmitElement;
    bool QuestionResult;

    // methods

    void SetupQuestion();
    void PreviewQuestions(List<QuestionActionAnswer> answersTemp);
    void AnswerPressed(GameObject answer);
    void SubmitPressed();
};

// direct descendants

class QuestionBehavior;

Detailed Documentation

The Question Behavior interface.

Properties

string Question

Gets or sets the question asked.

GameObject AnswerElement

Gets the UI Element of an answer.

int NumberOfAnswers

Gets or sets the number of avaliable answers.

List<QuestionActionAnswer> Answers

Gets or sets the answers to the question.

UnityEvent OnAnswered

Gets the OnAnswered Event.

bool RevealAnswers

Gets or sets a value indicating whether the answers should be revealed.

GameObject SubmitElement

Gets the submit UI Element.

bool QuestionResult

Gets or sets a value indicating whether the question was answered correctly.

Methods

void SetupQuestion()

Sets and displays the question.

void PreviewQuestions(List<QuestionActionAnswer> answersTemp)

On Edit mode preview the available answers.

Parameters:

answersTemp

The avaiable answers to preview.

void AnswerPressed(GameObject answer)

Sets which answer was pressed.

Parameters:

answer

The pressed answer gameobject.

void SubmitPressed()

Submit your final anwser.