DoubleTabBackSceneCtrl.cs 435 B

12345678910111213141516171819202122
  1. using RayNeo.Tool;
  2. using UnityEngine;
  3. using UnityEngine.SceneManagement;
  4. public class DoubleTabBackSceneCtrl : MonoBehaviour
  5. {
  6. public void OnDoubleTapCallBack()
  7. {
  8. SceneManager.LoadScene("SampleMain");
  9. }
  10. void Start()
  11. {
  12. TouchEventCtrl.Instance.OnDoubleTap += OnDoubleTapCallBack;
  13. }
  14. private void OnDestroy()
  15. {
  16. TouchEventCtrl.Instance.OnDoubleTap -= OnDoubleTapCallBack;
  17. }
  18. }