summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XSecurityHPInfo.cs
blob: 045b8f33ef815472762dc6049b586d1d8d40131c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;

namespace XMainClient
{
	internal class XSecurityHPInfo
	{
		public float _TotalValue;

		public float _MaxValue;

		public float _MinValue;

		public void Reset()
		{
			this._TotalValue = 0f;
			this._MaxValue = 0f;
			this._MinValue = float.MaxValue;
		}

		public void Merge(float value)
		{
			this._TotalValue += value;
			this._MaxValue = Math.Max(this._MaxValue, value);
			this._MinValue = Math.Min(this._MinValue, value);
		}

		public static void SendData(XSecurityHPInfo info, string keywords)
		{
			XStaticSecurityStatistics.Append(string.Format("{0}InitHPMax", keywords), info._MaxValue);
			XStaticSecurityStatistics.Append(string.Format("{0}InitHPMin", keywords), info._MinValue);
			XStaticSecurityStatistics.Append(string.Format("{0}InitHPTotal", keywords), info._TotalValue);
		}
	}
}