Exemplo n.º 1
0
 public static void Destroy()
 {
     if (_instance != null)
     {
         Destroy(_instance.gameObject);
         _instance = null;
     }
 }
Exemplo n.º 2
0
 public static void Init()
 {
     if (_instance == null)
     {
         UnityEngine.Object PrefabObj = Resources.Load("Prefabs/OrbbecSensingManager");
         GameObject         obj       = UnityEngine.Object.Instantiate(PrefabObj) as GameObject;
         obj.transform.localScale    = Vector3.one;
         obj.transform.localPosition = Vector3.zero;
         _instance = obj.GetComponent <OrbbecSensingManager> ();
     }
 }
Exemplo n.º 3
0
        // Use this for initialization
        void Start()
        {
            startBtn.onClick.AddListener(() =>
            {
                OrbbecSensingManager.Init();
                OrbbecSensingManager.instance.showTrackingUI = true;
                OrbbecSensingManager.instance.playerMode     = OrbbecSensingManager.PlayerMode.single;

                OrbbecSensingManager.instance.deviceInitAction     = OnDeviceInit;
                OrbbecSensingManager.instance.trackedAction        = OnTracked;
                OrbbecSensingManager.instance.unTrackedAction      = OnUnTrackedAction;
                OrbbecSensingManager.instance.leftAtkAction        = OnLeftAtkAction;
                OrbbecSensingManager.instance.rightAtkAction       = OnRightAtkAction;
                OrbbecSensingManager.instance.leftHandRaiseAction  = OnLeftHandRaiseAction;
                OrbbecSensingManager.instance.rightHandRaiseAction = OnRightHandRaiseAction;

                OrbbecSensingManager.instance.InitOrbbecDevice();
            });
        }