Example #1
0
        public void Init()
        {
            sb = GetComponent <SceneBrancher>();
            if (sb.scenes == null)
            {
                sb.scenes = new Dictionary <string, SceneObj>();
            }

            if (sb.writing == null)
            {
                sb.writing = new Dictionary <string, string>();
            }

            GameJson game = JsonUtility.FromJson <GameJson>(Game.ToString());

            parseGame(game);

            WritingJson language = JsonUtility.FromJson <WritingJson>(Language.ToString());

            parseLanguage(language);
        }
 void Awake()
 {
     gmc = GetComponent <GameMenusContainer>();
     jr  = GetComponent <JsonReader>();
     sb  = GetComponent <SceneBrancher>();
 }