public TransferEnhancementSystem(IMatcherProvider matcherProvider, IEntityFactoryProvider entityFactoryProvider) { _entityFactoryProvider = entityFactoryProvider; // TODO: the matcher should be smart enough to infer all required types from the ComponentDependency attributes on the types specified _transferMatcherGroup = matcherProvider.CreateMatcherGroup <TransferEnhancement, ItemStorage>(); _transferMatcherGroup.MatchingEntityAdded += OnNewEntity; }
public GarbageDisposalEnhancementSystem(IMatcherProvider matcherProvider, IEntityFactoryProvider entityFactoryProvider) { // TODO: the matcher should be smart enough to infer all required types from the ComponentDependency attributes on the types specified var garbageDisposalMatcherGroup = matcherProvider.CreateMatcherGroup <GarbageDisposalEnhancement, ItemStorage>(); garbageDisposalMatcherGroup.MatchingEntityAdded += OnNewEntity; _entityFactoryProvider = entityFactoryProvider; }
public CreateMalwareCommandHandler(IEntityFactoryProvider entityFactoryProvider, IMatcherProvider matcherProvider, MovementSystem movementSystem, RNGSystem rngSystem) { _entityFactoryProvider = entityFactoryProvider; _movementSystem = movementSystem; _nodeMatcherGroup = matcherProvider.CreateMatcherGroup <GraphNode, Visitors, IEntityType>(); _rngSystem = rngSystem; }
public AnalyserSystem(IMatcherProvider matcherProvider, IEntityFactoryProvider entityFactoryProvider, EventSystem eventSystem) { _analyserMatcherGroup = matcherProvider.CreateMatcherGroup <Engine.Systems.Activation.Components.Activation, Analyser, CurrentLocation, Owner>(); _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, ItemStorage>(); _captureMatcherGroup = matcherProvider.CreateMatcherGroup <Capture>(); _entityFactoryProvider = entityFactoryProvider; _eventSystem = eventSystem; }
public AntivirusEnhancementSystem(IMatcherProvider matcherProvider, IEntityFactoryProvider entityFactoryProvider) { _entityFactoryProvider = entityFactoryProvider; // TODO: the matcher should be smart enough to infer all required types from the ComponentDependency attributes on the types specified var antivirusMatcherGroup = matcherProvider.CreateMatcherGroup <AntivirusEnhancement, ItemStorage>(); antivirusMatcherGroup.MatchingEntityAdded += OnNewEntity; _captureMatcherGroup = matcherProvider.CreateMatcherGroup <Capture>(); _outputMatcherGroup = matcherProvider.CreateMatcherGroup <Components.Antivirus>(); }
public PlayerSystem(SimulationConfiguration configuration, IEntityFactoryProvider entityFactoryProvider, GraphSystem graphSystem, MovementSystem movementSystem, [InjectOptional] List <IPlayerSystemBehaviour> playerSystemBehaviours) { _configuration = configuration; _entityFactoryProvider = entityFactoryProvider; _graphSystem = graphSystem; _movementSystem = movementSystem; _playterSystemBehaviours = playerSystemBehaviours; _playerEntityMapping = new Dictionary <int, int>(); }
//TODO: replace with some sort of global components - or make the simulation or rather 'graph' or something an entity with the layout components on it public Simulation(SimulationConfiguration configuration, IEntityRegistry entityRegistry, IMatcherProvider matcherProvider, ISystemRegistry systemRegistry, // TODO: remove zenject dependency when implicit optional collection paramters is implemented IEntityFactoryProvider entityFactoryProvider, CommandQueue commandQueue) : base(configuration, entityRegistry, matcherProvider, systemRegistry, entityFactoryProvider, commandQueue) { }
public MalwarePropogationSystem(IMatcherProvider matcherProvider, IEntityFactoryProvider entityFactoryProvider, RNGSystem rngSystem, MovementSystem movementSystem, EventSystem eventSystem) { _entityFactoryProvider = entityFactoryProvider; _rngSystem = rngSystem; _movementSystem = movementSystem; _eventSystem = eventSystem; // TODO: refactor to use tuple matcher _malwareMatcher = matcherProvider.CreateMatcherGroup <MalwareGenome, CurrentLocation, MalwarePropogation, MalwareVisibility>(); _subsystemMatcher = matcherProvider.CreateMatcherGroup <Subsystem, GraphNode>(); }
public static bool TryCreateItem(this IEntityFactoryProvider entityFactoryProvider, string archetype, int?currentLocationId, int?ownerId, out ComponentEntityTuple <CurrentLocation, Owner> entityTuple) { if (entityFactoryProvider.TryCreateEntityFromArchetype(archetype, out var item) && item.TryGetComponent <CurrentLocation>(out var currentLocation) && item.TryGetComponent <Owner>(out var owner)) { currentLocation.Value = currentLocationId; owner.Value = ownerId; entityTuple = new ComponentEntityTuple <CurrentLocation, Owner>(item, currentLocation, owner); return(true); } item?.Dispose(); entityTuple = null; return(false); }
public DisplayTextCommandHandler(IEntityFactoryProvider entityFactoryProvider) { _entityFactoryProvider = entityFactoryProvider; }
public GraphSystem(SimulationConfiguration configuration, IEntityFactoryProvider entityFactoryProvider) { _configuration = configuration; _entityFactoryProvider = entityFactoryProvider; }
public CreateItemCommandHandler(IEntityFactoryProvider entityFactoryProvider, IMatcherProvider matcherProvider) { _entityFactoryProvider = entityFactoryProvider; _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, ItemStorage>(); }