Пример #1
0
 public override void InstallBindings()
 {
     Container.BindInterfacesAndSelfTo <NetworkCarFacade>().FromNewComponentOnRoot().AsSingle();
     Container.Bind <CarDeathHandler>().AsSingle();
     base.InstallBindings();
     PhotonCarInstaller.Install(Container, CarObject);
 }
        protected override void BindChasers()
        {
            Container.Bind <ChaserRegistry>().AsSingle();
            Container.Bind <PlayerController>().FromNewComponentOnRoot().AsSingle().NonLazy();

            Container.BindInterfacesAndSelfTo <AIChaserSpawner>().AsSingle();
            Container.BindFactory <ChaserFacade, ChaserFacade.Factory>()
            .WithId("AIChaser")
            .FromPoolableMemoryPool <ChaserFacade, ChaserFacadePool>(poolBinder => poolBinder
                                                                     .WithInitialSize(4)
                                                                     .FromSubContainerResolve()
                                                                     .ByNewGameObjectInstaller <MineNetworkAIChaserInstaller>()
                                                                     .WithGameObjectName("AIChaser")
                                                                     .UnderTransformGroup("Chasers"));

            Container.BindInterfacesAndSelfTo <PlayerChaserSpawner>().AsSingle();
            Container.BindFactory <ChaserFacade, ChaserFacade.Factory>()
            .WithId("PlayerChaser")
            .FromPoolableMemoryPool <ChaserFacade, ChaserFacadePool>(poolBinder => poolBinder
                                                                     .WithInitialSize(0)
                                                                     .FromSubContainerResolve()
                                                                     .ByNewGameObjectInstaller <MasterNetworkPlayerChaserInstaller>()
                                                                     .WithGameObjectName("PlayerChaser")
                                                                     .UnderTransformGroup("Chasers"));

            PhotonCarInstaller.Install(Container, CarObject);
            Container.BindInterfacesAndSelfTo <CarInstantiator>().AsSingle().WithArguments(PlayerType.Runner, false, -1);
        }
Пример #3
0
        public override void InstallBindings()
        {
            Container.Bind <CarDeathHandler>().To <PlayerChaserDeathHandler>().AsSingle();

            base.InstallBindings();

            PhotonInputInstaller.Install(Container);
            Container.BindInterfacesAndSelfTo <InputInstantiateHandler>().AsSingle();
            Container.BindInterfacesAndSelfTo <InputFactory>().AsSingle();

            PhotonCarInstaller.Install(Container, CarObject);
            Container.BindInterfacesAndSelfTo <CarInstantiator>().AsSingle().WithArguments(PlayerType.Chaser, false, PlayerController.OwnerId);
        }
 public override void InstallBindings()
 {
     base.InstallBindings();
     PhotonCarInstaller.Install(Container, CarObject);
     Container.BindInterfacesAndSelfTo <CarInstantiator>().AsSingle().WithArguments(PlayerType.Chaser, true, -1);
 }