コード例 #1
0
 private void AddProfitUpgradeLevel(int id, int count)
 {
     if (ProfitUpgradeLevels.ContainsKey(id))
     {
         ProfitUpgradeLevels[id] += count;
     }
     else
     {
         ProfitUpgradeLevels.Add(id, count);
     }
 }
コード例 #2
0
 private int GetProfitUpgradeLevel(int id)
 => ProfitUpgradeLevels.ContainsKey(id) ? ProfitUpgradeLevels[id] : 0;