public void SaveJson(DialogueDataSaveOptions data) { var path = Path.Combine(Application.dataPath, $"Data/VisualNovel/save.json"); // Save($"{VISUAL_NOVEL_PATH}/save.json", data); Save(path, data); }
public void Save(int index) { var data = new DialogueDataSaveOptions { currentSpeech = index }; Resource.SaveJson(data); }
private void Awake() { SpeakerName = GameObject.FindGameObjectWithTag("SpeakerName").GetComponent <Text>(); SpeakerText = GameObject.FindGameObjectWithTag("SpeechText").GetComponent <Text>(); SpeakerImage = GameObject.FindGameObjectWithTag("SpeakerImage").GetComponent <Image>(); BackgroundImage = GameObject.FindGameObjectWithTag("Background").GetComponent <Image>(); Data = Service.LoadSave(); _currentSpeech = Data.currentSpeech; LastCurrentSpeech = _currentSpeech - 1; _dialogues = Service.LoadDialogueList(); }