Scriptum/Assets/Scripts/NPCs' Scripts/WizardScripts/Wizard.cs
KrolMel f0edea12e1 Added Wizard Dialogue
Fixed Dialogue and Grid bugs
2022-12-11 13:04:06 +01:00

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();
}
}
}