コード例 #1
0
 private void RefreshPrices()
 {
     for (int i = 0; i < GameResourcesStorage.resourceCount; ++i)
     {
         prices[i] = initialMarketStorage.getResourceAmount((GameResourceType)i) * initialPrices[i] / marketStorage.getResourceAmount((GameResourceType)i);
     }
 }
コード例 #2
0
    public void UpdateResources(GameResourcesStorage storage)
    {
        for (int i = 0; i < GameResourcesStorage.resourceCount; ++i)
        {
            float resourceAmount = storage.getResourceAmount((GameResourceType)i);

            resourceCountTexts[i].text = ValueToText(resourceAmount);
        }
    }