FreeCursorDuringConversation.cs
Code: Select all
using UnityEngine;
public class FreeCursorDuringConversations : MonoBehaviour
{
private menuPause menuPause;
public void OnConversationStart(Transform actor)
{
menuPause = FindObjectOfType<menuPause>();
if (menuPause) menuPause.setMouseButtonPressPausedState(true);
PixelCrushers.DialogueSystem.Tools.SetCursorActive(true);
}
public void OnConversationEnd(Transform actor)
{
if (menuPause) menuPause.setMouseButtonPressPausedState(false);
}
}