예제 #1
0
 /// <summary>
 /// 返回到登录场景,重置数据
 /// </summary>
 public static void ResetData()
 {
     playerData = null;
     bagInfo.Clear();
     mails.Clear();
     friends.Clear();
     gameTypes.Clear();
     waitPlayers.Clear();
     recentPlay = null;
 }
예제 #2
0
 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);
 }