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