コード例 #1
0
 void Start()
 {
     terrain.SetActive(false);
     forest.SetActive(false);
     MyJsonUtility.LoadData(out charactersDict, out characters, out dialogues);
     dialogueUI.OnAnswerSelected      += OnAnswerSelected;
     dialogueUI.IntroStage            += OnIntroStageChange;
     charactersUI.OnCharacterSelected += OnCharacterSelected;
     SubmitLogic.ScoresComputed       += OnScoresComputed;
     currentCharacter = charactersDict["AI"];
     dialogueUI.DisplayIntro(currentCharacter.CurrentDialogue);
     charactersUI.SetCharacters(characters);
     audioManager.PlayIntro();
 }
コード例 #2
0
    private WordSet ToJason(WordSet wordset)
    {
        string s = JsonUtility.ToJson(wordset);

        Debug.Log(s.Length);

        string compressString = MyJsonUtility.CompressString(s);

        Debug.Log(compressString.Length);

        string decompressString = MyJsonUtility.DeCompressString(compressString);

        Debug.Log(decompressString.Length);

        WordSet newSet = new WordSet();

        JsonUtility.FromJsonOverwrite(decompressString, newSet);
        return(newSet);
    }
コード例 #3
0
 // Start is called before the first frame update
 void Start()
 {
     dialogues = MyJsonUtility.LoadDialogues();
 }