コード例 #1
0
ファイル: PlayerInfo.cs プロジェクト: isoundy000/qipai-3
 /// <summary>
 /// 返回到登录场景,重置数据
 /// </summary>
 public static void ResetData()
 {
     playerData = null;
     bagInfo.Clear();
     mails.Clear();
     friends.Clear();
     gameTypes.Clear();
     waitPlayers.Clear();
     recentPlay = null;
 }
コード例 #2
0
ファイル: PlayerInfo.cs プロジェクト: isoundy000/qipai-3
 public static Proto.RecentPlay GetRecentPlay()
 {
     Debug.Log("recentplay: " + PlayerPrefs.GetString("recentPlay"));
     if (recentPlay == null)
     {
         string recentPlayStr = PlayerPrefs.GetString("recentPlay");
         if (recentPlayStr == "")
         {
             recentPlay = new Proto.RecentPlay();
         }
         else
         {
             recentPlay = JsonUtility.FromJson <Proto.RecentPlay>(recentPlayStr);
         }
     }
     return(recentPlay);
 }