示例#1
0
 void LoadBibleData()
 {
     try
     {
         string saved_pointer = "";
         if (login_type == 0)
         {
             saved_pointer = PlayerPrefs.GetString(KEY_BOOKMARK);
         }
         else if (login_type == 1)
         {
             saved_pointer = fm.GetBookmark();
         }
         Debug.Log("LoadBiblePointer:" + saved_pointer);
         bookmark = JsonUtility.FromJson <Bookmark>(saved_pointer);
         if (bookmark == null)
         {
             bookmark = new Bookmark();
         }
     }
     catch (Exception ex)
     {
         Debug.LogError(ex.ToString());
         if (bookmark == null)
         {
             bookmark = new Bookmark();
         }
     }
     p_book    = bookmark.p_book;
     p_chapter = bookmark.saved_chapter[p_book];
     p_verse   = bookmark.saved_verse[p_book];
 }