GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
DesignLab
keyboard.h
[詳解]
1
3
4
// Copyright(c) 2023-2025 Design Engineering Laboratory, Saitama University
5
// Released under the MIT license
6
// https://opensource.org/licenses/mit-license.php
7
8
#ifndef DESIGNLAB_KEYBOARD_H_
9
#define DESIGNLAB_KEYBOARD_H_
10
11
#include <array>
12
13
14
namespace
designlab
15
{
16
19
class
Keyboard
final
20
{
21
public
:
22
Keyboard
();
23
24
27
void
Update
();
28
33
int
GetPressingCount
(
const
int
key_code)
const
;
34
39
int
GetReleasingCount
(
const
int
key_code)
const
;
40
41
private
:
42
static
const
int
kKeyNum = 256;
43
49
bool
IsAvailableCode(
const
int
key_code)
const
;
50
51
std::array<int, kKeyNum> key_pressing_counter_;
52
std::array<int, kKeyNum> key_releasing_counter_;
53
};
54
55
}
// namespace designlab
56
57
58
#endif
// DESIGNLAB_KEYBOARD_H_
designlab::Keyboard
Dxlibのキーボード入力を取得するクラス.
Definition
keyboard.h:20
designlab::Keyboard::GetReleasingCount
int GetReleasingCount(const int key_code) const
keyCodeのキーが離されているフレーム数を取得する.
Definition
keyboard.cpp:68
designlab::Keyboard::Update
void Update()
キー入力を更新する. これを毎フレーム実行しないと,キー入力を取得できない.
Definition
keyboard.cpp:25
designlab::Keyboard::GetPressingCount
int GetPressingCount(const int key_code) const
keyCodeのキーが押されているフレーム数を取得する.
Definition
keyboard.cpp:58
designlab::Keyboard::Keyboard
Keyboard()
Definition
keyboard.cpp:16
designlab
Definition
abstract_dxlib_gui.cpp:18
構築:
1.9.8