public TargetUnitFrameUIControllerEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, IEntityDataChangeCallbackRegisterable entityDataCallbackRegister, IReadonlyLocalPlayerDetails playerDetails, [NotNull][KeyFilter(UnityUIRegisterationKey.TargetUnitFrame)] IUIUnitFrame targetUnitFrame, [NotNull] ILog logger, INetworkEntityVisibilityLostEventSubscribable networkVisibilityLostSubscriptionService, [NotNull] IPeerPayloadSendService <GameClientPacketPayload> sendService) : base(subscriptionService, entityDataCallbackRegister, playerDetails) { TargetUnitFrame = targetUnitFrame ?? throw new ArgumentNullException(nameof(targetUnitFrame)); Logger = logger ?? throw new ArgumentNullException(nameof(logger)); SendService = sendService ?? throw new ArgumentNullException(nameof(sendService)); //Subscribe to when the target actually disappears. networkVisibilityLostSubscriptionService.OnNetworkEntityVisibilityLost += (sender, args) => { UnityAsyncHelper.UnityMainThreadContext.Post(o => { //This should be safe, we're checking if it was the current target still //user may have clicked on something else but this should be safe this way. if (args.EntityGuid == this.CurrentTarget) { OnPlayerTargetDisappeared(); } }, null); }; }
public InitializeClientLoadingPositionEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, [NotNull] GladMMOUnityClient client, [NotNull] IReadonlyEntityGuidMappable <IMovementData> movementDataMappable) : base(subscriptionService) { Client = client ?? throw new ArgumentNullException(nameof(client)); MovementDataMappable = movementDataMappable ?? throw new ArgumentNullException(nameof(movementDataMappable)); }
public InitializeDefaultLocalSpawnRequirementsEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, [NotNull] GladMMOUnityClient client, [NotNull] ILocalCharacterDataRepository characterDataRepository) : base(subscriptionService) { Client = client ?? throw new ArgumentNullException(nameof(client)); CharacterDataRepository = characterDataRepository ?? throw new ArgumentNullException(nameof(characterDataRepository)); }
/// <inheritdoc /> protected DataChangedLocalPlayerSpawnedEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, [NotNull] IEntityDataChangeCallbackRegisterable entityDataCallbackRegister, [NotNull] IReadonlyLocalPlayerDetails playerDetails) : base(subscriptionService) { EntityDataCallbackRegister = entityDataCallbackRegister ?? throw new ArgumentNullException(nameof(entityDataCallbackRegister)); PlayerDetails = playerDetails ?? throw new ArgumentNullException(nameof(playerDetails)); }
/// <inheritdoc /> public MovementInputBroadcastingTickable(ILocalPlayerSpawnedEventSubscribable subscriptionService, [NotNull] ILog logger, [NotNull] IMovementInputController inputController) : base(subscriptionService) { Logger = logger ?? throw new ArgumentNullException(nameof(logger)); InputController = inputController ?? throw new ArgumentNullException(nameof(inputController)); }
/// <inheritdoc /> public LocalPlayerSpawnedLevelChangeEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, IEntityDataChangeCallbackRegisterable entityDataCallbackRegister, IReadonlyLocalPlayerDetails playerDetails, [KeyFilter(UnityUIRegisterationKey.PlayerUnitFrame)][NotNull] IUIUnitFrame playerUnitFrame) : base(subscriptionService, entityDataCallbackRegister, playerDetails) { PlayerUnitFrame = playerUnitFrame ?? throw new ArgumentNullException(nameof(playerUnitFrame)); }
public InitializeExperienceBarEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, IEntityDataChangeCallbackRegisterable entityDataCallbackRegister, IReadonlyLocalPlayerDetails playerDetails, [NotNull] IEntityExperienceLevelStrategy levelStrategy, [NotNull][KeyFilter(UnityUIRegisterationKey.ExperienceBar)] IUIFillableImage experienceBar) : base(subscriptionService, entityDataCallbackRegister, playerDetails) { LevelStrategy = levelStrategy ?? throw new ArgumentNullException(nameof(levelStrategy)); ExperienceBar = experienceBar ?? throw new ArgumentNullException(nameof(experienceBar)); }
public RequestPlayerActionBarsEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, [NotNull] ICharacterService characterService, [NotNull] IReadonlyLocalPlayerDetails playerDetails, [NotNull] IActionBarCollection actionBarCollection, [NotNull] IActionBarButtonStateChangedEventPublisher actionBarStateChangePublisher) : base(subscriptionService) { CharacterService = characterService ?? throw new ArgumentNullException(nameof(characterService)); PlayerDetails = playerDetails ?? throw new ArgumentNullException(nameof(playerDetails)); ActionBarCollection = actionBarCollection ?? throw new ArgumentNullException(nameof(actionBarCollection)); ActionBarStateChangePublisher = actionBarStateChangePublisher ?? throw new ArgumentNullException(nameof(actionBarStateChangePublisher)); }
public PositionalVoiceAudioGameTickable(IVoiceSessionAuthenticatedEventSubscribable subscriptionService, [NotNull] ILocalPlayerSpawnedEventSubscribable playerSpawnedSubscriptionService, [NotNull] PositionalVoiceEntityTickable positionalChannelUpdateTickable, [NotNull] INetworkClientDisconnectedEventSubscribable disconnectionEventSubscriptionService) : base(subscriptionService) { if (playerSpawnedSubscriptionService == null) { throw new ArgumentNullException(nameof(playerSpawnedSubscriptionService)); } PositionalChannelUpdateTickable = positionalChannelUpdateTickable ?? throw new ArgumentNullException(nameof(positionalChannelUpdateTickable)); playerSpawnedSubscriptionService.OnLocalPlayerSpawned += OnLocalPlayerSpawnedEvent; disconnectionEventSubscriptionService.OnNetworkClientDisconnected += (o, e) => this.State = PositionalAudioState.Default; }
public CameraInputBroadcastingTickable(ILocalPlayerSpawnedEventSubscribable subscriptionService, [NotNull] ILog logger, [NotNull] IFactoryCreatable <CameraInputData, EmptyFactoryContext> cameraInputDataFactory, [NotNull] ICameraInputController cameraInputController) : base(subscriptionService) { if (cameraInputDataFactory == null) { throw new ArgumentNullException(nameof(cameraInputDataFactory)); } Logger = logger ?? throw new ArgumentNullException(nameof(logger)); CameraInputController = cameraInputController ?? throw new ArgumentNullException(nameof(cameraInputController)); Data = new Lazy <CameraInputData>(() => cameraInputDataFactory.Create(EmptyFactoryContext.Instance)); }
public InitializeRealtimeSocialServiceEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, [NotNull] ILog logger, [NotNull] IServiceDiscoveryService serviceDiscoveryService, [NotNull] ILocalPlayerDetails playerDetails, [NotNull] IReadonlyAuthTokenRepository authTokenProvider, [NotNull] IRemoteSocialHubClient remoteSocialClient, [NotNull] IEnumerable <IConnectionHubInitializable> connectionHubInitializable) : base(subscriptionService) { Logger = logger ?? throw new ArgumentNullException(nameof(logger)); ServiceDiscoveryService = serviceDiscoveryService ?? throw new ArgumentNullException(nameof(serviceDiscoveryService)); PlayerDetails = playerDetails ?? throw new ArgumentNullException(nameof(playerDetails)); AuthTokenProvider = authTokenProvider ?? throw new ArgumentNullException(nameof(authTokenProvider)); RemoteSocialClient = remoteSocialClient ?? throw new ArgumentNullException(nameof(remoteSocialClient)); ConnectionHubInitializable = connectionHubInitializable ?? throw new ArgumentNullException(nameof(connectionHubInitializable)); }
public LocalPlayerSpawnedInitializeCameraMappableEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, [NotNull] IEntityGuidMappable <Camera> cameraMappable) : base(subscriptionService) { CameraMappable = cameraMappable ?? throw new ArgumentNullException(nameof(cameraMappable)); }
/// <inheritdoc /> public LocalPlayerSpellCastingEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, IEntityDataChangeCallbackRegisterable entityDataCallbackRegister, IReadonlyLocalPlayerDetails playerDetails) : base(subscriptionService, entityDataCallbackRegister, playerDetails) { }
public InitializeLocalPlayerEventListener(ILocalPlayerSpawnedEventSubscribable subscriptionService, [NotNull] GladMMOUnityClient client) : base(subscriptionService) { Client = client ?? throw new ArgumentNullException(nameof(client)); }