public override void InstallBindings()
 {
     GameSignalsInstaller.Install(Container);
     Container.BindFactory <TruckConfig, Truck, Truck.TruckFactory>()
     .FromComponentInNewPrefab(prefabConfig.TruckPefab)
     .WithGameObjectName("Truck");
     Container.BindFactory <Transform, BullDozerConfig, BullDozer, BullDozer.BullDozerFactory>()
     .FromComponentInNewPrefab(prefabConfig.BulldozerPrefab)
     .WithGameObjectName("Bulldozer");
 }
示例#2
0
    public override void InstallBindings()
    {
        InitAndBindPool <FieldPart, FieldPart.Pool>(_settings.FieldPartPool);
        InitAndBindPool <Crystal, Crystal.Pool>(_settings.CrystalPool);

        Container.Bind <FieldGenerator>().AsSingle();

        Container.Bind <CameraMovement>().FromComponentInHierarchy().AsSingle();
        Container.Bind <KillZoneMovement>().FromComponentInHierarchy().AsSingle();
        GameSignalsInstaller.Install(Container);
    }
示例#3
0
    public override void InstallBindings()
    {
        Container.BindSignal <IncorrectKeyPressedSignal>().To <UIManager>(x => x.OnIncorrectKeyPressed).FromInstance(_uiManager).AsSingle();
        Container.BindInterfacesAndSelfTo <SkirmishController>().AsSingle();
        Container.BindInterfacesAndSelfTo <GameController>().AsSingle();
        Container.BindInterfacesAndSelfTo <AIController>().AsSingle().WithArguments(_playerTwo);
        Container.BindInterfacesAndSelfTo <InputController>().AsSingle().WithArguments(_playerOne);

        GameSignalsInstaller.Install(Container);

        Container.BindSignal <PlayerOneWinSignal>().To <PlayerFacade>(x => x.OnVictory).FromInstance(_playerOne).AsCached();
        Container.BindSignal <PlayerTwoWinSignal>().To <PlayerFacade>(x => x.OnDefeat).FromInstance(_playerOne).AsCached();
        Container.BindSignal <PlayerOneRecoverSignal>().To <PlayerFacade>(x => x.OnRecover).FromInstance(_playerOne).AsCached();
        Container.BindSignal <PrepareSignal>().To <PlayerFacade>(x => x.OnPrepare).FromInstance(_playerOne).AsCached();

        Container.BindSignal <PlayerOneWinSignal>().To <PlayerFacade>(x => x.OnDefeat).FromInstance(_playerTwo).AsCached();
        Container.BindSignal <PlayerTwoWinSignal>().To <PlayerFacade>(x => x.OnVictory).FromInstance(_playerTwo).AsCached();
        Container.BindSignal <PlayerTwoRecoverSignal>().To <PlayerFacade>(x => x.OnRecover).FromInstance(_playerTwo).AsCached();
        Container.BindSignal <PrepareSignal>().To <PlayerFacade>(x => x.OnPrepare).FromInstance(_playerTwo).AsCached();

        Container.BindSignal <PlayerOneWinSignal>().To <GameController>(x => x.OnPlayerOneWin).AsSingle();
        Container.BindSignal <PlayerTwoWinSignal>().To <GameController>(x => x.OnPlayerTwoWin).AsSingle();
    }