Exemple #1
0
 public bool Equals(Memo other)
 {
     return
         (MemoData.Equals(other.MemoData) &&
          MemoFormat.Equals(other.MemoFormat) &&
          MemoType.Equals(other.MemoType));
 }
Exemple #2
0
 public Memo(MemoData data)
 {
     ID               = data.id;
     Title            = data.title;
     Body             = data.body;
     OriginalGameName = data.original_game_name;
     ChangePoint      = data.change_point;
     Date             = data.date;
     Author           = data.author;
 }
    //外部ファイルに書き込む
    public void SaveMemo()
    {
        MemoDataFile file = new MemoDataFile();

        file.dataArray = new MemoData[memoList.Count];
        for (int i = 0; i < memoList.Count; i++)
        {
            Memo     memo = memoList[i];
            MemoData data = new MemoData();

            data.id    = memo.ID;
            data.title = memo.Title;
            data.body  = memo.Body;
            data.original_game_name = memo.OriginalGameName;
            data.change_point       = memo.ChangePoint;
            data.date   = memo.Date;
            data.author = memo.Author;

            file.dataArray[i] = data;
        }

        memoDataJson.SetValue(JsonUtility.ToJson(file));
    }