Beispiel #1
0
        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 CellYieldLogic(
            IPossessionRelationship <IHexCell, IResourceNode> nodePositionCanon,
            IImprovementLocationCanon improvementLocationCanon,
            IPossessionRelationship <ICity, IHexCell> cellPossessionCanon,
            IPossessionRelationship <ICity, IBuilding> buildingPossessionCanon,
            ITechCanon techCanon,
            IFreshWaterLogic freshWaterCanon,
            IGoldenAgeCanon goldenAgeCanon,
            ICivilizationConfig civConfig,

            IInherentCellYieldLogic inherentYieldLogic,
            IResourceNodeYieldLogic nodeYieldLogic,
            IImprovementYieldLogic improvementYieldLogic,
            ICellYieldFromBuildingsLogic buildingYieldLogic
            )
        {
            NodePositionCanon        = nodePositionCanon;
            ImprovementLocationCanon = improvementLocationCanon;
            CellPossessionCanon      = cellPossessionCanon;
            BuildingPossessionCanon  = buildingPossessionCanon;
            TechCanon       = techCanon;
            FreshWaterCanon = freshWaterCanon;
            GoldenAgeCanon  = goldenAgeCanon;
            CivConfig       = civConfig;

            InherentYieldLogic    = inherentYieldLogic;
            NodeYieldLogic        = nodeYieldLogic;
            ImprovementYieldLogic = improvementYieldLogic;
            BuildingYieldLogic    = buildingYieldLogic;
        }
 public EncampmentLocationCanon(
     IImprovementLocationCanon improvementLocationCanon, HexCellSignals cellSignals
     )
 {
     ImprovementLocationCanon = improvementLocationCanon;
     CellSignals = cellSignals;
 }
 public CellAlphamapLogic(
     IMapRenderConfig renderConfig, IImprovementLocationCanon improvementLocationCanon
     )
 {
     RenderConfig             = renderConfig;
     ImprovementLocationCanon = improvementLocationCanon;
 }
Beispiel #5
0
 public BakedElementsLogic(
     IRiverCanon riverCanon, IImprovementLocationCanon improvementLocationCanon,
     ICivilizationTerritoryLogic civTerritoryLogic
     )
 {
     RiverCanon = riverCanon;
     ImprovementLocationCanon = improvementLocationCanon;
     CivTerritoryLogic        = civTerritoryLogic;
 }
 public ImprovementConstructionExecuter(
     IUnitPositionCanon unitPositionCanon, IImprovementLocationCanon improvementLocationCanon,
     IImprovementWorkLogic improvementWorkLogic
     )
 {
     UnitPositionCanon        = unitPositionCanon;
     ImprovementLocationCanon = improvementLocationCanon;
     ImprovementWorkLogic     = improvementWorkLogic;
 }
 public ImprovementComposer(
     IImprovementFactory improvementFactory, IImprovementLocationCanon improvementLocationCanon, IHexGrid grid,
     [Inject(Id = "Available Improvement Templates")] IEnumerable <IImprovementTemplate> availableImprovementTemplates
     )
 {
     ImprovementFactory       = improvementFactory;
     ImprovementLocationCanon = improvementLocationCanon;
     Grid = grid;
     AvailableImprovementTemplates = availableImprovementTemplates;
 }
Beispiel #8
0
 public ImprovementInfluenceSource(
     IImprovementLocationCanon improvementLocationCanon, IHexGrid grid,
     ICivilizationTerritoryLogic civTerritoryLogic, IAIConfig aiConfig,
     IPossessionRelationship <IHexCell, IResourceNode> nodeLocationCanon
     )
 {
     ImprovementLocationCanon = improvementLocationCanon;
     Grid = grid;
     CivTerritoryLogic = civTerritoryLogic;
     AIConfig          = aiConfig;
     NodeLocationCanon = nodeLocationCanon;
 }
 public PillageAbilityHandler(
     IUnitPositionCanon unitPositionCanon, IImprovementLocationCanon improvementLocationCanon,
     ICivilizationTerritoryLogic civTerritoryLogic, IWarCanon warCanon,
     IPossessionRelationship <ICivilization, IUnit> unitPossessionCanon
     )
 {
     UnitPositionCanon        = unitPositionCanon;
     ImprovementLocationCanon = improvementLocationCanon;
     CivTerritoryLogic        = civTerritoryLogic;
     WarCanon            = warCanon;
     UnitPossessionCanon = unitPossessionCanon;
 }
 public void InjectDependencies(
     IImprovementValidityLogic improvementValidityLogic,
     IImprovementLocationCanon improvementLocationCanon,
     IImprovementFactory improvementFactory, HexCellSignals cellSignals,
     [Inject(Id = "Available Improvement Templates")] IEnumerable <IImprovementTemplate> availableImprovementTemplates
     )
 {
     ImprovementValidityLogic = improvementValidityLogic;
     ImprovementLocationCanon = improvementLocationCanon;
     ImprovementFactory       = improvementFactory;
     CellSignals = cellSignals;
     AvailableImprovementTemplates = availableImprovementTemplates;
 }
