public POV GetPOVByName(JoystickPOVs pov)
        {
            int key = (int)pov;

            if (key >= povsDictionary.Length)
            {
                return(null);
            }
            return(povsDictionary[key]);
        }
Esempio n. 2
0
        public JoystickPOVDirections GetJoystickPOV(JoystickPOVs pov)
        {
            var index = (int)pov;

            if (index >= 0 && index < joystickPOVs.Length)
            {
                return(joystickPOVs[index]);
            }
            return(0);
        }
Esempio n. 3
0
 public SystemJoystickValue( JoystickPOVs pov, JoystickPOVDirections povDirection )
 {
     type = Types.POV;
     this.pov = pov;
     this.povDirection = povDirection;
 }
Esempio n. 4
0
 public DefaultJoystickValueAttribute( JoystickPOVs pov, JoystickPOVDirections direction )
 {
     value = new GameControlsManager.SystemJoystickValue( pov, direction );
 }
            //

            public POV(JoystickPOVs name)
            {
                this.name = name;
            }
 public SystemJoystickValue(JoystickPOVs pov, JoystickPOVDirections povDirection, float strength)
 {
     type = Types.POV;
     this.pov = pov;
     this.povDirection = povDirection;
     this.strength = strength;
 }
 public SystemJoystickValue(SystemJoystickValue source)
 {
     type = source.Type;
     button = source.Button;
     axis = source.Axis;
     axisFilter = source.AxisFilter;
     pov = source.POV;
     povDirection = source.POVDirection;
     _parent = source.Parent;
     strength = source.strength;
 }
 /// <summary>
 /// Check if the Given Input is Binded. Return the currently binded control to the input
 /// </summary>
 public bool IsAlreadyBinded(JoystickPOVs pov, JoystickPOVDirections dir, out SystemJoystickValue control)
 {
     control = null;
     foreach (GameControlItem item in Items)
     {
         if (item.BindedJoystickValues.Count <= 0)
             continue;
         foreach (SystemJoystickValue value in item.BindedJoystickValues)
         {
             if (value.Type == SystemJoystickValue.Types.POV && value.POV == pov && value.POVDirection == dir)
             {
                 control = value;
                 return true;
             }
         }
     }
     return false;
 }
Esempio n. 9
0
 public DefaultJoystickValueAttribute(JoystickPOVs pov, JoystickPOVDirections direction)
 {
     value = new GameControlsManager.SystemJoystickValue(pov, direction);
 }
Esempio n. 10
0
 public SystemJoystickValue(JoystickPOVs pov, JoystickPOVDirections povDirection)
 {
     type              = Types.POV;
     this.pov          = pov;
     this.povDirection = povDirection;
 }