[1] C#

Seokchan Yun·2022년 4월 19일
0

----Update()

Input.anyKeyDwon -- 프로퍼티(?)

if (Input.anyKeyDown)
입력

if (Input.anyKey)
아무키나 입력받으면 true;

입력에는

Down // Stay // Up 세가지 형태가 있음.

ex) GetkeyDown / GetkeyUp / Getkey

Input.GetKey -- 키보드 버튼 입력을 받으면 true (KeyCode.Return)
Keycode class 에서 받는 값 .return

마우스 입력 : GetMouseButtonDown(0) / GetMouseButton(1) / GetMouseButtonUp(0)

변수 0 = 마우스 왼쪽 버튼
변수 1 = 마우스 오른쪽 버튼

Edit project setting 에서
기본 설정된 키 받기 가능
Jump Fire etc ...
char type 으로 GetButtonDown 변수에 저장 가능

Horizontal
{
GetAxisRaw = 1 // -1 로 이동
GetAxis = .xxx Float 값으로 이동
}

TransForm
(오브젝트 형태에 대한 기본 컴포넌트)

Translate: 벡터값을 현재 위치에 더하는 함수
컴포넌트는 마우스 오른쪽 버튼 메뉴로 리셋 가능하다.

Vector3 vec = new Vector3(0, 0, 0);
transform.Translate(vec);

선언 사용

profile
42 Paris developer

0개의 댓글