예제 #1
0
    public static string ToValue(this PSButton value)
    {
        var i = (int)value;

        if (i < strings.Length)
        {
            return(strings[i]);
        }
        else
        {
            return("none");
        }
    }
예제 #2
0
 /// <summary>
 /// Returns true during the frame the user released the button.
 /// </summary>
 /// <param name="btn"></param>
 /// <returns></returns>
 public bool Released(PSButton btn)
 {
     return(Released((CButton)btn));
 }
예제 #3
0
 /// <summary>
 /// Returns true during the frame the user pressed the button.
 /// </summary>
 /// <param name="btn"></param>
 /// <returns></returns>
 public bool Pressed(PSButton btn)
 {
     return(Pressed((CButton)btn));
 }
예제 #4
0
 /// <summary>
 /// Returns true while the button is pressed.
 /// </summary>
 /// <param name="btn"></param>
 /// <returns></returns>
 public bool Button(PSButton btn)
 {
     return(Button((CButton)btn));
 }
예제 #5
0
 /// <summary>
 /// Returns the state of button <paramref name="btn"/> of player <paramref name="id"/> using a playstation controller layout.
 /// </summary>
 /// <param name="btn"></param>
 /// <param name="id"></param>
 /// <returns></returns>
 public static bool GetButton(PSButton btn, PlayerIndex id = PlayerIndex.Any)
 {
     return(GetButton((CButton)btn, id));
 }