示例#1
0
    public void RemoveContract()
    {
        List <Contract> contracts = trader.GetContracts();

        contracts.Remove(contract);
        trader.SetContracts(contracts);

        GameObject.Find("TraderInfo").GetComponent <TraderUI>().DisplayContract();
    }
示例#2
0
    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);
    }