public virtual void Initialize(IEventSystem eventSystem, IPoolManager poolManager, GroupFactory groupFactory, PrefabFactory prefabFactory) { EventSystem = eventSystem; PoolManager = poolManager; GroupFactory = groupFactory; PrefabFactory = prefabFactory; }
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); } }
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); }