Static Functions
| GetAccelerationEvent | Returns specific acceleration measurement which occurred during last frame. (Does not allocate temporary variables). |
|---|---|
| GetAxis | Returns the value of the virtual axis identified by axisName. |
| GetAxisRaw | Returns the value of the virtual axis identified by axisName with no smoothing filtering applied. |
| GetButton | Returns true while the virtual button identified by buttonName is held down. |
| GetButtonDown | Returns true during the frame the user pressed down the virtual button identified by buttonName. |
| GetButtonUp | Returns true the first frame the user releases the virtual button identified by buttonName. |
| GetJoystickNames | Returns an array of strings describing the connected joysticks. |
| GetKey | Returns true while the user holds down the key identified by name. Think auto fire. |
| GetKeyDown | Returns true during the frame the user starts pressing down the key identified by name. |
| GetKeyUp | Returns true during the frame the user releases the key identified by name. |
| GetMouseButton | Returns whether the given mouse button is held down. |
| GetMouseButtonDown | Returns true during the frame the user pressed the given mouse button. |
| GetMouseButtonUp | Returns true during the frame the user releases the given mouse button. |
| GetTouch | Returns object representing status of a specific touch. (Does not allocate temporary variables). |
| ResetInputAxes | Resets 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에 미리 지정된 값들이다(스트링값으로 지정된 값)
'유니티 > 스크립트' 카테고리의 다른 글
| 유니티 내의 특정 오브젝트 보이기/감추기 Or 컴포넌트 On/off (0) | 2014.01.28 |
|---|---|
| 유니티 특정 오브젝트 생성시 시간간격 두기(실행 지연 관련) (0) | 2014.01.28 |
| 유니티 키 입력 관련 input manager 클래스관련 (0) | 2014.01.28 |
| 유니티 SendMessage함수를 사용해서 다른 오브젝트의 특정 함수 호출하기 (0) | 2014.01.28 |
| 폭파 불꽃 관련 파티클 이미지 (0) | 2014.01.28 |
| 유니티의 오브젝트 크기, 위치, 색 설정하기 (0) | 2014.01.28 |
Trackback 0 And
Comment 0


