Esempio n. 1
0
    private void TickResources()
    {
        UpdateROC();

        resPool.AddResource(ResourceStockpile.ResourceType.Food, FoodRateOfChange);
        resPool.AddResource(ResourceStockpile.ResourceType.Gasses, GasesRateOfChange);
        resPool.AddResource(ResourceStockpile.ResourceType.Metals, MetalsRateOfChange);

        UIResourceManager.GetInstance().SetAllROCs(GasesRateOfChange, MetalsRateOfChange, FoodRateOfChange);
        UIResourceManager.GetInstance().SetAll(resPool.gasses, resPool.metals, resPool.food);

        currentTime = Time.time;
        StartCoroutine(ResourceTick());
    }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        UIResourceManager UIResMan = UIResourceManager.GetInstance();

        shipMan = GetComponent <ShipManager>();

        resPool.AddResource(0, 100); //TODO: Get these from setup

        UIResMan.SetGasText(100);
        UIResMan.SetFoodText(100);
        UIResMan.SetMetalText(100);

        currentTime = Time.time;
        StartCoroutine(ResourceTick());
    }