Exemple #1
0
 public virtual void Initialize(IEventSystem eventSystem, IPoolManager poolManager, GroupFactory groupFactory, PrefabFactory prefabFactory)
 {
     EventSystem   = eventSystem;
     PoolManager   = poolManager;
     GroupFactory  = groupFactory;
     PrefabFactory = prefabFactory;
 }
Exemple #2
0
        public override void Initialize(IEventSystem eventSystem, IPoolManager poolManager, GroupFactory groupFactory, PrefabFactory prefabFactory)
        {
            base.Initialize(eventSystem, poolManager, groupFactory, prefabFactory);

            foreach (var system in RuntimeSystems)
            {
                system.Initialize(eventSystem, poolManager, groupFactory, prefabFactory);

                system.IsOn.DistinctUntilChanged().Where(_ => this.isActiveAndEnabled).Subscribe(b =>
                {
                    if (b)
                    {
                        system.OnEnable();
                    }
                    else
                    {
                        system.OnDisable();
                    }
                }).AddTo(this.Disposer);
            }
        }
Exemple #3
0
        public override void Initialize(IEventSystem eventSystem, IPoolManager poolManager, GroupFactory groupFactory, PrefabFactory prefabFactory)
        {
            base.Initialize(eventSystem, poolManager, groupFactory, prefabFactory);

            SystemEnv.Get("Initialize", out luaInitialize);
            SystemEnv.Get("OnEnable", out luaOnEnable);
            SystemEnv.Get("OnDisable", out luaOnDisable);
            SystemEnv.Get("OnDestroy", out luaOnDestroy);

            luaInitialize?.Invoke(eventSystem, poolManager, groupFactory, prefabFactory);
        }