コード例 #1
0
 public virtual void Initialize(IEventSystem eventSystem, IPoolManager poolManager, GroupFactory groupFactory, PrefabFactory prefabFactory)
 {
     EventSystem   = eventSystem;
     PoolManager   = poolManager;
     GroupFactory  = groupFactory;
     PrefabFactory = prefabFactory;
 }
コード例 #2
0
ファイル: Feature.cs プロジェクト: 3Dsamples/UnityFramework
        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);
            }
        }
コード例 #3
0
ファイル: LuaSystem.cs プロジェクト: Avatarchik/LuaFramework
        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);
        }