Move -> Vector2 ํ์ ์ผ๋ก ๋ฐฉํฅํค arrow 4๊ฐ ๋ฑ๋ก ํ๋๋ฐ
Shift -> Button ํ์ ์ ์ถ๊ฐํด์
InputAction moveAction = action.Player.Move;
InputActionย buttonAction = action.Player.Shift;
์ด๋ ๊ฒ ๋ฑ๋กํจ.
Shift ๋ Docs ๋ณด๋๊น buttonAction.triggered ๋ง ํด์
๋๋ ธ๋์ง ๋ฐ๋ก ์ฒดํฌ ๊ฐ๋ฅํ๋ฐ
moveAction์ readValue๋ก Vector2๊ฐ ๊ฐ์ ํตํด์๋ง ํ์ธ ๊ฐ๋ฅํ๊ฑฐ์ผ? triggered๊ฐ ์๋จนํ๋๊ฑฐ ๊ฐ๋๋ผ๊ตฌ.
์ด๋ด๋๋ Shift -> Button ์ชฝ์ ๋๊ฐ์ด ๋ฐฉํฅํค 4๊ฐ๋ง ๋ฑ๋กํด๋๊ณ Triggered๋ก ์ฒดํฌํ๋๊ฒ ์ข์๊น?
Vector2 ๊ฐ ํ๋จํด์ ๋๋ ธ๋์ง ํ์ธํ๋๊ฑด ๋จผ๊ฐ ๋๋ฌด ์กฑ๊ฐ์์.
buttonํ์ ์ 4๋ฐฉํฅ InputAction์ ๋ง๋๋๊ฒ ์ํ๋ ํํ์ธ๋ฏ