public void Start() { var lss = new LocalSharedState(); lss.Count = _options.ComponentsCount; var worldCfg = new EcsWorldConfig() { FilterEntitiesCacheSize = lss.Count, WorldEntitiesCacheSize = lss.Count, }; _world = new EcsWorld(worldCfg); _systems = new EcsSystems(_world); _systems .Add(new InitSystem()) .Add(new MoveSystem()) .Inject(lss) ; _systems.ProcessInjects(); _systems.Init(); }
public void Start() { var lss = new LocalSharedState(); lss.Count = _options.ComponentsCount; var worldCfg = new EcsWorldConfig() { ComponentsCount = lss.Count, EntitiesCount = lss.Count, }; _worlds = new EcsWorlds(lss); _worlds .Create(cfg: worldCfg) .Register <Movable>(); _worlds.Init(); _systems = new EcsSystems(); _systems .Add(new MoveSystem()) .Init(_worlds) ; }