FromString() public static method

public static FromString ( string s ) : GameProgress,
s string
return GameProgress,
示例#1
0
    public static GameProgress LoadFromDisk()
    {
        string s = PlayerPrefs.GetString(PlayerPrefsKey, "");

        if (s == null || s.Trim().Length == 0)
        {
            return(new GameProgress());
        }
        return(GameProgress.FromString(s));
    }
示例#2
0
 public static GameProgress FromBytes(byte[] b)
 {
     return(GameProgress.FromString(System.Text.ASCIIEncoding.Default.GetString(b)));
 }