38 lines
781 B
C#
38 lines
781 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Wizard : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void OnTriggerEnter2D(Collider2D other)
|
|
{
|
|
if (other.tag == "Player")
|
|
{
|
|
Debug.Log("OnTriggerEnter2D");
|
|
|
|
gameObject.GetComponent<NpcDialogueManager>().Dialogue.StartDialogue();
|
|
}
|
|
}
|
|
|
|
public void OnTriggerExit2D(Collider2D other)
|
|
{
|
|
if (other.tag == "Player")
|
|
{
|
|
gameObject.GetComponent<NpcDialogueManager>().Dialogue.BreakDialogueStep();
|
|
}
|
|
}
|
|
|
|
}
|