public void restoreSaveGameData(FPEAudioDiaryPlayedStateSaveData data) { hasBeenPlayed = data.HasBeenPlayed; if (hasBeenPlayed && postPlaybackInteractionString != "") { interactionString = postPlaybackInteractionString; } }
/// <summary> /// Gathers saveable data from both regular and passive Audio Diary type objects /// </summary> /// <returns>Array of save data for both of these audio diary types</returns> public FPEAudioDiaryPlayedStateSaveData[] gatherAudioDiaryPlayedStateData() { FPEPassiveAudioDiary[] passiveDiaryObjs = GameObject.FindObjectsOfType <FPEPassiveAudioDiary>(); FPEInteractableAudioDiaryScript[] diaryObjs = GameObject.FindObjectsOfType <FPEInteractableAudioDiaryScript>(); FPEAudioDiaryPlayedStateSaveData[] saveData = new FPEAudioDiaryPlayedStateSaveData[passiveDiaryObjs.Length + diaryObjs.Length]; for (int ad1 = 0; ad1 < passiveDiaryObjs.Length; ad1++) { saveData[ad1] = passiveDiaryObjs[ad1].getSaveGameData(); } for (int ad2 = 0; ad2 < diaryObjs.Length; ad2++) { saveData[passiveDiaryObjs.Length + ad2] = diaryObjs[ad2].getSaveGameData(); } return(saveData); }
public void restoreSaveGameData(FPEAudioDiaryPlayedStateSaveData data) { hasBeenPlayed = data.HasBeenPlayed; }