Ejemplo n.º 1
0
    public void QuestionCharacter(int reference)
    {
        //reference passes the question style reference i.e leftmost button=0, middle=1, rightmost=2
        string response;
        string choice;

        choice = GetQuestioningChoice(reference);
        if (character.CanBeQuestionned())               //ADDITION BY WEDUNNIT
        {
            List <string> weaknesses;
            weaknesses = character.GetWeaknesses();

            if ((weaknesses.Contains(choice)) && (character.getVerbalClue() != null))                 //If chosen style is a weakness to the character
            {
                VerbalClue clue = character.getVerbalClue();
                if (!NotebookManager.instance.logbook.GetLogbook().Contains(character.getVerbalClue())) //If the logbook doesnt contain the clue already
                {
                    response = "Clue Added: " + clue.getDescription();                                  //Change the responce and add to the logbook
                    NotebookManager.instance.logbook.AddVerbalClueToLogbook(clue);
                    GameMaster.instance.UnblockAllCharacters();                                         //ADDITION BY WEDUNNIT
                    NotebookManager.instance.UpdateNotebook();
                    //__NEW_FOR_ASSESSMENT_4__(START)
                    if (GameObject.Find("Multiplayer Manager Object") != null)
                    {
                        MultiplayerManager.instance.GetTurnManager().IncrementActionCounter();                         // For turn switching in multiplayer.
                    }
                    //__NEW_FOR_ASSESSMENT_4__(END)
                }
                else
                {
                    response = "Clue Already Obtained";                                         //Otherwise state the clue is already in the logbook
                }
            }
            else
            {
                response = character.GetResponse(choice);                               //Otherwise just give the responce
            }
        }
        else                                                                            //If the character blocks questioning //ADDITION BY WEDUNNIT
        {
            response = character.GetResponse(choice + "ButBlocked");                    //Gets relevent reply //ADDITION BY WEDUNNIT
        }

        clueSpeech.text = response;             //Update the UI Text with the appropriate repsonce
    }