Esempio n. 1
0
 public static Xbox360Controller getInstance()
 {
     if (instance == null)
     {
         instance = new Xbox360Controller();
     }
     return(instance);
 }
Esempio n. 2
0
 public static Xbox360Controller getInstance()
 {
     if (instance == null)
     {
         instance = new Xbox360Controller();
     }
     return instance;
 }
Esempio n. 3
0
        public GenericJoystick()
        {
            ControlDeviceType = "Gamepad";
            ProductName = "XBox360 Controller";
            InstanceName = "None";

            joystick = Xbox360Controller.getInstance();
            joystick.joystickEvent += XBox360Controller_JoystickEvent;
        }
Esempio n. 4
0
        public GenericJoystick()
        {
            ControlDeviceType = "Gamepad";
            ProductName       = "XBox360 Controller";
            InstanceName      = "None";

            joystick = Xbox360Controller.getInstance();
            joystick.joystickEvent += XBox360Controller_JoystickEvent;
        }
Esempio n. 5
0
        public void Close()
        {
            if (IsEnabled && joystick != null)
            {
                Debug.WriteLine("IP: GenericJoystick  Close(): unacquiring joystick...");

                joystick.joystickEvent -= XBox360Controller_JoystickEvent;
                //joystick.SetNotification(null);
                //joystick.Unacquire();
                joystick.Dispose();
                IsEnabled = false;
                joystick  = null;
            }
        }
Esempio n. 6
0
        public void Close()
        {
            if (IsEnabled && joystick != null)
            {
                Debug.WriteLine("IP: GenericJoystick  Close(): unacquiring joystick...");

                joystick.joystickEvent -= XBox360Controller_JoystickEvent;
                //joystick.SetNotification(null);
                //joystick.Unacquire();
                joystick.Dispose();
                IsEnabled = false;
                joystick = null;
            }
        }