scene transition fixes
This commit is contained in:
@@ -11,8 +11,8 @@ public class DialogueManager : MonoBehaviour
|
||||
public TextMeshProUGUI nameText;
|
||||
public TextMeshProUGUI dialogueText;
|
||||
|
||||
public TextMeshProUGUI itemText;
|
||||
public GameObject pickupHint;
|
||||
public TextMeshProUGUI itemText; // displays name of nearby item
|
||||
public TextMeshProUGUI pickupHint; // tells the player to press 'E' to pickup
|
||||
|
||||
public Animator animator;
|
||||
|
||||
@@ -22,6 +22,15 @@ void Start()
|
||||
sentences = new Queue<string>();
|
||||
}
|
||||
|
||||
public void ReloadReferences()
|
||||
{
|
||||
nameText = GameObject.FindWithTag("DialogNameText").GetComponent<TextMeshProUGUI>();
|
||||
dialogueText = GameObject.FindWithTag("DialogMessageText").GetComponent<TextMeshProUGUI>();
|
||||
itemText = GameObject.FindWithTag("DialogItemText").GetComponent<TextMeshProUGUI>();
|
||||
pickupHint = GameObject.FindWithTag("ItemPickupText").GetComponent<TextMeshProUGUI>();
|
||||
animator = GameObject.FindWithTag("DialogContainer").GetComponent<Animator>();
|
||||
}
|
||||
|
||||
public void StartDialogue(Dialogue dialogue)
|
||||
{
|
||||
animator.SetBool("IsOpen", true);
|
||||
@@ -75,12 +84,12 @@ IEnumerator TypeSentence(string sentence)
|
||||
public void ShowItemText(string itemName)
|
||||
{
|
||||
itemText.text = itemName;
|
||||
pickupHint.SetActive(true);
|
||||
pickupHint.text = "Press \"E\" to pick up";
|
||||
}
|
||||
|
||||
public void HideItemText()
|
||||
{
|
||||
itemText.text = "";
|
||||
pickupHint.SetActive(false);
|
||||
pickupHint.text = "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user