private static void EffectTrust() { System.Console.WriteLine("1. Option A"); System.Console.WriteLine("2. Option B"); System.Console.WriteLine("3. Option C"); string choice = System.Console.ReadLine(); ChatOption choiceCheck = ValidChoice(choice); if (choiceCheck == ChatOption.Invalid) { // Do nothing } else if (choiceCheck == ChatOption.A) { System.Console.WriteLine("did it work?"); trustA = trustA + 1; } else if (choiceCheck == ChatOption.B) { System.Console.WriteLine("Other option"); paranoiaA = paranoiaA + 2; } else if (choiceCheck == ChatOption.C) { System.Console.WriteLine("poor choice"); trustA = trustA - 1; } }
public void SendAwnser(ChatOption _nextText) { playerController.currentAwnser = ""; playerController.currentOption = null; manager.ClearAwnser(); //print awnser for (int i = 0; i < _nextText.playerAwnser.Count; i++) //for each line in this message { if (i == 0) //check if it is the 1st message so the name is added { tabs[currentChat].displayedText.Add("[" + manager.playerName + "] " + _nextText.playerAwnser[i]); } else//dont add name { tabs[currentChat].displayedText.Add(_nextText.playerAwnser[i]); } //check if the scroll up is active if (!scrolling && currentChat == tabs[currentChat].tabNum) { GameObject newText = Instantiate(textPrefab, generalTextContainer.transform); //create a new line if (i == 0) //check if it is the 1st message so the name is added { newText.GetComponent <TextMeshProUGUI>().text = "[" + manager.playerName + "] " + _nextText.playerAwnser[i]; } else//dont add name { newText.GetComponent <TextMeshProUGUI>().text = _nextText.playerAwnser[i]; } tabs[currentChat].currentText += 1; //chatNumb[0] += 1;//current chat possion CheckOverflow(0);//check if overflow } } //close options manager.CloseChat(); if (_nextText.npcAnwser.options.Count != 0) { StartCoroutine(WaitForNextSentence(_nextText.npcAnwser.timer, tabs[currentChat], 1, _nextText.npcAnwser)); } else { StartCoroutine(WaitForNextSentence(_nextText.npcAnwser.timer, tabs[currentChat], tabs[currentChat].tabChat.Count - 1, _nextText.npcAnwser)); } }
public void ChoiceMade(ChatOption _option, ChatText _nextText, List <string> _awnser) { string newAwnser = ""; for (int i = 0; i < _awnser.Count; i++) { newAwnser += _awnser[i] + " "; } playerController.currentAwnser = newAwnser; playerController.currentOption = _option; //clear options for (int i = 0; i < optionsPanel.transform.childCount; i++) { optionsPanel.transform.GetChild(i).gameObject.GetComponent <ChoiceController>().ClearValues(); } }
public void ClearValues() { currentOption = null; transform.GetChild(0).GetComponent <TextMeshProUGUI>().text = ""; hasOptions = false; }
public void SetValues(ChatOption _newOption) { currentOption = _newOption; transform.GetChild(0).GetComponent <TextMeshProUGUI>().text = _newOption.feelingName; hasOptions = true; }