Esempio n. 1
0
 public PagesFactory(PageNavigator navigator, TalkDataContainerScriptable scriptable)
 {
     _pages = new Dictionary <Type, IPage>()
     {
         { typeof(TalkGroupsPage), new TalkGroupsPage(scriptable.Container, navigator) },
         { typeof(TalksPage), new TalksPage(scriptable.Container, navigator) },
         { typeof(EditPageText), new EditPageText(scriptable.EditPagedata) },
     };
 }
Esempio n. 2
0
    private void Init()
    {
        if (_pageNavigator == null)
        {
            _scriptable = Utils.GetTalkScriptable();
            //EditorUtility.SetDirty(_scriptable);

            _pageNavigator = new PageNavigator(_scriptable, _scriptable.CurrentPageState);
            _talkManager   = new TalkFileManager(_scriptable.Container);

            _mainPages = new IPage[] { _pageNavigator /*, _talkManager*/ };

            _mainPageNames = _mainPages.Select(x => x.NavigationName).ToArray();

            //Undo.undoRedoPerformed += () =>
            //{
            //    Debug.Log("undo performed");
            //};
        }
    }