Beispiel #1
0
 /// <summary>
 /// Updates the dictionary to correspond with the GameResources database
 /// </summary>
 /// <param name="data"></param>
 public void SetResources()
 {
     startingResources = new ResourceAmountDictionary();
     for (int i = 0; i < DataManager.ResourcesData.dataArray.Length; i++)
     {
         startingResources.Add(DataManager.ResourcesData.dataArray[i].Name, 0);
     }
 }
Beispiel #2
0
    public void Init()
    {
        money = startingMoney;

        resources = new ResourceAmountDictionary();
        foreach (KeyValuePair <string, int> pair in startingResources)
        {
            resources.Add(pair.Key, pair.Value);
        }
    }