Example #1
0
        public double GetTrigger(int controller, XboxTriggerCode triggerCode)
        {
            if (controller < 0 || controller >= states.Length || !controllers[controller].IsConnected)
            {
                return(0.0d);
            }

            return((triggerCode == XboxTriggerCode.Left) ? states[controller].LeftTrigger / 255.0d : states[controller].RightTrigger / 255.0d);
        }
 //constructor
 public TriggerEventArgs(XboxTriggerCode code, double position)
 {
     _code     = code;
     _position = position;
 }