public ActivateItemTypeCommandHandler(IMatcherProvider matcherProvider, PlayerSystem playerSystem) { _activationMatcherGroup = matcherProvider.CreateMatcherGroup <Item, Activation, CurrentLocation, Owner>(); _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, ItemStorage>(); _playerMatcherGroup = matcherProvider.CreateMatcherGroup <Player, CurrentLocation>(); _playerSystem = playerSystem; }
public DropInventoryOnDisconnect(IMatcherProvider matcherProvider) { _playerMatcherGroup = matcherProvider.CreateMatcherGroup <Player, ItemStorage, CurrentLocation>(); _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, ItemStorage>(); _connectionMatcherGroup = matcherProvider.CreateMatcherGroup <Connection, GraphNode>(); _itemMatcherGroup = matcherProvider.CreateMatcherGroup <Item, Owner, CurrentLocation>(); }
public SwapSubsystemItemCommandHandler(IMatcherProvider matcherProvider, EventSystem eventSystem) { _playerMatcherGroup = matcherProvider.CreateMatcherGroup <Player, ItemStorage, CurrentLocation>(); _itemMatcherGroup = matcherProvider.CreateMatcherGroup <Item, Owner, CurrentLocation, IItemType>(); _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, ItemStorage>(); _eventSystem = eventSystem; }
public PathFindingSystem(IMatcherProvider matcherProvider, IEntityRegistry entityRegistry) { _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <GraphNode, Subsystem, ExitRoutes>(); _connectionMatcherGroup = matcherProvider.CreateMatcherGroup <GraphNode, Connection, MovementCost>(); // TODO: handle new match route recalculation // TODO: handle graph node events that might affect routing }
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 SubsystemMovement(IMatcherProvider matcherProvider, MovementSpeedSystem movementSpeedSystem) : base(matcherProvider) { _movementSpeedSystem = movementSpeedSystem; // TODO: this is a good example where creating arbitrarily larger n-tuples might not be the best option // the flag components will never be used in the tuple but consume one valuable slot _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, GraphNode, Visitors, ExitRoutes, MovementCost>(); }
public GarbageDisposalSystem(IMatcherProvider matcherProvider, EventSystem eventSystem) { _garbageDisposalMatcherGroup = matcherProvider.CreateMatcherGroup <Engine.Systems.Activation.Components.Activation, GarbageDisposalActivator, CurrentLocation, Owner>(); _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, ItemStorage>(); _itemMatcherGroup = matcherProvider.CreateMatcherGroup <IItemType>(); _eventSystem = eventSystem; }
public SetActorDestinationCommandHandler(IMatcherProvider matcherProvider, PlayerSystem playerSystem, EventSystem eventSystem) { _playerMatcherGroup = matcherProvider.CreateMatcherGroup <Player, Destination>(); _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem>(); _playerSystem = playerSystem; _eventSystem = eventSystem; }
public ItemStorageSystem(IMatcherProvider matcherProvider) { _itemStorageMatcherGroup = matcherProvider.CreateMatcherGroup <ItemStorage>(); _itemStorageMatcherGroup.MatchingEntityAdded += ItemStorage_EntityAdded; _itemMatcherGroup = matcherProvider.CreateMatcherGroup <IItemType>(); _itemMatcherGroup.MatchingEntityRemoved += ItemMatcher_EntityRemoved; }
public ScannerSystem(IMatcherProvider matcherProvider, EventSystem eventSystem) { _scannerMatcherGroup = matcherProvider.CreateMatcherGroup <Engine.Systems.Activation.Components.Activation, Scanner, CurrentLocation, Owner>(); _visitorsMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, Visitors>(); _malwareMatcherGroup = matcherProvider.CreateMatcherGroup <MalwareGenome, MalwareVisibility>(); _playerMatcherGroup = matcherProvider.CreateMatcherGroup <Player, PlayerBitMask>(); _eventSystem = eventSystem; }
public CreateMalwareCommandHandler(IEntityFactoryProvider entityFactoryProvider, IMatcherProvider matcherProvider, MovementSystem movementSystem, RNGSystem rngSystem) { _entityFactoryProvider = entityFactoryProvider; _movementSystem = movementSystem; _nodeMatcherGroup = matcherProvider.CreateMatcherGroup <GraphNode, Visitors, IEntityType>(); _rngSystem = rngSystem; }
public AntivirusSystem(IMatcherProvider matcherProvider, EventSystem eventSystem) { _antivirusMatcherGroup = matcherProvider.CreateMatcherGroup <Activation, Components.Antivirus, CurrentLocation, Owner, ConsumableActivation>(); _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem>(); _visitorsMatcherGroup = matcherProvider.CreateMatcherGroup <Visitors>(); _malwareMatcherGroup = matcherProvider.CreateMatcherGroup <MalwareGenome, MalwarePropogation, CurrentLocation>(); _eventSystem = eventSystem; }
public TransferSystem(IMatcherProvider matcherProvider, EventSystem eventSystem) { _transferActivatorMatcherGroup = matcherProvider.CreateMatcherGroup <Engine.Systems.Activation.Components.Activation, TransferActivator, CurrentLocation, Owner, TimedActivation>(); _transferSystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, TransferEnhancement, ItemStorage>(); _itemMatcherGroup = matcherProvider.CreateMatcherGroup <IItemType, CurrentLocation, Owner>(); _itemActivationMatcherGroup = matcherProvider.CreateMatcherGroup <IItemType, Engine.Systems.Activation.Components.Activation>(); _eventSystem = eventSystem; }
public CoopMultiColourAntivirusSystem(IMatcherProvider matcherProvider, EventSystem eventSystem) { _antivirusMatcherGroup = matcherProvider.CreateMatcherGroup <Engine.Systems.Activation.Components.Activation, Components.Antivirus, CurrentLocation, Owner>(); _subsystemMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem>(); _locationMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, ItemStorage, Visitors>(); _malwareMatcherGroup = matcherProvider.CreateMatcherGroup <MalwareGenome, MalwarePropogation, CurrentLocation>(); _eventSystem = eventSystem; }
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 PlayerScoringSystem([InjectOptional] List <IPlayerScoringExtension> scoringExtensions, IMatcherProvider matcherProvider, PlayerSystem playerSystem, EventSystem eventSystem) { _scoringExtensions = scoringExtensions; _playerMatcherGroup = matcherProvider.CreateMatcherGroup <Components.EntityTypes.Player, Score>(); _playerSystem = playerSystem; _eventSystem = eventSystem; _endGameSubscription = eventSystem.Subscribe <EndGameEvent>(OnEndGameEvent); }
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 TransferTimedPickupScoring(IMatcherProvider matcherProvider, EventSystem eventSystem) { _transferActivationSubscription = eventSystem.Subscribe <TransferActivationEvent>(OnTransferActivationEvent); _pickupItemSubscription = eventSystem.Subscribe <PickupItemEvent>(OnPickupItemEvent); _activateItemSubscription = eventSystem.Subscribe <ActivateItemEvent>(OnActivateItemEvent); _pickupItemAndActivateHeldSubscription = eventSystem.Subscribe <SwapInventoryItemAndActivateEvent>(OnPickUpAndActivateHeldEvent); _pickupItemAndSwapWithHeldSubscription = eventSystem.Subscribe <SwapInventoryItemCommandEvent>(OnPickUpAndSwapHeldEvent); _moveItemSubscription = eventSystem.Subscribe <MoveItemCommandEvent>(OnMoveItemEvent); _swapItemSubscription = eventSystem.Subscribe <SwapSubsystemItemCommandEvent>(OnSwapItemEvent); _transferTiming = new Dictionary <int, TransferActivationEvent>(); _playerScoreMatcherGroup = matcherProvider.CreateMatcherGroup <ITAlert.Simulation.Components.EntityTypes.Player, Score>(); }
//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 TeamScoringSystem([InjectOptional] List <ITeamScoringExtension> scoringExtensions, IMatcherProvider matcherProvider, EventSystem eventSystem) { _scoringExtensions = scoringExtensions; _playerMatcherGroup = matcherProvider.CreateMatcherGroup <Components.EntityTypes.Player, Score>(); SystemHealth = new List <decimal>(); foreach (var extension in scoringExtensions) { extension.Score += ExtensionOnScore; } _eventSystem = eventSystem; _endGameSubscription = eventSystem.Subscribe <EndGameEvent>(OnEndGameEvent); }
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 AntivirusActivationScoringEventHandler(EventSystem eventSystem, IMatcherProvider matcherProvider) : base(eventSystem, matcherProvider) { _antivirusWorkstationMatcherGroup = matcherProvider.CreateMatcherGroup <Subsystem, AntivirusEnhancement>(); }
public ItemStorageConsumesMemoryEffect(IMatcherProvider matcherProvider) { _subsystemMatcher = matcherProvider.CreateMatcherGroup <Subsystem, ItemStorage, MemoryResource>(); _itemMatcher = matcherProvider.CreateMatcherGroup <IItemType, ConsumeMemory>(); }
public DisposePlayerOnDisconnect(IMatcherProvider matcherProvider) { _playerMatcherGroup = matcherProvider.CreateMatcherGroup<Player, ItemStorage, CurrentLocation>(); _visitorsMatcherGroup = matcherProvider.CreateMatcherGroup<Visitors>(); }
public ResetCPUEachTick(IMatcherProvider matcherProvider, IEntityRegistry entityRegistry) { _subsystemMatcher = matcherProvider.CreateMatcherGroup <Subsystem, CPUResource>(); }
public PlayerInventorySystem(IMatcherProvider matcherProvider) { _playerMatcher = matcherProvider.CreateMatcherGroup <Player, CurrentLocation, ItemStorage>(); _subsystemMatcher = matcherProvider.CreateMatcherGroup <Subsystem, ItemStorage>(); }
public CPUConsumptionIncreasesTimedActivationDurationSystem(IMatcherProvider matcherProvider) { _timedActivationMatcherGroup = matcherProvider.CreateMatcherGroup <Engine.Systems.Activation.Components.Activation, TimedActivation, CurrentLocation>(); _subsystemMatcher = matcherProvider.CreateMatcherGroup <Subsystem, CPUResource, MovementCost>(); }
public SetHighlightCommandHandler(IMatcherProvider matcherProvider) { _highlightMatcherGroup = matcherProvider.CreateMatcherGroup <TutorialHighlight>(); }
protected MovementSystemExtensionBase(IMatcherProvider matcherProvider) { VisitorMatcherGroup = matcherProvider.CreateMatcherGroup<VisitorPosition, CurrentLocation, MovementSpeed, Destination>(); _visitorsMatcherGroup = matcherProvider.CreateMatcherGroup<Visitors>(); }