Esempio n. 1
0
            /// <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);
                }
            }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
 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));
 }
Esempio n. 4
0
 /// <inheritdoc />
 public UILabeledBar([NotNull] IUIText barText, [NotNull] IUIFillableImage barFillable)
 {
     BarText     = barText ?? throw new ArgumentNullException(nameof(barText));
     BarFillable = barFillable ?? throw new ArgumentNullException(nameof(barFillable));
 }