예제 #1
0
 public MovementDirectionDispatchTickable([NotNull] IReadonlyEntityGuidMappable <IMovementDirectionChangedListener> movementDirectionChangeListenerMappable,
                                          [NotNull] IReadonlyEntityGuidMappable <IMovementData> movementDataMappable,
                                          [NotNull] IReadonlyKnownEntitySet knownEntities)
 {
     MovementDirectionChangeListenerMappable = movementDirectionChangeListenerMappable ?? throw new ArgumentNullException(nameof(movementDirectionChangeListenerMappable));
     MovementDataMappable = movementDataMappable ?? throw new ArgumentNullException(nameof(movementDataMappable));
     KnownEntities        = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
 }
예제 #2
0
 public NetworkedTrackerChangedTickable(IPlayerTrackerTransformChangedEventSubscribable subscriptionService, ILog logger, 
     [NotNull] IReadonlyKnownEntitySet knownEntities,
     [NotNull] IReadonlyEntityGuidMappable<EntityGameObjectDirectory> gameObjectDirectoryMappable)
     : base(subscriptionService, true, logger)
 {
     KnownEntities = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
     GameObjectDirectoryMappable = gameObjectDirectoryMappable ?? throw new ArgumentNullException(nameof(gameObjectDirectoryMappable));
 }
예제 #3
0
 /// <inheritdoc />
 public PlayerActorDeathWatchTickable([NotNull] IReadonlyEntityGuidMappable <IActorRef> entityDataContainer,
                                      [NotNull] ILog logger,
                                      [NotNull] IReadonlyKnownEntitySet knownEntities,
                                      [NotNull] IEntityDestructionRequestedEventPublisher entityDestructionPublisher)
 {
     EntityDataContainer = entityDataContainer ?? throw new ArgumentNullException(nameof(entityDataContainer));
     Logger        = logger ?? throw new ArgumentNullException(nameof(logger));
     KnownEntities = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
     EntityDestructionPublisher = entityDestructionPublisher ?? throw new ArgumentNullException(nameof(entityDestructionPublisher));
 }
예제 #4
0
 /// <inheritdoc />
 public PlayerConnectionWatchTickable([NotNull] IReadonlyEntityGuidMappable <IActorRef> entityDataContainer,
                                      [NotNull] ILog logger,
                                      [NotNull] IReadonlyKnownEntitySet knownEntities,
                                      [NotNull] IReadonlyEntityGuidMappable <IConnectionService> connectionServiceMappable)
 {
     EntityDataContainer = entityDataContainer ?? throw new ArgumentNullException(nameof(entityDataContainer));
     Logger                    = logger ?? throw new ArgumentNullException(nameof(logger));
     KnownEntities             = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
     ConnectionServiceMappable = connectionServiceMappable ?? throw new ArgumentNullException(nameof(connectionServiceMappable));
 }
예제 #5
0
 public CleanupInterestCollectionsEventListener(IEntityDeconstructionFinishedEventSubscribable subscriptionService,
                                                IReadonlyEntityGuidMappable <InterestCollection> interestCollections,
                                                IEntityInterestChangeEventSpoofable interestEventSpoofer,
                                                [NotNull] IReadonlyKnownEntitySet knownEntities)
     : base(subscriptionService)
 {
     InterestCollections  = interestCollections;
     InterestEventSpoofer = interestEventSpoofer;
     KnownEntities        = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
 }
예제 #6
0
 /// <inheritdoc />
 public EntityDataChangeTrackerTickable(IReadonlyEntityGuidMappable <IChangeTrackableEntityDataCollection> changeTrackableMap,
                                        IEntityDataChangeCallbackService entityDataCallbackDispatcher,
                                        [NotNull] IReadonlyKnownEntitySet knownEntites,
                                        [NotNull] ILog logger)
 {
     ChangeTrackableMap           = changeTrackableMap ?? throw new ArgumentNullException(nameof(changeTrackableMap));
     EntityDataCallbackDispatcher = entityDataCallbackDispatcher ?? throw new ArgumentNullException(nameof(entityDataCallbackDispatcher));
     KnownEntites = knownEntites ?? throw new ArgumentNullException(nameof(knownEntites));
     Logger       = logger ?? throw new ArgumentNullException(nameof(logger));
 }
