public static PlayerData Init() { PlayerData pd = new PlayerData { MaxStage = 4, MaxClearStage = 0, StageCount = 240, RecentStage = 1 }; pd.starInfos = new int[pd.StageCount]; for (int i = 1; i <= pd.StageCount; i++) { pd.SetStarInfo(i, 0); } PlayerPerfUtil.Save(DataSaveKey.VOLUME.ToString(), 50); PlayerPerfUtil.Save(DataSaveKey.SENSITIVITY.ToString(), 5); PlayerPrefs.SetString("SaveData", "Ok"); return(pd); }
public void SetStarInfo(int stage, int data) { starInfos[stage - 1] = data; PlayerPerfUtil.Save(DataSaveKey.STAGE_STAR_.ToString() + stage, data); }