Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5.  
  6. public class ConvoScript : MonoBehaviour
  7. {
  8. public string[] conversationOptions;
  9. public Button option1, option2;
  10.  
  11.  
  12. public Text currentDisplayedText, questionOption1, questionOption2;
  13. public GameObject questionsPanel;
  14.  
  15.  
  16.  
  17. // Update is called once per frame
  18. void Update()
  19. {
  20.  
  21. }
  22.  
  23. private void Start()
  24. {
  25. StartNewConversation();
  26. }
  27.  
  28. public void StartNewConversation()
  29. {
  30. //Show character
  31. //Set text and convo options
  32. questionOption1.text = conversationOptions[0];
  33. questionOption2.text = conversationOptions[1];
  34. //
  35. }
  36.  
  37. public void KickPerson()
  38. {
  39.  
  40. }
  41.  
  42. public void SlapPerson()
  43. {
  44.  
  45. }
  46.  
  47. public void Gift()
  48. {
  49.  
  50. }
  51.  
  52. public void QuestionsToggle()
  53. {
  54. if (questionsPanel.activeInHierarchy)
  55. {
  56. questionsPanel.SetActive(false);
  57. }
  58. else
  59. {
  60. questionsPanel.SetActive(true);
  61. }
  62. }
  63.  
  64. public void Question(int question)
  65. {
  66. if (question == 1)
  67. {
  68. Debug.Log("Asked question 1");
  69. }
  70. if(question == 2)
  71. {
  72. Debug.Log("Asked question 2");
  73. }
  74.  
  75. QuestionsToggle();
  76.  
  77. }
  78.  
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement