private void RefreshPrices() { for (int i = 0; i < GameResourcesStorage.resourceCount; ++i) { prices[i] = initialMarketStorage.getResourceAmount((GameResourceType)i) * initialPrices[i] / marketStorage.getResourceAmount((GameResourceType)i); } }
public void UpdateResources(GameResourcesStorage storage) { for (int i = 0; i < GameResourcesStorage.resourceCount; ++i) { float resourceAmount = storage.getResourceAmount((GameResourceType)i); resourceCountTexts[i].text = ValueToText(resourceAmount); } }