TpActionManager.cs 757 B

1234567891011121314151617181920212223242526272829
  1. using SC.XR.Unity;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. public class TpActionManager : Singleton<TpActionManager>
  7. {
  8. private AndroidJavaObject tpListenerManager;
  9. public TpActionManager()
  10. {
  11. if (tpListenerManager == null)
  12. {
  13. tpListenerManager = new AndroidJavaObject("com.movision.tplistener.TPListenerManager");
  14. }
  15. }
  16. public void ActiveTpListener(Action callback)
  17. {
  18. TpActionListenerProxy tpActionListenerProxy = new TpActionListenerProxy(callback);
  19. tpListenerManager.Call("activeTpListener", tpActionListenerProxy);
  20. }
  21. public void CancelTpListener()
  22. {
  23. tpListenerManager.Call("cancelTpListener");
  24. }
  25. }