コード例 #1
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);
        }
    }
コード例 #2
0
 void Start()
 {
     resouces = new GameResourcesStorage();
     people   = new People();
     if (isFirstInColony)
     {
         people.AddPeople(50);
         objects.Add(new InBaseMoxie(this));
         objects.Add(new InBaseVaporator(this));
     }
 }
コード例 #3
0
    void Start()
    {
        // TODO
        // fill with coresponding initial values
        // hardcoded for now

        initialMarketStorage = new GameResourcesStorage(500);
        marketStorage        = new GameResourcesStorage(500);
        for (int i = 0; i < GameResourcesStorage.resourceCount; ++i)
        {
            prices[i]        = 500;
            initialPrices[i] = 500;
        }

        globalStorage = FindObjectOfType <GlobalStorage>();
    }
コード例 #4
0
 private void Start()
 {
     globalStorage = GameObject.Find("GlobalStorage");
     inventory     = new GameResourcesStorage();
 }