Ejemplo n.º 1
0
 /// <summary>
 /// Setup builds an XN Context, Session Manager and all the detectors. 
 /// It also adds the callbacks for the SessionManager and adds the listeners on the Broadcaster. 
 /// </summary>
 private void Setup()
 {
     //build the context
     Context = new Context(CONFIG);
     //build session manager
     SeshManager = new SessionManager(Context,"RaiseHand","RaiseHand");
     SeshManager.SetQuickRefocusTimeout(15000);
     //build the FlowRouter
     Flowy  = new FlowRouter();
     //build the Broadcaster
     BCaster = new Broadcaster();
     //build the detectors
     Pushy = new PushDetector();
     Swipy = new SwipeDetector();
     //setup all the callbacks
     SetupCallbacks();
     Flowy.SetActive(BCaster);
     //add the flow router to the session
     SeshManager.AddListener(Flowy);
     SeshManager.SessionStart += SessionStarted;
     //add the listeners to BCaster
     BCaster.AddListener(Pushy);
     BCaster.AddListener(Swipy);
 }