public void Choose(dialogue example1, dialogue example2) { if (example1.isTalk == true) { example2.isTalk = true; } }
public void showDialoguesecond(dialogue example, GameObject A) { if (example.canTalk == true && Input.GetMouseButtonDown(0)) { A.GetComponent <Text>().text = example.dialoguecontent; example.canTalk = true; } }
public void showDialoguefirst(dialogue example, GameObject A) { if (example.canTalk == true) { A.GetComponent <Text>().text = example.dialoguecontent; example.isTalk = true; } }
public void StartDialogue(dialogue dialogue) //when press start button { Debug.Log("Starting conversation"); sentences.Clear(); foreach (string sentence in dialogue.sentences) { sentences.Enqueue(sentence); } DisplayNextSentence(); }
public void startDialogue(dialogue dia) { anim.SetBool("isOpen", true); nameText.text = dia.name; sentences.Clear(); foreach (string sentence in dia.sentences) { sentences.Enqueue(sentence); } displayNextSentence(); }
/*void Start() * { * sentences = new Queue<string>(); * }*/ public void initializeConversation(dialogue dg) { dialogueBox.SetActive(true); sentences.Clear(); foreach (dialogue.Info info in dg.dialogueInfo) { sentences.Enqueue(info); } dequeueConversation(); }
public void startDialogue(dialogue dialogue) // shows dialogue on the text UI { dialogueBox.enabled = true; //will enable the text UI show that it is now visible as well as clear any previous text dialogueText.enabled = true; sentences.Clear(); foreach (string sentence in dialogue.sentences) { sentences.Enqueue(sentence); } DisplayNextSentence(); }
public void startDialogue(dialogue dialogue) //begins the dialogue { dialogueBox.enabled = true; //box and text can now be seen in the gameplay. dialogueText.enabled = true; sentences.Clear(); foreach (string sentence in dialogue.sentences)//will put all of the sentences from the dialogue into the queue { sentences.Enqueue(sentence); } DisplayNextSentence(); }
public void startDialogue(dialogue dialogue) { animator.SetBool("isOpen", true); nameText.text = dialogue.name; Debug.Log("convo"); sentences.Clear(); foreach (string sentence in dialogue.sentences) { sentences.Enqueue(sentence); } displayNextSentence(); }
public void startDialogue(dialogue d) { NameText.text = d.name; Debug.Log(d.name); Debug.Log(d.sentence[0]); sentence.Clear(); foreach (string sente in d.sentence) { sentence.Enqueue(sente); } displayNextSentence(); }
public void StartDialogue(dialogue dialogue) //when scene starts { Prefs = FindObjectOfType <playerprefs>(); Prefs.resetPref(); Debug.Log("resetPref called"); Debug.Log(PlayerPrefs.GetInt("Magicrocks")); // continueButton.gameObject.SetActive(true); sentences.Clear(); Debug.Log("Starting conversation"); foreach (string sentence in dialogue.sentences) { sentences.Enqueue(sentence); } DisplayNextSentence(); }
public void StartDialogue(dialogue text) { //Debug.Log("Starting Conversation with" + text.name); nameText.text = text.name; sentences.Clear(); panel.SetActive(true); foreach (string sentence in text.sentences) { sentences.Enqueue(sentence); } DisplayNextSentence(); }
public bool CheckInteraction() { bool isInteract; Collider2D[] collidersHit = Physics2D.OverlapBoxAll(collider2D.bounds.center, collider2D.size, 0f, layerToCheck); isInteract = collidersHit != null; for (int i = 0; i < collidersHit.Length; i++) { IInteractive interactive = collidersHit[i].GetComponent <IInteractive>(); if (collidersHit[i].CompareTag("Item")) { WorldItem item = collidersHit[i].GetComponent <WorldItem>(); item.PickUp(ref inventory); break; } else if (interactive.ToMonoBehaviour() != null && interactive.CanInteract(null)) { interactive.Interact(null); break; } else if (collidersHit[i].CompareTag("Merchant")) { MerchantWorld merchant = collidersHit[i].GetComponentInParent <MerchantWorld>(); merchant.Interact(); break; } else if (collidersHit[i].CompareTag("EndMapEvent")) { EventEndScene nextLevel = collidersHit[i].GetComponent <EventEndScene>(); nextLevel.Activate(); break; } else if (collidersHit[i].CompareTag("WhaleDialogue")) { dialogue dialogue = collidersHit[i].GetComponent <dialogue>(); dialogue.InitDialog(); break; } } return(isInteract); }
public void StartDialogue(dialogue dialogue) { //Debug.Log("Start conv with " + dialogue.name); animator.SetBool("IsOpen", true); nameText.text = dialogue.name; sentences.Clear(); foreach (string sentence in dialogue.sentences) { sentences.Enqueue(sentence); } DisplayNextSentence(); }
// Update is called once per frame public void StartDialogue(dialogue dial) { animator.SetBool("IsOpen", true); //sm.ispaused = true; StartCoroutine(PauseDelay()); //Debug.Log("Starting Conversation with " + dial.name); nameText.text = dial.name; sentences.Clear(); foreach (string sentence in dial.sentences) { sentences.Enqueue(sentence); } DisplayNextSentence(); }
private void Awake() { this.GetComponentInChildren <Text>().text = "New Game"; }
private void Start() { player = FindObjectOfType <PlayerController>(); dial = FindObjectOfType <dialogue>(); }
public void Awake() { instance = this; }