/// <summary> /// _data를 깊은 복사 합니다. /// </summary> /// <param name="_data">복사할 원본 데이터</param> public Data_Child(Data_Child _data) { currentStage = _data.currentStage; currentPosition = _data.currentPosition; isDie = _data.isDie; isFriend = _data.isFriend; isBye = _data.isBye; name = _data.name; diaryData = _data.diaryData; }
//테스트용 세이브. public IEnumerator TestSave() { yield return(StartCoroutine(CreatePath(eDataType.CHILD, currentDataSlot))); isLoad = false; //원래라면 딕셔너리로 작업된 녀석들을 DictToList로 변환시켜야합니다. currentData_ChildList = new Data_ChildList(); currentData_ChildList.childDataList = new List <Data_Child>(); currentData_ChildList.childDataList.Clear(); currentData_Child = new Data_Child(); currentData_Child.currentStage = 1; currentData_Child.currentPosition = new Vector3(0, 0, 0); currentData_Child.isDie = false; currentData_Child.isFriend = false; currentData_Child.isBye = false; currentData_Child.name = "코라"; currentData_Child.age = "10살"; currentData_Child.diaryData = "아앙, 테메와 돈독한 친구사이같다..."; currentData_Child.childType = eChildType.KORA; currentData_ChildList.childDataList.Add(currentData_Child); Data_Child tempData = new Data_Child(currentData_Child); tempData.name = "테메"; tempData.diaryData = "코라를 좋아하고 있는 듯 하다..."; tempData.age = "9살"; tempData.childType = eChildType.TEME; currentData_Child = tempData; currentData_ChildList.childDataList.Add(currentData_Child); currentData_Child = null; yield return(StartCoroutine(SaveData_ChildList())); ListToDictionary(); Debug.Log("Save Finish!"); yield break; }