public TerrainRefreshResponder( IHexGrid grid, IPossessionRelationship <ICity, IHexCell> cellPossessionCanon, CitySignals citySignals, CivilizationSignals civSignals, HexCellSignals cellSignals, ImprovementSignals improvementSignals, ResourceSignals resourceSignals ) { Grid = grid; CellPossessionCanon = cellPossessionCanon; citySignals.LostCellFromBoundaries.Subscribe(OnCellPossessionChanged); citySignals.GainedCellToBoundaries.Subscribe(OnCellPossessionChanged); citySignals.CityAddedToLocation.Subscribe(OnCityChangedLocation); citySignals.CityRemovedFromLocation.Subscribe(OnCityChangedLocation); civSignals.CivGainedCity.Subscribe(OnCityPossessionChanged); civSignals.CivLostCity.Subscribe(OnCityPossessionChanged); cellSignals.TerrainChanged.Subscribe(OnCellTerrainChanged); cellSignals.ShapeChanged.Subscribe(OnCellShapeChanged); cellSignals.VegetationChanged.Subscribe(OnCellVegetationChanged); cellSignals.FeatureChanged.Subscribe(OnCellFeatureChanged); cellSignals.RoadStatusChanged.Subscribe(OnCellRoadStatusChanged); cellSignals.GainedRiveredEdge.Subscribe(OnCellRiverChanged); cellSignals.LostRiveredEdge.Subscribe(OnCellRiverChanged); cellSignals.GainedEncampment.Subscribe(OnCellEncampmentChanged); cellSignals.LostEncampment.Subscribe(OnCellEncampmentChanged); improvementSignals.AddedToLocation.Subscribe(OnCellImprovementsChanged); improvementSignals.RemovedFromLocation.Subscribe(OnCellImprovementsChanged); resourceSignals.NodeAddedToLocation.Subscribe(OnCellNodesChanged); resourceSignals.NodeRemovedFromLocation.Subscribe(OnCellNodesChanged); }
public void InjectDependencies( List <UnitDisplayBase> displaysToManage, UIStateMachineBrain brain, ICombatExecuter combatExecuter, IUnitAttackOrderLogic attackOrderLogic, IUnitPositionCanon unitPositionCanon, IHexPathfinder hexPathfinder, ICellPathDrawer pathDrawer, CitySignals citySignals, UnitSignals unitSignals, HexCellSignals cellSignals, IHexCellOverlayManager overlayManager, [Inject(Id = "Combat Summary Display")] CombatSummaryDisplay combatSummaryDisplay, IPossessionRelationship <IHexCell, ICity> cityLocationCanon ) { DisplaysToManage = displaysToManage; Brain = brain; CombatExecuter = combatExecuter; AttackOrderLogic = attackOrderLogic; UnitPositionCanon = unitPositionCanon; HexPathfinder = hexPathfinder; PathDrawer = pathDrawer; CitySignals = citySignals; UnitSignals = unitSignals; CellSignals = cellSignals; OverlayManager = overlayManager; CombatSummaryDisplay = combatSummaryDisplay; CityLocationCanon = cityLocationCanon; }
public void InjectDependencies( IYieldGenerationLogic resourceGenerationLogic, CitySignals citySignals ) { YieldGenerationLogic = resourceGenerationLogic; CitySignals = citySignals; }
public void InjectDependencies( IUnemploymentLogic unemploymentLogic, CitySignals citySignals ) { UnemploymentLogic = unemploymentLogic; CitySignals = citySignals; }
public ResourceTransferCanonSynchronizer( IResourceTransferCanon resourceTransferCanon, IImprovementLocationCanon improvementLocationCanon, IPossessionRelationship <IHexCell, IResourceNode> resourceNodeLocationCanon, ICivilizationTerritoryLogic civTerritoryLogic, IPossessionRelationship <ICity, IHexCell> cityTerritoryCanon, IPossessionRelationship <ICivilization, ICity> cityPossessionCanon, ImprovementSignals improvementSignals, ResourceSignals resourceSignals, CitySignals citySignals, CivilizationSignals civSignals ) { ResourceTransferCanon = resourceTransferCanon; ImprovementLocationCanon = improvementLocationCanon; ResourceNodeLocationCanon = resourceNodeLocationCanon; CivTerritoryLogic = civTerritoryLogic; CityTerritoryCanon = cityTerritoryCanon; CityPossessionCanon = cityPossessionCanon; improvementSignals.RemovedFromLocation.Subscribe(OnImprovementRemovedFromLocation); improvementSignals.Pillaged.Subscribe(OnImprovementPillaged); resourceSignals.NodeRemovedFromLocation.Subscribe(OnResourceNodeRemovedFromLocation); citySignals.LostCellFromBoundaries.Subscribe(OnCityLostCellFromBoundaries); civSignals.CivLosingCity.Subscribe(OnCivLosingCity); }
public void CommonInstall() { MockGrowthLogic = new Mock <IPopulationGrowthLogic>(); MockProductionLogic = new Mock <IProductionLogic>(); MockYieldGenerationLogic = new Mock <IYieldGenerationLogic>(); MockExpansionLogic = new Mock <IBorderExpansionLogic>(); MockCellPossessionCanon = new Mock <IPossessionRelationship <ICity, IHexCell> >(); MockDistributionLogic = new Mock <IWorkerDistributionLogic>(); MockProductionResolver = new Mock <ICityProductionResolver>(); MockCityConfig = new Mock <ICityConfig>(); CitySignals = new CitySignals(); Container.Bind <IPopulationGrowthLogic> ().FromInstance(MockGrowthLogic.Object); Container.Bind <IProductionLogic> ().FromInstance(MockProductionLogic.Object); Container.Bind <IYieldGenerationLogic> ().FromInstance(MockYieldGenerationLogic.Object); Container.Bind <IBorderExpansionLogic> ().FromInstance(MockExpansionLogic.Object); Container.Bind <IPossessionRelationship <ICity, IHexCell> > ().FromInstance(MockCellPossessionCanon.Object); Container.Bind <IWorkerDistributionLogic> ().FromInstance(MockDistributionLogic.Object); Container.Bind <ICityProductionResolver> ().FromInstance(MockProductionResolver.Object); Container.Bind <ICityConfig> ().FromInstance(MockCityConfig.Object); Container.Bind <CitySignals> ().FromInstance(CitySignals); Container.Bind <ISubject <ICity> >().WithId("City Clicked Subject").FromInstance(new Subject <ICity>()); Container.Bind <City>().FromNewComponentOnNewGameObject().AsSingle(); }
public FreeBuildingsResponder( CitySignals citySignals, IBuildingFactory buildingFactory, IBuildingProductionValidityLogic buildingValidityLogic ) { CitySignals = citySignals; BuildingFactory = buildingFactory; BuildingValidityLogic = buildingValidityLogic; }
public FreeGreatPeopleCanon( CivilizationSignals civSignals, CitySignals citySignals, IPossessionRelationship <ICivilization, ICity> cityPossessionCanon ) { CivSignals = civSignals; CitySignals = citySignals; CityPossessionCanon = cityPossessionCanon; }
public void InjectDependencies( IPopulationGrowthLogic growthLogic, IYieldGenerationLogic generationLogic, CitySignals citySignals ) { GrowthLogic = growthLogic; GenerationLogic = generationLogic; CitySignals = citySignals; }
public void InjectDependencies( IPossessionRelationship <ICity, IBuilding> possessionCanon, BuildingDisplayFactory displayFactory, CitySignals citySignals ) { PossessionCanon = possessionCanon; DisplayFactory = displayFactory; CitySignals = citySignals; }
public VisibilityResponder( IPossessionRelationship <ICivilization, IUnit> unitPossessionCanon, IPossessionRelationship <ICivilization, ICity> cityPossessionCanon, IVisibilityCanon visibilityCanon, IExplorationCanon explorationCanon, ICityLineOfSightLogic cityLineOfSightLogic, IUnitVisibilityLogic unitLineOfSightLogic, IUnitFactory unitFactory, ICityFactory cityFactory, IHexGrid grid, [Inject(Id = "Coroutine Invoker")] MonoBehaviour coroutineInvoker, IHexCellShaderData hexCellShaderData, UnitSignals unitSignals, CitySignals citySignals, HexCellSignals cellSignals, CivilizationSignals civSignals, VisibilitySignals visibilitySignals, CoreSignals coreSignals, MapRenderingSignals mapRenderingSignals ) { UnitPossessionCanon = unitPossessionCanon; CityPossessionCanon = cityPossessionCanon; VisibilityCanon = visibilityCanon; ExplorationCanon = explorationCanon; CityLineOfSightLogic = cityLineOfSightLogic; UnitLineOfSightLogic = unitLineOfSightLogic; UnitFactory = unitFactory; CityFactory = cityFactory; Grid = grid; CoroutineInvoker = coroutineInvoker; HexCellShaderData = hexCellShaderData; unitSignals.LeftLocation.Subscribe(OnUnitLeftLocation); unitSignals.EnteredLocation.Subscribe(OnUnitEnteredLocation); citySignals.LostCellFromBoundaries.Subscribe(OnCityLostCell); citySignals.GainedCellToBoundaries.Subscribe(OnCityGainedCell); cellSignals.TerrainChanged.Subscribe(data => TryResetCellVisibility()); cellSignals.ShapeChanged.Subscribe(data => TryResetCellVisibility()); cellSignals.VegetationChanged.Subscribe(data => TryResetCellVisibility()); civSignals.CivLosingCity.Subscribe(OnCivLosingCity); civSignals.CivGainedCity.Subscribe(OnCivGainedCity); civSignals.CivDiscoveredTech.Subscribe(data => TryResetResourceVisibility()); civSignals.CivUndiscoveredTech.Subscribe(data => TryResetResourceVisibility()); visibilitySignals.CellVisibilityModeChanged.Subscribe(unit => TryResetCellVisibility()); visibilitySignals.CellExplorationModeChanged.Subscribe(unit => TryResetCellVisibility()); visibilitySignals.ResourceVisibilityModeChanged.Subscribe(unit => TryResetResourceVisibility()); coreSignals.ActivePlayerChanged.Subscribe(OnActivePlayerChanged); mapRenderingSignals.MapFinishedLoading.Subscribe(Unit => TryResetCellVisibility()); mapRenderingSignals.MapFinishedLoading.Subscribe(Unit => TryResetResourceVisibility()); }
public FreeGoldenAgeResponder( IGoldenAgeCanon goldenAgeCanon, CivilizationSignals civSignals, CitySignals citySignals, IPossessionRelationship <ICivilization, ICity> cityPossessionCanon ) { GoldenAgeCanon = goldenAgeCanon; CivSignals = civSignals; CitySignals = citySignals; CityPossessionCanon = cityPossessionCanon; }
public BuildingFactory( IPossessionRelationship <ICity, IBuilding> possessionCanon, IWorkerSlotFactory workerSlotFactory, CitySignals citySignals ) { PossessionCanon = possessionCanon; WorkerSlotFactory = workerSlotFactory; citySignals.BeingDestroyed.Subscribe(OnCityBeingDestroyed); }
public BuildingPossessionCanon( CitySignals citySignals, IResourceLockingCanon resourceLockingCanon, IPossessionRelationship <ICivilization, ICity> cityPossessionCanon, ITechCanon techCanon ) { CitySignals = citySignals; ResourceLockingCanon = resourceLockingCanon; CityPossessionCanon = cityPossessionCanon; TechCanon = techCanon; }
public void InjectDependencies( HexCellSignals cellSignals, CitySignals citySignals, IPossessionRelationship <IHexCell, ICity> cityLocationCanon, IPointOrientationLogic pointOrientationLogic ) { CellSignals = cellSignals; CitySignals = citySignals; CityLocationCanon = cityLocationCanon; PointOrientationLogic = pointOrientationLogic; }
public CellPossessionCanon( CitySignals citySignals, HexCellSignals cellSignals, IPossessionRelationship <IHexCell, ICity> cityLocationCanon ) { CitySignals = citySignals; CityLocationCanon = cityLocationCanon; citySignals.BeingDestroyed.Subscribe(OnCityBeingDestroyed); cellSignals.MapBeingClearedSignal.Subscribe(unit => Clear(false)); }
public void CommonInstall() { CivSignals = new CivilizationSignals(); CitySignals = new CitySignals(); MockCityPossessionCanon = new Mock <IPossessionRelationship <ICivilization, ICity> >(); Container.Bind <CivilizationSignals> ().FromInstance(CivSignals); Container.Bind <CitySignals> ().FromInstance(CitySignals); Container.Bind <IPossessionRelationship <ICivilization, ICity> >().FromInstance(MockCityPossessionCanon.Object); Container.Bind <FreeGreatPeopleCanon>().AsSingle(); }
public void CommonInstall() { MockPossessionCanon = new Mock <IPossessionRelationship <ICity, IBuilding> >(); MockWorkerSlotFactory = new Mock <IWorkerSlotFactory>(); CitySignals = new CitySignals(); Container.Bind <IPossessionRelationship <ICity, IBuilding> >().FromInstance(MockPossessionCanon.Object); Container.Bind <IWorkerSlotFactory> ().FromInstance(MockWorkerSlotFactory.Object); Container.Bind <CitySignals> ().FromInstance(CitySignals); Container.Bind <BuildingFactory>().AsSingle(); }
public CityPossessionCanon( CitySignals citySignals, CivilizationSignals civSignals, IPossessionRelationship <ICity, IHexCell> cellPossessionCanon, HexCellSignals cellSignals ) { CivSignals = civSignals; citySignals.BeingDestroyed.Subscribe(OnCityBeingDestroyed); civSignals.CivBeingDestroyed.Subscribe(OnCivilizationBeingDestroyed); cellSignals.MapBeingClearedSignal.Subscribe(unit => Clear(false)); }
public void InjectDependencies( IPossessionRelationship <ICity, IHexCell> possessionCanon, CitySignals citySignals, HexCellSignals hexCellSignals, DiContainer container, IBorderExpansionLogic borderExpansionLogic, IPossessionRelationship <ICity, IHexCell> cellPossessionCanon ) { PossessionCanon = possessionCanon; CitySignals = citySignals; HexCellSignals = hexCellSignals; Container = container; BorderExpansionLogic = borderExpansionLogic; CellPossessionCanon = cellPossessionCanon; }
public CityProductionResolver( CitySignals citySignals, IPossessionRelationship <ICivilization, ICity> cityPossessionCanon, ICityFactory cityFactory, IBuildingProductionValidityLogic buildingValidityLogic, CoreSignals coreSignals ) { CitySignals = citySignals; CityPossessionCanon = cityPossessionCanon; CityFactory = cityFactory; BuildingValidityLogic = buildingValidityLogic; CitySignals.GainedBuilding.Subscribe(OnCityGainedBuilding); coreSignals.RoundBegan.Subscribe(OnRoundBegan); }
public void CommonInstall() { CitySignals = new CitySignals(); MockResourceLockingCanon = new Mock <IResourceLockingCanon>(); MockCityPossessionCanon = new Mock <IPossessionRelationship <ICivilization, ICity> >(); MockTechCanon = new Mock <ITechCanon>(); Container.Bind <CitySignals> ().FromInstance(CitySignals); Container.Bind <IResourceLockingCanon> ().FromInstance(MockResourceLockingCanon.Object); Container.Bind <IPossessionRelationship <ICivilization, ICity> >().FromInstance(MockCityPossessionCanon.Object); Container.Bind <ITechCanon> ().FromInstance(MockTechCanon.Object); Container.Bind <BuildingPossessionCanon>().AsSingle(); }
public FreeUnitsResponder( CivilizationSignals civSignals, CitySignals citySignals, IUnitFactory unitFactory, IHexGrid grid, IPossessionRelationship <IHexCell, ICity> cityLocationCanon, IPossessionRelationship <ICivilization, ICity> cityPossessionCanon, ICapitalCityCanon capitalCityCanon ) { CivSignals = civSignals; CitySignals = citySignals; UnitFactory = unitFactory; Grid = grid; CityLocationCanon = cityLocationCanon; CityPossessionCanon = cityPossessionCanon; CapitalCityCanon = capitalCityCanon; }
public void InjectDependencies( ICivilizationFactory civilizationFactory, ICityValidityLogic cityValidityLogic, HexCellSignals cellSignals, CitySignals citySignals, ICityFactory cityFactory, IPossessionRelationship <IHexCell, ICity> cityLocationCanon, IPossessionRelationship <ICivilization, ICity> cityPossessionCanon ) { CivilizationFactory = civilizationFactory; CityValidityLogic = cityValidityLogic; CellSignals = cellSignals; CitySignals = citySignals; CityFactory = cityFactory; CityLocationCanon = cityLocationCanon; CityPossessionCanon = cityPossessionCanon; }
public void InjectDependencies(IBuildingProductionValidityLogic buildingValidityLogic, IUnitProductionValidityLogic unitValidityLogic, ITechCanon techCanon, IPossessionRelationship <ICivilization, ICity> cityPossessionCanon, IProductionProjectFactory projectFactory, DiContainer container, List <IBuildingTemplate> allBuildingTemplates, IBuildingFactory buildingFactory, CitySignals citySignals ) { BuildingValidityLogic = buildingValidityLogic; UnitValidityLogic = unitValidityLogic; TechCanon = techCanon; CityPossessionCanon = cityPossessionCanon; ProjectFactory = projectFactory; Container = container; AllBuildingTemplates = allBuildingTemplates; BuildingFactory = buildingFactory; CitySignals = citySignals; }
public CitySummaryManager( CitySummaryDisplay summaryPrefab, ICityFactory cityFactory, DiContainer container, ICityUIConfig cityUIConfig, IGameCamera gameCamera, [Inject(Id = "City Summary Container")] RectTransform citySummaryContainer, CitySignals citySignals, IExplorationCanon explorationCanon, IPossessionRelationship <IHexCell, ICity> cityLocationCanon ) { SummaryPrefab = summaryPrefab; CityFactory = cityFactory; Container = container; CityUIConfig = cityUIConfig; GameCamera = gameCamera; CitySummaryContainer = citySummaryContainer; ExplorationCanon = explorationCanon; CityLocationCanon = cityLocationCanon; citySignals.BeingDestroyed.Subscribe(OnCityBeingDestroyed); }
public void CommonInstall() { AllCities.Clear(); CitySignals = new CitySignals(); MockCityPossessionCanon = new Mock <IPossessionRelationship <ICivilization, ICity> >(); MockCityFactory = new Mock <ICityFactory>(); MockBuildingProductionValidityLogic = new Mock <IBuildingProductionValidityLogic>(); CoreSignals = new CoreSignals(); MockCityFactory.Setup(factory => factory.AllCities).Returns(AllCities.AsReadOnly()); Container.Bind <CitySignals> ().FromInstance(CitySignals); Container.Bind <IPossessionRelationship <ICivilization, ICity> >().FromInstance(MockCityPossessionCanon.Object); Container.Bind <ICityFactory> ().FromInstance(MockCityFactory.Object); Container.Bind <IBuildingProductionValidityLogic> ().FromInstance(MockBuildingProductionValidityLogic.Object); Container.Bind <CoreSignals> ().FromInstance(CoreSignals); Container.Bind <CityProductionResolver>().AsSingle(); }
public void InjectDependencies( UnitSignals unitSignals, HexCellSignals cellSignals, CitySignals citySignals, IUnitPositionCanon unitPositionCanon, ICombatExecuter combatExecuter, UIStateMachineBrain brain, IPossessionRelationship <IHexCell, ICity> cityLocationCanon, [Inject(Id = "Ranged Attack State Displays")] List <UnitDisplayBase> displaysToManage, [Inject(Id = "Combat Summary Display")] CombatSummaryDisplay combatSummaryDisplay, IHexCellOverlayManager overlayManager ) { UnitSignals = unitSignals; CellSignals = cellSignals; CitySignals = citySignals; UnitPositionCanon = unitPositionCanon; CombatExecuter = combatExecuter; Brain = brain; CityLocationCanon = cityLocationCanon; DisplaysToManage = displaysToManage; CombatSummaryDisplay = combatSummaryDisplay; OverlayManager = overlayManager; }
public void CommonInstall() { MockUnitPossessionCanon = new Mock <IPossessionRelationship <ICivilization, IUnit> >(); MockCityLocationCanon = new Mock <IPossessionRelationship <IHexCell, ICity> >(); MockCityFactory = new Mock <ICityFactory>(); MockCityPossessionCanon = new Mock <IPossessionRelationship <ICivilization, ICity> >(); MockUnitPositionCanon = new Mock <IUnitPositionCanon>(); CitySignals = new CitySignals(); MockBuildingPossessionCanon = new Mock <IPossessionRelationship <ICity, IBuilding> >(); MockBuildingFactory = new Mock <IBuildingFactory>(); Container.Bind <IPossessionRelationship <ICivilization, IUnit> >().FromInstance(MockUnitPossessionCanon.Object); Container.Bind <IPossessionRelationship <IHexCell, ICity> > ().FromInstance(MockCityLocationCanon.Object); Container.Bind <ICityFactory> ().FromInstance(MockCityFactory.Object); Container.Bind <IPossessionRelationship <ICivilization, ICity> >().FromInstance(MockCityPossessionCanon.Object); Container.Bind <IUnitPositionCanon> ().FromInstance(MockUnitPositionCanon.Object); Container.Bind <CitySignals> ().FromInstance(CitySignals); Container.Bind <IPossessionRelationship <ICity, IBuilding> > ().FromInstance(MockBuildingPossessionCanon.Object); Container.Bind <IBuildingFactory> ().FromInstance(MockBuildingFactory.Object); Container.Bind <CityConquestResponder>().AsSingle(); }