示例#1
0
文件: Display.cs 项目: dnpi314/LD42
 public void SetObjects(WorldPopulation wp, Finances f, Workforce w, Production p, Research r)
 {
     worldPopulation = wp;
     finances        = f;
     workforce       = w;
     production      = p;
     research        = r;
 }
示例#2
0
文件: Finances.cs 项目: dnpi314/LD42
    public Finances(int f, float dr, float dra, WorldPopulation wp)
    {
        funds                    = f;
        donationRate             = dr;
        donationRateAcceleration = dra;
        worldPopulation          = wp;

        income = (int)(worldPopulation.DisplayPopulation() * donationRate);
    }
示例#3
0
    void Start()
    {
        display = GetComponent <Display> ();

        worldPopulation = new WorldPopulation(1000000, 0.03f, 0.002f, 1500000, 500000);
        finances        = new Finances(1000, 0.3f, 0.03f, worldPopulation);
        workforce       = new Workforce(50, 10, 0, 0, finances, worldPopulation);
        production      = new Production(10, workforce, finances, this);
        research        = new Research(0, 40, 60, 60, 80, workforce, production);

        display.SetObjects(worldPopulation, finances, workforce, production, research);
    }
示例#4
0
    public Workforce(int l, int r, int pc, int dc, Finances f, WorldPopulation wp)
    {
        laborers        = l;
        researchers     = r;
        planningCenters = pc;
        donationCenters = dc;
        finances        = f;
        worldPopulation = wp;

        int expenses = (l * laborerCost) + (r * researcherCost) + (pc * planningCenterCost);

        finances.UpdateExpenses(expenses);
    }