FromString() public static method

public static FromString ( string s ) : GameProgress,
s string
return GameProgress,
Exemplo n.º 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));
    }
Exemplo n.º 2
0
 public static GameProgress FromBytes(byte[] b)
 {
     return(GameProgress.FromString(System.Text.ASCIIEncoding.Default.GetString(b)));
 }