コード例 #1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     SetupKinect();
     yourController = new CustomController(this);
     exampleController = new SkeletonController(this);
     currentController = yourController;
     InitTargets();
     i = 0;
 }
コード例 #2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     SetupKinect();
     exampleController = new SkeletonController(this);
     yourController1   = new CustomController1(this);
     yourController2   = new CustomController2(this);
     currentController = exampleController;
     InitTargets();
     i = 0;
 }
コード例 #3
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     SetupKinect();
     shoopDoupController = new ShoopDoupController(this);
     selectionController = new SelectionController(this);
     currentController = shoopDoupController;
 
     
     i = 0;
 }
コード例 #4
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.D1)
            {
                currentController      = exampleController;
                controllerText.Content = "Example Controller";
                currentController.controllerActivated(targets);
            }

            if (e.Key == Key.D2)
            {
                currentController      = yourController1;
                controllerText.Content = "Controller 1";
                currentController.controllerActivated(targets);
            }

            if (e.Key == Key.D3)
            {
                currentController      = yourController2;
                controllerText.Content = "Controller 2";
                currentController.controllerActivated(targets);
            }
        }
コード例 #5
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            Boolean changedController = false;
            if (e.Key == Key.D1)
            {
                changedController = changedController || currentController != exampleController;
                currentController = exampleController;
                controllerText.Content = "Example Controller";
                currentController.controllerActivated(targets);
            }

            if (e.Key == Key.D2)
            {
                changedController = changedController || currentController != yourController1;
                currentController = yourController1;
                controllerText.Content = "Controller 1";
                currentController.controllerActivated(targets);
            }

            if (e.Key == Key.D3)
            {
                changedController = changedController || currentController != yourController2;
                currentController = yourController2;
                controllerText.Content = "Controller 2";
                currentController.controllerActivated(targets);
            }

            if (changedController)
            {
                yourController1.removeAllBalls();
            }
        }
コード例 #6
0
ファイル: MainWindow.xaml.cs プロジェクト: Wesleyleung/cs247
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     SetupKinect();
     exampleController = new SkeletonController(this);
     yourController1 = new CustomController1(this);
     yourController2 = new CustomController2(this);
     currentController = exampleController;
     currentController.controllerActivated();
 }
コード例 #7
0
ファイル: MainWindow.xaml.cs プロジェクト: Wesleyleung/cs247
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.D1)
            {
                currentController = exampleController;
                controllerText.Content = "Example Controller";
                currentController.controllerActivated();
            }

            if (e.Key == Key.D2)
            {
                currentController = yourController1;
                controllerText.Content = "Controller 1";
                currentController.controllerActivated();
            }

            if (e.Key == Key.D3)
            {
                currentController = yourController2;
                controllerText.Content = "Controller 2";
                currentController.controllerActivated();

            }
        }
コード例 #8
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.D1)
            {
                currentController = shoopDoupController;
            }

            if (e.Key == Key.D2)
            {
                currentController = selectionController;
            }
        }