mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 01:35:42 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cafd3b80cd |
+13
-8
@@ -63,14 +63,19 @@ namespace eagle {
|
||||
: -(int)Math.Ceiling(NetFood * TradeCommand.FoodSellPrice);
|
||||
private int GoldAmount => TradeCommand.GoldAvailable + NetGold;
|
||||
|
||||
public override SelectedCommand Command => new() {
|
||||
TradeCommand =
|
||||
new TradeSelectedCommand {
|
||||
Amount = Math.Abs(FoodAmount - TradeCommand.FoodAvailable),
|
||||
TradeType = IsBuy ? TradeSelectedCommand.Types.TradeType.BuyFood
|
||||
: TradeSelectedCommand.Types.TradeType.SellFood
|
||||
}
|
||||
};
|
||||
public override SelectedCommand Command {
|
||||
get {
|
||||
var command = new SelectedCommand {
|
||||
TradeCommand =
|
||||
new() {
|
||||
Amount = Math.Abs(FoodAmount - TradeCommand.FoodAvailable),
|
||||
TradeType = IsBuy ? TradeSelectedCommand.Types.TradeType.BuyFood
|
||||
: TradeSelectedCommand.Types.TradeType.SellFood
|
||||
}
|
||||
};
|
||||
return command;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTextFields() {
|
||||
goldText.text = GoldAmount.ToString();
|
||||
|
||||
Reference in New Issue
Block a user