AddForce(방향*힘 값, 힘의 종류)
오늘 쓴 것_rb2d.AddForce(Vector2.up * (SPEED * 50f));
프로그램의 개발에 있어서, 데이터는 가장 중요한 요소다. 데이터는 지속적으로 저장되어, 케릭터의 레벨과 같은 상태, 획득한 아이템 등은 영구적인 보관이 요구된다.
PlayerPrefs은 int, float, string 타입의 데이터를 저장하도록 Set 함수를 제공한다.
SetInt(string Key, int value) : Key 값으로 int 형 데이터를 저장한다.
SetFloat(string Key, float value) : Key 값으로 float 형 데이터를 저장한다.
SetString(string Key, string value) : Key 값으로 string 형 데이터를 저장한다.
PlayerPrefs은 int, float, string 타입의 저장된 데이터를 불러오도록 Get 함수를 제공한다.
GetInt(string Key) : Key 값으로 저장된 int 형 데이터를 불러온다.
GetFloat(string Key) : Key 값으로 저장된 float 형 데이터를 불러온다.
GetString(string Key) : Key 값으로 저장된 string 형 데이터를 불러온다.