Esempio n. 1
0
    private void updateLogicStep()
    {
        LogicStep currLogicStep = logicSteps[currStep];

        currDialogue     = currLogicStep.GetDialogue();
        currDialogueIndx = 0;
        updateDialogue();
        // if there is a clue or choice to be made, cannot go to next logic step
        showPopup = currLogicStep.GetClue() != null || currLogicStep.GetCorrectChoice() > -1;
    }
Esempio n. 2
0
    /// <summary>
    /// Select a choice
    /// </summary>
    /// <param name="choice"> Index of the choice</param>
    public void SelectChoice(int choice)
    {
        LogicStep currLogicStep = logicSteps[currStep];

        int correctChoice = currLogicStep.GetCorrectChoice();

        ChoicePopup.SetActive(false);
        showPopup = false;
        if (choice != correctChoice)
        {
            // selected wrong choice
            wrongAnswer = true;
            updateWrongDialogue();
        }
    }
Esempio n. 3
0
 /// <summary>
 /// Determine if the player selected the correct choice
 /// </summary>
 /// <param name="choice">Choice that the player selected</param>
 /// <param name="logicStep">Step of the Logic System</param>
 /// <returns>True if the choice is the correct one, false otherwise</returns>
 public static bool DidSelectCorrectChoice(int choice, LogicStep logicStep)
 {
     return(choice == logicStep.GetCorrectChoice());
 }