TheMuseumProject/Assets/Scripts/Player/Information/PlayerDialogue.cs

28 lines
742 B
C#
Raw Normal View History

using UnityEngine;
namespace Player.Information
{
public class PlayerDialogue : MonoBehaviour
{
public GameObject dialogueMaster;
private GameObject chatHolder;
private GameObject chatPrompt;
private void Start()
{
chatHolder = dialogueMaster.transform.Find("Chat Holder").gameObject;
chatPrompt = dialogueMaster.transform.Find("Chat Prompt").gameObject;
chatHolder.SetActive(false);
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.LeftAlt))
{
chatHolder.SetActive(!chatHolder.activeSelf);
chatPrompt.SetActive(!chatPrompt.activeSelf);
}
}
}
}