예제 #1
0
 void Update()
 {
     if (listeners.Count == 0 && currentTracker.IsTracking())
     {
         currentTracker.DisableTracking();
     }
     else if (listeners.Count != 0 && !currentTracker.IsTracking())
     {
         currentTracker.EnableTracking();
     }
     currentTracker.DoUpdate();
 }
예제 #2
0
 private void SetupTracker()
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android)
     {
         currentTracker = bodyTrackerNative;
         //bodyTrackerNative.EnableTracking ();
     }
     else if (useWebcamInEditor)
     {
         currentTracker = bodyTrackerMono;
         //bodyTrackerMono.EnableTracking ();
         bodyTrackerKeyboard.DisableTracking();
     }
     else
     {
         currentTracker = bodyTrackerKeyboard;
         bodyTrackerMono.DisableTracking();
         //bodyTrackerKeyboard.EnableTracking ();
     }
     currentTracker.SetPlayerCount(playerCount);
 }