示例#1
0
 public void Init(Main_ChallengeViewer parent, Json_Challenge_ListNode mySaveData, ChallengeData myData)
 {
     _ParentComponent = parent;
     _mySaveData      = mySaveData;
     _myData          = myData;
     UpdateView();
 }
示例#2
0
    public static void Init(Main_DataFileManager DatafileManager, Main_ChallengeViewer Viewer, Assets_ChallengeList Asset, Main_NoticeViewer NoticeViewer)
    {
        Main_ChallengeManager.DatafileManager = DatafileManager;
        Main_ChallengeManager.ChallengeViewer = Viewer;
        Main_ChallengeManager.ChallengeList   = Asset;
        Main_ChallengeManager.NoticeViewer    = NoticeViewer;
        UpdateFromJson();

        //セーブデータを補完する
        {
            foreach (var node in Asset.ChallengeList)
            {
                bool isExist = false;
                for (int i = 0, size = ChallengeSaveData.Data.Count; i < size; ++i)
                {
                    if (ChallengeSaveData.Data[i].CloseID == node.CloseID)
                    {
                        isExist = true;
                        break;
                    }
                }

                //無かったら追加
                if (!isExist)
                {
                    var data = new Json_Challenge_ListNode();
                    data.CloseID = node.CloseID;
                    ChallengeSaveData.Data.Add(data);
                }
            }
        }
    }