summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/DialogueBox.cs
blob: 63fe612ad7088c9328c52f76541d5e9655092e4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using UnityEngine;

public class DialogueBox : MonoBehaviour
{
	public TextRenderer target;

	public void Show(string dialogue)
	{
		this.target.Text = dialogue;
		if (Minigame.Instance)
		{
			Minigame.Instance.Close();
			Minigame.Instance.Close();
		}
		PlayerControl.LocalPlayer.moveable = false;
		PlayerControl.LocalPlayer.NetTransform.Halt();
		base.gameObject.SetActive(true);
	}

	public void Hide()
	{
		base.gameObject.SetActive(false);
		PlayerControl.LocalPlayer.moveable = true;
		Camera.main.GetComponent<FollowerCamera>().Locked = false;
	}
}