예제 #7
0
 public OnAvatarDownloadedInitializeRelevantMappablesEventListener(IContentPrefabCompletedDownloadEventSubscribable subscriptionService,
                                                                   [NotNull] IEntityGuidMappable <IPrefabContentResourceHandle> prefabHandleMappable,
                                                                   [NotNull] IReadonlyKnownEntitySet knownEntities,
                                                                   [NotNull] ILog logger)
     : base(subscriptionService)
 {
     PrefabHandleMappable = prefabHandleMappable ?? throw new ArgumentNullException(nameof(prefabHandleMappable));
     KnownEntities        = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
     Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
예제 #8
0
 /// <inheritdoc />
 public MovementSimulationTickable(
     IReadonlyEntityGuidMappable <IMovementGenerator <GameObject> > movementGenerators,
     IReadonlyEntityGuidMappable <GameObject> worldObjectMap,
     INetworkTimeService timeService,
     [NotNull] IReadonlyKnownEntitySet knownEntities)
 {
     MovementGenerators = movementGenerators ?? throw new ArgumentNullException(nameof(movementGenerators));
     WorldObjectMap     = worldObjectMap ?? throw new ArgumentNullException(nameof(worldObjectMap));
     TimeService        = timeService ?? throw new ArgumentNullException(nameof(timeService));
     KnownEntities      = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
 }
 /// <inheritdoc />
 public MovementUpdateMessageHandler(
     ILog logger,
     [NotNull] IFactoryCreatable <IMovementGenerator <IWorldObject>, EntityAssociatedData <IMovementData> > movementGeneratorFactory,
     [NotNull] IEntityGuidMappable <IMovementGenerator <IWorldObject> > movementGeneratorMappable,
     [NotNull] IEntityGuidMappable <IMovementData> movementDataMappable,
     [NotNull] IKnownEntitySet knownEntities)
     : base(logger)
 {
     MovementGeneratorFactory  = movementGeneratorFactory ?? throw new ArgumentNullException(nameof(movementGeneratorFactory));
     MovementGeneratorMappable = movementGeneratorMappable ?? throw new ArgumentNullException(nameof(movementGeneratorMappable));
     MovementDataMappable      = movementDataMappable ?? throw new ArgumentNullException(nameof(movementDataMappable));
     KnownEntities             = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
 }
예제 #10
0
 /// <inheritdoc />
 public EntityDataUpdateManager(
     IReadonlyEntityGuidMappable <IPeerPayloadSendService <GameServerPacketPayload> > sessionMappable,
     IReadonlyEntityGuidMappable <InterestCollection> guidToInterestCollectionMappable,
     IFactoryCreatable <FieldValueUpdate, EntityFieldUpdateCreationContext> updateFactory,
     IReadonlyEntityGuidMappable <IChangeTrackableEntityDataCollection> changeTrackingCollections,
     [NotNull] IReadonlyKnownEntitySet knownEntities)
 {
     SessionMappable = sessionMappable;
     GuidToInterestCollectionMappable = guidToInterestCollectionMappable;
     UpdateFactory             = updateFactory;
     ChangeTrackingCollections = changeTrackingCollections;
     KnownEntities             = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
 }
예제 #11
0
 /// <inheritdoc />
 public MovementSimulationTickable(
     IReadonlyEntityGuidMappable <IMovementGenerator <IWorldObject> > movementGenerators,
     IReadonlyEntityGuidMappable <IWorldObject> worldObjectMap,
     INetworkTimeService timeService,
     [NotNull] IReadonlyKnownEntitySet knonwnEntities,
     [JetBrains.Annotations.NotNull] RsUnityClient client)
 {
     MovementGenerators = movementGenerators ?? throw new ArgumentNullException(nameof(movementGenerators));
     WorldObjectMap     = worldObjectMap ?? throw new ArgumentNullException(nameof(worldObjectMap));
     TimeService        = timeService ?? throw new ArgumentNullException(nameof(timeService));
     KnonwnEntities     = knonwnEntities ?? throw new ArgumentNullException(nameof(knonwnEntities));
     Client             = client ?? throw new ArgumentNullException(nameof(client));
 }
예제 #12
0
 /// <inheritdoc />
 public InterestChangeEventHandlerTickable(
     [NotNull] IEntityInterestChangeEventSubscribable subscriptionService,
     [NotNull] ILog logger,
     [NotNull] IReadonlyEntityGuidMappable <InterestCollection> managedInterestCollections,
     [NotNull] INetworkMessageSender <EntityVisibilityChangeContext> visibilityMessageSender,
     [NotNull] IReadonlyKnownEntitySet knownEntities,
     [NotNull] IReadonlyEntityGuidMappable <IActorRef> actorReferenceMappable)
     : base(subscriptionService, true, logger)
 {
     ManagedInterestCollections = managedInterestCollections ?? throw new ArgumentNullException(nameof(managedInterestCollections));
     VisibilityMessageSender    = visibilityMessageSender ?? throw new ArgumentNullException(nameof(visibilityMessageSender));
     KnownEntities          = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
     ActorReferenceMappable = actorReferenceMappable ?? throw new ArgumentNullException(nameof(actorReferenceMappable));
 }
예제 #13
0
 public ServerPingPacketTickable([NotNull] IReadonlyEntityGuidMappable <IPeerPayloadSendService <GameServerPacketPayload> > sendServiceMappable,
                                 [NotNull] IReadonlyKnownEntitySet knownEntities)
 {
     SendServiceMappable = sendServiceMappable ?? throw new ArgumentNullException(nameof(sendServiceMappable));
     KnownEntities       = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
 }
예제 #14
0
 //Never used this before, new C# feature. Named tuples. They seem like a bad idea, but I figured I should write one in my life.
 public static IEnumerable <(NetworkEntityGuid EntityGuid, TReturnType ComponentValue)> EnumerateWithGuid <TReturnType>(this IReadonlyEntityGuidMappable <NetworkEntityGuid, TReturnType> collection, IReadonlyKnownEntitySet entitySet, EntityType exclusiveEntityType = EntityType.None)
 {
     if (collection == null)
예제 #15
0
        public static IEnumerable <TReturnType> Enumerate <TReturnType>(this IReadonlyEntityGuidMappable <NetworkEntityGuid, TReturnType> collection, IReadonlyKnownEntitySet entitySet)
        {
            if (collection == null)
            {
                throw new ArgumentNullException(nameof(collection));
            }
            if (entitySet == null)
            {
                throw new ArgumentNullException(nameof(entitySet));
            }

            //Thread safe internally to iterate
            foreach (var element in entitySet)
            {
                if (collection.ContainsKey(element))
                {
                    yield return(collection.RetrieveEntity(element));
                }
            }
        }
예제 #16
0
 public PlayerEntityGuidEnumerable([NotNull] IReadonlyKnownEntitySet entitySet)
 {
     EntitySet = entitySet ?? throw new ArgumentNullException(nameof(entitySet));
 }
예제 #17
0
 public SimpleEnemyTargetSpellEffectTargetValidator([NotNull] IReadonlyKnownEntitySet knownEntitySet)
 {
     KnownEntitySet = knownEntitySet ?? throw new ArgumentNullException(nameof(knownEntitySet));
 }
예제 #18
0
 /// <inheritdoc />
 public DemoTestingGameTickable([NotNull] IReadonlyEntityGuidMappable <IEntityDataFieldContainer> entityDataContainer,
                                [NotNull] IReadonlyKnownEntitySet knownEntities)
 {
     EntityDataContainer = entityDataContainer ?? throw new ArgumentNullException(nameof(entityDataContainer));
     KnownEntities       = knownEntities ?? throw new ArgumentNullException(nameof(knownEntities));
 }