12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System.Collections.Generic;
- namespace Core.BattleReport
- {
- /// <summary>
- /// 战斗value数据模块
- /// </summary>
- public class BattleReportValueDataModule
- {
- public string name;
- public Dictionary<string, ReportFightValueData<long>> fightValueData_long =
- new Dictionary<string, ReportFightValueData<long>>();
- public void SetMax(string name, long value)
- {
- if (!fightValueData_long.ContainsKey(name))
- {
- fightValueData_long.Add(name, new ReportFightValueData<long>()
- {
- name = name,
- value = 0,
- maxValue = value
- });
- }
- else
- {
- fightValueData_long[name].maxValue = value;
- }
- }
- public void Add(string name, long value)
- {
- if (!fightValueData_long.ContainsKey(name))
- {
- fightValueData_long.Add(name, new ReportFightValueData<long>()
- {
- name = name,
- value = value,
- maxValue = value
- });
- }
- else
- {
- fightValueData_long[name].value = value;
- }
- }
- }
- }
|