public void QuestionCharacter(int reference) { //reference passes the question style reference i.e leftmost button=0, middle=1, rightmost=2 string choice; List <string> weaknesses; string response; choice = GetQuestioningChoice(reference); 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); NotebookManager.instance.UpdateNotebook(); } else { response = "Clue Already Obtained"; //Otherwise state the clue is already in the logbook } } else { response = character.GetResponse(choice); //Otherwise just give the responce } clueSpeech.text = response; //Update the UI Text with the appropriate repsonce }
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 }
public void ShowClueInfomation(int index) { //Check if the clue is in the given range. if (index < inventory.GetInventory().Count + logbook.GetLogbook().Count) { //Detect if it is an item if (index < inventory.GetInventory().Count) { Item clue = inventory.GetInventory() [index]; clueNameText.text = clue.getID(); clueDescriptionText.text = clue.getDescription(); clueImage.sprite = clue.GetSprite(); //Otherwise it must be a Verbal Clue } else { VerbalClue clue = logbook.GetLogbook() [index - inventory.GetInventory().Count]; clueNameText.text = clue.getID(); clueDescriptionText.text = clue.getDescription(); clueImage.sprite = questionMark; } } }