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