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 CityPossessionResponder(CivilizationSignals civSignals,
                                       IPossessionRelationship <ICivilization, IUnit> unitPossessionCanon
                                       )
        {
            UnitPossessionCanon = unitPossessionCanon;

            civSignals.CivGainedCity.Subscribe(OnCityOwnershipChanged);
        }
Beispiel #3
0
 public ResourceTransferCanon(
     IResourceExtractionLogic extractionLogic, IResourceLockingCanon lockingCanon,
     CivilizationSignals civSignals
     )
 {
     ExtractionLogic = extractionLogic;
     LockingCanon    = lockingCanon;
     CivSignals      = civSignals;
 }
 public FreeBuildingsCanon(
     IFreeBuildingApplier freeBuildingApplier, CivilizationSignals civSignals,
     IPossessionRelationship <ICivilization, ICity> cityPossessionCanon
     )
 {
     FreeBuildingApplier = freeBuildingApplier;
     CivSignals          = civSignals;
     CityPossessionCanon = cityPossessionCanon;
 }
        public GreatPersonCanon(
            ICivilizationConfig civConfig, IUnitConfig unitConfig,
            CivilizationSignals civSignals
            )
        {
            CivConfig  = civConfig;
            UnitConfig = unitConfig;

            civSignals.GreatPersonBorn.Subscribe(OnGreatPersonBorn);
        }
 public FreeGoldenAgeResponder(
     IGoldenAgeCanon goldenAgeCanon, CivilizationSignals civSignals, CitySignals citySignals,
     IPossessionRelationship <ICivilization, ICity> cityPossessionCanon
     )
 {
     GoldenAgeCanon      = goldenAgeCanon;
     CivSignals          = civSignals;
     CitySignals         = citySignals;
     CityPossessionCanon = cityPossessionCanon;
 }
Beispiel #7
0
        public CapitalCitySynchronizer(
            ICapitalCityCanon capitalCityCanon, CivilizationSignals civSignals,
            IPossessionRelationship <ICivilization, ICity> cityPossessionCanon
            )
        {
            CapitalCityCanon    = capitalCityCanon;
            CivSignals          = civSignals;
            CityPossessionCanon = cityPossessionCanon;

            SetCapitalUpdating(true);
        }
Beispiel #8
0
        public UnitPossessionCanon(
            IResourceLockingCanon resourceLockingCanon, CivilizationSignals civSignals,
            UnitSignals unitSignals
            )
        {
            ResourceLockingCanon = resourceLockingCanon;
            CivSignals           = civSignals;
            UnitSignals          = unitSignals;

            civSignals.CivBeingDestroyed.Subscribe(OnCivilizationBeingDestroyed);
        }
        public CivilizationFactory(
            DiContainer container, CivilizationSignals signals, ITechCanon techCanon,
            [InjectOptional(Id = "Civ Container")] Transform civContainer
            )
        {
            Container    = container;
            Signals      = signals;
            TechCanon    = techCanon;
            CivContainer = civContainer;

            signals.CivBeingDestroyed.Subscribe(OnCivilizationBeingDestroyed);
        }
        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 GoldenAgeCanon(
            IPossessionRelationship <ICivilization, ICity> cityPossessionCanon,
            ICivilizationConfig civConfig, CivilizationSignals civSignals,
            ICivModifiers civModifiers
            )
        {
            CityPossessionCanon = cityPossessionCanon;
            CivConfig           = civConfig;
            CivSignals          = civSignals;
            CivModifiers        = civModifiers;

            CivSignals.CivBeingDestroyed.Subscribe(civ => ClearCiv(civ));
        }
        public void InjectDependencies(
            ICivilizationYieldLogic yieldLogic, ITechCanon techCanon,
            CivilizationSignals signals, IGreatPersonCanon greatPersonCanon,
            IGreatPersonFactory greatPersonFactory, IGoldenAgeCanon goldenAgeCanon,
            ICivilizationHappinessLogic civHappinessLogic
            )
        {
            YieldLogic         = yieldLogic;
            TechCanon          = techCanon;
            Signals            = signals;
            GreatPersonCanon   = greatPersonCanon;
            GreatPersonFactory = greatPersonFactory;
            GoldenAgeCanon     = goldenAgeCanon;
            CivHappinessLogic  = civHappinessLogic;

            TechQueue = new Queue <ITechDefinition>();
        }
        public CivDefeatExecutor(
            ICivilizationConfig civConfig, ICanBuildCityLogic canBuildCityLogic,
            IPossessionRelationship <ICivilization, ICity> cityPossessionCanon,
            IPossessionRelationship <ICivilization, IUnit> unitPossessionCanon,
            CivilizationSignals civSignals
            )
        {
            CivConfig           = civConfig;
            CanBuildCityLogic   = canBuildCityLogic;
            CityPossessionCanon = cityPossessionCanon;
            UnitPossessionCanon = unitPossessionCanon;
            CivSignals          = civSignals;

            CivSignals.CivLostUnit.Subscribe(OnLostUnit);
            CivSignals.CivLostCity.Subscribe(OnLostCity);

            CivSignals.NewCivilizationCreated.Subscribe(OnNewCivCreated);
        }
Beispiel #14
0
 public CivDiscoveryCanon(CivilizationSignals civSignals)
 {
     civSignals.CivBeingDestroyed.Subscribe(OnCivBeingDestroyed);
 }