public void ResetRecord() { HillRecord = 0; RecordPoint = new Vector2(-400, -400); PlayerPrefs.SetFloat(HillName.ToString(), 0); PlayerPrefs.SetFloat(HillName.ToString() + "X", -400); PlayerPrefs.SetFloat(HillName.ToString() + "Y", -400); }
public void SetRecord(float hillRecord, Vector2 recordPoint) { if (hillRecord > HillRecord) { HillRecord = hillRecord; RecordPoint = recordPoint; PlayerPrefs.SetFloat(HillName.ToString(), HillRecord); PlayerPrefs.SetFloat(HillName.ToString() + "X", RecordPoint.x); PlayerPrefs.SetFloat(HillName.ToString() + "Y", RecordPoint.y); } }