/// <inheritdoc /> protected override void Load(ContainerBuilder builder) { //TODO: Automate discovery of adapter types IUIText uiText = Mock.Of <IUIText>(); IUIImage uiImage = Mock.Of <IUIImage>(); IUIButton uiButton = Mock.Of <IUIButton>(); IUIFillableImage fillableImage = Mock.Of <IUIFillableImage>(); foreach (UnityUIRegisterationKey key in Enum.GetValues(typeof(UnityUIRegisterationKey))) { builder.RegisterInstance(uiText) .Keyed <IUIText>(key); builder.RegisterInstance(uiImage) .Keyed <IUIImage>(key); builder.RegisterInstance(uiButton) .Keyed <IUIButton>(key); builder.RegisterInstance(fillableImage) .Keyed <IUIFillableImage>(key); } }
public SetDownloadProgressEventListener(IWorldDownloadBeginEventSubscribable subscriptionService, [KeyFilter(UnityUIRegisterationKey.WorldDownloadProgress)][NotNull] IUIFillableImage downloadFillImage, [KeyFilter(UnityUIRegisterationKey.WorldDownloadProgress)][NotNull] IUIText downloadText) : base(subscriptionService) { DownloadFillImage = downloadFillImage ?? throw new ArgumentNullException(nameof(downloadFillImage)); DownloadText = downloadText ?? throw new ArgumentNullException(nameof(downloadText)); }
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)); }
/// <inheritdoc /> public UILabeledBar([NotNull] IUIText barText, [NotNull] IUIFillableImage barFillable) { BarText = barText ?? throw new ArgumentNullException(nameof(barText)); BarFillable = barFillable ?? throw new ArgumentNullException(nameof(barFillable)); }