Changing Character Controller
Last updated
Last updated
public class NoteDisableManager : MonoBehaviour
{
[SerializeField] private FirstPersonController player = null;
[SerializeField] private NotesInteractor noteInteractorScript = null;
public static NoteDisableManager instance;
void Awake()
{
if (instance != null) { Destroy(gameObject); }
else { instance = this; DontDestroyOnLoad(gameObject); }
}
private void Start()
{
DebugReferenceCheck();
}
public void ToggleRaycast(bool disable)
{
noteInteractorScript.enabled = disable;
}
public void DisablePlayer(bool isActive)
{
player.enabled = !isActive;
NoteUIManager.instance.HideCursor(!isActive);
noteInteractorScript.enabled = !isActive;
}
}