Пример #1
0
 private void OnDisable()
 {
     if (_systems != null)
     {
         _systems.Destroy();
         _systems = null;
         _world.Destroy();
         _world = null;
     }
 }
Пример #2
0
 void OnDisable()
 {
     _systems.Destroy();
     _systems = null;
     _world.Destroy();
     _world = null;
 }
Пример #3
0
 void OnDestroy()
 {
     // destroy systems logical group.
     _systems.Destroy();
     // destroy world.
     _world.Destroy();
 }
Пример #4
0
 public void Destroy()
 {
     _systems?.Destroy(_worlds);
     _systems = null;
     _worlds?.Destroy();
     _worlds = null;
 }
Пример #5
0
 public void Dispose()
 {
     Systems.Destroy();
     Systems = null;
     World.Destroy();
     World = null;
 }
Пример #6
0
    private void OnDisable()
    {
        systems.Destroy();
        systems = null;

        ecsWorld.Destroy();
        ecsWorld = null;
    }
Пример #7
0
        private void OnDisable()
        {
            _systems.Destroy();
            _systems = null;

            _ecsWorld.Destroy();
            _ecsWorld = null;
        }
Пример #8
0
 void OnDestroy()
 {
     systems.Destroy();
     systems = null;
     fixedSystems.Destroy();
     fixedSystems = null;
     world.Destroy();
     world = null;
 }
Пример #9
0
 private void OnDestroy()
 {
     if (_mainSystems != null)
     {
         _mainSystems.Destroy();
         _mainSystems = null;
         _world.Destroy();
         _world = null;
     }
 }
 void OnDestroy()
 {
     if (_systems != null)
     {
         _systems.Destroy();
         _systems = null;
         _world.Destroy();
         _world = null;
     }
 }
Пример #11
0
    void OnDestroy()
    {
        if (systemsUpdate != null)
        {
            systemsUpdate.Destroy();
            systemsUpdate = null;
        }

        World.Destroy();
        World = null;
    }
Пример #12
0
 public void OnDestroy()
 {
     if (_systems == null)
     {
         return;
     }
     _systems.Destroy();
     _systems = null;
     _world.Destroy();
     _world = null;
 }
Пример #13
0
        void OnDestroy()
        {
            updateSystems.Destroy();
            updateSystems = null;

            fixedSystems.Destroy();
            fixedSystems = null;

            world.Destroy();
            world = null;
        }
Пример #14
0
 void OnDestroy()
 {
     if (_systems != null)
     {
         _systems.Destroy();
         _systems = null;
         _world.Destroy();
         _world = null;
     }
     GameState.OnGameStateChange -= SceneData.UI.OnGameStateChange;
 }
Пример #15
0
        private void OnDestroy()
        {
            if (_systems == null)
            {
                return;
            }

            _systems.Destroy();
            _systems = null;

            World.Destroy();
        }
Пример #16
0
        public virtual void Dispose()
        {
            RootSystems.Destroy();
            RootSystems = null;
            _debugger   = null;

            if (_world != null && _world.IsAlive())
            {
                _world.Destroy();
                _world = null;
            }
        }
Пример #17
0
        private void OnDestroy()
        {
            if (_systems != null)
            {
                _systems.Destroy();
            }

            if (_world != null)
            {
                _world.Destroy();
            }
        }
Пример #18
0
        private void OnDestroy()
        {
            if (_systems != null)
            {
                _systems.Destroy();
                _systems = null;
                _world.Destroy();
                _world = null;
            }

            _gameState.OnScoreChange -= _ui.SetScore;
            _gameState.OnCountChange -= _ui.SetCount;
        }
Пример #19
0
        void OnDestroy()
        {
            if (systems == null)
            {
                return;
            }

            systems.Destroy();
            systems = null;

            world.Destroy();
            world = null;
        }
        private static void InitializeAllSystems(EcsWorld world)
        {
            //register all system into world for filter creation
            var ecsSystems = new EcsSystems(world);

            foreach (var system in mainSystems.Systems)
            {
                ecsSystems.Add(system.System);
            }

            ecsSystems.Init();
            //destroy initialized systems
            ecsSystems.Destroy();
        }
Пример #21
0
        private void OnDisable()
        {
            updateSystems.Destroy();
            updateSystems = null;
            fixedUpdateSystems.Destroy();
            fixedUpdateSystems = null;

                        #if UNITY_EDITOR
            gizmosSystems.Destroy();
            gizmosSystems = null;
                        #endif

            world.Destroy();
            world = null;
        }
Пример #22
0
        void OnDestroy()
        {
            if (_fixedUpdateSystems != null)
            {
                _fixedUpdateSystems.Destroy();
                _fixedUpdateSystems = null;
            }

            if (_updateSystems != null)
            {
                _updateSystems.Destroy();
                _updateSystems = null;
            }

            _world?.Destroy();
            _world = null;
        }
Пример #23
0
 private void OnDestroy()
 {
     if (_update != null)
     {
         _update.Destroy();
         _update = null;
     }
     if (_fixedUpdate != null)
     {
         _fixedUpdate.Destroy();
         _fixedUpdate = null;
     }
     if (_world != null)
     {
         _world.Destroy();
         _world = null;
     }
 }
Пример #24
0
    private void StartEcs()
    {
        var system1 = new MotionTargetInitSystem()
        {
            prefab = _prefab,
            amount = _amount,
            radius = _radius
        };
        var system2 = new MotionDirectionSystem();
        var system3 = new MotionTargetSystem();

        _world      = new EcsWorld();
        _ecsSystems = new EcsSystems(_world)
                      .Add(system1)
                      .Add(system2)
                      .Add(system3);

        _ecsSystems.Init();
        _ecsSystems.Destroy();

        _systems.Add(new EcsSystems(_world).Add(system2));
        _systems.Add(new EcsSystems(_world).Add(system3));
        _systems.ForEach(x => x.Init());
    }
Пример #25
0
 public void OnDestroy()
 {
     systems.Destroy();
     world.Destroy();
 }
Пример #26
0
        void OnDestroy()
        {
            system.Destroy();

            world.Destroy();
        }
 public void LateDispose()
 {
     _systems.Destroy();
     _world.Destroy();
 }
 public void Dispose()
 {
     _systems.Destroy();
 }
Пример #29
0
 public virtual void Destroy()
 {
     systems?.Destroy();
     world?.Destroy();
 }
Пример #30
0
 private void OnDestroy()
 {
     systems.Destroy();
     world.Destroy();
 }