public void RemoveContract() { List <Contract> contracts = trader.GetContracts(); contracts.Remove(contract); trader.SetContracts(contracts); GameObject.Find("TraderInfo").GetComponent <TraderUI>().DisplayContract(); }
public void AddContract() { if (trader == null) { return; } if (settlement == null) { return; } if (workshop == null) { return; } List <Contract> contracts = trader.GetContracts(); contracts.Add(new Production(settlement.GetPosition(), settlement as Settlement, trader as Trader, settlement.GetWallet(), workshop as Workshop)); trader.SetContracts(contracts); }
public void AddContract() { if (desire == null) { return; } if (trader == null) { return; } if (settlement == null) { return; } List <Contract> contracts = trader.GetContracts(); contracts.Add(new Trade(trader as Trader, settlement as Settlement, settlement.GetPosition(), desire as Desire, desire.GetPrice())); trader.SetContracts(contracts); }