using SC.XR.Unity;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TpActionManager : Singleton<TpActionManager>
{
    private AndroidJavaObject tpListenerManager;

    public TpActionManager()
    {
        if (tpListenerManager == null)
        {
            tpListenerManager = new AndroidJavaObject("com.movision.tplistener.TPListenerManager");
        }
    }

    public void ActiveTpListener(Action callback)
    {
        TpActionListenerProxy tpActionListenerProxy = new TpActionListenerProxy(callback);
        tpListenerManager.Call("activeTpListener", tpActionListenerProxy);
    }

    public void CancelTpListener()
    {
        tpListenerManager.Call("cancelTpListener");
    }
}