public PayMoneyForUpgradeBuildingReason(Building building, BuildingGrade sourceGrade, BuildingGrade targetGrade, long amount, WithAssetObject target) : base(amount, target) { Building = building; SourceGrade = sourceGrade; TargetGrade = targetGrade; }
protected PayMoneyReason(long amount, [NotNull] WithAssetObject target) { if (amount <= 0) { throw new ArgumentOutOfRangeException(nameof(amount)); } Amount = amount; Target = target ?? throw new ArgumentNullException(nameof(target)); }
/// <summary> /// 由Area调用,开始建造这个建筑 /// </summary> /// <param name="position"></param> /// <param name="player"></param> public virtual void Build(Area position, WithAssetObject player) { Position = position; Grade = Type.EntryGrade; State = BuildingState.Building; Bank.Current.ReceivePayReason(new PayMoneyForBuildBuildingReason(this, Type.EntryGrade.StartUpgradeCost, Owner)); //player.RequestPay(player, // Type.EntryGrade.StartUpgradeCost, // new PayMoneyForBuildBuildingReason(this)); UpgradeTo = Type.EntryGrade; UpgradeProcess = 0; //Todo:完善这个 }
public override void RequestPay(WithAssetObject source, PayMoneyReason reason) { }
public PayMoneyForMaintainBuildingReason(Building building, long amount, WithAssetObject target) : base(amount, target) { Building = building; }
public PayMoneyForBuildBuildingReason([NotNull] Building building, long amount, WithAssetObject target) : base(amount, target) { Building = building ?? throw new ArgumentNullException(nameof(building)); }
public void GiveTo(WithAssetObject newOwner) { newOwner.ReceivePayReason(new PayMoneyForGiveMoneyAsset(this, Owner)); Owner = newOwner; }
public void GiveTo(WithAssetObject newOwner) { Owner = newOwner; }
public void GiveTo(WithAssetObject newOwner) { Owner = newOwner ?? throw new ArgumentNullException(nameof(newOwner)); }
public PayMoneyForCrossReason(Area area, long amount, WithAssetObject target) : base(amount, target) { Area = area; }
public override void ReceiveTransfer(WithAssetObject source, decimal amount, PayMoneyReason reason) { throw new NotImplementedException( ); }
public override void RequestAsset(WithAssetObject source, IAsset asset, PayMoneyReason reason) { throw new NotImplementedException( ); }
public AssetOwnerDefineDomain(WithAssetObject owner) { Owner = owner; }
public void GiveTo(WithAssetObject newOwner) { throw new NotImplementedException( ); }
public override void RequestAsset(WithAssetObject source, IAsset asset, PayMoneyReason reason) { }
public override void ReceiveCheck(WithAssetObject source, decimal amount, PayMoneyReason reason) { }
public PayMoneyForBuyStockReason([NotNull] Stock stock, int number, long amount, WithAssetObject target) : base(amount, target) { Stock = stock ?? throw new ArgumentNullException(nameof(stock)); Number = number; }
public AuctionRequest(long startPrice, WithAssetObject beneficiary, IAsset asset) { Beneficiary = beneficiary; Asset = asset; StartPrice = startPrice; }
public PayMoneyForGiveMoneyAsset(MoneyAsset asset, WithAssetObject target) : base(asset.Amount, target) { Asset = asset; }
public PayMoneyForStockDelegateReason([NotNull] StockDelegate stockDelegate, long amount, WithAssetObject target) : base(amount, target) { StockDelegate = stockDelegate ?? throw new ArgumentNullException(nameof(stockDelegate)); }
/// <summary> /// 被用于希望买东西 /// </summary> /// <param name="partyA"></param> /// <param name="partyB"></param> /// <param name="partyBProvide"></param> public AssetTransactionAgreement(WithAssetObject partyA, WithAssetObject partyB, IAsset partyBProvide) { PartyA = partyA; PartyB = partyB; PartyBProvide = partyBProvide; }