public void Setup(IDependencyContainer container) { // Override our default save pipeline (binary ones) with the json one container.Unbind <ISaveEntityDatabasePipeline>(); container.Bind <ISaveEntityDatabasePipeline>(builder => builder.ToMethod(CreateJsonSavePipeline).AsSingleton()); // Override our default load pipeline (binary ones) with the json one container.Unbind <ILoadEntityDatabasePipeline>(); container.Bind <ILoadEntityDatabasePipeline>(builder => builder.ToMethod(CreateJsonLoadPipeline).AsSingleton()); }
public void Setup(IDependencyContainer container) { container.Unbind <IUpdateScheduler>(); container.Bind <IUpdateScheduler>(x => x.ToInstance(_gameContext)); container.Bind <IGameScheduler>(x => x.ToInstance(_gameContext)); container.Bind <IBytech>(x => x.ToInstance(_gameContext.Bytech)); }
public void Setup(IDependencyContainer container) { if (container.HasBinding <IF_VR_IInterface>()) { container.Unbind <IF_VR_IInterface>(); } container.Bind <IF_VR_IInterface, IF_VR_Steam_Interface>(); }
public void Setup(IDependencyContainer container) { if (container.HasBinding <IF_VR_IGrabStatus>()) { container.Unbind <IF_VR_IGrabStatus>(); } container.Bind <IF_VR_IGrabStatus, IF_VR_Glove_SteamVRManus_GrabStatus>(); }
public void Setup(IDependencyContainer container) { var graphics = new GraphicsManager(_gameContext.Bytech, _gameContext); container.Unbind <IUpdateScheduler>(); container.Bind <IUpdateScheduler>(x => x.ToInstance(_gameContext)); container.Bind <IGameScheduler>(x => x.ToInstance(_gameContext)); container.Bind <IBytech>(x => x.ToInstance(_gameContext.Bytech)); container.Bind <IGraphics>(x => x.ToInstance(graphics)); }
public void Setup(IDependencyContainer container) { container.Unbind <IComponentTypeLookup>(); var explicitTypeLookups = new Dictionary <Type, int> { { typeof(NameComponent), ComponentLookupTypes.NameComponentId }, { typeof(PositionComponent), ComponentLookupTypes.PositionComponentId }, { typeof(MovementSpeedComponent), ComponentLookupTypes.MovementSpeedComponentId } }; var explicitComponentLookup = new ComponentTypeLookup(explicitTypeLookups); container.Bind <IComponentTypeLookup>(new BindingConfiguration { ToInstance = explicitComponentLookup }); }
public void Setup(IDependencyContainer container) { container.Bind <IEcsRxGame>(x => x.ToInstance(_ecsRxGame)); container.Unbind <IUpdateScheduler>(); container.Bind <IUpdateScheduler>(x => x.ToInstance(_ecsRxGame)); container.Bind <IGameScheduler>(x => x.ToInstance(_ecsRxGame)); container.Bind <IEcsRxContentManager>(x => x.ToInstance(_ecsRxGame.EcsRxContentManager)); container.Bind <IEcsRxSpriteBatch>(x => x.ToInstance(_ecsRxGame.EcsRxSpriteBatch)); container.Bind <IEcsRxGraphicsDeviceManager>(x => x.ToInstance(_ecsRxGame.EcsRxGraphicsDeviceManager)); container.Bind <IEcsRxGraphicsDevice>(x => x.ToInstance(_ecsRxGame.EcsRxGraphicsDevice)); container.Bind <IRenderTarget2dRegistry, RenderTarget2dRegistry>(); container.Bind <IRenderTargetCubeRegistry, RenderTargetCubeRegistry>(); container.Bind <IConventionalSystemHandler, SpriteBatchSystemHandler>(); }
public void Setup(IDependencyContainer container) { container.Unbind <IUpdateScheduler>(); container.Bind <IUpdateScheduler, UnityUpdateScheduler>(x => x.AsSingleton()); }
public void Shutdown(IDependencyContainer container) { container.Resolve <IF_IContentPluginLoader>().Shutdown(); container.Unbind <IF_IContentPluginLoader>(); }
public void Shutdown(IDependencyContainer container) { container.Resolve <IF_IGameObjectTool>().Shutdown(); container.Unbind <IF_IGameObjectTool>(); }
/// <summary> /// Unbinds a type from the container /// </summary> /// <typeparam name="T">The type to unbind</typeparam> public static void Unbind <T>(this IDependencyContainer container) { container.Unbind(typeof(T)); }
public static void Unbind <TType>(this IDependencyContainer container) => container.Unbind(typeof(TType));
public void Setup(IDependencyContainer container) { container.Unbind <IEventSystem>(); container.Bind <IEventSystem, DebugEventSystem>(); }