Пример #1
0
    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);
    }
Пример #2
0
    public void Save(int index)
    {
        var data = new DialogueDataSaveOptions
        {
            currentSpeech = index
        };

        Resource.SaveJson(data);
    }
Пример #3
0
    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();
    }