コード例 #1
0
        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());
        }
コード例 #2
0
 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));
 }
コード例 #3
0
 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>();
 }
コード例 #4
0
 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>();
 }
コード例 #5
0
        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));
        }
コード例 #6
0
        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
            });
        }
コード例 #7
0
        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>();
        }
コード例 #8
0
 public void Setup(IDependencyContainer container)
 {
     container.Unbind <IUpdateScheduler>();
     container.Bind <IUpdateScheduler, UnityUpdateScheduler>(x => x.AsSingleton());
 }
コード例 #9
0
 public void Shutdown(IDependencyContainer container)
 {
     container.Resolve <IF_IContentPluginLoader>().Shutdown();
     container.Unbind <IF_IContentPluginLoader>();
 }
コード例 #10
0
 public void Shutdown(IDependencyContainer container)
 {
     container.Resolve <IF_IGameObjectTool>().Shutdown();
     container.Unbind <IF_IGameObjectTool>();
 }
コード例 #11
0
 /// <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));
 }
コード例 #12
0
 public static void Unbind <TType>(this IDependencyContainer container) =>
 container.Unbind(typeof(TType));
コード例 #13
0
 public void Setup(IDependencyContainer container)
 {
     container.Unbind <IEventSystem>();
     container.Bind <IEventSystem, DebugEventSystem>();
 }