示例#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));
 }
 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));
        }
        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>();
        }
 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>();
 }