Beispiel #1
0
        private void Start()
        {
            _container = new Container();

            _configStorage     = new ConfigStorage();
            _unityEventManager = new UnityEventManager();

            _container.Register <IUnityEventManager>(_unityEventManager);
            _container.Register <IPrefabLoader>(new PrefabLoader());
            _container.Register <IConfigStorage>(_configStorage);
            _container.Register <IPrefabsPoolingService>(new PrefabsPoolingService());

            _container.Inject();
            _container.PrepareAll();
            _container.StartAll();

            LoadScene(_configStorage.Get <GameConfig>(0).MainScene, null);
        }
Beispiel #2
0
        public void LoadScene <T>(string sceneLinkage) where T : class, ISceneInitable
        {
            var gameConfig = _configStorage.Get <GameConfig>(0);

            _unityEventManager.StartCoroutine(SceneLoaderCoroutine(gameConfig.PreloaderScene, sceneLinkage));
        }
Beispiel #3
0
        public void LoadScene(string sceneLinkage, Action callback)
        {
            var gameConfig = _configStorage.Get <GameConfig>(0);

            _unityEventManager.StartCoroutine(SceneLoaderCoroutine(gameConfig.PreloaderScene, sceneLinkage, callback));
        }