Skip to content

InputManager

29thnight edited this page Nov 27, 2025 · 1 revision

InputManager

간단 설명: 키보드/마우스/게임패드 입력을 통합 관리하는 싱글턴. 프레임별 상태 업데이트와 편의 조회 함수 제공.

초기화/업데이트

메서드 설명
Initialize(hwnd) 윈도우 핸들 기반 초기화(IGameInput 준비)
Update(deltaTime) 모든 디바이스 상태 갱신 및 진동 업데이트

키보드

메서드 설명
KeyBoardUpdate() 키 상태 갱신(Down/Pressed/Released)
IsKeyDown/Pressed/Released(key) 키 상태 조회
IsAnyKeyPressed() 임의 키 눌림 여부

마우스

메서드 설명
MouseUpdate() 마우스 상태 갱신
SetMousePos(pos) / GetMousePos() 좌표 설정/조회
GetMouseDelta() 프레임 이동량
IsWheelUp/Down() 휠 방향 판별
IsMouseButtonDown/Pressed/Released(button) 버튼 상태 조회
HideCursor()/ShowCursor() 커서 표시 제어
ResetMouseDelta() 델타 초기화
GetWheelDelta() 휠 델타 조회

게임패드

메서드 설명
PadUpdate()/GamePadUpdate() 게임패드 상태 갱신
IsControllerConnected(index) 연결 여부
IsControllerButtonDown/Pressed/Released(index, btn) 버튼 상태
IsControllerTriggerL/R(index) 트리거 입력(좌/우)
GetControllerThumbL/R(index) 스틱 벡터 입력
SetControllerVibration(...) 진동 설정(주파수/시간 포함)
UpdateControllerVibration(tick) 진동 시간 관리
SetControllerVibrationTime(index, time) 잔여 시간 설정

필드(핵심)

필드 설명
gameInput IGameInput ComPtr
m_keyboardState 키보드 상태 래퍼
m_GameInputMouseState 마우스 상태
m_curKeyStates/m_curMouseState 비트 플래그 상태
m_mousePos/m_mouseDelta 위치/델타
m_mouseWheelDelta 휠 델타
m_GameInputPadState 패드 상태 배열
m_curPadState 패드 비트플래그 배열
deadZone/triggerdeadZone 스틱/트리거 데드존

윈도우/DirectInput(GameInput)와 직접 연동되어 상태를 업데이트.

CreatorEngine

API Docs

API Reference
Main
PhysicsSystem
RenderEngine
ScriptBinder
Utility_Framework

etc

Clone this wiki locally