예제 #1
0
 private void OnRunSceneLoaded()
 {
     _storyRoot = null;
     if (_runnerRoot == null)
     {
         Root.Ctx runnerRootCtx = new Root.Ctx
         {
             restartScene       = _sceneLoader.LoadRunScene,
             returnToStoryScene = _sceneLoader.LoadStoryScene,
             playerData         = _playersData,
             analitics          = _analiticsCore,
         };
         _runnerRoot = new Root(runnerRootCtx);
     }
     _runnerRoot.InitializeRunnerRoot();
 }
예제 #2
0
 private void OnSceneLoaded()
 {
     _runnerRoot = null;
     if (_storyRoot == null)
     {
         //Create StoryRoot object
         StoryRoot.Ctx storyCtx = new StoryRoot.Ctx()
         {
             playersData   = _playersData,
             analiticsCore = _analiticsCore,
             reloadGame    = _sceneLoader.ReloadGame,
             loadRunScene  = _sceneLoader.LoadRunScene,
             setCanvas     = _loadingScreen.SetCanvas,
             analitics     = _analiticsCore,
             iapCore       = _iapCore,
         };
         _storyRoot = new StoryRoot(storyCtx);
     }
     _storyRoot.Initialize();
 }