public AdvancedVrInputDispatcher(IMessagePopupService messagePopupService, IReadOnlyList <IVrNavigationMode> navigationModes, IEventRoutingService eventRoutingService, IUserQueryService userQueryService, IVrHeadPositionService headPositionService, IGlobalObjectService globalObjectService) { this.messagePopupService = messagePopupService; this.userQueryService = userQueryService; this.headPositionService = headPositionService; this.globalObjectService = globalObjectService; this.NavigationModes = navigationModes.Where(x => !(x is IMinimapVrNavigationMode)).ToArray(); this.minimapVrNavigationMode = navigationModes.OfType <IMinimapVrNavigationMode>().Single(); minimapVrNavigationMode.ZoomEnabled = true; eventRoutingService.Subscribe <INewFrameEvent>(typeof(IVrInputDispatcher), nameof(OnNewFrame), OnNewFrame); eventRoutingService.Subscribe <IFixedUpdateEvent>(typeof(IVrInputDispatcher), nameof(OnFixedUpdate), OnFixedUpdate); capabilities = VrInputDispatcherCapabilities.All; }
public NoviceVrInputDispatcher(IMessagePopupService messagePopupService, IReadOnlyList <IVrNavigationMode> navigationModes, IEventRoutingService eventRoutingService, IUserQueryService userQueryService, IVrHeadPositionService headPositionService, IGlobalObjectService globalObjectService, IVrManipulationService vrManipulationService) { this.headPositionService = headPositionService; this.globalObjectService = globalObjectService; this.vrManipulationService = vrManipulationService; minimapVrNavigationMode = navigationModes.OfType <IMinimapVrNavigationMode>().Single(); minimapVrNavigationMode.ZoomEnabled = false; freeTeleportMode = navigationModes.OfType <FreeTeleportVrNavigationMode>().Single(); moveInPlaceMode = navigationModes.OfType <MoveInPlaceVrNavigationMode>().Single(); NavigationModes = new IVrNavigationMode[] { freeTeleportMode, moveInPlaceMode }; eventRoutingService.Subscribe <INewFrameEvent>(typeof(IVrInputDispatcher), nameof(OnNewFrame), OnNewFrame); eventRoutingService.Subscribe <IFixedUpdateEvent>(typeof(IVrInputDispatcher), nameof(OnFixedUpdate), OnFixedUpdate); capabilities = VrInputDispatcherCapabilities.All; }