Files
vampire-like/Assets/GameMain/Scripts/Runtime/UIBase/Stat/StatRawData.cs
T

27 lines
639 B
C#

using System.Collections.Generic;
using SepCore.Definition;
namespace SepCore.UI
{
public class StatRawData
{
public Dictionary<StatType, float> Values { get; } = new Dictionary<StatType, float>();
public float this[StatType statType]
{
get => GetValue(statType);
set => SetValue(statType, value);
}
public float GetValue(StatType statType)
{
return Values.TryGetValue(statType, out float val) ? val : 0f;
}
public void SetValue(StatType statType, float value)
{
Values[statType] = value;
}
}
}