// Use this for initialization void Awake() { stand = new StandTutorial (tutor); sit = new SitTutorial (tutor); Debug.Log("Initializing Kinect"); try { GameKinectSensor = new OhioState.Kinect.KinectSensor(); } catch (Exception e) { Debug.LogError(e.Message); } currentKinectGameData = new KinectGameData(); try { GameKinectSensor.SkeletonHandler += kinectSensor_SkeletonFrameReady; GameKinectSensor.Initialize(); } catch (Exception e) { Debug.LogError(e.Message); } DontDestroyOnLoad(this.gameObject); int size = 5 * 60; gestureManager = new GestureManager(size, true); gestureManager.Level = 1; gestureManager.ReadFiles(); //if (gestureManager.ErrorMessage.Length > 0) // Debug.LogError(gestureManager.ErrorMessage); SetGesturesForSection("tutorial"); Debug.Log("Kinect Complete"); }
// Use this for initialization void Awake() { Debug.Log("Initializing Kinect"); try { GameKinectSensor = new OhioState.Kinect.KinectSensor(); } catch (Exception e) { errorMessage = e.Message; Debug.LogError(e.Message); } currentKinectGameData = new KinectGameData(); try { GameKinectSensor.SkeletonHandler += kinectSensor_SkeletonFrameReady; GameKinectSensor.Initialize(); } catch (Exception e) { errorMessage = e.Message; Debug.LogError(e.Message); } int size = 5 * 60; gestureManager = new GestureManager(size, true); gestureManager.Level = 1; gestureManager.ReadFiles(); //if (gestureManager.ErrorMessage.Length > 0) // Debug.LogError(gestureManager.ErrorMessage); SetGesturesForSection(sectionName); Debug.Log("Kinect: " + GameKinectSensor.Status); }