revival/game/Assets/Scripts/Dialogue/ScriptedDialogueTrigger.cs

17 lines
396 B
C#
Raw Normal View History

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
public class ScriptedDialogueTrigger : MonoBehaviour
{
[SerializeField] private DialogueSystem _dialogue;
[SerializeField] private string _key;
private void OnTriggerEnter(Collider other)
{
_dialogue.PlayLine(_key);
}
}