public static void Validate(BaseManualControllingGameComponentSettings settings) { if (settings == null) { throw new ValidationException("Base manual controlling game component settings can not be null."); } if (settings.HostListener == null) { throw new ValidationException("HostListener can not be null."); } }
protected BaseManualControllingGameComponent(BaseManualControllingGameComponentSettings settings, IWorldCoreGameComponentContext worldContext) : base(settings, worldContext) { BaseManualControllingGameComponentSettingsValidator.Validate(settings); var platformTypesConvertorsRegistry = worldContext.PlatformTypesConvertors; _endpointsRegistries = new List <IEndpointsRegistry>(); _hostEndpointsRegistry = new EndpointsRegistry(Logger); _endpointsRegistries.Add(_hostEndpointsRegistry); var platformEndpointsList = EndpointDescriber.GetEndpointsInfoList(settings.HostListener); _hostEndpointsRegistry.AddEndpointsRange(platformEndpointsList); _endPointsResolver = new EndPointsResolver(Logger, platformTypesConvertorsRegistry); _endPointActivator = new EndPointActivator(Logger, platformTypesConvertorsRegistry, worldContext.InvokerInMainThread); _internalManualControlledObjectsList = new List <IInternalManualControlledObject>(); _internalManualControlledObjectsDict = new Dictionary <IGameObject, InternalManualControlledObject>(); _endpointsRegistryForManualControlledObjectsDict = new Dictionary <IGameObject, EndpointsProxyRegistryForDevices>(); }
public TstBaseManualControllingGameComponent(BaseManualControllingGameComponentSettings settings, IWorldCoreGameComponentContext worldContext) : base(settings, worldContext) { }