유니티 키 입력 관련 input manager 클래스관련

|
Static Functions
GetAccelerationEventReturns specific acceleration measurement which occurred during last frame. (Does not allocate temporary variables).
GetAxisReturns the value of the virtual axis identified by axisName.
GetAxisRawReturns the value of the virtual axis identified by axisName with no smoothing filtering applied.
GetButtonReturns true while the virtual button identified by buttonName is held down.
GetButtonDownReturns true during the frame the user pressed down the virtual button identified by buttonName.
GetButtonUpReturns true the first frame the user releases the virtual button identified by buttonName.
GetJoystickNamesReturns an array of strings describing the connected joysticks.
GetKeyReturns true while the user holds down the key identified by name. Think auto fire.
GetKeyDownReturns true during the frame the user starts pressing down the key identified by name.
GetKeyUpReturns true during the frame the user releases the key identified by name.
GetMouseButtonReturns whether the given mouse button is held down.
GetMouseButtonDownReturns true during the frame the user pressed the given mouse button.
GetMouseButtonUpReturns true during the frame the user releases the given mouse button.
GetTouchReturns object representing status of a specific touch. (Does not allocate temporary variables).
ResetInputAxesResets all input. After ResetInputAxes all axes return to 0 and all buttons return to 0 for one frame.

유니티에서 사용되는 Input 함수들

위에서 알수 있듯이 여러가지 Input 함수들을 제공합니다.


버튼에는 GetButton, GetButtonUp, GetButtonDown이 있는데

Up 같은경우 버튼에서 손을땠을때 최초 한번 발동하고

Down 같은경우 버튼을 누를시에 최초 한번 발동한다.

그리고 아무것도 붙여지지 않은 함수는 버튼을 누르는동안 계속해서 발동한다.


마우스 관련함수도 마찬가지로 

up은 손을땔떼, down은 누를시, 그리고 아무것도 없는 것은 누르고 있는동안 지속적으로 발동한다.



GetAxis는 Input Manager에 미리 지정된 값들이다(스트링값으로 지정된 값)





Trackback 0 And Comment 0