Beispiel #11
0
 public BuildImprovementAbilityHandler(
     IImprovementValidityLogic validityLogic, IUnitPositionCanon unitPositionCanon,
     [Inject(Id = "Available Improvement Templates")] IEnumerable <IImprovementTemplate> availableTemplates,
     IImprovementFactory improvementFactory, IImprovementLocationCanon improvementLocationCanon,
     IImprovementWorkLogic improvementWorkLogic
     )
 {
     ValidityLogic            = validityLogic;
     UnitPositionCanon        = unitPositionCanon;
     AvailableTemplates       = availableTemplates;
     ImprovementFactory       = improvementFactory;
     ImprovementLocationCanon = improvementLocationCanon;
     ImprovementWorkLogic     = improvementWorkLogic;
 }
Beispiel #12
0
        public ImprovementFactory(DiContainer container,
                                  IImprovementLocationCanon improvementLocationCanon,
                                  ICellModificationLogic cellModificationLogic,
                                  [Inject(Id = "Improvement Prefab")] GameObject improvementPrefab,
                                  ImprovementSignals signals
                                  )
        {
            Container = container;
            ImprovementLocationCanon = improvementLocationCanon;
            CellModificationLogic    = cellModificationLogic;
            ImprovementPrefab        = improvementPrefab;

            signals.BeingDestroyed.Subscribe(OnImprovementBeingDestroyed);
        }
Beispiel #13
0
 public ImprovementDamageExecuter(
     IImprovementLocationCanon improvementLocationCanon, IHexGrid grid,
     IPossessionRelationship <ICivilization, IUnit> unitPossessionCanon,
     ICivilizationTerritoryLogic civTerritoryLogic, IWarCanon warCanon,
     IUnitPositionCanon unitPositionCanon
     )
 {
     ImprovementLocationCanon = improvementLocationCanon;
     Grid = grid;
     UnitPossessionCanon = unitPossessionCanon;
     CivTerritoryLogic   = civTerritoryLogic;
     WarCanon            = warCanon;
     UnitPositionCanon   = unitPositionCanon;
 }
Beispiel #14
0
 public ResourceExtractionLogic(
     IPossessionRelationship <ICivilization, ICity> cityPossessionCanon,
     IPossessionRelationship <ICity, IHexCell> cellPossessionCanon,
     IPossessionRelationship <IHexCell, IResourceNode> nodePositionCanon,
     IImprovementLocationCanon improvementLocationCanon,
     ITechCanon techCanon
     )
 {
     CityPossessionCanon      = cityPossessionCanon;
     CellPossessionCanon      = cellPossessionCanon;
     NodePositionCanon        = nodePositionCanon;
     ImprovementLocationCanon = improvementLocationCanon;
     TechCanon = techCanon;
 }
Beispiel #15
0
 public FarmTriangulator(
     IHexGrid grid, IImprovementLocationCanon improvementLocationCanon, INoiseGenerator noiseGenerator,
     IMapRenderConfig renderConfig, IGeometry2D geometry2D, ICellEdgeContourCanon cellContourCanon,
     IRiverCanon riverCanon, MapRenderingSignals mapRenderingSignals
     )
 {
     Grid = grid;
     ImprovementLocationCanon = improvementLocationCanon;
     NoiseGenerator           = noiseGenerator;
     RenderConfig             = renderConfig;
     Geometry2D          = geometry2D;
     CellContourCanon    = cellContourCanon;
     RiverCanon          = riverCanon;
     MapRenderingSignals = mapRenderingSignals;
 }
 public CombatInfoLogic(
     IUnitConfig config, IRiverCanon riverCanon,
     IImprovementLocationCanon improvementLocationCanon,
     IPossessionRelationship <ICivilization, IUnit> unitPossessionCanon,
     ICivilizationHappinessLogic civilizationHappinessLogic,
     ICivilizationConfig civConfig, IUnitFortificationLogic fortificationLogic,
     ICombatAuraLogic combatAuraLogic, ICityCombatModifierLogic cityCombatModifierLogic
     )
 {
     UnitConfig = config;
     RiverCanon = riverCanon;
     ImprovementLocationCanon   = improvementLocationCanon;
     UnitPossessionCanon        = unitPossessionCanon;
     CivilizationHappinessLogic = civilizationHappinessLogic;
     CivConfig               = civConfig;
     FortificationLogic      = fortificationLogic;
     CombatAuraLogic         = combatAuraLogic;
     CityCombatModifierLogic = cityCombatModifierLogic;
 }
Beispiel #17
0
 public void InjectDependencies(
     IHexCellSignalLogic signalLogic,
     IYieldGenerationLogic generationLogic,
     IPossessionRelationship <ICity, IHexCell> cellPossessionCanon,
     IPossessionRelationship <IHexCell, IResourceNode> resourceNodePositionCanon,
     IImprovementLocationCanon improvementLocationCanon,
     ICellYieldLogic cellResourceLogic,
     IGameCore gameCore,
     IVisibilityCanon visibilityCanon,
     IExplorationCanon explorationCanon,
     IEncampmentLocationCanon encampmentLocationCanon
     )
 {
     SignalLogic               = signalLogic;
     GenerationLogic           = generationLogic;
     CellPossessionCanon       = cellPossessionCanon;
     ResourceNodePositionCanon = resourceNodePositionCanon;
     ImprovementLocationCanon  = improvementLocationCanon;
     CellYieldLogic            = cellResourceLogic;
     GameCore                = gameCore;
     VisibilityCanon         = visibilityCanon;
     ExplorationCanon        = explorationCanon;
     EncampmentLocationCanon = encampmentLocationCanon;
 }