28 lines
780 B
C#
28 lines
780 B
C#
using UnityEngine;
|
|
using Yarn.Unity;
|
|
|
|
namespace NightclubArcadia.Dialogue
|
|
{
|
|
/// <summary>
|
|
/// Registers the <<enter_environment>> Yarn command, which steps the player
|
|
/// out of dialogue and hands control to the 3D environment.
|
|
/// </summary>
|
|
public class DialogueTransitionController : MonoBehaviour
|
|
{
|
|
[SerializeField] private DialogueRunner dialogueRunner;
|
|
[SerializeField] private GameObject dialogueUI;
|
|
[SerializeField] private GameObject playerArmature;
|
|
|
|
void Start()
|
|
{
|
|
dialogueRunner.AddCommandHandler("enter_environment", EnterEnvironment);
|
|
}
|
|
|
|
void EnterEnvironment()
|
|
{
|
|
dialogueUI.SetActive(false);
|
|
playerArmature.SetActive(true);
|
|
}
|
|
}
|
|
}
|