Exemplo n.º 1
0
 public int GetKeyPressLength(EKeyCode key)
 {
     return(cKeyboard.GetIsEnded(ref key) ? -1 : cKeyboard.GetPressFrameCount(ref key));
 }
Exemplo n.º 2
0
 /// <summary>
 /// キーが押された瞬間どうかを取得します。
 /// </summary>
 /// <param name="key">キー番号</param>
 /// <returns>押された瞬間かどうか</returns>
 public bool GetIsKeyBegan(EKeyCode key) => cKeyboard.GetIsBegan(ref key);
Exemplo n.º 3
0
 /// <summary>
 /// キーが離された瞬間どうかを取得します。
 /// </summary>
 /// <param name="key">キー番号</param>
 /// <returns>離された瞬間かどうか</returns>
 public bool GetIsKeyEnded(EKeyCode key) => cKeyboard.GetIsEnded(ref key);
Exemplo n.º 4
0
 public bool GetIsEnded(ref EKeyCode key)
 {
     return(cKeyInfo[cCodeToIndex[key]].State == EState.Ended);
 }
Exemplo n.º 5
0
 /// <summary>
 /// キーが押されている時間(押された瞬間からの経過時間)を取得します。
 /// </summary>
 /// <param name="key">キー番号</param>
 /// <returns>時間(秒。押されていない場合と押された瞬間は0を返します)</returns>
 public float GetKeyPressDuration(EKeyCode key) => cKeyboard.GetPressDuration(ref key);
Exemplo n.º 6
0
 public bool IsKeyReleased(EKeyCode key) => cKeyboard.GetIsEnded(ref key);
Exemplo n.º 7
0
 public bool IsKeyPushed(EKeyCode key)
 {
     return(cKeyboard.GetIsBegan(ref key));
 }
Exemplo n.º 8
0
 public int GetPressFrameCount(ref EKeyCode key)
 {
     return(cKeyInfo[cCodeToIndex[key]].FrameCount);
 }
Exemplo n.º 9
0
 public float GetPressDuration(ref EKeyCode key)
 {
     return(cKeyInfo[cCodeToIndex[key]].Duration);
 }
Exemplo n.º 10
0
 /// <summary>
 /// キーが押された瞬間どうかを取得します。
 /// </summary>
 /// <param name="key">キー番号</param>
 /// <returns>押された瞬間かどうか</returns>
 public bool GetIsKeyBegan(EKeyCode key)
 {
     return(cKeyboard.GetIsBegan(ref key));
 }
Exemplo n.º 11
0
 /// <summary>
 /// キーが離された瞬間どうかを取得します。
 /// </summary>
 /// <param name="key">キー番号</param>
 /// <returns>離された瞬間かどうか</returns>
 public bool GetIsKeyEnded(EKeyCode key)
 {
     return(cKeyboard.GetIsEnded(ref key));
 }
Exemplo n.º 12
0
 /// <summary>
 /// キーが押されているかどうかを取得します。
 /// </summary>
 /// <param name="key">キー番号</param>
 /// <returns>押されているかどうか</returns>
 public bool GetIsKeyPress(EKeyCode key)
 {
     return(cKeyboard.GetIsPress(ref key));
 }
Exemplo n.º 13
0
 /// <summary>
 /// キーが押されている時間(押された瞬間からの経過時間)を取得します。
 /// </summary>
 /// <param name="key">キー番号</param>
 /// <returns>時間(秒。押されていない場合と押された瞬間は0を返します)</returns>
 public float GetKeyPressDuration(EKeyCode key)
 {
     return(cKeyboard.GetPressDuration(ref key));
 }
Exemplo n.º 14
0
 /// <summary>
 /// キーが押されているフレーム数(押された瞬間を1フレーム目とする経過フレーム数)を取得します。
 /// </summary>
 /// <param name="key">キー番号</param>
 /// <returns>フレーム数(押されていない場合は常に0を返します)</returns>
 public int GetKeyPressFrameCount(EKeyCode key)
 {
     return(cKeyboard.GetPressFrameCount(ref key));
 }
Exemplo n.º 15
0
 public bool IsKeyPress(EKeyCode key) => cKeyboard.GetIsPress(ref key);
Exemplo n.º 16
0
 public bool GetIsPress(ref EKeyCode key)
 {
     return(cKeyInfo[cCodeToIndex[key]].State != EState.None);
 }
Exemplo n.º 17
0
 public bool IsKeyPushed(EKeyCode key) => cKeyboard.GetIsBegan(ref key);
Exemplo n.º 18
0
 public bool GetIsBegan(ref EKeyCode key)
 {
     return(cKeyInfo[cCodeToIndex[key]].State == EState.Began);
 }
Exemplo n.º 19
0
 /// <summary>
 /// キーが押されているフレーム数(押された瞬間を1フレーム目とする経過フレーム数)を取得します。
 /// </summary>
 /// <param name="key">キー番号</param>
 /// <returns>フレーム数(押されていない場合は常に0を返します)</returns>
 public int GetKeyPressFrameCount(EKeyCode key) => cKeyboard.GetPressFrameCount(ref key);
Exemplo n.º 20
0
 public bool GetKey(EKeyCode key)
 {
     return(Keyboard.IsKeyDown((Key)key));
 }