controllerActivated() public method

public controllerActivated ( Target>.Dictionary targets ) : void
targets Target>.Dictionary
return void
Esempio n. 1
0
 private void InitTargets()
 {
     targets.Add(1, new Target(target1, 1));
     targets.Add(2, new Target(target2, 2));
     targets.Add(3, new Target(target3, 3));
     targets.Add(4, new Target(target4, 4));
     targets.Add(5, new Target(target5, 5));
     currentController.controllerActivated(targets);
     Canvas.SetZIndex(target1, 100);
     Canvas.SetZIndex(target2, 100);
     Canvas.SetZIndex(target3, 100);
     Canvas.SetZIndex(target4, 100);
     Canvas.SetZIndex(target5, 100);
 }
Esempio n. 2
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);
            }
        }
        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();
            }
        }
Esempio n. 4
0
 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();
 }
Esempio n. 5
0
        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();

            }
        }