Пример #1
0
 public World(Contexts contexts, IServiceContainer services, IEnumerable <byte> actorIds,
              Feature logicFeature)
 {
     Contexts            = contexts;
     _timeMachineService = services.GetService <ITimeMachineService>();
     _systems            = new WorldSystems(Contexts, services, logicFeature);
 }
Пример #2
0
        public World(Contexts contexts, IServiceContainer services, IEnumerable <byte> actorIds,
                     Feature logicFeature)
        {
            _actorContext     = contexts.actor;
            _gameContext      = contexts.game;
            _gameStateContext = contexts.gameState;
            _snapshotContext  = contexts.snapshot;

            _timeMachineService = services.GetService <ITimeMachineService>();
            _systems            = new WorldSystems(contexts, services, logicFeature);
        }
Пример #3
0
        public World(Contexts contexts, IEnumerable <byte> actorIds, params Feature[] features)
        {
            Contexts = contexts;

            foreach (var id in actorIds)
            {
                Contexts.actor.CreateEntity().AddId(id);
            }

            _systems = new WorldSystems(Contexts, features);
            _systems.Initialize();
        }
        public EntitasWorld(IServiceContainer services, object contextsObj, object logicFeatureObj)
        {
            var contexts     = contextsObj as Contexts;
            var logicFeature = logicFeatureObj as Feature;

            _context          = contexts;
            _actorContext     = contexts.actor;
            _gameContext      = contexts.game;
            _gameStateContext = contexts.gameState;
            _snapshotContext  = contexts.snapshot;

            _timeMachineService = services.GetService <ITimeMachineService>();
            _systems            = new WorldSystems(contexts, services, logicFeature);
        }
Пример #5
0
 public World(Contexts contexts, ITimeMachineService timeMachineService, IEnumerable <byte> actorIds, Feature logicFeature)
 {
     Contexts            = contexts;
     _timeMachineService = timeMachineService;
     _systems            = new WorldSystems(Contexts, logicFeature);
 }