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

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

        GameObject.Find("TraderInfo").GetComponent <TraderUI>().DisplayContract();
    }
Example #2
0
    public void DisplayContract()
    {
        simpleMenu.CloseWindow();
        if (trader == null)
        {
            return;
        }
        List <Contract>   contracts  = trader.GetContracts();
        List <GameObject> objectList = new List <GameObject>();

        for (int i = 0; i < contracts.Count; i++)
        {
            GameObject obj = Instantiate(contractTemp, simpleMenu.GetContent());
            obj.GetComponent <ContractUI>().SetContract(trader, contracts[i], i);
            objectList.Add(obj);
        }
        simpleMenu.Display(objectList, "Contracts");
    }
Example #3
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);
    }