예제 #1
0
 public bool AddOne(MoneyType id, long value)
 {
     if (resourceDic.ContainsKey(id))
     {
         bool check = resourceDic[id].Add(value);
         if (check)
         {
             Save();
         }
         return(check);
     }
     else
     {
         Resource resource = new Resource((int)ResourceType.MONEY, (int)id, value);
         resourceDic.Add(id, resource);
         resourceList.AddData(resource);
         Save();
         return(true);
     }
 }